Let's Make Robots!

Arduino Avoider

 

Update for http://letsmakerobots.com/node/25837

Stops and reverses for a millisecond when it comes within 30 cm of an object for effective braking when it picks up speed. Looks left and right and chooses the direction with the most space. PWM to about 1/4 of the speed.

Issues corrected.

     To drive the motors properly I ended up having to stack 4 sn754410 chips on top of one another to handle the current. Works great.

 

Remaining issues.

There is about a half sec lag between the response time of the right wheel after the left wheel. Not sure theres anything that can be done about this though. *Corrected this issue with a few tweaks to the code*

 

The speed is still an issue. Because of the gear ratio on the car itself it is a speed demon. If I alter the code to slow it down it won't be able to move properly. If I speed it up, it picks up speed quickly and moves faster than It can react to detected objects, which causes it to occasionally rams into things. Increased the distance to keep from objects to 30 cm from 20 cm to allow it more reaction time. Still experimenting on findind a suitable speed and distance. I added a huge bumper so it can ram into whatever it likes now without damaging itself.

Would like to add white led headlights to the front which turn on while it is moving forward, red led headlights to the rear which turn on as it backs up, and maybe green or blue leds somewhere which light as it turns.

Any ideas, suggestions, inputs or comments are welcome! nothing wrong with learning

UPDATE: Changed the code so it now looks left and right and makes the best choice where to go when it comes to an object. Added Brake Lights and headlights. PWM the speed to about 1/4 of what its capable of. Reverses for 1 millisec when it detects something for more effective braking... not bad for my first robot huh. Last Video Shows The Final Product

 

Comment viewing options

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

Stacking those motor drivers looks like a great solution to the current issue you had earlier. The robot looks much better in this video. Good job!

 

I'm anxious to see it running on the floor!

Hey Elijah, the bot looks great!   it reminds of the rigs you see in the tractor-pull competitions.

the code looks good too.  good structure and commenting always pays off.

.

nice that it works now. with the motor controller IC. good work.
I'm not familiar with arduino code but:

that half-sec delay is logical because you first need to turn the servo to the left. (which is time consuming) and then changed the left motor direction. Then turn the servo to the right (which also takes time) and then the right engine to change direction.

you could it do that you first look to the left and right. and then the motors simultaneously change direction.

 

True. I'm still gettin familiar with arduino code myself. Will look into that suggestion. Thanks!

1) That is one cool looking bot. Show me pictures of the large wheels. They look awsome

2) Isn't it way to fast to follow anything? I'd love to see it drive, but I wonder if it will be able to avoid crashing into any object it sees.

3) dont post your code on the page like that. Add it as an attachment. That makes for a much nicer read of your pages.

 

It actually works pretty well b/c as it approaches an object it slows itself down and backs up if it gets inside 30 cm. It does occasianally bump into things though and then begin to reverse. I can adjust the maxspeed in the program. Ill upload a video of it roaming around as soon as I can.

Here are some more pics of the wheels.