DIY Perimeter Wire Generator and Sensor | RobotShop Community

@Deemoss Unfortunately, this circuit is not intended to be used for precise (sub-millimeter accuracy) positioning. The sensor-generator setup will provide a rough idea if the robot (sensors) gets too close/far from the perimeter cable.

Hi Brahim,
thanks for this brilliant post, I really appreciate it! :slight_smile:

One question: you stated that the perimeter wire may not be longer than 100 feet, right? Could you please short describe what would have to be done that the sender is able to power a longer wire?

Best regards,

Michael

@Michael Thank you for your nice feedback, glad that you like the post.
The perimeter wire we used to test the generator circuit was 100ā€™ long. This doesnā€™t mean that the wire canā€™t be longer.
From the datasheet of the NE555, the maximum recommended current output of the chip is 200mA. Therefore, with a VCC of 12V, the maximum power output would be 2.4 Watt.
So theoretically, the total output resistance should be less than 60 Ohms. There is an output resistance of 47 Ohms in the generator circuit, so it leaves 13 Ohms for the loop wire resistance.
A 22 AWG wire gauge is rated for 16.14 Ohms of resistance per 1000ft, therefore, the maximum theoretical length of the perimeter wire, would be approximately 805ā€™.

Hi Brahim

Just like Michael I really appreciate this post and iā€™ve a question on perimeter wire length.
If I was to increase the cross sectional area of the perimeter wire, therefore reducing the resistance of the wire, would I be able to run it over an even longer distance than 805ā€™?
Kind Regards and thank you
Dave

@David Thank you.
Theoretically, yes but the square wave signal might be distorted at a certain length of the cable. This would be caused due to the self inductance which is caused by the magnetic field generated by the wire. In AC, the current switches its direction back and forth causing a changing field. This changing field reacts with the electrons in the wire opposing the current flow. This opposition is called inductive reactance and acts as resistance. Inductive reactance increases with the frequency of the square wave and the inductance of the wire by this formula : Xl = 2Ļ€f*L.
Where L is the self inductance of a wire and is dependent on its length and radius. It can be calculated using this tool/formula
Therefore, longer the wire, more the self inductance will be important and more this will have an effect on the generator signal.

Hi, any news on the Generator Board 3D and sensor brb in the shop ???

@tore The Generator and Sensor boards should be available next week. Weā€™ll add the link to the product as soon as itā€™s live on RobotShop.

Hi, I have built the circuits on bread boards and testing with the analog read on my Arduino but am only getting a small change in values when the coil is 1mm from the loop. I get a low value of 56 and a high of about 200
I am hoping to use your design as an electronic finish line in a electronic billy cart timing system I am working on so I was hoping to get a high level with the coil 10cm from the loop. Should I be able to get a better result in a bread board?

@Aaaron Did you verify the frequency of the generatorā€™s output square wave ? This frequency can be varied by the potentiometer and should be as close as possible to 34 Khz to match the tank circuitā€™s resonance frequency. You can monitor the generatorā€™s frequency by using an oscilloscope, probing one end of the perimeter wire cable (while the other end of the cable is connected to the generator circuit output) and connecting the oscilloscope probeā€™s ground to the generatorā€™s GND. You can keep the coil at a fixed distance from the loop cable while varying the generator frequency potentiometer to obtain the best results. Also, please note that the coil should be oriented correctly. As indicated in the post, the inductors longitudinal axis should be perpendicular to the perimeter wire.
Also, for better results, the generatorā€™s power supply voltage should be between 12V-15V with at least 500mA amperage.

I think I have a bad 22nF capacitor. It only measures 16nF
I am powering the generator with a 12v lead acid battery.
The shops are all closed for a long weekend now so I will have to wait and get a replacement capacitor on Tuesday and try again.

Good news. The RobotShop Perimeter Wire Generator and Sensor Soldering Kit is now available.

Hello, I have question. Is it possible modulate signal this way? I will have more perimeter wires in earth.
Each perimeter wire will have unique signal or encode some digital ID
Robotic lawn mower will know path_ONE/wire_ID1 I am up to hill wire_ID2 i am cutting grass downhill
and Robot logic is then simple : Find perimeter wire decode path_ID and rotate right way and go to end of PATH then find next perimeter wire and decode ID rotate to right direction and again cut until is end of path ā€¦etcā€¦
Any idea how to do that?

@Jepster This might be possible by using multiple generators with different output square wave frequencies as the frequency can be easily varied with the onboard potentiometer (about 32KHz to 44KHz). You will also have to use multiple sensor boards on the robot with different inductors/capacitors values knowing that the frequency of each tank circuit should match the frequency of its generator board.
For example :

  1. wire_ID1 loop cable will be connected to generator board #1 that has an output wave frequency of 34KHz. wire_ID1 will be detected by sensor board #1 that has a tank circuit with two inductors of 1mH and two capacitors of 22nF (corresponding to a resonance frequency of approximately 34KHz)
  2. wire_ID2 loop cable will be connected to generator board #2 that has an output wave frequency of 37.5KHz. wire_ID2 will be detected by sensor board #2 that has a tank circuit with two inductors of 1mH and two capacitors of 18nF (corresponding to a resonance frequency of approximately 37.5KHz)
    And so onā€¦
    You will also have to think on how you will mount the sensor boards and the inductors on the robot as you will have a lot of inductors. Assuming you have 4 different areas, therefore you will need 4 generator boards + 4 sensor boards with 8 inductors (if each sensor board has two inductros).

Hi, really excited to see this kit can now be bought from you, thatā€™ll make a big difference, I expect Iā€™ll be ordering very soon! One question - how would you use this, either as it is, or modified, to allow the robot to follow the wire back to the base station for charging? Iā€™ve seen some designs that allow the robot mower to know which direction to follow along the wire, but wasnā€™t sure if it was possible with this or not.

@Iain This is feasible with the perimeter wire generator and sensor boards but will come largely to how you will program the controller. Since the sensor board provide 2 x analog signals which its strength depend on the distance between the wire loop and the inductance (closer the inductance to the wire, stronger the output analog signal from the sensor board). The code/algorithm used to follow the wire loop would be very similar to the one used on line following robots using analog line following sensors (for example, the DFRobotShop Rover Line Follower Sensor with an example Arduino code here). The perimeter wire generator and sensor boards alone wonā€™t be able to detect a direction but I guess this wonā€™t be necessary since the robot will be following a loop, therefore any direction will get it to the generator board anyways (where the base station can be placed).

Thanks a lot @brahim

I understand that the theoretical length to the perimeter wire can go to about 800 feet. What is the best course of action if I have a farm that has about two acres of land and I would like a robotic lawnmower to follow a specific pattern which might take the total distance beyond the theoretical maximum? I was thinking of a simple amplifier, but you also mentioned the self inductive reactance of being simply a long wire. Should I need a repeater instead? Do you recommend a good design for that application? Thanks for the good work!

@David Thank you. We apologize as we donā€™t have yet a ready-to-use solution that can work for this DIY generator and sensor boards to increase the total length of the perimeter wire. Correct, this design has its limits and self inductance of the wire will have an important effect on the generator output wave if the wire length is longer than maximum. You can probably find more advanced (therefore, more expensive) designs online to allow longer perimeter wire.

Given that we have literally hundreds of unused arduinos sitting around is it possible to just use an arduino to create the signal on a loop? e.g. basically using a blink sketch or might need to manipulate the timer bits directly - any reason that wouldnā€™t work?

Also, so in the commercial invisible dog fence system they can alter the size/width of the detectable zone - what is it thatā€™s being increased/decreased on those systems? Would we need to run the output from the 555 circuit (or the Arduino hack I mentioned above) into a transistor/amplifier to feed a variable voltage onto the perimeter wire? would that also be essentially the solution to David Hoā€™s question? Does higher voltage overcome, or at least extend, the distance limitation?

Thanks for the really great article!! Iā€™ve been looking for something like this that explains the basics for at least a couple of years.

@John Ringer Appreciate the feedback. Quite a few of your questions would require some experimentation (donā€™t have enough time at the moment but nevertheless interested) - would you be interested in giving some of your hypotheses a try and telling us how they went? The kit we put up for sale is really inexpensive and is not soldered, so it should give you a good head start to mess with components on a breadboard. Brahim will provide additional insight shortly.