Voltage Monitoring
Multiwii 3S
I used a lot of time searching the web to find the answer to this simple question. This
guide is made to make it easy to set up voltage monitoring on Multiwii. Guide made
by Christian W on multiwii forums based on info in NikTheGreek's forum post.
Needed: 33k and 52k resistor (It's possible to use different resistors, use the equation
later in the guide.)
Setup:
Software:
-In Config.h under “battery voltage monitoring” you need to uncomment:
//#define VBAT to #define VBAT
-Then you need to set the right parameters for the voltage monitoring to be correct.
The #define VBATSCALE 131 has to be set.
-Enter
http://panoramaic.se/configurator/2.2/ and scroll down to V BAT monitoring here
is a calculator to find the VBATSCALE. Write in:
1. Number of cells: 3
2. Measured battery voltage: 12.6 (for example)
3. Volt difference: 4.89
(The volt difference can be calculated with:
Volt from battery*(first resistor/ first resistor+second resistor)
Example: 12.6*(33/52+33)=4.89
With this you can use other resistors than recommended and still get the right VBATSCALE, however
go as close to recommended resistors as possible and volt difference over 5v can damage your
board.)
Write the value you get from the V BAT calculator in:
#define VBATSCALE 126 (If you use the exact same setup as in this guide)
Upload.
You can also calibrate using MWConfig just changing VBatscale until reading matches that measured by accurate multimeter set to DC volts. Don't forget to save changes.
It appears that HK AIOP does not bring A0-A7 out to a port as Crius AIOP V1 & V2 does. You may have to Google 2560 pinouts & solder to pins on chip. You may be lucky & the A0-A7 may be terminated on pads somewhere on board.
I use a 5V zener diode from A3 to ground to protect input port from overvoltage. You should also install a 4.7K resistor inline with voltage from divider to limit current in overvoltage situation.