Navigational aid (programming)

Guys I need my tank bot to navigate around my house like bedroom to kitchen but without a camera or a GPS like system.

I plan to do it using simple pre programmed paths, like go front for 10 secs, turn right about 45 degrees go forward again.

But I think this idea will lack precision.

Kindly give me some suggestions people!

 

Thanks in advance!

Use time for movements is

Use time for movements is not precise.

How about encoders on the wheels?

IR or ultra sound beacons around your house to navigate from one to the other finding it’s way back to the charging station or your bed for either charging batteries or bringing you a beer :wink:

Use of inductive wires to makr tha path (depends on the material of your floor)

Draw a black line and use a simple line follower ;-)))

 

I was thinking encoders or

I was thinking encoders or IR beacons as well, sounds like the best and cheapest options.

Encoders might not be accurate enough as well, if there is a small obstacle on the way, it might change path and not make it afterall.

Maybe combine the two?

actually I am not exactly

actually I am not exactly sure how to use time in a program, but I was planning to use this:

  • for(int i=1; i < n ; i+=1)        // number of times the below loops should be played
  • for(value = 0 ; value <= 255; value+=5)   //each time this loop runs , the bot covers almost 1 feet
  •   { 
  •     digitalWrite(M1,HIGH);   //Motor 1 HIGH
  •     digitalWrite(M2, HIGH);  //Motor 2 HIGH     
  •     analogWrite(E1, value);   //PWM Speed Control
  •     analogWrite(E2, value);   //PWM Speed Control
  •     delay(30); 
  •   }  

Sorry but I don’t think mom will agree on that IR / Ultrasound becons all around the house, I don’t think she will permit me to draw lines on the floor too!

So what do you think? the “for” loop will work?

I have tried it, I have some trouble making it go in a perfectly straingt line, but with a little bit of tweaking I guess I should be able to get it working!

Thanks

The problem with time is

The problem with time is like Einstein already pointed out "Time is relative"

Just think about it. Your bot is powered by batteries. They get drained over time and the power loss will cause that your motors run slower and slower.

If your bot can go 1 meter in 20 seconds he/she/it may just go that far in 25 seconds when the batteries are not fully charged anymore. So anything related to a time value will be not precise when the conditions got changed (low battery, slippery floor, sudden obstacle like a dog, a cat or just a lost slipper)

EDIT: IR beacons does not have to be very big, just a IR LED, board, batery in atiny case sticked on the wall or standing under a closet or hidden behind a flower pot.

At the moment I’m using time

At the moment I’m using time as well in my 4wd rover, to make it turn for example 45 degrees.
This is far from ideal, for the reasons Lumi has stated.

If your battery drains a bit, the motor will go slower, and thus the movement will change.
When I get enough cash, I’m gonna get encoders for that reason, to eliminate everything related with time.

Yes actually this was the

Yes actually this was the reason why I did not want to use “for loops” and time, need to do some research on encoders and beacons.

Any good places to buy them from? Hope they come cheap :stuck_out_tongue:

Encoders go for like 10

Encoders go for like 10 bucks for 2, maybe even less.

IR beacons you can make yourself, just get an IR LED, battery and a resistor and you’ll be good to go. You can make them extremely small as well.

Encoders give you the advantage that everything is in the bot itself, no external stuff needed.

Light beacons are the best

Make a robot that can roughly determine the direction towards a source of light. Make blinking beacons that you can identify by frequency or color (color is not really an option if you use IR). The omnidirectional beacons can be used to roughly determine the robot’s position and you can also have narrow beam beacons that you can use to precisely navigate from one room to the other or between specfic objectives within a room. Encoders won’t help you too much… they may be useful to detect speed, motor malfunctions or stalls but don’t use them for dead reckoning. Dead reckoning barely works on flat, clean surfaces such as a table, won’t work on floors.

Encoders and beacons would help

Both encoders and beacons should help. Using the beacons is the most effective for getting around. Since it is just plotting beacons around the place to direct it. But if you add encoders, then each time you follow the beacons path, the encoders can also record the the … how can I say it, distance it took to get to one place to another. Then, it can store that information, and use it again to navigate, just incase batteries on beacons die, or they’re turned off.

Well you can use a compass

Well you can use a compass too .

Little more detail please
Little more detail please

I still don’t understand how
I still don’t understand how to build a beacon using ir LEDs , how the bot know where these beacons are? Little more info on how to build a beacon or where I can buy it from

Casn not recommend any place

Can not recommend any place since I am buying all in the chinese Taobao and did not came to that IR beacons yet. I think you can just make them by yourself with an IR LED and some around. It juist have to send out a let’s say pulsed signal what the rerceiver can interpret and call the right function for each beacon.

Example: Your bot “see” beacon 1 and drives toward to it and if it arrives it get told to turn and seek out for beacon 2 (#2 has another frequency to avoid misinterpretation)

Encoders are that black/white discs on a wheel with an LDR reading the black/white chenges to determine how many times your wheel turned and then you can calculate a waypoint…it’s also not precise since a wheelspin can happen without movement.

Here are beacon projects

Found something…

https://www.robotshop.com/letsmakerobots/node/6737, https://www.robotshop.com/letsmakerobots/node/10590, https://www.robotshop.com/letsmakerobots/node/6499, https://www.robotshop.com/letsmakerobots/node/10003

I am sure the beacon version will be the best solution for your task. Another benefit…you just can re-organize the beacons to let your bot go another path…

A compass in indoor use is

A compass in indoor use is not so reliable. If you drive past anything that has a magnetic field the compass can go haywire.
When you pass a loudspeaker for example, the magnet can pull the compass in it’s direction.

RFID tags?

You could place RFID tags in all doorways and have a map for each room. I believe another point I would make is that a few of the more navigationally intense robots that I have seen use 2 way communication for navigation.

EDIT: WOW! Talk about a partial thought. I intended to say that some of the more traveled robots I have seen use 2 way communication between the robot and a PC. Offloading some of the work that the robot would be required to do onboard otherwise.

RFID is really something new
RFID is really something new and interesting but have you used it? Or has some one used it ?
My floor does have some black lines at the edge of each tile so I guess I can make a line follower… But I was also thinking whether it will be possible to use a capacitor so that voltage would not drop abruptly and change the speed of the motors

Firstly thanks a lot! I saw
Firstly thanks a lot! I saw those 4 pages understood a bit about beacons but what is the typical range of a beacon? Suppose I want the robot to navigate my entire house I will need a LOT of beacons!

Seems like you could set up

Seems like you could set up a few IR beacons, each with its own unique serialized identity, that way you could tell where it was based on the ID of the beacon.