# Relative positioning system using Electromagnetic field from a wire

I am quite new to electronics and I'd like to build a really small car (something like Lego scale) that follows a path given by a wire under a thin plastic layer. I researched a bit, and seems like hall sensors or flux gates are the way to go. If I understood correctly, using two hall sensor like A3144E on the front left and right of the car I could sense the electromagnetic field and decide if turn left or right to make the car back on track and keep the wire under the plate in between the sensors. Few question, how much current needs to flow in the wire in order to produce an electromagnetic field big enough to be sensed by the hall effect sensor from 1cm away? Are there more sensible sensor or more ideal ones?

• Sensible current sensors must be very close to the current Feb 19 '20 at 23:39
• you could feed the wire with an RF signal and use antennas to detect it ... something like an "invisible dog fence" Feb 19 '20 at 23:43
• I get 1000A....you may be better off with a magnetic compass technology (of which a flux-gate is one but also might be a more difficult solution than other compass technologies). Feb 20 '20 at 0:31
• those invisible fence systems use an AC signal in the wire (about 8kHz i think) there must be a reason for that. Feb 20 '20 at 4:53
• I think this concept of detection lacks good concepts of resolution, SNR , position error sensitivity, differential sensing etc and will not work very well unless it is a slow moving vehicle unlike the car racers that use differential optical sensing. Feb 20 '20 at 8:34

The datasheet for that sensor says it triggers at 200 Gauss and releases at about 130 Gauss. That is 0.02 Tesla and 0.013 Tesla.

The equation for magnetic field strength from a straight wire carrying current is:

From Physics Central

where $$\u_0 = 4\pi \times 10^{-7} \$$ Tesla/m/amp

I get 1000A before your chosen sensor will trip at 1cm.

• With that much current, might as well shoot for a rail gun mini-dragster! :-)
– Ed V
Feb 20 '20 at 0:28
• @EdV Indeed dubily Feb 20 '20 at 0:29
• @DKNguyen thanks a lot for the quick reply! You also mentioned a magnetic compass, is the overall idea the same with a magnetic compass? Or instead of using the wire to produce a electromagnetic field I should use a real magnet with that solution? Feb 20 '20 at 7:05
• @MattiaManzati Same idea just magnetic compasses are made to work with the Earth's extremely weak field so would maybe be better suited for your purposes. Feb 20 '20 at 14:08