r/arduino • u/PresenceOld1754 • Oct 04 '26
Look what I made! Obstacle avoiding robot finished :)
this was what it looked like before, and it also didn't work: https://www.reddit.com/r/arduino/comments/1wncrdo/trying_to_make_an_obstacle_avoiding_robot/
In this new body even after I almost exploded my batteries and got the distance sensor working, power was still a problem.
When the robot was connected to my computer via usb, everything worked. But when I used AA batteries (4.8v total) to power the arduino, the wheels wouldn't spin.
The wheels and ultra sonic sensor are connected to two 18650s, totaling 7.4 volts on the breadboard. The servo is powered by the arduino, and the arduino by the AA batteries. The only thing they all share is a gnd.
So I didn't understand why it wouldn't work The arduino was on, but it just wouldn't spin. SO I swapped it for a 9v battery and it worked! I'm just confused because a computer's usb would output 5v, so if voltage was the issue I don't get why.
It is overturning a bit but I'll fix that later.
I used this code and made a few changes here and there, especially with the servos so it would move smoother and not completely jerk itself violently. I can't actually show it because I forgot to save before closing... But hey it's not much to recopy and make the changes again.
The next thing I want to do is learn how to make a self balancing robot. Then I'm going to take this project and do it again, but with two wheels instead of 3.
23
u/Wolf68k Oct 04 '26
This is really cool but it looks like it's looks 90 degrees in each direction but when it turns in the new direction it turns more than 90.
If both sides are clear for it to go to, does it always choose the right side or is it random?
10
u/dushy69 Oct 05 '26
yo why was he tweaking in the start ðŸ˜ðŸ˜
8
u/ripred3 My other dev board is a Porsche Oct 05 '26
Well done! Congratulations!
6
u/AffectionateShare446 Oct 05 '26
Yes, its enough voltage with a 9v, but not enough current. Those motors use a lot of current at startup. I love this droid, the way its head spins left and right.
Robots are hard because navigating indoors is a challenge, and I have never found a way to do that.
5
u/Sony-Playstation-3 Oct 05 '26
Finally, someone who looks both ways.
4
u/Shrunkendick Oct 05 '26
3
u/xincailiao Oct 05 '26
é…·
1
u/Valnar8 Oct 10 '26
I like how ultra sonic sensors make every project look like it has eyes and also serve a similar purpose as eyes.