Let's Make Robots!

Big Bertha - Obstacle avoidance

Navigate around with infrared sensor
AttachmentSize
Bertha.txt5.85 KB

Hi all! So, this is my second robot, not finished yet.

Like the first one, the structure is made with knex and the controller is an arduino uno. This time it uses an infrared sensor moved with a micro servo to check distances, and the 2 back wheels are powered wih separated DC motors. The 2 DC motors are controled via a module (bought all mounted) using a double H-bridge (L298), which allows changing direction and speed of the 2 motors separately.

 


 

Update 07 october:

Structure changed completely (was too heavy with all the batteries, wasnt strong enough).

Added pizeo buzzer when starts.


 

Current problem : when arduino is powered through a usb cable, it works, but when powered with batteries, it acts strangely : the wheels don't go in the right direction and it doesn't change speed or direction when obstacle are met. I really don't see what's the reason why it doens't act the same way when it's powered with usb or batteries.

 


 

Update 14 october : By switching batteries (so now, 6AA for arduino and 4AA for the motors), no more problem. A few interferences, easily deleted by adding capacitors in parallel with motors.

Changed also the algortihm, now the robot (almost) never gets stuck --> check videos.

 


Next project : add bumper sensors (like simply two switches), make the robot learn by himself how to use the datas coming from the infrared sensor to avoid obstacles, that is to say, avoid that the bumpers bump. I know it's gonna be difficult and maybe I won't succeed but I want to try.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Your next project sounds a lot like my robot.

Yeah that's exactly what I want to do :)

Good luck!  I can't wait to see how you do it.  (or, if you want to know how I did it, I'll be happy to tell you)

:^)

Looks really cool.  Think I would name it Mad Max, though.  

The battery problem sounds like the voltage is too low.  I'm not real familiar with the Arduino, but I think it uses a standard regulator instead of low dropout.  A standard reg needs 7.0 to 7.5 Volts to work properly.  Your 4 AAs put out about 6 when brand new.  the regulator will usually put out about 5 volts with that, but it isn't really regulating.  It makes it VERY susceptible to noise (from motors and stuff) which could be causing your problems.  I would try connecting the Arduino to the 6 AAs as a test, maybe with a large capacitor (100 or more uF) to filter noise and sags.  

Like I say in the article, I switched batteries, thus putting more power for the Arduino board and it worked, thanks.

It's not ideal because then there is only 6V for the motors module, and it says it should be minimum 7V. But well I don't let the robot running around during long times, shouldn't cause big problems.

Glad that worked.  I looked at an Arduino schematic and they seem to use a "sort of" low dropout regulator.  It needs at least 6 volts to work right.  Four alkaline batteries give a little over 6 when brand new, but drop rapidly.  You can probably run the electronics and the motors off the same batteries.  Three reasons people usually don't:

1- need different voltages.  Since you want about the same (7-9V) on both, that shouldn't be a problem for you

2- voltage sags.  The high current a motor takes when starting makes the voltage drop below the needed regulator voltage.  Some large caps (100 - 1000 uF) across the battery input to the electronics will usually fix that.

3- motor noise.  The electrical kind.  Motors generate a LOT of electronic noise which comes through the power lines especially.  Some small caps ( 0.1 uF ) will sometimes fix that, but it's the hardest to fix.

You can try it with the caps and if that doesn't quite work you can put a diode in line between the battery and the caps to isolate the electronics power from the motors.  You lose about 0.6 volt in the diode but you should still have enough for the Arduino with 6 batteries.

Nice work.  Good luck! 

Like I say in the article, I switched batteries, thus putting more power for the Arduino board and it worked, thanks.

It's not ideal because then there is only 6V for the motors module, and it says it should be minimum 7V. But well I don't let the robot running around during long times, shouldn't cause big problems.

Considering how it's acting for now, yeah mad max would fit quite well.

Your battery problem explanation makes sense. Plus I noticed that there were less problems if I replaced one or two of the 6 batteries for the motors by two rechargeable batteries, so providing a bit less voltage. I'll try next weekend!

Cool construction. Your battery problem makes no sense for me. It should be enogh if the batteries are full charged. Do you have thick enough wires from your battery to the motors?

Thanks! The batteries are quite new. I used them on a precedent project and there was no problem...

I'll rewire the thing to see if this is the problem. But I'll have time to do it only next weekend.