Maker Pro
Maker Pro

How to monitor a battery for a Raspberry Pi drone?

lovrinho

Apr 5, 2023
13
Joined
Apr 5, 2023
Messages
13
Hi, I have a drone project that I'm building with a Raspberry Pi Pico W and I need an advice on how to monitor and charge the battery as I have no experience with this part.

I will be using and 11.1 V (3S 1800mAh 30C) battery and I need a circuit (I don't what it's called) that will tell my rpi the voltage of the battery at any moment and the current as well if it can. I found some components online for this but I am not sure which specifications are the most important.

The other question is how to properly charge the battery. If it's 11 V, is a 15 V charger adapter enough or do I also need a component that limits the current and overcharging?

Thanks a lot in advance :)
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,734
Joined
Nov 17, 2011
Messages
13,734
I need a circuit (I don't what it's called) that will tell my rpi the voltage of the battery at any moment and the current as well if it can.
The Raspberry Pi has no analog inputs. You therefore need anexternal analog digital converter (ADC). See e.g. here how to use one. You can buy off the shelf modules containing the ADC and the required circuitry whoch can directly be connected to the RPI.
Sensing current works equivalently, but you'll need different circuitry to convert the current to a digital value. See e.g. here.

The other question is how to properly charge the battery. If it's 11 V, is a 15 V charger adapter enough or do I also need a component that limits the current and overcharging?
You will need a dedicated charger circuit (module) that matches your battery's chemistry to limit the charge to prevent damage due to overcharging.
You will also need to limit discharge as Lithium based batteries are easily damaged when discharged too low.
You can find both functions combined in so called "battery managemenmt systems" (BMS). You'll have to find one which matches your battery voltage and capacity.
 

lovrinho

Apr 5, 2023
13
Joined
Apr 5, 2023
Messages
13
The Raspberry Pi has no analog inputs. You therefore need anexternal analog digital converter (ADC). See e.g. here how to use one. You can buy off the shelf modules containing the ADC and the required circuitry whoch can directly be connected to the RPI.
Sensing current works equivalently, but you'll need different circuitry to convert the current to a digital value. See e.g. here.


You will need a dedicated charger circuit (module) that matches your battery's chemistry to limit the charge to prevent damage due to overcharging.
You will also need to limit discharge as Lithium based batteries are easily damaged when discharged too low.
You can find both functions combined in so called "battery managemenmt systems" (BMS). You'll have to find one which matches your battery voltage and capacity.

Thank you for your reply :) and sorry for my late response.

As for RPI analog inputs I thought that I saw RPI Pico series usually have a few ADC pins so I checked and Pico W does has a few which you can see on the picture below and the datasheet on this link on page 4. So suppose I can use that with a voltage divider to get a voltage reading under 5 V or so. Do you agree?

As for charging, I found this module on AliExpress but I'm not sure if it's only for charging or does it also have overcharge limiting capabilities. What is your opinion?

Thank you again very much :)
 

Attachments

  • datasheet.png
    datasheet.png
    148.7 KB · Views: 3

Alec_t

Jul 7, 2015
3,591
Joined
Jul 7, 2015
Messages
3,591
I can use that with a voltage divider to get a voltage reading under 5 V or so. Do you agree?
That should work. But the battery voltage alone won't be a good guide as to how much useful charge remains. A 'Coulomb-counter' is more effective.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,734
Joined
Nov 17, 2011
Messages
13,734
As for RPI analog inputs I thought that I saw RPI Pico series usually have a few ADC pins
Raspberry Pi and Raspberry Pi pico are two completely different breeds. Of course you can use the ADC of the PICO with a voltage divider.
An oversight on my side, my bad.

As for charging, I found this module on AliExpress but I'm not sure if it's only for charging or does it also have overcharge limiting capabilities.
The website states:
1681648965004.png
 
Top