-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Welcome to the OZ890-BMS wiki!
This is a 3 part project:
- BMS
This is Arduino code to poll live measurements from the OZ890 chip and post them on an ESP8266 wifi chip. It posts on UDP broadcast, port 4444. Use my UDPGauge Android app to read and graph. Tested with Arduino MEGA 2560 and Arduino Nano. Should work on any arduino, but note different pins for I2C as well as different serial ports. Current (Amps) reading is very inaccurate, still not sure if it's my formulas and calibration that is off or if it's the best this BMS chip can do.
My best result so far was when I calibrated it for 5 amps charging, it would show 20 amps when I pulled 30 amps. If I calibrate it to show ~ 30 amps correctly, it will show 6-7 amps when charging 5.
The logic of ESP8266 is that if found, it connects to my home WIFI. Useful for charging and testing at home. Fill your own SSID+password in the beginning of the program
- BMS-LCD
Does everything BMS does, plus puts some numbers and bar graphs on a 320x240 LCD display. Currently amp measurements are even worse than the BMS project.
- BMSSettings
Very incomplete and hacky tool to set different properties + calibration of the OZ890. Use with caution, don't run it before you've read and understood the code.
The re-writing of the EEPROM to store calibration data works. But it's a very specific way to make it work:
-1. Dump EEPROM, store it somewhere
0. Check password, take note if it matches the one in the code (B8, 2C). If not, change code
1. Measure all your battery cells with something you trust, I used my Turnigy charger
2. Enter those measurements into the calibrated[12] array, in mV, example:
uint16_t calibrated[12] = {
`4180,`
`4170,`
`4170,`
`4170,`
`4170,`
`4170, // 6`
`4170,`
`4170,`
`4170,`
`4160,`
`4160,`
`4160 };`
3. Compile, upload
4. Start pwd authentication (6)
5. Set password
6. Show password, look for PWD_OK = true
7. If not PWD_OK, try reset password, then set password again
8. Do song and dance
9. Check calibrated values.