Saturday, March 22, 2014

Dog Collar Work - Andrew Baden

Over spring break, I worked on getting the dog collar to interface with the Arduino micro controller.  When I had it connected before, it was having issues reading stable values while the dog collar was not detecting the outer boundary of the dog fence.  I found a simple issue with it, and fixed the problem.  The polarity was backwards! So now I have this working with an analog input on the micro controller itself.  To make this more simple when it comes to programming, I put the output to a 7414 inverting hex Schmitt trigger.   I used the 7414 to clean up the output of the dog collar because it was not always giving a nice stable value.  This will also allow us to use a digital input on the micro controller, and detect if it is at the boundary or not with boolean values rather than a range of values with the analog input.  

Schmitt Trigger on breadboard

Schmitt Trigger schematic
Basically when the Schmitt trigger sees an input (I am currently using pin 1) that is above 1.7V it will trigger a low output on pin 2, and when the trigger sees an input lower than  0.8V, it sends out a high output on pin 2. Now when the dog collar is near the dog fence, the input on the micro controller will read a LOW, and when the dog collar is away from the fence, a HIGH will be read.  I could potentially put the output of the inverter into the input of another inverter and the output of the second inverer to the micro controller to allow a HIGH to indicate the collar being next to the boundary, and a LOW to indicate the collar being away from the boundary.