Notifications
Clear all

Power supply for robot - Is my approach correct?

23 Posts
4 Users
5 Likes
1,433 Views
(@jeffreyjene)
Member
Joined: 4 years ago
Posts: 56
Topic starter  

I have a small robot that has 2 12V motors, a TB6612FNG motor driver, Bluetooth HC-05, nrf24l01+, 3 ultrasonic sensors, 2 line sensors, and a Nextion display. All components other than the motors are powered with 5V. I have an Arduino Mega that I'm powering with a separate battery through the barrel jack. I decided not to power anything off the 5V pin of the Arduino. I'm using 3 18650 3.7V 1200mAh batteries. On my testing board I've run a line from the batteries to the motors, and one line through a buck converter stepped down to 5V to a power rail where I've plugged my components in. When I have everything turned on I checked the rail with my multimeter and found it to be around 4.7V, which makes sense. The Nextion display needs a solid 5V to avoid damage to the unit. Should I run an additional line from the buck converter to the display or could I increase the voltage of the buck converter so the rail is back around 5V with all components running? I'm guessing the first approach is best, but I want to make sure. I'm trying to get the most "bang for my buck" (no pun intended) out of this setup.

JJ


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7008
 

@jeffreyjene The first approach does nothing other than allow more current to flow if required. Set the buck converter to produce 5V.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1694
 

Hi @jeffreyjene,

  I interpret what you are saying is that your buck converter is giving 4.7V under load. My suspicious side is flagging up a warning .. Why is that happening? a small change, say 0.1V, is to be be expected, but 0.3V is on the high side. A "good" buck power supply will show very little voltage change over its load range.

---------

Admittedly, there are occasions that the voltage at the supply is set a 'little' high, to allow for wiring losses ... e.g. USB power output is often set to 5.1V, so that 5V is seen at the far end of a USB cable, but this includes accepting that some devices will see 5.1V, which is within the margin.

So I am not saying, setting the power supply output a little high is always unacceptable, but rather, only do it after carefully understanding why it is the best solution and ensuring there are no 'downside' consequences which are unacceptable ... over voltage is far more likely to permanently damage something than under voltage!

---------

Also, you mention that the display wants a 'solid' 5V ... whilst I sympathise with it, most digital based electronics would not notice 0.3V drop on a 5V supply, albeit poor design practice to assume that 4.7V was 'near enough'.

If you have tried connecting it, and it is not functioning properly, I would wonder if the true voltage is dipping below 4.7V, possibly for periods which are too short to show on a meter, but easily long enough to upset a display.  In particular,but not limited to, if you have any transient voltage drops on the 0V 'ground' lines, these can cause digital signals to be corrupted.

---------

Whilst it may be harmless, 0.3V is large enough to warrant me thinking you should be aware of how it is happening. Of course, it might simply be the buck converter was set to 4.7V in the first place, but I am assuming  that is not the case. A corollary of that is the buck converter regulation, particularly at low load, may be poor. Some regulators specify a minimum load, although in practice, whilst I am sure there are rogue examples, I haven't seen one that produces an appreciable over voltage under no-load conditions.

Alternatively, it could be because:

  • Voltage drop across the wiring, plug contacts(if you have any), switches, etc.
  • The regulator is struggling to provide that much current

Personally, I would advise you spend a little time finding out exactly why the voltage is lower than you expect. It may be a total red herring, but it is the kind of red (or maybe yellow, as it is only cautionary warning?) flag, that something is on the edge, and may give other problems, especially those of the type that show up every now and again. Measure the voltage at different points around your system to see if it varies because of wiring voltage drops.

Particularly consider the power supply wiring ... each wire is also a small inductor and resistor, which will cause voltage drops when current increases rapidly.  In some cases, consider providing separate wires to different parts of the system, so that a demand from one does not affect another 'sensitive' part.

In other cases, separate regulators is the optimal approach ... e.g. some of the 'top of the range' graphics cards use a number of separate buck regulators to power the single graphics processor device, simply to meet the current demand. So whilst I am not in a position to recommend you use a separate regulator for the display device, equally, I would not rule out the possibiility after examing the system in some detail.

Sorry, this is all very woolly and vague - sometimes problems are a little different from their first appearances. As I can't physically see and test the system, all I can do is try to convey an impression of sort of things I would probably look for.

Best wishes, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7008
 

@davee I assumed he was using the same kind of buck converters I use that are adjustable. He just needs to adjust it to be 5V. I have tested mine under 'normal' loads and they do not vary. I think that is how they are designed.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1694
 

Hi Ron @zander,

  My suspicious nature was assuming that it wasn't that easy ... i.e. that it was either a fixed regulator or that if it was adjustable, that it had been adjusted to 5V on no-load, but it was giving 4.7V in situ.

Of course, sometimes the simplest answers are correct ... that is difficulty of diagnosing by a forum ... 1% technology experience .. 99% guesswork of what the other person actually has in front of them. 😉 

Take care my friend, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7008
 

@jeffreyjene I just noticed something that I missed before. The 12V motors should be on their own LIPO batteries. Either a 4S pack of 14.8 stepped down to 12 or a 3S of 11.1 stepped up to 12V It's a tradeoff between cost and run duration which is power. Here is the Canadian amazon link to the batteries I ordered. HERE As you can see even this 'cheaper' solution is still very expensive. Depending on where you got your 18650's they may only last a few minutes as most are mis-labelled.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7008
 

@davee Yes, I don't 'know' that it is adjustable, but many are. I order them by the dozen because I have an abundance of 12VDC so buck it down to roughly 7 then put it through an LDO Linear to get a stable 5VDC. Best of both worlds, having the problems of each. But seriously, I have not had a problem so far.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@jeffreyjene)
Member
Joined: 4 years ago
Posts: 56
Topic starter  

@zander I guess I don't understand about the batteries, my 18650s seem to perform just fine in other projects I've used them in. Is there an issue running the components (stepped-down of course) and the motors (before stepping down) off the same batteries? I'm not detecting any problems or noticing them losing charge very quickly, or maybe I'm just lucky.

 

JJ


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7008
 

@jeffreyjene I think you said you were using 3 18650 1200mah batteries. They must be wired in series so what you have is 11.1VDC at 1200mAh. That is a very small amount of power for a 'robot' unless it's a tiny robot. My battery is also 11.1VDC but at 5,200mAh and cost about $80. I actually wanted more but that was costly enough.

It is just good engineering practice to separate the motive power supply from the command and control power supply. Will it work as you have it, yes, most of the time. I have to admit a bias having worked on fault tolerant hardware for a great many years and having to produce bug free code at the same time so I might be extra cautious.

If those batteries are working for a few minutes then carry on, but if you want to run for a longer time remember you can split the power, the exiting pack for the electronics but onh 2 batteries needed and a pack like the following for motors. That 5,200mAh pack is good for 20 - 30 mins.

https://amz.run/6JTd

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7008
 

@jeffreyjene I thought you said you had 12VDC motors, and 11.1VDC battery. That being true, you are stepping UP not down, but no actual need to, the motors will work fine on 11.1VDC.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@jeffreyjene)
Member
Joined: 4 years ago
Posts: 56
Topic starter  

@zander Sorry, I should have mentioned that was the voltage I was going to run the motors on. I don't mind the 11.1VDC.

JJ


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7008
 

@jeffreyjene Those motors have a wide tolerance for voltage, I also have an 11.1 battery, the next size is 14.8 but costs something like $40 more. Do you have a picture or link to the robot, it must be very small unless the run time is 5 mins or something.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
THRandell
(@thrandell)
Brain Donor
Joined: 3 years ago
Posts: 225
 

@jeffreyjene

Hi Jeffrey,

In my robots (if i have the room) I separate the motor’s power source from the logic/sensor power source.  I used 6 - 18650 1.2Ah batteries in my Seeker robot with no problems.  I used 4 batteries in series and a 12 volt regulator for the two motors and they run super quiet.  The remaining 2 batteries I used for my Arduino clone board (Pololu A* Prime) and two IR proximity sensors, two wheel encoders, the logic for the motor driver, a LCD, a buzzer, a microphone (3.3V), a collision bumper and 3 LEDs with no problems.

My problem (observation) with running everything from one power source is that as the battery weakens the voltage takes a big hit when the motors start up/change direction.  So you might want to consider powering the motors separately if your display is sensitive to voltage drops.

 

Tom

To err is human.
To really foul up, use a computer.


   
Ron reacted
ReplyQuote
(@jeffreyjene)
Member
Joined: 4 years ago
Posts: 56
Topic starter  

@zander It is really rather small, It's on the bench at the moment in parts. I'm working on a course that will show wall following, maze-solving algorithms, etc.. The power hasn't run out on me (yet) during all the testing I had done when it was put together, but I figured if I'm going to be "teaching" anything I'd better get the power requirements right and know what I am doing there.

JJ


   
ReplyQuote
(@jeffreyjene)
Member
Joined: 4 years ago
Posts: 56
Topic starter  

@thrandell Hey Tom, my setup right now separates the Arduino itself from the 18650s (it runs on a 9V through the barrel jack). I am, however, powering all the sensors from the stepped down 5V split-off I've been talking about. I'm not sure what kind of hit they are taking when that motor revs and turns, but I'll have to put it on the bench and see. I know the 9V drains very fast when I run all the sensors off the 5v supplied through the Arduino. I'm also trying to develop a shield for this whole thing to manage the wiring and simplify the whole thing.


   
ReplyQuote
Page 1 / 2