Suggestions on magnetic wires and arduino for path recognition

Hi to all,

I hope you can help me with my path recognition problem! :slight_smile:
I'm developing a mobile robot application and I'm using Arduino Mega with some sonar sensors and a motor controller to drive the DC motors and let my robot move around a defined area.

I'd like to use a magnetic wire to define the perimeter area within the robot has to move and to use some magnetic or hall sensors to detect the area borders.
When the robot comes close to the borders, it should detect the magnetic field and change its direction in order to not cross the defined area.

Can you give me some suggestions on how to realize the perimetrical magnetic wire, please?
And what kind of sensors should I use to detect the magnetic field?

Thanks a lot!

read once that some lawnmower robots use a wire that sends a HF signal that is received by the LM. If the signalstrength comes above some level it "hit the wall".

If the magnetic line is missed your robot will escape and you know that means trouble (at least in movies and SF).

I would use the magnetic wire to signal to the robot that it does not have to overcome the boundary line: if no magnetic filed is detected, than everything is ok and the robot can move.

The problem is: what kind of circuit should i use to generate the magnetic field? (I read that I need a NE555)
Can I use a magnetic compass sensor (for example, the CMPS03 sensor which I already have) to try to detect the magnetic field generated by the wire? Or i have to realize a dedicated circuit?

Can I use Arduino to accomplish these tasks?

magnetic fields decrease with a 3rd power, so you need quite a strong field for a relative small distance. sorry I don't know the numbers/details,

you might need to experiment with sensors and different field strengths.

I just need to detect a magnetic field in max 40 centimeters or less.

The problem is that I do not know how to generate the magnetic field, can you suggest me some sample or tutorial, please?
Can I generate the magnetic field with a NE555 and the Arduino?

How can i decrease and increase the magnetic field power?

I think you will need a coil of wire around the perimeter, a '555 oscillator @ 50 to 100 Khz and some kind of driver (resonate the loop and you might well make a big metal detector (much more sensitive). Sense objects by the change in Driver supply current as you will couple a small amount of energy to the Sensed object, if the change isn't sensitive enough you could use a "Heavily loaded tuned circuit to modulate sensor load coil current and look for the changes in coil driver current, use an output from the robot controller to "Short out the tuned circuit at some detectable rate causing the device to draw more current from the sensor loop {based on the effect of a shorted turn in a transformer winding}), as the other person pointed out a DC mag field would consume horrendous amounts of power. Better a tuned coil and amplifiers and you will need a pole piece in the detecting coil to limit and direct/limit the effective detection area. It would require several turns of wire to be effective though, there are optical distance sensors that are good for close measurement, you might also think about a "Pinger" ultrasonic distance measurement device where 'safe' distance is determined by the "delay". There are many different means of sensing objects, most depend on the size of the area to be sensed. You could even use a photo cell and a IR LED to signal the sensed object when it crossed the beam inside of the 'controlled' area. These were Ideas thrown out in an engineering session in early 2001, by my notes. We solved that Area Denial Job with a small doppler radar detector on a Pan head and used PIR detectors with a narrow FOV on the openings to the warehouse (Private Car Warehouse)
I do hope this hasn't been more confusing than helpful. I think the best idea's would be the Pinger or the other optical means of detection. The Magnetic Detection electronics are a workable but non trivial solution to the probllem. Another area denial could well be based of those fusible anti theft devices frequently found in store items that have issues with shrinkage (Theft). They work by being pumped at one frequency and a good (Non fused) one will radiate a small amount of 2nd harmonic energy which is detected to trip an alarm, those devices aren't very sensitive however, it might take several watts of power in a large room to detect the device. If you have any questions except direct design information
I will be happy to help (or hinder) as much as I can.

Doc

Thank you for all your suggestions!

I've already tried to use IR and sonar sensors, but they do not offer a reliable solution for my application because my robot has to move in outdoor, tipically in sandy and dusty conditions and under the sun (so IR sensors can't work correctly). Moreover, sonars don't work properly in dusty condition and also when the source (my mobile robot) and the object (the IR emitter) are in different temperature areas (this can happen in the environment where my robot has to work).

After having testing all these solutions, I decided that the inductive guidance with the wire guidance sensor can be the best method to use.
(It is widely used in industrial applications and a lots of lawn mower robots use it with success)

The problem is that I do not know how to realize this solution.
I know that the wire must generate a magnetic field (obviously with a AC current) but i do not know how to realize it and in particular what kind of components I have to use.
(The wire has to be 50-70 meters lenght at least).

To detect the magnetic field, I can use a magnotometer sensor (ie. MicroMag 3-Axis) which should detect the magnetic field within a reasonable distance.

The Lawnmower controls are basically a transmitter and a receiver where the Transmitter is a device connected to the edge boundaries of the controlled area, some follow a buried wire on a predetermined path and some are the 'boundary' or 'electronic' fence type, an example of which is the braking system type of Parking-lot control to prevent the 'cart' from being pushed beyond a given point. Unfortunately the details of such a system are beyond in my opinion, the scope of this forum. Analog as well as digital methods can be used and the basic method is simple an identifiable signal is transmitted as an AC or pulsing current through a wire and on the controlled vehicle is a receiver with carefully limited sensitivity, for three reasons: 1. unique and possibly addressable control, 2. freedom from outside interference. Noise and interference from other services might well play a large role and 3. Efficiency, Use no more power in signaling than is necessary, a magnetometer is a somewhat difficult thing to use compared with a loopstick antenna and a simple linear IC or two...
The three states reasons are in my opinion why such a design is inappropriate here, Nor am I advertising for business as that is also IMO inappropriate.
If you Google sgopping cart loss prevention, you might come up with some information.

Doc

robtillaart:
magnetic fields decrease with a 3rd power, so you need quite a strong field for a relative small distance. sorry I don't know the numbers/details,

you might need to experiment with sensors and different field strengths.

No, magnetic field strength decreases as 1/r from a (long) current-carrying wire. The 1/r^3 law is between two magnetic dipoles. Check Maxwell's equations(!)

And my suggestion about receivers makes use of that phenomena, in that "Receiver Gain and Antenna Aperture" combine well to build what is in effect a simple Proximity Detector. It is the Method of generation that grows complex. Perhaps simplified in that If an audio tone were used or a low baud rate digital one(The transform of a fast pulse is well known, Inductors don't like fast pulses nor do they like data streams and the faster the stream the more the inductor will average it into noise with a DC content); gain, filtering and detection become trivial and can be done easily with an Arduino, including some data transfer in both directions. The only real issue would be one of efficiently coupling power into the "Antenna" rather then Brute Forcing enough current into the device so as to be detected with a Magnetometer... Not a complex task... just many small ones.

Doc

The problem looks to be complicated..
At the moment, I'm going to test the electronic dog fence in order to see if I can successfully use this kind of technology.
May be, electronic fence is the most suitable method for my application.. i hope..