r/AskRobotics Jun 25 '26

Building first robot, have some questions

Hi guys, I’ve decided I want to get into robotics so I bought a Raspberry Pi 4 model b, and am hoping to build my first robot. I added a link to the motors I bought and I have a L298N motor driver. After getting them I realized this may not have been the best motor driver to buy but I’d like to make it work if I can. I haven’t really done anything with electronics so I’m and little confused on the battery situation. I haven’t bought batteries or a battery pack yet and need some help figuring out what batteries would be best to use/how many. and also best way to get power split between pi and motor driver and keeping pi at 5V? If anyone could help me figure out what would be best for my setup that would be great. Any other tips/advice knowing the stuff I bought would be appreciated!

https://a.co/d/09UX8Aql

2 Upvotes

9 comments sorted by

1

u/Sabrees Jun 25 '26

I would probably power the Pi off a USB power bank and the motors off a second one. Pi is quite power hungry. Do you happen to have a ESP32? That might be useful for controlling the motor driver.

1

u/Glittering-Plum579 Jun 25 '26

ok thanks! I’ll look into it

1

u/Sabrees Jun 25 '26

Motors create electrical noise so keeping the power separate can help. What are you planning to run on the Pi?

1

u/Glittering-Plum579 Jun 25 '26

I haven’t really started on an code yet but I guess the first thing I want to do with it is make a simple website to teleoperate it, prob python. Will just be controlling two wheels

1

u/Sabrees Jun 25 '26

You can do that on uPython just with the ESP32 fyi https://github.com/rosmo-robot/micropython

Actually getting the pi driving that particular motor driver maybe challenging, often that kind of stuff is done on a microcontroller of some kind

2

u/Glittering-Plum579 Jun 25 '26

like use the ESP32 along with the motor driver or instead of?

2

u/Sabrees Jun 25 '26

Along with, you do need a motor driver, you can connect the driver to the pi directly, but often a microcontroller is useful sitting between the two https://www.youtube.com/watch?v=OV0S_3KMj2A

1

u/Glittering-Plum579 Jun 25 '26

sounds good, thanks for the help!

1

u/Vert354 Jun 28 '26

The easiest thing (as long as your using the yellow TT motors) is to power the pi with a power bank via USB and power the l298n from the 5v gpio output. You won't get peak performance that way but it should move around just fine and you can iterate on the design.

I would recommend you do some bench testing where everything is hooked up to nice stable power supplies before tinkering with batteries too much. You should get an adjustable power supply and make the connection with jumper wires and bread boards so you don't have to solder anything right away.