Measure battery voltage
Re: Measure battery voltage
Ok, thanks.
Re: Measure battery voltage
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
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
thanks for advice, tobias.
Re: Measure battery voltage
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.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".
Re: Measure 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.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
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
May I know if NRF51822 Pin 6 is connected R25 100K in the crazyflie2.0 schematic? I have mark it in the attached jpg.
Thank you very much