Hi, everyone! I'm working on my first relatively large robotics project using an Arduino Mega 2560 to control several devices including different sensors, servos, etc. I spent a decent amount of time planning out how I can power all of the different components for my project. I'm attaching a diagram that shows where my current thinking is, but to summarize, I have a power bank with a 12v/6A max output. I'm planning to use that output to power the Arduino Mega itself through the Vin pin as well as powering two 12v DC motors (via a motor encoder module). Additionally, I'm thinking I will have that output feed into two buck converters (12v to 5v/3A). I will then use the 5v output of the buck converters to power my different sensors and actuators. I expect (and will ensure) that the sum of each connected device's max current draw is well below 3A for the devices powered by each buck converter. The only other thing worth mentioning is I have an ESP8266-01 WiFi module that I plan to power using the Mega's 3.3v pin.

Since I am a beginner in this space, I wanted to share my thinking and design and hopefully solicit feedback from some of you kind souls if anything looks unwise, unsafe, or falls outside of good practice. Thanks in advance for any guidance and feedback :blush:

Please list the devices you have actually tested!

So I haven't actually tested any devices just yet. I'm still in the early planning phase for this project. The parts I'm planning to use though are:

  • 1 Arduino Mega 2560
  • 1 ESP8266-01 WiFi Module
  • 2 12v encoded gear motors (from Hiwonder Ackerman chassis)
  • 4 channel motor encoder module (from Hiwonder Ackerman chassis)
  • 1 LD-1501MG servo motor
  • 6 HC-SR04 ultrasonic sensors
  • 1 (maybe 2) Arducam 5MP Plus OV5642 Mini Module Camera
  • 2 (maybe 3) SG90 9g micro servos
  • 1 Micro SD Card Module
  • 1 Talentcell 12v Lithium ion battery with 12v/6A max barrel jack output
  • 2 LM2596 buck converters to take 12v as input and then output 5v/3A max

Based on what I've been reading and learning over the last few weeks I think some wiring like I have in my diagram should be able to sufficiently and safely power everything, but figured I'd post in here for extra sets of eyes just in case.

I really wonder if actual testing of those items would not give you a very different view of your project. For instance, triggering just one of your 6 HC-SR04 ultrasonic sensors will block code execution until an echo is received or the time-out period has expired. Also the SD card access will be blocking until the command has been completed.
These are some of the things you will learn if you begin testing rather that theorizing.

1 Like

Yeah that's definitely a good point. I will gain a lot of insight from trial and error with testing these different pieces I plan to use. Good suggestion!

Given this, it's fair to say that some of the sensors and devices I end up using for my project may change. Agnostic to the specific devices I end up using, do you have any insight specifically on the powering setup shown here? If I ensure that the sum of the max current draw of each device connected to a buck converter is decently less than the 3A max is that adequate or do you have any recommendations for cleaner or more appropriate ways to provide power to different components in the system (whatever those components may be)

Looking at the Hiwonder stuff, interesting - I can say I have never seen differential and ackerman steering on the same chassis before. Sure allows for some possibilities!

Re: your power plant - what battery exactly are you looking at? 12V 38400mAh should be a monster in size, if RC lipo battery sizes are any indication, at least relative to the chassis which looks to be about 1:10 - 1:16 scale as are typical in the RC cars world.
So I will say that this mystery battery with a barrel jack output (?) raises some concerns
Looks like that's basically what you're building, your power arrangement up top here looks fine. You just might be missing with that mystery battery.
Question: what specifically are you using to drive those motors? Is that motor encoder module also an ESC or motor driver?

1 Like

Re: your power plant - what battery exactly are you looking at?

The power source I've been eyeing up (haven't acquired yet) is actually a rechargeable power bank made by Talentcell. The power bank has two outputs: 5v USB (which I don't plan on using) and a barrel jack outputting 12v/6A max.

should be a monster in size,

The power bank will be 6.3 x 3.23 x 1.89 inches which I'm thinking should comfortably mount on the chassis. If not, I am open to exploring other, smaller power supplies for this project.

So I will say that this mystery battery with a barrel jack output (?) raises some concerns

Would you be able to elaborate on these concerns?

Question: what specifically are you using to drive those motors? Is that motor encoder module also an ESC or motor driver?

I am using a motor driver that came with the Hiwonder chassis. I haven't been able to find too much info on it outside of some pretty basic specs from the data Hiwonder sent along with the chassis.

Datasheet?

Sure.

All what's below is to say that the pack you're looking at claiming 12V and 38400mAh - I just don't buy it.

Go to your local hobby grade RC hobby shop, buy an RC 3S lipo and charger and use that instead. Bonus: with the RC battery, also buy a battery monitor/alarm. It will plug right into the battery balance lead and look really slick (and avoid undervoltage on a lipo which you definitely should avoid). Buy from the local shop, talk to them about your needs, they'll hook you up with the right stuff and be sure to ask about safe practices with lipos.

tl/dr
Consider the following lipo battery by Losi, a popular choice in the RC hobby:
https://www.losi.com/product/11.1v-1400mah-3s-30c-reaction-2.0-lipo-battery-ec3/DYNB14333.html
The dimensions of these are typically in the ballpark of 6.18 x 1.89 x 1.06 " (157 x 48 x 27mm ) so they fit in an average RC car battery tray.
These range from the Losi I linked to at 1400mAh (that's effectively the size of your "gas tank" if you will) to about 5000mAh which are the same length and width but they get more capacity in the depth of the stick pack.
Notice also the gauge of wires coming out of that stick pack, and the little pigtail that's for balance charging the relatively unstable chemistry of lithium polymer batteries (lipos).
I wouldn't feel comfortable drawing any real current through a barrel jack on a single skinny wire. The losi lipo has 14AWG (iirc) silicone jacket (for flexibility) stranded wires to allow the battery to deliver its rated C (charge and discharge current - for motors that start and stop a lot, it matters).

What you're building looks a lot like an RC car to me. I made a similar teleoperated (RC control still) robot I built on the Losi Nightcrawler rock crawler platform.

I used a shortie pack (half the length of standard RC packs) 3S (11.1V nominal), 3300 mAh pack because space was tight, then bought two matching male plug ends (lipo batteries are always female plugs to prevent accidental shorts), fed that male lead into two terminal strips (positive and negative), jumpered each strip with bits of wire to create a power bus and a ground bus, took the second male EC3 plug (the style on that lipo, there's lots like Deans, Traxxas, whatever), used that second male to plug into the robot drive ESC (speed controller) and picked off the remaining battery power like you are thinking of to feed into a buck converter and a Castle Creations 10A BEC (battery eliminator circuit) to power my servo.

Speaking of servos, your battery pack risks browning out when you try to steer with the servo (that's what the Castle BEC avoids in RC higher torque, higher voltage servos).

Clear as mud?

1 Like

Here are the available specs for the PB120B1 Talentcell battery pack I'm looking at:


OK, can't speak to that but if they designed it and sell it as part of the kit, it probably does the job. Maybe one of the circuit gurus here can speak more to that. I don't build my own H-bridges or use typical Arduino motor drivers.

tl/dr
Consider...

@hallowed31 Thank you so much for this very detailed response! There is a ton of useful information here. I will definitely take your advice and go seek out advice from a local RC hobby shop (I believe there are a few options in my area).

I really appreciate your time here!

Yeah, don't use this. This is a phone charger battery backup, I would bet my vintage Arduino Duemilanove that IF it works in your application, it will work for like, two minutes.
Just my $0.02

1 Like