StellarEquilibrium
Posts: 3
Joined: Thu Jan 10, 2019 12:25 am

Raspberry Pi 3 Robot car, Good to go?

Thu Jan 10, 2019 12:37 am

Planning to use the Pi 3B for a robot car project where 2x MG995 servo, 1 HC-04 Ultrasonic sensor control the entire vehicle.

That is pretty much all I have (+ breadboard, potentiometer, resistors, leds) right now, I still need a power source since unlike the Arduino, the raspberry pi's GPIO Pins are not sufficient enough to run 2x (5-8V) servo and 1 sensor.
On top of that it could lead to the pie crashing (low power) etc...
I don't think I need a motor driver controller.

1) Which power source do I need for the Pi & Components ?
I don't want to rely on a power cord since its a car
Have you seen a Tesla driving around with a power cord following behind? Me neiter :)

scotty101
Posts: 3680
Joined: Fri Jun 08, 2012 6:03 pm

Re: Raspberry Pi 3 Robot car, Good to go?

Thu Jan 10, 2019 10:36 am

A decently sized USB battery pack that you'd use for charging your phone would work.
Something like this
https://www.amazon.co.uk/dp/B072JLP79Z/ ... Z57961226/

You won't get huge run time out of them but probably enough for an hour or so.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

StellarEquilibrium
Posts: 3
Joined: Thu Jan 10, 2019 12:25 am

Re: Raspberry Pi 3 Robot car, Good to go?

Thu Jan 10, 2019 8:56 pm

scotty101 wrote:
Thu Jan 10, 2019 10:36 am
A decently sized USB battery pack that you'd use for charging your phone would work.
Something like this
https://www.amazon.co.uk/dp/B072JLP79Z/ ... Z57961226/
But power packs usually only supply max. 5V 2.1A which means the Pi will pretty much hog all the energy and the motors won't be able to get any power

StellarEquilibrium
Posts: 3
Joined: Thu Jan 10, 2019 12:25 am

Re: Raspberry Pi 3 Robot car, Good to go?

Wed Jan 16, 2019 10:21 pm

Is it wrong to power the 2-4 servos with an 4x 1.5V AA pack?

papous
Posts: 72
Joined: Fri Jan 05, 2018 5:50 am

Re: Raspberry Pi 3 Robot car, Good to go?

Thu Jan 24, 2019 9:14 am

I am using 2 packs of 2 18650 batteries each with a UBEC to reduce the voltage to 5 (or 6) volts. Have not checked how long it will work.

MarkR
Posts: 154
Joined: Fri Jan 25, 2013 1:55 pm

Re: Raspberry Pi 3 Robot car, Good to go?

Fri Jan 25, 2019 5:04 pm

You don't need a motor controller, as servos have these built in.

There are many variations (and huge amount of clones) of the MG995 servo. I bought a few "continuous rotation" models from some Chinese site and they seem to work ok on 5v from a power bank, plus servo pulses from a Raspberry Pi.

You want continuous rotation servos, not position-servos. Position servos are the standard type and typically rotate 180-270 degrees only, they're used for something like steering wheels or flight controls in a plane.

Continuous servos are the ones if you want a skid-steer robot (the easiest type to build).

You can run them from a power bank through its 5v regulator. Don't drive the +5v for power, or the GND, through your Raspberry Pi board. Make sure the GND is connected to the same place, and you can connect the servo pulse pins directly to GPIO - at least, it works for me. The Pi gives out 3.3v pulses which seem high enough for most servos to work.

You could use several power banks (e.g. one for the pi, another for the motors) provided you tie the negative (GND) together (never connect the positive together though).

One problem with servos is that they don't always centre or stop at exactly the same pulse length. The Pi will generate nice 1500us pulses (at least, using the pigpio library) which are very accurate, but the servo's control electronics always perfectly accurate, and might drive slowly forwards or backwards.

This means that a 4 wheel 4 servo robot, could see its different wheels driving different directions even when you're just putting 1500us pulses to all four. You might need to calibrate them individually.

Return to “Automation, sensing and robotics”