## Re: [Sdcc-user] [OT] - ADC Ideas

 Re: [Sdcc-user] [OT] - ADC Ideas From: Jean-Paul - 2007-03-09 12:36:01 ```Hi Markos, You don't want to bother with resolution and absolute values. The most=20 important is to detect the moment when the sign of the _slope_ changes. You= =20 will detect the change whatever the absolute value. Le Vendredi 9 Mars 2007 10:24, Markos a =E9crit=A0: > Hi Rod, > interesting design! Thanks. > How do you decide when to finish the charge? By the delta Peak. Have a > look at this (Fig 2): > http://www.maxim-ic.com/appnotes.cfm/appnote_number/680 > It is a typical (fast) charging voltage plot. With the divide by 4 > voltage Vsense, I will be loosing resolution, isn't it? > I mean, suposing that we have 0-5V in Vsense, 10 bit ADC gives 4,8 mV > per bit (adc step). Your resolution is divided by 4, so 4,8 x 4 =3D 20 mV > per bit + we must add the +- LSB ADC accuracy, thats a 40 mV error.... > So I think I won't be able to detect the 10 mV delta Peak.... > > In the description of your circuit you mention an 84 mV delta peak. Is > that peak the result of Delta * Num of Cells? > > Regards > > Jean-Paul escribi=F3: > > Hi, > > > > It looks like you don't think that the end-of-charge voltage is above t= he > > nominal voltage. > > On the schematics given in the link hereafter, it would be safer to put= a > > zener diode across the lower resistor of the divider, to protect the > > controller. > > > > Le Jeudi 8 Mars 2007 21:51, Rod Boyce a =E9crit : > >> Markos, > >> > >> It is very simple I have done this many times in my days job, use a > >> resistive divider and work out the error by calibrating the input and > >> fix any error in software. One thing you have to be careful of is that > >> you monitor the temperature as well as many resistors vary their > >> resistance with temperature, but it depends on your application if you > >> are charging lead acid batteries then you may only have to calibrate t= he > >> circuit between the usable voltage range of interest. > >> > >> Have a look at > >> http://www.angelfire.com/electronic/hayles/charge1fig3.html note the > >> divide by 4 voltage sense connecting to the ADC input of the PIC > >> micro-controller. > >> > >> Regards, > >> Rod > >> > >> Markos wrote: > >>> Hi guys, > >>> maybe this is a little offtopic, but i'm sure you could > >>> help me. I'm implementing a simple battery charger, and I need to > >>> messaure voltages ranges from 0 to 12 V. > >>> =BFCould I use the PIC integrated ADC to messaure above 5 V (provided > >>> that I use the voltage reference pins tied to 0 and 12 V, for example= )? > >>> Most external ADC have a 0 to 5V input range.... > >>> How would you guys solve this? Any Ideas? > >>> > >>> Thanks in advance. > >>> > >>> > >>> ---------------------------------------------------------------------= =2D- > >>>-- Take Surveys. Earn Cash. Influence the Future of IT > >>> Join SourceForge.net's Techsay panel and you'll get the chance to sha= re > >>> your opinions on IT & business topics through brief surveys-and earn > >>> cash > >>> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CI= D=3DDEVD > >>>EV _______________________________________________ > >>> Sdcc-user mailing list > >>> Sdcc-user@... > >>> https://lists.sourceforge.net/lists/listinfo/sdcc-user > >> > >> ----------------------------------------------------------------------= =2D- > >>- Take Surveys. Earn Cash. Influence the Future of IT > >> Join SourceForge.net's Techsay panel and you'll get the chance to share > >> your opinions on IT & business topics through brief surveys-and earn > >> cash > >> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID= =3DDEVDE > >>V _______________________________________________ > >> Sdcc-user mailing list > >> Sdcc-user@... > >> https://lists.sourceforge.net/lists/listinfo/sdcc-user > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@... > https://lists.sourceforge.net/lists/listinfo/sdcc-user =2D-=20 Never jump into a loop! ```