01:32.45 | MonMotha | chiques: 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.11 | MonMotha | in 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.53 | MonMotha | if 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.14 | MonMotha | as 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.34 | chiques | MonMotha, 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.35 | MonMotha | for programming the units, avrdude is pretty capable |
01:35.56 | MonMotha | if you're unfamiliar with Li-Ion batteries, I'd highly recommend using an integrated charger chip like the ones you mention |
01:36.00 | MonMotha | there are lots of makers |
01:36.19 | MonMotha | screwing up can cause some batteries (the ones without internal safeties) to explode |
01:36.26 | MonMotha | I'm sorry, not explode, but "vent with flame" |
01:37.23 | chiques | MonMotha, 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.17 | MonMotha | if you can find an integrated charger chip that does what you want, then I'd go for that |
01:42.12 | MonMotha | it's probably cheaper than rolling your own, less risky, and will likely consume less board space |
01:45.52 | chiques | MonMotha, 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.01 | MonMotha | generally each pack would probably do well to have its own charger |
01:47.28 | chiques | MonMotha, 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.36 | MonMotha | that's what the PC smart battery spec calls for, though they are probably assuming a series pack configuration to be impractical |
01:47.52 | MonMotha | well, using your own MCU is certainly the most flexible option |
01:47.56 | chiques | Yes, each pack will have it's native "subroutine" with unique logged data. |
01:48.17 | MonMotha | I know Atmel has a bunch of AVRs specifically designed for battery work. Might want to look at them |
01:48.19 | chiques | I really appreciate your opinion. |
01:48.28 | chiques | I'll check them out |
01:48.32 | chiques | Thanks alot |
01:48.34 | MonMotha | they may integrate some of the analog circuitry required for e.g. charge current monitoring into the chip |
01:51.10 | MonMotha | TI 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.31 | chiques | That's another of my future hurtles, controlling the voltage and current independently |
02:09.25 | MonMotha | chiques: well, you can either use linear or switching techniques for that, but the basic control loop model is the same |
02:10.09 | MonMotha | pick 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.32 | MonMotha | if 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.03 | MonMotha | if 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.17 | chiques | Good tips, thanks |
02:14.30 | *** join/#edev redblue (i=star@ppp019.109-253-207.mtl.mt.videotron.ca) |
04:13.11 | Mirell | How utterly bizarre. Dell is EOLing the Mini 9... |
04:43.41 | *** join/#edev Madsy (n=Madsy@fu/coder/madsy) |
04:47.16 | ds2 | wonder if coulomb counting works as well as sheep counting |
04:48.39 | MonMotha | ds2: dunno |
04:48.54 | MonMotha | probably a fair bit harder to do, though |
04:49.01 | MonMotha | them coulombs are tricksy |
04:51.13 | ds2 | Miliken did it. |
04:55.59 | MonMotha | I should ask my atmel rep for a dev board for the battery AVR series |
04:56.11 | MonMotha | they look like neat devices that have applications outside of batteries |
04:56.42 | ds2 | is there anything would would make then poor sensors interfaces? |
04:56.48 | MonMotha | gah, Atmel's website is now flash based |
04:56.52 | MonMotha | I need to complain to my rep, I guess |
04:57.04 | MonMotha | I was thinking more like power managment controllers in portable devices |
04:57.23 | ds2 | how many pins are they typically? |
04:57.28 | MonMotha | relatively small |
04:57.41 | ds2 | I been pondering using their pico power devices as a wake up/gpio expander |
04:57.46 | MonMotha | up to like 44 |
04:57.53 | ds2 | that's plenty |
04:58.00 | MonMotha | oh, I've done that sort of thing on a design (not fabricated) |
04:58.04 | MonMotha | heck, I even used it as the RTC! |
04:58.10 | ds2 | make it an i2c slave and have some intelligence |
04:58.20 | ds2 | *nod* |
04:58.48 | ds2 | given the few off the shelf 1.8V capable I2C GPIO expanders, it seems to make sense to use a micro instead |
04:59.07 | MonMotha | yup |
04:59.11 | MonMotha | then you can give it some intelligence, too |
04:59.25 | MonMotha | I think Semtech has 1.8V (and maybe even 1.2V) capable GPIO expanders, though |
04:59.29 | ds2 | yep. |
04:59.45 | ds2 | there are a few but not too many... maxim and microchip has them |
05:00.05 | ds2 | besides, micros are good for obfuscating code ;) |
05:00.29 | MonMotha | the Atmel battery AVRs seem geared towards the battery side of things as much as the charger side |
05:00.38 | MonMotha | they have integral primary safety features |
05:00.58 | ds2 | are they making them 12V tolerant and stuff like what ADI did with some of their battery targeted micros? |
05:01.34 | MonMotha | looks like just 5V, but they have purpose built FET driver outputs |
05:02.22 | ds2 | 5V voltage fet drivers would be nice... not too many mosfets with vthresh below 1.8V |
05:02.31 | MonMotha | built in differential ADC for the coulomb counter, too |
05:03.01 | ds2 | diff's ADCs would lend them selves to bridge sensor measurements |
05:03.27 | ds2 | think strain gages often come in that form? |
05:03.54 | MonMotha | possibly |
05:04.01 | MonMotha | their other MCUs have a differential option as well |
05:04.07 | MonMotha | but they aren't nearly as precise as this |
05:04.17 | MonMotha | this is 12-bit with very controlled offset and non-linearity |
05:04.33 | MonMotha | it's a sigma-delta ADC, not the normal successive approx |
05:04.44 | ds2 | do they have a suitable internal reference though? |
05:05.23 | ds2 | Hmmm sigma-delta ADC... sounds like a useful frontend for a quick and dirty scope project |
05:05.29 | MonMotha | worst case accuracy of the onboard reference is 0.2% with a tempco of 80ppm/degC |
05:05.42 | MonMotha | that's pretty darned good for an onboard reference on a micro |
05:06.33 | MonMotha | it also has a means of doing self-calibration to back out the temperature dependence |
05:06.49 | ds2 | internal temp sensors? |
05:07.25 | MonMotha | yes |
05:07.48 | MonMotha | Atmel 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.27 | MonMotha | you can in theory also use that temp sensor to do run-time calibration of the onboard RC oscillator |
05:10.00 | MonMotha | actually, I guess the datasheet seems to mention doing that |
05:10.00 | ds2 | so can you flex circuit mount the micro and use that sensor as a fail safe for battery monitoring? |
05:10.15 | MonMotha | that seems to be the intended use |
05:10.26 | ds2 | oh nice |
05:10.31 | MonMotha | something like the internal brains of a smart battery |
05:10.42 | ds2 | how are modern AVR's programmed? Flyswatter Jtag + software? |
05:11.06 | MonMotha | there's a program called avrdude that seems to talk with every hardware programmer for AVR known to man |
05:11.43 | MonMotha | the 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.50 | ds2 | the 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.28 | MonMotha | yeah, things get a little weird on the very low pin count devices |
05:12.38 | MonMotha | most of the 8-pin devices use the SPI interface |
05:12.58 | MonMotha | there'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.36 | ds2 | 6 pin as in SOT-23-6? |
05:13.38 | MonMotha | some of the larger small stuff doesn't do JTAG unfortunately, so you can only SPI program them |
05:13.44 | MonMotha | yup, it's a SOT-23/6 |
05:13.47 | MonMotha | aka TSOP-6 |
05:14.18 | MonMotha | it's clearly intended to be the "replacement" (though not form or function) for the tiny10 |
05:14.25 | MonMotha | er replacement for the tiny11 |
05:14.57 | MonMotha | the 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.22 | ds2 | that is nice... 1.2V capable? (1 AA power) |
05:16.36 | MonMotha | 2.5V-5.5V unfortunately |
05:16.45 | MonMotha | they do have some 0.7V(!!) capable products, though |
05:16.53 | MonMotha | they include a DC-DC converter in the package |
05:17.37 | MonMotha | unfortunately, they do require an external inductor |
05:17.46 | ds2 | 1.2V and SOT23/6 would make a nice toy.... LR44 battery + some kapton tape.... |
05:17.53 | ds2 | blah |
05:17.54 | MonMotha | I was hoping they'd use a charge pump and manage to cram the caps into the package |
05:18.37 | ds2 | I guess the alternativee is parasitic power - low wire + diode and drive near AM radio stations |
05:18.44 | ds2 | s/low/long/ |
05:19.03 | MonMotha | nice |
05:19.13 | MonMotha | they do have a 1.5V 8 pin model |
05:19.44 | MonMotha | if you clock them slow and keep them at room temp, they might work down to about 1V |
05:19.51 | MonMotha | er 1.8V model |
05:20.19 | MonMotha | I'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.31 | MonMotha | their process is pretty good, but I don't know if it's *that* good :) |
05:22.43 | MonMotha | do MSP430s go that low? |
05:33.54 | *** join/#edev albech (n=albech@124.157.201.5) |
05:50.22 | ds2 | donno... I do know their trade show demo is 3 grapes |
05:52.03 | MonMotha | looks like 1.8V also on the MSP430 |
05:52.10 | MonMotha | two AAs should run you for a while |
05:52.27 | MonMotha | especially NiMH with the "mostly flat until it's almost dead" discharge curve |
05:52.58 | MonMotha | can you get N size NiMH? Could strap them together into a AA size 2.4V "pack" |
06:06.36 | ds2 | I know they make 2/3 and 1/3 AA's for battery packs |
06:07.57 | MonMotha | I think an N is a 1/3AA |
06:13.43 | ds2 | all else fail, use a small Li cell |
06:16.28 | *** join/#edev mbuf (n=user@61.16.248.242) |
06:49.32 | MonMotha | gah |
06:49.41 | MonMotha | I know I have a set of JST VH crimp contacts laying around some place |
06:49.47 | MonMotha | I simply cannot find them |
07:15.10 | *** join/#edev pat123 (n=pat@99-41-81-18.lightspeed.mssnks.sbcglobal.net) |
07:15.13 | pat123 | hi |
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.36 | pat123 | hi |
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.15 | bsdfox__ | 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.40 | mne | bsdfox__, I'm using the olimex JTAG dongle (USB). Is was pretty cheap |
21:31.53 | mne | although its not DIY |
21:32.01 | bsdfox__ | that's alright |
21:32.17 | bsdfox__ | the jtag is fairly universal right? |
21:32.34 | mne | yep, i think so |
21:32.55 | mne | I have this one http://www.olimex.com/dev/arm-usb-ocd.html |
21:33.21 | bsdfox__ | any advice on programs to upload code that run in *nix? |
21:33.36 | mne | so far I programmed at91 controllers with it . |
21:34.20 | mne | I'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.03 | mne | Since 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.21 | bsdfox__ | something along these lines? http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/openocd_intro/index.html |
21:39.13 | mne | yep, if you have one of those controllers, you can use the scripts on that site |
21:39.59 | mne | for my at91sam9260 I fund some openocd scripts on the rockboxproject site. They work pretty well |
21:40.06 | bsdfox__ | ok thanks. answered some of my noob questions :) |
21:40.42 | mne | np. 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.04 | roxfan | mne: it seems some nand support has been added recently |
23:01.07 | roxfan | but 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) |