Difference between revisions of "Microduino-Module BM Li-ion"
From Microduino Wiki
(Created page with "{{Language|Microduino-BM}} {| style="width: 800px;" | 400px|thumb|right|Microduino-BM Microduino-BM is a discharging management module of a si...") |
|||
Line 19: | Line 19: | ||
==Specification== | ==Specification== | ||
*Look at the interfaces of the module at first: | *Look at the interfaces of the module at first: | ||
− | **A 1.27-spacing | + | **A 1.27-spacing 4Pin interface("VUSB","SWI","BAT" and "GND"); |
**The active interfaces in UPIN27 are 5V, 3V3 and GND;The analog voltage detection on BM can be chosen between A6 and A7, and it can judge the quantity of the electricity of the battery through using mcu to detect the voltage of the battery. And you mustn’t rely on the protection circuit to protect the battery, which only works under extreme case. | **The active interfaces in UPIN27 are 5V, 3V3 and GND;The analog voltage detection on BM can be chosen between A6 and A7, and it can judge the quantity of the electricity of the battery through using mcu to detect the voltage of the battery. And you mustn’t rely on the protection circuit to protect the battery, which only works under extreme case. | ||
Line 45: | Line 45: | ||
#define PIN_bat A7 //BAT | #define PIN_bat A7 //BAT | ||
− | // | + | //MCU Working voltage, which needs to be chosen according to the situation. |
#define MCU_VOLTAGE 50 | #define MCU_VOLTAGE 50 | ||
//#define MCU_VOLTAGE 33 | //#define MCU_VOLTAGE 33 |
Latest revision as of 03:56, 4 August 2017
Language: | English • 中文 |
---|
For the original module refer to Microduino-Module_BM_Li-ion(old).
Contents[hide]Features
Specification
Introduction of pins Power Supply
DocumentsMain Components
Development
//Voltage detection pin, which is pin A7 in BM Shield by default.
#define PIN_bat A7 //BAT
//MCU Working voltage, which needs to be chosen according to the situation.
#define MCU_VOLTAGE 50
//#define MCU_VOLTAGE 33
#define _V_max 41 //4.2V
#define _V_min 35 //3.7V
#define _V_fix 0.2 //fix battery voltage
#define _V_math(Y) (_V_fix+((Y*analogRead(PIN_bat)/1023.0f)/(33.0f/(51.0f+33.0f))))
uint8_t batVoltage() {
return constrain(_V_math(MCU_VOLTAGE), _V_min, _V_max);
} Application
FAQHistory
Gallery |