Picking up invisible fence cable with Arduino

I need to detect when my ardiuno is crossing a line in a field of play. I have been using a magnetic strip to do that but I am not pleased with the reliability. I was wondering if it would be more reliable to try and detecdt a radio frequency i.e. similar to a dog collar and an invisible fence.The invisible fence wire would be embedded in ice about 1/4 inch below the surface. The sensor would be about 2 inches about the ice.

Would this work? What would be the best sensor to use? I just need a precise indication that I am crossing the line (within 1cm).

Appreciate any thoughts.

Ian

ijourneaux:
I need to detect when my ardiuno is crossing a line in a field of play. I have been using a magnetic strip to do that but I am not pleased with the reliability.

I just need a precise indication that I am crossing the line (within 1cm).

You were using something like stores use to prevent theft ?

You need it to not alarm when 1+cm from the line and then alarm any closer and when crossed by an Arduino moving how fast ? How far above the line can the Arduino be ?

Is the Arduino in a hockey puck ? :mrgreen:

The Arduino (or Arduino derived device) will be on a curling stone so it will be moving at a maximum speed of about 10fps.

You are correct. No alarm if distance is > 1cm, then alarm when sensor gets to within 1cm of the embedded wire.

You could get that kind of resolution (1cm) w/overhead cameras or perhaps some form of laser scanning but I can’t see it done w/wires and RF. I might envision it being done, perhaps, w/embedded LEDs and detectors depending on how clear the ice is. You could have under-ice LEDs w/downward facing detectors in the stone … or the reverse. The trick would be keeping the light from getting too defocussed while traveling through the ice.

One thing that might make this easier to do. I don’t need to detect immediately when the detector reaches the fence wire. I just need to know that it has detector has cross the line. I was hoping that I could monitor the signal and only alarm when the signal has reached a maximum and starts dropping.

Ian

That might work but I don’t know how far past the wire the stone would have to go in order to reliably detect a drop in RF power given the presence of noise. IOW the no alarm distance is some cm past the wire and that distance would also be a function of stone speed. I’m not sure if the uncertainty would be < 1cm.

Also if the stone approached a wire and then curled away, I don’t know how it would know that’s different from crossing a wire. In both cases it’s a rise and subsequent drop in RF level.

Lastly if 2 wires get close to another or cross, that’s going to be a problem.

RIght now the detector in the stones pick up the presence of a magnetic strip in the ice using a hall type sensor. Reliability is just ok. THe strips themselves are quite expensive. 1in wide by .25in thick with some flexibility

The stones always cross the line close to perpendicular. Speed varies but over a limited range between 3 and 10fpm

The two wires would never cross. We would set it up so that they were several feet apart.

Would another type of sensor work?

The ice is reasonably clear but not sure I can reliably place and LED strip or strip of detectors in the ice cost effectively.

Can you give us a better idea of how this boundary relates to the playing surface or the play of the game ? You say

The stones always cross the line close to perpendicular.

So the stone will either cross or approach and stop ? If it stops w/the visible edge just over 1 cm away from the visible boundary line ... then it shouldn't 'alarm'. If it crosses by even 1mm and stops, it should 'alarm' ? Or will it always cross totally through ? If the stone stops btw 0 and 1 cm away from the visible boundary line, then it may or may not alarm ... that's acceptable ?

In what way does the present system fail ? Does it not detect a crossing or does it false alarm or ?

How long is the total length of all the boundaries and what’s your cost target ?

It always crosses the line going 2-10fpm.

The current system (hall sensor crossing a magnetic strip) producing false positives where is there no magnetic strip. There are several other design deficiencies but they are mainly mechanical (bad battery connector etc)

The other main issue is battery life. Right now I am lucking if the batteries last 3-4 events and I am using 4 CR2477 batteries in series

The current handles cost about $900 each but I would venture a guess that there are <2000 in the world used only at competitive event. If I could get the cost down and make a dramatic improvement in battery life, the potential volume is significantly higher

Can I take it that any device must be in the handle, that the stone itself can’t be altered ? Are you trying to replicate what’s presently done re: hogline violations, but at a lower price point ? If so, do you know how the present system works ?

http://en.wikipedia.org/wiki/Curling#Curling_stone

In competition, an electronic handle known as the eye on the hog may be fitted to detect hog line violations, the game’s most frequent cause of controversy. This electronically detects whether the thrower’s hand is in contact with the handle as it passes the hog line and indicates a violation by lights at the base of the handle. The eye on the hog eliminates human error and the need for hog line officials. It is mandatory in high-level national and international competition but its cost, around US$650 each, currently puts it beyond the reach of most social curling.

In some aspects, if what you’re looking for is a hogline violation, the task becomes easier. The question then is … was the handle let go off before the line was crossed. That’s a different set of requirements than I’d infer from your OP.

Sorry I am so used to dealing with these handles that I forget that not everyone is on the same page and thank you for you continued discussion on the topic. I appreciate the questions and comments.

I do understand exactly how the existing sensor handles work. They are not my design. I just maintain them for our national events. What I would like to do is improve the design to make it more reliable, cost effective and improve the battery life. Since there is a patent involved, at least for the next few years, I can’t sell the new design, but I can incorporate the improvements into our handles

The handles use three sensors

  1. a roller ball switch that detected that the handle has been flipped over for cleaning. This activates the handle immediately prior to it being thrown.

  2. a hall effect sensor to detect a magnetic strip embedded in in the ice at the foul position.

  3. a capacitance sensor to determine if a hand is in contact with the handle

The handle is activated by flipping it over to be cleaned. If a hand is touching the handle as it crosses the foul line then the LEDs on the handle flash red. If the handle is released before it gets to the foul line, the led blink green rapidly. Once it crosses the foul line without a hand in contact, the leds light up solid green.

For some reason, at several facilities, the handles start flashing a foul signal (red led) at random time when there clearly was no foul. The hearsay explanation is that the facility was built on a junk yard and that is interfering with the detection of the magnetic strip. Not impossible but the magnet it strip in the ice is less than 2in away from the magnetic strip that is quite magnetic. I don’t have the magnetic strength right at hand but it is quite strong (1/4in thick by 1in wide with some limited flexibility). This is what drove the thought of detecting the rf from an invisible fence wire.

The battery packs on the handles include 4 CR2477 1100ma coin cells. If the battery packs are not disconnected between event, the battery packs will be dead before the arrive at the next site. The explanation there seems to be that the vibration in shipment continuously activates the handles. The only way to disconnect the battery pack it to pull the connector out of the small circuit board. The causes failures of the female plug on the circuit board. Also disconnecting the battery involves removing the handle from the stone. This was done to prevent the sensor handle from being powered off accidentally.

There are about 100 handles in use at an event, so using rechargable batteries could be problematic. Currently there is no plug on the handle but I suppose I could expose a connector that could be used to connect a charger.

I use a pulse style load tester for the batteries and the always seem to test ok in the shop but performance in the field has been mixed. Is there a way to test the quality of the CR2477 battery? some batteries seem to last a long time others fail quickly.WHen I get the next set of failed batteries, I am going to test the individual batteries to see if the failure involves all batteries or just one or 2 of the 4 in a pack.

Unless I can get the power consumption down, the final design might not be an arduino but that is useful for prototyping. I have already configured up an arduino to mimic the existing handle as a proof of concept. It would have to be redesigned to minimize power consumption.

Sorry for the long and detailed description. I appreciate your thoughts and hopefully you will have the opportunity to comment further.

OK, the situation is much clearer now. It seems you have 2 problems; a battery life issue and a ‘cry wolf’ issue that may lead to the questioning of whether the system can be trusted. Let me think about these for a bit today. But let me also ask about the details of the electronics. Is there any microcontroller in the system now ? Has any of it’s low power/sleep modes been utilized ? Do you know the current draw of the system in all of it’s modes ?

I will have to flip one of the circuit boards over to see what microcontroler is being used. I don’t have a dead handle on hand so I can look at the circuit bourd. If there is a power saving mode, it is probably minor. Wait around for handle to be activated. When activated check touch and magnetic sensors, determine foul or no foul. After 10-15sec or so, go back to waiting for the handle to be activated.

I was able to get my hands on a mA meter to measure the draw. I haven’t had a chance to hook it up and run the tests.

ijourneaux:
I was hoping that I could monitor the signal and only alarm when the signal has reached a maximum and starts dropping.

Now that I understand the task, a system using a 'dog fence' approach and the above *might* work. The big problem is that while the peak signal should happen when the Rx antenna is directly over the Tx wire, I think it'll be a broad peak and so, in the presence of noise, hard to accurately find the true peak. That may introduce a larger than acceptable window of uncertainty. One article I found claimed the existing system was within 3mm of the true hogline position. I doubt the RF system could match that.

Perhaps an acceptable system might result if the Rx antenna had a null when over the Tx wire. Nulls are generally sharper than peaks. The issue is that for any practical RF frequency, the Tx and Rx antennae are in their near fields, not the far field, which is where you have the usual defined antenna pattern of lobes and nulls. The gist being I’m not sure what to predict for an Rx null.

OTOH, knowing the task and having seen a pic of the e-handle’s contents, I’m fairly sure an LED fence and detector in the stone would work just as well as the present system. But I hate to toss the baby out with the bathwater. It would be better if the existing system could be ‘tuned’, likely via software, to fix the problems. But that’s another post.

I don’t know enough about the existing electronics to help much (ATM) on the dead battery issue. I suppose you could add another switch in series w/the existing one but that would negate the intend benefit of the ball switch. Perhaps a redesign and SW tweaks could help reduce current consumption.

Re: false alarms I wonder if you couldn’t use pulsewidth as a discriminant vs FA’s ? A stone going over the strip will produce a pulse, whose PW is a function of the strip, the detector’s “beamwidth” and the stone’s speed and (slightly) the crossing angle over the strip. You could estimate, and confirm by experiment, the expected range of PWs. A pulse shorter or longer than the range could be deemed to be a FA and ignored. And accurately measuring PWs is routine for any MCU.

I was able to expose a circuit board on a handle that is no longer working.

There are 2 larger ICs

MC33794DWBR

and

PIC16F87X (QPF package)

The connection to the handle (capacitive touch) is the bluw wire. The ball switch on the middle. Connector to the battery is on the top left and the 3 wire connection to the hall sensor is top middle.

The cirduit board seems complicated given the purpose. But the design is likely from 2000-2002 timeframe.

ijourneaux:
The circuit board seems complicated given the purpose.

I agree bit you've ID'ed 2 of the main components, the PIC16F87 and the capacitance sensor.

http://web.media.mit.edu/~jrs/MC33794.pdf

Let me see what I can deduce from the picture.

Thanks again for taking an interest. I appreciate the thoughts and discussion. I can take better pictures if needed. The board is sized and shaped to fit in an opening in the handle.The circuit board is shaped to fit in an open area in the underside of the handle. There isn’t anything magical there other than the leds fit in holes in the handle.

I am stopping by the office tomorrow to pick up a working handle and new battery pack so I can measure the battery drain in the different modes. That should give me some idea of the potential improvement in battery life.

rapid green blinking - hand is not touching handle and magnetic strip has not been detected.

solid green - hand is not touching handle and magnetic strip has been detected

solids red - hand is touching handle and magnetic strip has been detected

red-green blinking - low battery warning.

Another aspect of the handle that could be important.

The handle has a threaded stem at the center that extends about 3/4 of the way though the stone. The hall sensor is integrated into the stem. The handle is tighted into place with a bolt that goes into the stem. In that design, the stem tip is about 1in off the ice.

I would continue to measure, for a few minutes at least, the current draw after the handle has been released. If it goes into some low power ‘sleep’ mode, it may wait a while to do it.

I noticed in a video that the bottom of the ‘stem’ was hollow. I thought “there’s the place for the LED detector”. Makes sense that’s where they placed the Hall sensor. Any part # or info on that might be useful. I do have some questions below. Lastly how the batteries are wired, all in series or in parallel or some S/P combo (alternately - what voltage is supplied to the board) ?

Having looked at the datasheets I will opine there’s no low power modes. There’s on, on driving some LEDs (an extra 20 mA/LED) and off. The capacitance IC takes 12v for power (so all 4 batts will be in series) and can output a regulated 5v for the PIC (and Hall sensor) to run on. My guess is that the ball switch applies 12v to the capacitance IC which, after it’s power on reset, powers up the PIC. The PIC then keeps power on via an another, parallel, switch. After some period w/o a hand touch being detected, the PIC removes all power via that switch and the cycle is ready to repeat.

The CR2477 battery is not the optimal choice IMO. It’s intended for sub-mA continuous loads. It’s standard load is 0.2 mA, my guess is that’s <1% of the average load it’s seeing in your usage. Thus the expected lifetime capacity will be < the 1000 mAh rating. How much less is hard to tell as your usage is literally off the charts. Perhaps some batts tolerate the “high” current better than others, that’s why you see the variability ?

http://www.panasonic.com/industrial/inc … CR2477.pdf

http://www.sony.net/Products/MicroBatte … cr2477.pdf

http://www.farnell.com/datasheets/1496886.pdf (max current = 15 mA !?!?)

I don’t know if there’s a more suitable battery that will fit in the handle. But I’d be tempted to look.