Autonomous lawn mower and perimetral wire following

Hi everyone,

I'm trying to build a robotic lawn mower for a small garden.
The electronic part for handling the perimeter wire is done and working. Now I would like to handle the "going back home" of the robot when the battery is low.
I can follow 2 ways:

  • when the battery is low, the robot follow the wire until it reaches "home".
  • it goes back home through the calculations on its position.

I'm trying to use the first way, but it seems to be harder than what I expected.
The real problem is not following the wire, but the positioning on the wire! The robot could arrive from any direction, so I don't know how to position the robot on the line, ready to follow it...

It has 2 magnetic sensors on the front, positioned 45° with respect to the forward direction. I'm not sure if 2 are really needed, but at the moment this is it..

Any advice?
thanks

If I get what you're after, the robot needs to approach the wire on an angle, close to but not quite parallel, then straighten up when straddling the wire.

Let's assume the robot has to turn right, onto the wire, when it senses it.

If the robot arrives at the wire and senses it on both sensors at once, it knows it's at right angles to the wire, so it could back up slightly, turn right a little, then try again. If it now senses the wire on the left sensor, (which it should), it can move forward a little until the left sensor crosses the wire and the right sensor picks up the wire.

If the time between the left then right sensors 'seeing' the wire is too short, it could back up again, turn very slightly right again, then try again, until the period between the left and right sensors 'seeing' the wire is a little longer, at which point the robot will be closer to parallel to the wire, and straddling it.

If on first contact with the wire it 'sees' it with the right sensor, it knows to back up and turn right as well, until the left sensor is the first to sense the wire, then go through the above process.

(Or the reverse of all of this if it has to turn left onto the wire.)

Once the robot is sraddling the wire, it should easily be able to follow it.

Is this what you're after, or am I way off-track?

Use the forum search box in the upper right of this page and search for "lawn mower" to see previous similar discussions.

Another thing you'll need to figure out: How will you know once your robot is straddling the wire - that it is going in the right direction to get back "home"?

A single wire won't help you - you'll either need multiple wire (two with different signals on them would work), or you would need some other method to let the robot know it is moving in the right direction along the wire path.

Also - look into how various "line following" robots work (software and hardware); for instance, many of them use not one or two sensors (generally IR sensors) - but multiple ones in a line or arc, to help guide the robot properly, as well as to determine crossing angles, and to help ignore when the line crosses over itself (mostly for competition purposes). Some of that knowledge might help you.

cr0sh:
Another thing you'll need to figure out: How will you know once your robot is straddling the wire - that it is going in the right direction to get back "home"?

If it's always within the perimeter of the wire, it will always have to turn onto the wire in the same direction, either left or right, then it will automatically be travelling in the right direction.

If it can approach the wire from either side, then you're right, something more complex is needed.
I was assuming that it always stays within the perimeter wire, then follows that same wire back to the charger.