Picking up invisible fence cable with Arduino

PS Jus tthoguht of it. My son works over by one of the facilites that experienced the false triggers (Blaine, MN). This would be a good opportunity to get over to see him and run some tests. The magnetic strips will still be in the ice so I will be able to sense the magnetic strips as well as the rest of the ice field where they might have had problems.

PS Jus tthoguht of it. My son works over by one of the facilites that experienced the false triggers (Blaine, MN). This would be a good opportunity to get over to see him and run some tests. The magnetic strips will still be in the ice so I will be able to sense the magnetic strips as well as the rest of the ice field where they might have had problems.

ijourneaux:
I was looking at the 1304. That is a surface mount chip, it might be easier to work with in a SIP through hole package. I am trying to identify an equivalent part.

It is but it's 3pin SIP cousin, A1324, is a 5v part. Moreover they both take about equal foot prints when their sensing axis is vertical. I thought the SOT23 could be "dead bugged", w/cabling soldered to it's pads about as easily as soldering to the SIP's leads.

http://en.wikipedia.org/wiki/Point-to-p … nstruction

Or perhaps use this.

https://www.sparkfun.com/products/717

https://cdn.sparkfun.com//assets/parts/ … 717-02.jpg

Mee_n_Mac:
FWIW you’ll need this or another USB-TTL serial converter to program the above Arduino. An FTDI adapter cable costs about the same.

https://www.sparkfun.com/products/9873

Errrr, forget the above. The Micro's have the 32U4 MCU, w/native USB onboard. All you'll need is the correct USB cable. I must have thinking of the Mini's... :oops:

No problem. all of the parts are ordered. Should have them early next week. so will be able to assemble the test bed shortly there after.

You’ll want a battery (buy anywhere) and a holder.

cr123a holder

http://www.digikey.com/product-search/e … 3%20holder

http://www.digikey.com/product-detail/e … ND/1974067

Unless you want to remove the battery, some on/off switch. You could get this or something like it.

on/off switch

https://www.sparkfun.com/products/11477

Also some red and green LEDs and a dropping resistor (100 ohm) for each (if you don’t have some handy).

https://www.sparkfun.com/products/9592

https://www.sparkfun.com/products/9590

I was going to suggest these super bright ones from SF but their Vf is (3.3v) much higher than normal (1.8V for red, 2.0v for green). That’s a problem (running off a 3.0 - 3.6v battery) to defer until later.

https://www.sparkfun.com/products/8285

https://www.sparkfun.com/products/528

If you want to experiment w/the above, go ahead. I’d suggest a dropping resistor of 15-20 ohms for green and 75-100 for red.

Some heat shrink tubing if you want to keep things neat. Get locally or

https://www.sparkfun.com/products/9353

Some things may be screwed or glued or taped to the handle. I’ll assume you can get hookup wire, solder, glue, tape, etc locally.

And that’s about it.

Here’s a “schematic” for the testbed. Since there were few wires and it was easier for me to grab the pics than make my own depictions, it’s more like a wiring diagram or (gack) Fritzing than a true schematic.

(click on to open)

It occurs to me that early on it could be affixed to a wood platform of sorts, just so long as the Hall sensor is at the proper height (or adjustable?). This could be used to get a first idea of the field for some hoglines at your local arena while you’re figuring out how to mount it in/on a stone. At some point I would like to see the testbed in a representative environment, as far as all the metal bits go, to make sure any effect they might have is accounted for.

Should not have any problem following drawing. I am assuming you still need the dropping resistors on the LEDs. Any limitations on the wires going to the hall sensor? If I mount the hall sensor at the end of the stem, it would be about <8in away from where the test circuitry would be mounted.

ijourneaux:
Should not have any problem following drawing. I am assuming you still need the dropping resistors on the LEDs. Any limitations on the wires going to the hall sensor? If I mount the hall sensor at the end of the stem, it would be about <8in away from where the test circuitry would be mounted.

I forgot the R's this AM after telling myself last night to add them. Good catch. Wiring to Hall sensor shouldn't be an issue. Best practice might be to use shielded cable or twisted pair for pwr&gnd but the EM environment should be benign. Do those if you want to.

(fixed schematic)

With regards to programming …

Can you tell me if this is the normal LED illumination sequence/conditions (from the datasheet pdf)

Indication:
Activation: Red LED’s on momentarily
Verify On/Ready: Rapid flashing green without hand contact (10 s)
Standby: Green flash every 2 s following Ready. Returns to Ready when grip is touched and
released. Turns off if grip is not touched within 120 s.
Delivery: No indication with hand touching grip
Release: Rapid flashing green until rock crosses hog-line magnet
Valid: Solid green
Violation: Flashing red
Low Battery: Alternating red and green for 3 s after activation

The same info is in the manual …

2. OPERATION
Eye On the Hog electronics activate and the red LED’s
flash when the rock is tilted with a bare hand touching the
coated handle grip. When the rock is returned to the playing
position and the grip is released, the green LED’s flash
quickly for ten seconds and then slowly for two minutes. If
the grip is not touched, the electronics will turn off after the
slow flashing stops. If the grip is touched, the LED’s turn
off to prevent distracting the curler during delivery. When
the grip is released before the hog line, the green LED’s
flash until the centre of the rock crosses the centre of the
hog-line magnet; then, the green LED’s turn on for five
seconds to indicate a valid delivery. If the grip is not
released before the centre of the rock crosses the centre of
the hog-line magnet, a violation is indicated for 25 seconds
by flashing red LED’s. The touch sensor remains on for a
short interval after the hog line is crossed. If the grip is
touched in this interval, indication will switch from valid to
violation.
A low battery is indicated by alternating red and green
LED’s.

But I didn’t see “When the grip is released before the hog line, the green LED’s flash until the centre of the rock crosses the centre of the hog-line magnet” when watching the Olympics. Did the video just not pick up the flashing or has that part changed ?

Also, IYO, should the 2 events occur simultaneously, what’s the proper indication ? Should there be a “grace period” of some amount of time where the hogline is crossed but the grip is still being held … to allow for any slop in the mounting of the magnetic strip vs the visible hogline ?

I don’t have a battery pack left here. I had to ship them all of the championships in Philadelphia next week. TWIth the number of battery packs we went through this year, we were concerend that we might run out.

The flashing green when the handle is release is quite fast. The LEDs never get as bright as they do when the are solid on. If I remember correctly the 2 green leds actually alternate when flashing.

The flashing red for foul is much slower and and again it alternates from one side to the other.

The battery low flashing has a red one one side and green on the other alternating with the opposite pair. I won’t have the battery pack back until mid march. I may be able to jury rig a set of batteris to power up on on the handles I have here to confirm the flashing patterns.

ijourneaux:
I may be able to jury rig a set of batteries to power up on on the handles I have here to confirm the flashing patterns.

No need to, I'll code it up per your post. It can be fine tuned later as needed.

A minor thing and nothing that needs to be addressed now. There are 2 red and 2 green LEDs. layad out

Green i

Red

A minor thing and nothing that needs to be addressed now. There are 2 red and 2 green LEDs. layad out

Green i

Red

I coded up a skeleton/framework for the curling (not testbed) code but in doing so came up w/more questions. Program is a state machine w/actions within states and transitions btw states as roughed out (not complete) in the diagram below. Questions follow from the wording in the manual.

electronics activate and the red LED’s flash when the rock is tilted
with a bare hand touching the coated handle grip

Is flashing same (period, on time) as hogline violation flashing ?

How long before battery test completes and this flashing stops ?

Will activation happen and LEDs still indicate w/gloved hand ?

A low battery is indicated by alternating red and green
LED’s.

Details (period, equal R/G ontime, duration) ?

What if battery test passes ?

When the rock is returned to the playing
position and the grip is released, the green LED’s flash
quickly for ten seconds and then slowly for two minutes.

Is the transition to quick G flashing dependent on (waits for) grip release ?

Details (period, on time) of quick and slow flashing ?

When the grip is released before the hog line, the green LED’s
flash until the centre of the rock crosses the centre of the
hog-line magnet; then, the green LED’s turn on for five
seconds to indicate a valid delivery. If the grip is not
released before the centre of the rock crosses the centre of
the hog-line magnet, a violation is indicated for 25 seconds
by flashing red LED’s.

Before the hogline detection, G flashing - same details as 10 secs of quick G flashing above ?

After good/violation decision and subsequent 5/25 secs of indication - what happens ?

Just time out to power off ? What if re-gripped ?

The touch sensor remains on for a short interval after the hog line is crossed.
If the grip is touched in this interval, indication will switch from valid to
violation.

Is this needed or desired ? We can prevent this.

(click to open)

I should add that it’s my hope that we can eliminate the tilt switch and associated circuitry by powering off Hall sensor and putting grip sensor and “Arduino” into a u-power sleep mode. Such that their current draw is small compared to the internal, self discharge rate of the battery. If possible it simplifies things and reduces parts count, board space and cost. The above diagram represents that goal.

PS - I understand that w/o a running unit you can’t provide LED “details” right now. Just keep the list and answer when you can. They’re just constants in code, easy to tweak.

A better diagram …

(click on to open/enlarge)

After good/violation decision and subsequent 5/25 secs of indication - what happens ?Just time out to power off ? What if re-gripped ?

After the 5/25 secs of indication, the handle just powers down and waits for the next time the stone is tilted up to activate it.

The touch sensor remains on for a short interval after the hog line is crossed.

If the grip is touched in this interval, indication will switch from valid to

violation.

Is this needed or desired ? We can prevent this.

This is one the foul conditions that needs to be detected. It doesn’t happen very often though.

As soon as I get a working handle, I will do the timing on the leds.

Found a battery pack. The hall sensor on the handle must be bad as I can’t get it to detect a foul.

Here is what I have so far

If the stone is only activated if the stone is flipped over with the hand on the handle.

when the stone is activated, the green led flashes once for about 0.5sec then the red led flashes once for 1 sec. If the hand is in contact with the handle the LEDs go out.

If you let go of the handle, both green LEDs flash quickly 5x per second for ~10sec. After 5sec the flash rate drops to 0.5x per second for ~90 sec. At the end of the 90sec (manual says 120s), the handle returns to the unactivated state.

If you regrip the handle when it is flashing at 5x or 0.5x per second, the LEDs go out. When you let go of the handle again, it behaves as if it was the first time the handle was released.

I think I have all of the parts. The hall sensor is much smaller in size than I was expecting . That is a good thing but I am going to haev to figure out how to solder leads to the sensor.

Would you recommend soldering headers to the pro micro?