Tuesday, April 7, 2015

Posted up v0.0.1 of monitor, but. . . .

Today I posted up an almost complete Battery MONITOR capable of measuring the battery voltage, amps, temperature as well as count its SOC.  Communications via CAN, USB and using the Arudino IDE.

I spent a lot of time coming to this point, mostly trying to get in some type of coulomb counter.  And in the end I have based this around the ATmega32HVB chip.   This part is design as a battery monitor/manager for Li cells, includes amp shunt, coulomb counter, and cell voltage readings.  Added to it is a SPI based CAN controller and a USB <--> Serial adapter (though will need to use SoftwareSerial libs, as the ATmega32HVB does not contain a UART)

(See Resource Tab above for .pdf file)

Over all I am not fully settled with this design.  The core chip is rather expensive ($11+), and after going through the voltage dividers for Vbat its 12bit ADC end up with a resolution of only 22mV.  Oversampling can help get this down to perhaps 6mV - fortunately the ADC is fast, but this is a long ways from the 16 bit ADC used in the INA226, where I also oversampled, and had much better resolution.  Interface to external cell monitors is incomplete as well.

Though I have posted this, I am not going to build a copy right away.  There is a lot of development work to be done on the MPPT controller, and I have other boards around that I can use to simulate a battery monitor, or even build one up.  Plus I want to think about this all some more.

Perhaps the biggest limiting factor at this point is usage of the Arduino IDE.  Without going to even more massive efforts (ala, what Intel has done -- among other) I was just not able to come up with a clean solution based on the Atmel uCs, and say the INA226 - close, but getting a coulomb counter capability was proving tough (again without going overboard and designing a discreet solution).  I would give the ATmegas32HVB based monitor a C+ grade.

Now - I also have been looking at the Freescale MM9Z1I638.  Has Volt, Amp, coulomb+ CAN and a UART for under $8.  Its 16 bit ADCs provide 1mV resolution, and there are 3 of them BTW - one for volts, one for Amps, and one for Temp.  It is a multi-die solution with all the analog separated from the digital stuff.  Plus it is targeted for the Auto industry, so it some with some extra hardening futures. I think this would make a much better core for the battery monitor / manager.

But it is not Arduino.  No simple IDE, need around a $50 probe to program, crippled free compiler, etc, etc..  

This is why I am a bit unsettled.  How important is it to keep the Arduino IDE for a project like this?  Goes beyond the monitor as well, PIC makes very nice uCs for the alternator regulator and Solar MPPT - but again, different development environment.

So - am a bit unsettled.  Given there is much to work on for now, will push this down the road some.  Perhaps anyone reading this has some thoughts?