IRC log for #edev on 20090530

01:32.45MonMothachiques: Atmel actually makes a whole line of AVRs designed especially for battery charging/monitoring purposes.  They include very accurate ADCs for coulomb counting and such
01:33.11MonMothain general, measuring something inherently analog like a battery voltage on a MCU calls for an ADC.  If yours doesn't have it, I'd suggest finding a micro that does for this project.
01:33.53MonMothaif you have an ADC (which you appear to), then it's just a matter of the analog scaling/buffering required.  That's usually pretty simple to work out.
01:35.14MonMothaas for AVR Studio on Linux, well, I never much liked AVR Studio.  I always just write my own Makefiles and use VIM for editing.  That means I can just use the native Linux versions of avr-gcc and avr-binutils
01:35.34chiquesMonMotha, I saw there are a few vendors that make such a device (Linear, Maxim, NI) but I keep reading this is "simple" using a MCU but I'm running into brick walls with the coding.
01:35.35MonMothafor programming the units, avrdude is pretty capable
01:35.56MonMothaif you're unfamiliar with Li-Ion batteries, I'd highly recommend using an integrated charger chip like the ones you mention
01:36.00MonMothathere are lots of makers
01:36.19MonMothascrewing up can cause some batteries (the ones without internal safeties) to explode
01:36.26MonMothaI'm sorry, not explode, but "vent with flame"
01:37.23chiquesMonMotha, yes, I'm aware of the "vent with flaming" problem. Of course I'm going to test antying I make using a 15V DC 5500uF cap first
01:41.17MonMothaif you can find an integrated charger chip that does what you want, then I'd go for that
01:42.12MonMothait's probably cheaper than rolling your own, less risky, and will likely consume less board space
01:45.52chiquesMonMotha, I can find a chip to do a few cells but my ultimate goal is going to be to monitor and charge arrays of packs.
01:47.01MonMothagenerally each pack would probably do well to have its own charger
01:47.28chiquesMonMotha, As I ramp up the project I will test it with series-parallel configurations, balancing and detailed temperature monitoring. I figured I can interface my own algorithms in a more practical way using a MCU.
01:47.36MonMothathat's what the PC smart battery spec calls for, though they are probably assuming a series pack configuration to be impractical
01:47.52MonMothawell, using your own MCU is certainly the most flexible option
01:47.56chiquesYes, each pack will have it's native "subroutine" with unique logged data.
01:48.17MonMothaI know Atmel has a bunch of AVRs specifically designed for battery work.  Might want to look at them
01:48.19chiquesI really appreciate your opinion.
01:48.28chiquesI'll check them out
01:48.32chiquesThanks alot
01:48.34MonMothathey may integrate some of the analog circuitry required for e.g. charge current monitoring into the chip
01:51.10MonMothaTI may also have something in their MSP430 line.  I know TI does a lot of Li-Ion battery stuff, but I don't know if their MSP430 group has gotten into it.
01:51.31chiquesThat's another of my future hurtles, controlling the voltage and current independently
02:09.25MonMothachiques: well, you can either use linear or switching techniques for that, but the basic control loop model is the same
02:10.09MonMothapick CC or CV operation mode and form a closed loop around that parameter while monitoring the other one "out of band" to make sure it's within range
02:10.32MonMothaif the opposite parameter from the one you're regulating goes out of range, switch to regulating that since that should force the other parameter within range
02:11.03MonMothaif you can't get both in range at the same time, then something is probably wrong (open cell, shorted cell, open/non-present pack, or just invalid parameters) and you just have to terminate charging entirely
02:11.17chiquesGood tips, thanks
02:14.30*** join/#edev redblue (i=star@ppp019.109-253-207.mtl.mt.videotron.ca)
04:13.11MirellHow utterly bizarre. Dell is EOLing the Mini 9...
04:43.41*** join/#edev Madsy (n=Madsy@fu/coder/madsy)
04:47.16ds2wonder if coulomb counting works as well as sheep counting
04:48.39MonMothads2: dunno
04:48.54MonMothaprobably a fair bit harder to do, though
04:49.01MonMothathem coulombs are tricksy
04:51.13ds2Miliken did it.
04:55.59MonMothaI should ask my atmel rep for a dev board for the battery AVR series
04:56.11MonMothathey look like neat devices that have applications outside of batteries
04:56.42ds2is there anything would would make then poor sensors interfaces?
04:56.48MonMothagah, Atmel's website is now flash based
04:56.52MonMothaI need to complain to my rep, I guess
04:57.04MonMothaI was thinking more like power managment controllers in portable devices
04:57.23ds2how many pins are they typically?
04:57.28MonMotharelatively small
04:57.41ds2I been pondering using their pico power devices as a wake up/gpio expander
04:57.46MonMothaup to like 44
04:57.53ds2that's plenty
04:58.00MonMothaoh, I've done that sort of thing on a design (not fabricated)
04:58.04MonMothaheck, I even used it as the RTC!
04:58.10ds2make it an i2c slave and have some intelligence
04:58.20ds2*nod*
04:58.48ds2given the few off the shelf 1.8V capable I2C GPIO expanders, it seems to make sense to use a micro instead
04:59.07MonMothayup
04:59.11MonMothathen you can give it some intelligence, too
04:59.25MonMothaI think Semtech has 1.8V (and maybe even 1.2V) capable GPIO expanders, though
04:59.29ds2yep.
04:59.45ds2there are a few but not too many... maxim and microchip has them
05:00.05ds2besides, micros are good for obfuscating code ;)
05:00.29MonMothathe Atmel battery AVRs seem geared towards the battery side of things as much as the charger side
05:00.38MonMothathey have integral primary safety features
05:00.58ds2are they making them 12V tolerant and stuff like what ADI did with some of their battery targeted micros?
05:01.34MonMothalooks like just 5V, but they have purpose built FET driver outputs
05:02.22ds25V voltage fet drivers would be nice... not too many mosfets with vthresh below 1.8V
05:02.31MonMothabuilt in differential ADC for the coulomb counter, too
05:03.01ds2diff's ADCs would lend them selves to bridge sensor measurements
05:03.27ds2think strain gages often come in that form?
05:03.54MonMothapossibly
05:04.01MonMothatheir other MCUs have a differential option as well
05:04.07MonMothabut they aren't nearly as precise as this
05:04.17MonMothathis is 12-bit with very controlled offset and non-linearity
05:04.33MonMothait's a sigma-delta ADC, not the normal successive approx
05:04.44ds2do they have a suitable internal reference though?
05:05.23ds2Hmmm sigma-delta ADC... sounds like a useful frontend for a quick and dirty scope project
05:05.29MonMothaworst case accuracy of the onboard reference is 0.2% with a tempco of 80ppm/degC
05:05.42MonMothathat's pretty darned good for an onboard reference on a micro
05:06.33MonMothait also has a means of doing self-calibration to back out the temperature dependence
05:06.49ds2internal temp sensors?
05:07.25MonMothayes
05:07.48MonMothaAtmel ships it with a calibration point at 85C, you can do a calibration at another temperature and use the controlled tempco to back out the dependency
05:08.27MonMothayou can in theory also use that temp sensor to do run-time calibration of the onboard RC oscillator
05:10.00MonMothaactually, I guess the datasheet seems to mention doing that
05:10.00ds2so can you flex circuit mount the  micro and use that sensor as a fail safe for battery monitoring?
05:10.15MonMothathat seems to be the intended use
05:10.26ds2oh nice
05:10.31MonMothasomething like the internal brains of a smart battery
05:10.42ds2how are modern AVR's programmed? Flyswatter Jtag + software?
05:11.06MonMothathere's a program called avrdude that seems to talk with every hardware programmer for AVR known to man
05:11.43MonMothathe devices themselves can be parallel programmed (mass programming), SPI programmed (including pport bit-bang), or JTAG programmed (using any JTAG device that avrdude supports)
05:11.50ds2the only AVRs I have usedare the tiny stuff and that used the same programmer as for PIC (software supported those as an option)
05:12.28MonMothayeah, things get a little weird on the very low pin count devices
05:12.38MonMothamost of the 8-pin devices use the SPI interface
05:12.58MonMothathere's a new oddball algo they came up with for their forthcoming 6-pin device since you can't really even fit a SPI port onto that
05:13.36ds26 pin as in SOT-23-6?
05:13.38MonMothasome of the larger small stuff doesn't do JTAG unfortunately, so you can only SPI program them
05:13.44MonMothayup, it's a SOT-23/6
05:13.47MonMothaaka TSOP-6
05:14.18MonMothait's clearly intended to be the "replacement" (though not form or function) for the tiny10
05:14.25MonMothaer replacement for the tiny11
05:14.57MonMothathe new one is the tiny10, and it has a lot more goodies crammed into that 6-pin package than the old tiny11 did.  In fact, it seems to have more than the tiny13A does.  They're only like 50 cents in 10k, too
05:16.22ds2that is nice... 1.2V capable? (1 AA power)
05:16.36MonMotha2.5V-5.5V unfortunately
05:16.45MonMothathey do have some 0.7V(!!) capable products, though
05:16.53MonMothathey include a DC-DC converter in the package
05:17.37MonMothaunfortunately, they do require an external inductor
05:17.46ds21.2V and SOT23/6 would make a nice toy.... LR44 battery + some kapton tape....
05:17.53ds2blah
05:17.54MonMothaI was hoping they'd use a charge pump and manage to cram the caps into the package
05:18.37ds2I guess the alternativee is parasitic power - low wire + diode and drive near AM radio stations
05:18.44ds2s/low/long/
05:19.03MonMothanice
05:19.13MonMothathey do have a 1.5V 8 pin model
05:19.44MonMothaif you clock them slow and keep them at room temp, they might work down to about 1V
05:19.51MonMothaer 1.8V model
05:20.19MonMothaI've had very good luck driving Atmel's AVRs and 8051s down way below spec'd voltage, but I don't know how far you can push it when the voltage is already that low
05:20.31MonMothatheir process is pretty good, but I don't know if it's *that* good :)
05:22.43MonMothado MSP430s go that low?
05:33.54*** join/#edev albech (n=albech@124.157.201.5)
05:50.22ds2donno... I do know their  trade show demo is 3 grapes
05:52.03MonMothalooks like 1.8V also on the MSP430
05:52.10MonMothatwo AAs should run you for a while
05:52.27MonMothaespecially NiMH with the "mostly flat until it's almost dead" discharge curve
05:52.58MonMothacan you get N size NiMH?  Could strap them together into a AA size 2.4V "pack"
06:06.36ds2I know they make 2/3 and 1/3 AA's for battery packs
06:07.57MonMothaI think an N is a 1/3AA
06:13.43ds2all else fail, use a small Li cell
06:16.28*** join/#edev mbuf (n=user@61.16.248.242)
06:49.32MonMothagah
06:49.41MonMothaI know I have a set of JST VH crimp contacts laying around some place
06:49.47MonMothaI simply cannot find them
07:15.10*** join/#edev pat123 (n=pat@99-41-81-18.lightspeed.mssnks.sbcglobal.net)
07:15.13pat123hi
07:41.55*** join/#edev damunix (n=damunix@brc29-1-82-245-194-55.fbx.proxad.net)
07:57.31*** join/#edev mbuf` (n=user@61.16.248.242)
08:03.58*** join/#edev lyakh (n=lyakh@p57BD10D1.dip0.t-ipconnect.de)
09:01.22*** join/#edev redblue (i=star@ppp085.108-253-207.mtl.mt.videotron.ca)
09:13.51*** join/#edev damunix (n=damunix@brc29-1-82-245-194-55.fbx.proxad.net)
09:27.21*** join/#edev JoeLlama (n=snork@206.169.63.10)
10:25.20*** join/#edev damunix (n=damunix@brc29-1-82-245-194-55.fbx.proxad.net)
10:31.25*** join/#edev pirho (i=pirho@gateway/gpg-tor/key-0x2CEEC9CB)
11:25.45*** join/#edev g1powermac (n=g1powerm@unaffiliated/g1powermac)
11:27.59*** join/#edev GPSFan (n=kenm@64.92.145.112)
11:27.59*** mode/#edev [+o GPSFan] by ChanServ
11:59.58*** join/#edev linac (n=lin@114.114.12.34)
14:02.45*** join/#edev miknix (n=miknix@gentoo/developer/miknix)
14:34.15*** join/#edev mne (n=mne@unaffiliated/mne)
14:35.06*** join/#edev cmatei (n=cmatei@95.76.26.166)
14:35.24*** join/#edev pocek (n=pock@213-238-124-215.adsl.inetia.pl)
14:41.22*** join/#edev pocek (i=pock@213-238-124-215.adsl.inetia.pl)
14:44.13*** join/#edev pocek (i=pock@213-238-124-215.adsl.inetia.pl)
14:50.57*** join/#edev pocek_ (i=pock@77-253-54-227.adsl.inetia.pl)
15:15.00*** join/#edev kergoth (n=kergoth@ip98-167-215-86.ph.ph.cox.net)
15:16.01*** join/#edev brolin (n=brolin@200.24.16.55)
15:43.41*** join/#edev g1powermac_EPC (n=g1powerm@unaffiliated/g1powermac)
16:42.04*** join/#edev miknix (n=miknix@gentoo/developer/miknix)
16:42.22*** join/#edev chiques (n=tony@pool-173-60-8-104.lsanca.fios.verizon.net)
16:59.30*** join/#edev pirho (i=pirho@gateway/gpg-tor/key-0x2CEEC9CB)
17:34.33*** join/#edev pat123 (n=pat@99-41-81-18.lightspeed.mssnks.sbcglobal.net)
17:34.36pat123hi
17:54.24*** join/#edev lyakh (n=lyakh@p57BD10D1.dip0.t-ipconnect.de)
17:54.40*** join/#edev damunix (n=damunix@89.155.204-77.rev.gaoland.net)
18:39.37*** join/#edev GPSFan (n=kenm@64.92.145.112)
18:39.37*** mode/#edev [+o GPSFan] by ChanServ
18:46.48*** join/#edev damunix (n=damunix@89.155.204-77.rev.gaoland.net)
19:25.30*** join/#edev damunix_ (n=damunix@229.177.204-77.rev.gaoland.net)
19:59.21*** join/#edev JoeLlama (n=snork@206.169.63.10)
20:23.20*** join/#edev bsdfox__ (n=h36sa@c-71-197-73-68.hsd1.ca.comcast.net)
20:32.15bsdfox__hey, can anyone recommend either a simple (preferrably non-parport) diy programmer? I've got a reasonable amount of experience with avr and pic but recently purchased a few cortex-m3 chips from nxp. not really sure what all I'm going to need to upload code (planning to compile with arm-gcc)
20:36.24*** join/#edev florian (n=fuchs@f054212188.adsl.alicedsl.de)
20:56.06*** join/#edev redblue (i=star@ppp073.108-253-207.mtl.mt.videotron.ca)
21:31.40mnebsdfox__, I'm using the olimex JTAG dongle (USB). Is was pretty cheap
21:31.53mnealthough its not DIY
21:32.01bsdfox__that's alright
21:32.17bsdfox__the jtag is fairly universal right?
21:32.34mneyep, i think so
21:32.55mneI have this one http://www.olimex.com/dev/arm-usb-ocd.html
21:33.21bsdfox__any advice on programs to upload code that run in *nix?
21:33.36mneso far I programmed at91 controllers with it .
21:34.20mneI'm on linux. For uploading I either use linux4sam (it can directly program the at91 controller I have over USB) or I use openocd with the olimex dongle
21:36.03mneSince openocd does not support programming nand flash, one can upload code to SRAM/SDRAM, boot it and use it for programming nand flash. E.g. you can use u-boot or linux running on the target itself to program NAND
21:37.21bsdfox__something along these lines? http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/openocd_intro/index.html
21:39.13mneyep, if you have one of those controllers, you can use the scripts on that site
21:39.59mnefor my at91sam9260 I fund some openocd scripts on the rockboxproject site. They work pretty well
21:40.06bsdfox__ok thanks. answered some of my noob questions :)
21:40.42mnenp. I asked the same questions like 2 months ago ;)
22:11.47*** join/#edev pat123 (n=pat@99-41-81-18.lightspeed.mssnks.sbcglobal.net)
22:56.42*** join/#edev redblue (i=star@ppp180.108-253-207.mtl.mt.videotron.ca)
23:00.04roxfanmne: it seems some nand support has been added recently
23:01.07roxfanbut nxp chip probably has internal flash... and i think their m3s are too new to have support
23:35.58*** join/#edev devilsadvocate (n=quassel@202.3.77.11)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.