ideas for reading a lot of voltages? - Page 1
Forum section: electronics / projects

author: KTP
author_rank: Frequent Contributor
timestamp: July 09, 2010, 11:25:35 pm
content: I want to build a cell level LVC (and monitor HVC while charging) for my LiMn battery and maybe eventually for a LiFePO4 battery or *gasp* the lightweight but dangerous LiPo packs (I think I would still charge these outside in a gas grill or something even with cell level monitoringAnyway, I am going to start simple, and have a Atmel microcontroller monitor the individual cell voltages and disable the electronic brake input to the brushless motor controller on the bicycle if any cell drops below a preset value (the cells are good from 4.1V down to 2.5V but I would like to leave some room and maybe only discharge them to 3V.Most of the Atmel microcontrollers have just one 8 channel A/D...I don't think any of them have four ports of A/D. I am thinking I would need to use an analog mux or perhaps hang three more A/D off of a serial data line from the Atmel. Suggestions?Filtering on the inputs should not be a problem as I really don't need a fast update (even reading the cell voltages once per second would be acceptable).After I get this working I will add a few more things, like a shunt to measure peak watts to the motor, average power, and keep track of battery AH consumed. Perhaps also I will tap off of the hall sensors in the motor to give me a speedometer, and run a serial line to a small lcd on the handlebar. But starting simple first.Thanks for any tips

author: Unknown
author_rank: Unknown
timestamp: July 10, 2010, 12:03:11 am
content: The ATTiny261/461/861 has 11 ADC channels, I don't think you can get more. Analog muxes would be fine unless they're more expensive than ADC's, since you don't need any speed, multiplexing them is a good solution. Scanners (which is usually a bunch of relays for isolation wired to each channel) are often used for this type of work in automated test setups.

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 10, 2010, 04:19:17 am
content: http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1786,P87985

author: KTP
author_rank: Frequent Contributor
timestamp: July 10, 2010, 04:50:51 am
content: Quote from: NiHaoMike on July 10, 2010, 04:19:17 amNeat part! Way overpriced though ($14 for 1-100 quantity). I could have 4 AVR chips and measure 44 cells for less than that. I still need to look up how much serial A/D chips are (or the analog mux).

author: EEVblog
author_rank: Unknown
timestamp: July 10, 2010, 05:48:28 am
content: Use the parametric search and sort by number of ADC channels. 3 devices have 16 channels.http://atmel.com/dyn/products/param_table.asp?family_id=607&OrderBy=1169&Direction=ASC#760As do most of the XMEGA AVR's.Dave.

author: Zero999
author_rank: Super Contributor
timestamp: July 10, 2010, 08:56:24 am
content: http://www.vishay.com/docs/72552/dg406b.pdf

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 10, 2010, 10:58:27 am
content: @EEVBlog: nice! an atmel parametric!

author: tecman
author_rank: Frequent Contributor
timestamp: July 10, 2010, 01:43:34 pm
content: There are a number of PICs that have 16 ADC as well.Paul

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 10, 2010, 08:08:25 pm
content: Don't forget that you'll also need some differential amplifiers to sense the voltages of the higher cells and some sort of circuit to do the balancing. The LT chip has almost everything you need.

author: RayJones
author_rank: Frequent Contributor
timestamp: July 10, 2010, 10:43:58 pm
content: Quote from: NiHaoMike on July 10, 2010, 08:08:25 pmYes, this is not to be underestimated

author: KTP
author_rank: Frequent Contributor
timestamp: July 11, 2010, 03:02:50 am
content: Quote from: NiHaoMike on July 10, 2010, 08:08:25 pmHmmm...I was just planning to use a cheap resistor divider ladder...resistor R to the end lead then ADC directly to first cell, ADC to second cell through R, ADC to third cell through 2R, ADC to fouth cell through 3R, etc... Then a few lines of code to calculate the actual cell level voltages from these values. It wouldn't be super accurate but I think I could get within 20mV or so which would be fine.I don't want to get into balancing (at least for now) I will most likely charge the cells in banks through one of the better quality chargers made for 2s to 6s Lipo batteries. This circuit I want to make is just an alarm system to let me know if any cell gets out of the acceptable range (2.5V to 4.1V for LiMn, 3.3V to 4.2V for LiPo).The LT chip does have a lot though...but I think the Atmel solution could be 3 or 4x cheaper.

author: Zero999
author_rank: Super Contributor
timestamp: July 11, 2010, 12:36:20 pm
content: What about using two, 16 way multiplexers and a single differential amplifier?

author: chiaTu
author_rank: Newbie
timestamp: July 11, 2010, 09:11:24 pm
content: Quote from: KTP on July 11, 2010, 03:02:50 amIf just for alarming system, then why not just use comparator with build-in voltage reference on each cell, and then you can use them to drive opto-couplers. One side connects to comparator's output, and the other side connects to uC digital pins to toggle the pins.

author: KTP
author_rank: Frequent Contributor
timestamp: July 12, 2010, 03:38:21 pm
content: Initially it really is just for an alarm system but I would like to be able to actually read and record each cell voltage for display and data logging while I am experimenting with battery technologiies and my ebike.Analog muxes are more expensive than I thought. Even the cheapest 16:1 at digikey is over $5:http://www.intersil.com/data/fn/fn3116.pdfI can buy Atmel processors with 8 channel 10 bit A/D for $1 or $2 eachIt does seem like a silly design to use 4 microcontrollers to read 32 voltages, but it might be the cheapest. I guess I would get a lot of extra I/O that wayEdit: I just saw Dave's post about some Atmel controllers that have 16 channel A/D...two microcontrollers seems MUCH less silly, thanks!

author: Unknown
author_rank: Unknown
timestamp: July 12, 2010, 10:29:43 pm
content: Cheapest switch $5? Something like 74HC4067 (1:16) is <$1, so is 74HC4051 (1:8, more voltage range). Not sure if these match your requirements, but they're nowhere near $5.

author: KTP
author_rank: Frequent Contributor
timestamp: July 13, 2010, 12:42:08 am
content: Quote from: alm on July 12, 2010, 10:29:43 pmGrrr, I swear I put the correct information into the Digikey parametric search but all I came up with was the $5 part as the cheapest. Thanks for doing the correct search for me!74HC4067 x 2 at $0.97, Atmel AVR anything at $1-$2, a few resistors and a buzzer...$5 solution! Sweet.

author: Zero999
author_rank: Super Contributor
timestamp: July 14, 2010, 09:34:42 pm
content: I didn't know the old CMOS switches came in HC versions with much better characteristics, still limited to 10V though but it's better than most HC devices which typically work up to 6V maximum.

author: Zad
author_rank: Super Contributor
timestamp: July 19, 2010, 09:39:58 pm
content: The PIC18F44K22 has 28 channels at 10 bits. Price is from US$2:41 in single quantities. Also available in DIP packaging.http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en547758