Go Down

Topic: UNO powered by power bank via USB, how to measure p b status (Read 351 times) previous topic - next topic

Railroader

I have a low current consuming UNO application powered by a power bank via the USB. In order to prohibit the p b to cut off I once per second adds a load controlled by the code. Applying the load 25% of a second makes the application use 1/4 of the capacity of the p b and then the p b Cuts off. In order to continue 50% was to little load and now I test using 75% load every second.
Is there any way I can measure p b voltage and by the code adjust the duty cycle of the extra power consumption needed to awoid power bank cut off?
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

Northof49

As the power bank outputs 5v, you should be able to keep track of its voltage using an analog input.  If the voltage is higher than 5v, you need to use a combination of 2 resistors to create an appropriate voltage drop before measuring.  I use this method to keep track of lipo voltage on my robot and send me warnings and eventually shut down the motors if voltage drops too low.

Railroader

I use a standard USB cable between the power bank and the UNO. Is it that USB +5 that appears on the various Vcc pins on the board?
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

Northof49

According this diagram, the usb is directly connected to the 5v rail when an external source through the barrel jack is not present.

https://i.stack.imgur.com/tEqgz.png

So, that would suggest you can use the 5v pin as your measuring point for usb power source.

Railroader

Thanks a lot Northof49! Your link is saved as a favorite for the future. I have been reading some topics where people have had trouble with the power supply options and mechanimsm when using the 7 - 12 volt supply connector. Now I know a lot more.
My idea is to trac down the cut off criteria of the power banks I use. Reading the voltage is one way to go. Experimenting with the amount of waist current and waist current duty cycle is also a way I am testing.
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

Northof49

I'm using an Anker portable usb charger as a power source for one of my robots.  It's a 25 amp hour pack with built in power management and an indicator of charge level.  Give a good long run time.  I'm powering a Raspberry pi with it, and you can't have power drop out on one of those, or else you corrupt the memory card that carries the whole operating system and programs.  The Arduino is powered off a usb power supply that is fed by a 14.4 volt lipo pack.  That needs to be monitored, because if you run a lipo down too low, its ruined.  I have the drive to the robot killed if it hits too low, and warnings send to me as it approaches that level.

Railroader

My increase of waist current didn't look like giving me the aswer. Started a new topic using 2 UNOs..
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

Railroader

Back from the other topic, a "Last report". Measuring now works. Using a higher frequency, 100 Hz and 10% duty cycle of waist load of current seams to be  more promising.then higher current at lower frequency, 10 Hz or 1 Hz at the same duty cycle..
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

Go Up