Author Topic: ideas for reading a lot of voltages?  (Read 7310 times)

0 Members and 1 Guest are viewing this topic.

Offline KTPTopic starter

  • Frequent Contributor
  • **
  • Posts: 512
ideas for reading a lot of voltages?
« on: July 09, 2010, 11:25:35 pm »
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 monitoring  ;)

Anyway, 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
 

alm

  • Guest
Re: ideas for reading a lot of voltages?
« Reply #1 on: July 10, 2010, 12:03:11 am »
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.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9272
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline KTPTopic starter

  • Frequent Contributor
  • **
  • Posts: 512
Re: ideas for reading a lot of voltages?
« Reply #3 on: July 10, 2010, 04:50:51 am »
http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1786,P87985

Neat 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).
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38888
  • Country: au
    • EEVblog
Re: ideas for reading a lot of voltages?
« Reply #4 on: July 10, 2010, 05:48:28 am »
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#760

As do most of the XMEGA AVR's.

Dave.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20141
  • Country: gb
  • 0999
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: my
  • reassessing directives...
Re: ideas for reading a lot of voltages?
« Reply #6 on: July 10, 2010, 10:58:27 am »
@EEVBlog: nice! an atmel parametric!
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline tecman

  • Frequent Contributor
  • **
  • Posts: 444
  • Country: us
Re: ideas for reading a lot of voltages?
« Reply #7 on: July 10, 2010, 01:43:34 pm »
There are a number of PICs that have 16 ADC as well.

Paul
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9272
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: ideas for reading a lot of voltages?
« Reply #8 on: July 10, 2010, 08:08:25 pm »
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.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline RayJones

  • Frequent Contributor
  • **
  • Posts: 490
    • Personal Website
Re: ideas for reading a lot of voltages?
« Reply #9 on: July 10, 2010, 10:43:58 pm »
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.

Yes, this is not to be underestimated
 

Offline KTPTopic starter

  • Frequent Contributor
  • **
  • Posts: 512
Re: ideas for reading a lot of voltages?
« Reply #10 on: July 11, 2010, 03:02:50 am »
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.

Hmmm...I was just planning to use a cheap resistor divider ladder...resistor R to the end lead then ADC[0] directly to first cell, ADC[1] to second cell through R, ADC[2] to third cell through 2R, ADC[3] 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.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20141
  • Country: gb
  • 0999
Re: ideas for reading a lot of voltages?
« Reply #11 on: July 11, 2010, 12:36:20 pm »
What about using two, 16 way multiplexers and a single differential amplifier?
 

Offline chiaTu

  • Newbie
  • Posts: 9
Re: ideas for reading a lot of voltages?
« Reply #12 on: July 11, 2010, 09:11:24 pm »
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.

Hmmm...I was just planning to use a cheap resistor divider ladder...resistor R to the end lead then ADC[0] directly to first cell, ADC[1] to second cell through R, ADC[2] to third cell through 2R, ADC[3] 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.

If 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.
 

Offline KTPTopic starter

  • Frequent Contributor
  • **
  • Posts: 512
Re: ideas for reading a lot of voltages?
« Reply #13 on: July 12, 2010, 03:38:21 pm »
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.pdf

I can buy Atmel processors with 8 channel 10 bit A/D for $1 or $2 each  :(

It 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 way  ::)

Edit:  I just saw Dave's post about some Atmel controllers that have 16 channel A/D...two microcontrollers seems MUCH less silly, thanks!
« Last Edit: July 12, 2010, 03:40:38 pm by KTP »
 

alm

  • Guest
Re: ideas for reading a lot of voltages?
« Reply #14 on: July 12, 2010, 10:29:43 pm »
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.
 

Offline KTPTopic starter

  • Frequent Contributor
  • **
  • Posts: 512
Re: ideas for reading a lot of voltages?
« Reply #15 on: July 13, 2010, 12:42:08 am »
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.

Grrr, 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.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20141
  • Country: gb
  • 0999
Re: ideas for reading a lot of voltages?
« Reply #16 on: July 14, 2010, 09:34:42 pm »
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.
 

Offline Zad

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: gb
    • Digital Wizardry, Analogue Alchemy, Software Sorcery
Re: ideas for reading a lot of voltages?
« Reply #17 on: July 19, 2010, 09:39:58 pm »
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


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf