I would like to build a robot, similar to a line following robot, but with buried magnets.
The idea is that the front of the robot would have an array of "Hall-effect" type sensors that would look for magnets. The magnets would be very powerful Neodymium magnets - that are mounted to the tops of stakes that are pushed into the ground and are flush to the surface of the dirt.
The robot would advance to the magnets, and navigate right or left in an attempt to keep the array of sensors centered on the magnet row. (attached is a crude drawing)
I would like to orient all the magnets so that the south pole is facing up, and then at the end of the row of magnets have the last one in the sequence with the north pole up. This way the robot would know that it's at the end of its circuit.
a.) Can I get a Hall-effect type sensor to read reliably at 4-6 inches? b.) Should I use some other type of sensor?
Thanks - I tested it out with a magnetometer and it was sensing the magnet at 6 inches.
With a 2 foot wide robot - I think I can do 6 of these sensors mounted in a piece of clear tubing or PVC.
If I hooked up 6 of these sensors (Each with its own address) on the i2c bus, and ran each sensor with it's own power feed.
Then my arduino code would 'poll' the i2c address's to see what they see?
I thought a Hall-effect was essentially 'on/off' - but a digital compass is always yielding a result.
I'm assuming that I will always get a reading - should I mount a weak magnet bar 'Overtop' of the sensors so that they 'default' to the weak bar, and then when they sense the powerful magnet in the ground, they report a distance 180 opposite of the weak bar? (This way I know it's a real reading?)
Also - These are typically designed to be tested 'horizontal' - If I mount them vertical - so they sense Up/Down - they would be at a 90 degree angle to the ground? Any thoughts on this?
I don't think you need 6 of them. If you have 2 at the outer ends of your bar, you should be able to look at the output of each to triangulate on the location of the next magnet. The readings will also be affected by the field of the magnet you just passed, so your tracking algorithm must take that into account as well. If the units are angled down to point at the ground 4-6" ahead, it should help minimize the effect of the magnets behind.