{"id":84306,"key":"Wire_Following_System","title":"Wire Following System","latest":{"id":1262873,"timestamp":"2026-09-01T14:21:16Z"},"content_model":"wikitext","license":{"url":"https://www.appropedia.org/Appropedia:Copyrights","title":"CC-BY-SA-4.0"},"source":"[[File:6-generator-board-1.jpg|thumb|Fig 1: Wire Generator Circuit]]\n\n[[File:16-sensor-board.1jpg.jpg|thumb|Fig 2: Sensor Circuit]]\n\nThis is the wire following system for [[OSHE Growbot]]. It consists of two circuits, a perimeter wire generator circuit, and an LC sensor circuit. The perimeter wire generator will induce a frequency, between 32 and 43 Hz, onto a perimeter wire. This perimeter wire is 100' of 22 guage wire, laid out in the path the Growbot will take around the garden. The LC has two inductors that can detect the signal going through the perimeter wire. There will be one inductor on either side of the wire, sensing when it gets close. Because Raspberry Pi's do not have anolog input, an ADC must be used. All supplies and code can be found below. The perimeter wire generator circuit will be located in the Growbot housing unit. The sensor circuit will be on the Growbot. This system works with the Odrive motors to control the Growbot.\n\nFor specifics of these circuits: [https://www.robotshop.com/community/blog/show/diy-perimeter-wire-generator-and-sensor Robot Shop]\n\n== Files and Bill of Materials ==\n\nFile for 3D prints available at [ <add link> OSF]\nFiles for Raspberry Pi python code available at [https://github.com/OSHE-Github/OSHE_Growbot/tree/master/WireFollowingSensor Github].\n\n{|class=\"wikitable\"\n|+ Wire Guidance Materials\n! Description\n! Count\n|-\n| Generator PCB\n| 1\n|-\n| Sensor PCB\n| 1\n|-\n| ADS1115 ADC\n| 1\n|-\n| 3.3 kΩ Resistor\n| 1\n|-\n| 12 kΩ Resistor\n| 1\n|-\n| 47 Ω Resistor\n| 1\n|-\n| 10 kΩ Resistor\n| 4\n|-\n| 1 MΩ Resistor\n| 4\n|-\n| 4.7 kΩ Potentiometer\n| 1\n|-\n| 12 kΩ Resistor\n| 1\n|-\n| 100 nF Capacitor\n| 2\n|-\n| 1.2 nF Capacitor\n| 1\n|-\n| 1 uF Capacitor\n| 1\n|-\n| 22 nF Capacitor\n| 2\n|-\n| 1 mH Inductor\n| 2\n|-\n| LM324N Amplifier\n| 1\n|-\n| NE555 Timer\n| 1\n|-\n| 2.1x5.5mm barrel connector\n| 1\n|-\n| 2 positions terminal connector\n| 3\n|-\n| 3 positions right angle pin header\n| 2\n|-\n| ~1 meter 20AWG cable (for the inductors)\n| 1\n|-\n| ~100' 22 gauge multi-strand wire (for the following wire)\n| 1\n|}\n\nHere is also:\n\n* Kit: [https://www.robotshop.com/en/robotshop-perimeter-wire-generator-sensor-soldering-kit.html?utm_source=rb-community&utm_medium=blog&utm_campaign=diy-perimeter-wire-generator-and-sensor RobotShop]\n* PCB Files: [https://www.robotshop.com/media/files/zip2/diy_perimeter_wire_2.zip?utm_source=rb-community&utm_medium=blog&utm_campaign=diy-perimeter-wire-generator-and-sensor Download]\n\n== Schematics ==\n\n[[File:Generatorschematic.PNG|500px]]\n\n[[File:Sensorschematic.PNG|500px]]\n\nFigure 1 (Left): Wire Generator Schematic\n\nFigure 2 (Right): Sensor Schematic\n\n== Extra Supplies ==\n\nTools and consumables in addition to those listed in the BOM.\n\n== Tools ==\n\n* Soldering iron\n* Wire stripper and cutters\n* 3D printer\n\n== Consumables ==\n\n* Solder\n* Zip ties\n* Super glue\n* 20AWG cable for inductors\n* 100' of 22 gauge multi-strand wire for perimeter\n\n== Before You Begin ==\n\nReview the process below and collect all of the tools and consumables you need to begin the build. The list of tools above is not necessarily exhaustive. Assembly and Wiring are the steps after you solder the components to the PCB and printed [https://github.com/OSHE-Github/OSHE_Growbot/blob/master/WireFollowingSensor/EndsAndPins.stl EndsAndPins] and TWO [https://github.com/OSHE-Github/OSHE_Growbot/blob/master/WireFollowingSensor/wireHolder.stl WireHolder].\n\n== Software to download and install ==\n\n* Raspberry Pi needs Python3-pip: [https://www.raspberrypi.org/documentation/linux/software/python.md RaspPi]\n* Enable I2C on Raspberry Pi: [https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c Adafruit]\n* Raspberry Pi to ADC set up: [https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/python-circuitpython Adafruit]\n\n== Assembly and Wiring ==\n\n== Mechanics ==\n\n* ---\n* Attach BotEnd to aluminum extrusion with a ??m screw and ??.\n* Place WireHolder in BotEnd and secure with Pin or a ??m screw and bolt\n* Place SensorEnd in WireHolder and secure with Pin or a ??m screw and bolt\n* Put the inductor in the slot of the SensorEnd, with a dab of superglue\n* Ziptie the wire in the small slots on the WireHolder\n\n== Wiring ==\n\n[[File:Ads1115s.PNG|500px]]\n\n* Raspberry Pi to ADS shown above\n* Analog outputs from Sensor Circuit go to A0 and A1 on the ADS\n* Sensor circuit needs a 5V power source\n* Perimeter wire generator circuit needs a 12V power source\n\n== Testing ==\n\n* Initial testing of sensors use autoTest.py\n* Collect Min and Max values and replace them in appropriate location inn autoTest.py\n* Odrive motors are ready to test\n\n== Notes ==\n\n* Make sure your inductor sensor leads are long enough before you cut\n* Test the code before you glue the inductors or zip tie the wire\n* Additional Procedures can be found [[OSHE Growbot Guidance System|here]].\n\n{{Page data}}"}