Page 2 of 2

Re: Measure battery voltage

Posted: Fri Feb 20, 2015 10:59 am
by almaz_1c
Ok, thanks.

Re: Measure battery voltage

Posted: Sat Feb 21, 2015 11:27 pm
by almaz_1c
Hello! In addition I want to measure total charging/discharging battery current. For this I think use max471 or operational amplifier. May be there is was some already implemented solution in schematics of quadrotor to do that. ( Without using nfr51 (

Re: Measure battery voltage

Posted: Mon Feb 23, 2015 8:10 am
by tobias
It might be better to use a hall effect current sensor instead. One of Allegro ones should work fine. There can be peek currents of above 5A so make sure the current sensor can handle that. The sensor outputs a voltage which could be measured with the STM32 ADC.

Re: Measure battery voltage

Posted: Mon Feb 23, 2015 7:16 pm
by almaz_1c
thanks for advice, tobias.

Re: Measure battery voltage

Posted: Tue Mar 24, 2015 3:17 am
by almaz_1c
tobias wrote:Currently the battery voltage is sent 100 times per second to the stm32 and you can get it using the pmGetBatteryVoltage function. If you want faster sampling then you would have to connect the VCOM expansion board pin to a stm32 ADC pin through a voltage divider. The battery voltage can currently also be logged from the cfclient "pm->vbat".
Hello! Please advise how to implement this service in my own firmware? What packet should I send to nfr81522 via UART to get the current battery voltage.

Re: Measure battery voltage

Posted: Tue Mar 24, 2015 11:21 am
by tobias
Please advise how to implement this service in my own firmware? What packet should I send to nfr81522 via UART to get the current battery voltage.
This is already setup and you can already get the battery voltage with the pmGetBatteryVoltage function so you don't have to implement anything. ;)

Re: Measure battery voltage

Posted: Tue Mar 24, 2015 3:51 pm
by arnaud
The NRF51 automatically send this packet 100 times per seconds on the UART: http://wiki.bitcraze.se/doc:crazyflie:s ... tery_state, as said Tobias if you are just modifying the official firmware the work is already done, but if you are making you own from scratch the syslink wiki page will help.

Re: Measure battery voltage

Posted: Thu Oct 22, 2015 4:03 am
by richiekwc
May I know if NRF51822 Pin 6 is connected R25 100K in the crazyflie2.0 schematic? I have mark it in the attached jpg.
crazyflie2.0.jpg
Thank you very much