Battery charger - power supply issue affecting ADC


Closed Thread
Results 1 to 30 of 30
  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891

    Default Battery charger - power supply issue affecting ADC

    Hello,

    I'm finishing my 24V lead-acid battery charger and get stuck on a power supply issue.<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2167&stc=1&d=119651200 3">
    The circuit works well but there is a strange (to me) voltage drop on the PIC's side while the current raises on the load and this impacts the ADC measurements.

    If no load is connected to the circuit, the controlled output voltage range is from 25V to 30,5Volts and there is a clean constant 5V at the VR1's output (VDD) through the full range.
    R2 drops the transformer's voltage from 44VDC to around 40VDC at the LM317K's input (to stay within specs).

    When the load is connected, as the charging current raises from 200mA up to 1,2Amps (maximum I need), the VDD drops from 5V to 4,8Volts while the load's voltage is then raising from 25V up to 29Volts.

    There is a slowly blinking LED (currently I have one, should be two finally) indicating the loading process goes on (timer toggles the LED every 2 seconds).

    I check the differents measured values by the PIC via a serial connection. This is actually how I noticed the voltage drop.

    Each time the LED is on, the values differ from the trend.

    I naturally thought about an overload on VR1. I can measure between 5,54mA and 14,51mA at the VR1'a output wich is far under it's limit (100mA). I the doubt, I replaced it with à 7805 (1A). Same problem.

    For a try, I replaced the actual 22V Zener by a 8,3V one; no change.

    I then built up a totally appart 5VDC power supply with a second transformator (230:9VAC). Again, the same voltage drop happens as the load raises (this is more than strange!!!).

    Does anyone have an idea what I'm doing wrong here?
    Attached Images Attached Images  
    Roger

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default

    Bonjour Roger,

    Just one question ... Temp of the LP2950 case ???

    see the " LP2950 Maximum Rated Output Current " current and remember the input voltage is close to the maximum of the LP ...

    the current you draw is ALSO very close to the max ...

    also the reason from DS DATASHEET:

    ''
    H - High-Terminal Potentiometer. This is the high terminal of the potentiometer. It is not required that
    this terminal be connected to a potential greater than the L-terminal. Voltage applied to the H-terminal
    can not exceed the power-supply voltage, VCC, or go below ground.


    "

    It seems I already had cut and pasted this section .....

    We already had this discussion too ... about frying the DS 1804 ...


    Amitiés
    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    Bonjour Alain,

    Merci de m'aider encore une fois
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2168&stc=1&d=119651738 4">
    When there is no load on the transformator, I have around 13Volts at the VR1. This is maybe just a little to much... At this time, the PIC has nothing to do.

    But when on full load, the transformator's voltage drops down the VR1 input's voltage to 7Volts wich is now okay. Now the PIC has to "go to work".

    About the DS, I don't understand what you mean; there is nothing connected to the "H" terminal. The DS is 5VDC powered and the maximum voltage I can measure between GND and "W" is 3,45Volts. Do I miss something basic?

    How do I "manage" the huge voltage difference from the transformator (with or without load)?
    Attached Images Attached Images  
    Roger

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Wink H,W or L ... same limits !!!

    Sorry, Roger

    it was :

    " W - Wiper of the Potentiometer. This pin is the wiper of the potentiometer. Its position on the resistor
    array is controlled by the 3-terminal control port. Voltage applied to the wiper cannot exceed the powersupply
    voltage,
    VCC, or go below ground."

    that means voltage on the wiper must not Exceed 5 Volts ... so, your output can't safely exceed 24 + 5 - .8 ( By 500 ! ) = 28 v

    you tell 25 to 30v out ... that's 2 v too much !!! I'm oK, only two "little volts" ... but too much ...

    I told you on another thread the DS couldn't bear the voltage you want !!!

    Alain
    Last edited by Acetronics2; - 1st December 2007 at 16:06.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    Hi boys. If I did the math correctly, at max output 30.5 volts the drop on the 10K DS pot would be around 6.8 Volts. As Alain stated this cannot be tolerated by the DS chip.

    I believe that it would be more practicle to use PWM on an output of the PIC, filter it and then feed a Pass transistor instead of the 317. As an example please refer to Elektor December 2001 issue (Digital controlled power supply).

    Ioannis

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Weird idea this Zener Z1 so far...

    But yeah i'll second the PWM idea.. maybe just remove the LM317 as well and use a Mosfet/Transistor instead and do everything in software. a 12F683 would be perfect for that.

    1 current senses
    1 voltage sense
    1 PWM and
    remaining pins for leds and maybe other safety inputs.
    Last edited by mister_e; - 2nd December 2007 at 23:11.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Jul 2007
    Location
    Bavaria
    Posts
    28


    Did you find this post helpful? Yes | No

    Exclamation

    Hello Roger,

    one thing I have noticed in your schematic: do you have a ground connection on the OPAMP?
    It's ground pin (4) seems to be floating...

    Regards,

    Ingo

  8. #8
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    Thank you Ingo,

    Good observation!

    I corrected the schema and the circuit (I was already noticed about this by Acetronis some hours ago - as I say, better two times than never ).
    Quote Originally Posted by Mister_e
    Weird idea this Zener Z1 so far...
    As I'm not an electronician but a real "bricoleur du dimanche". Anyway, why is the use of a Zener this way not a good idea?

    Ioannis, your math is absolutely correct but when I take my FLUKE87 or my scope, they both show a maximum of 3,45 volts. This has to be, again, one of this famous frontier between theory and real life .

    I forgot to ask: what type/model of MOSFET or Transistor would fit my application best please?
    Last edited by flotulopex; - 3rd December 2007 at 10:26.
    Roger

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    Your current is up to 1,2A so any transistor that can handle the double to be safe, could be used. TIP31 (3A) or MJE3055 (10A) are a few examples.

    The idea is to design a simple classic linear power supply that would be controlled by your PIC about the voltage and current. That would require A/D converters but to be very fast, a good designed Sigma-Delta converter may have to be used instead off the classic ADC's.

    That's what is hidden in the Elektor's article I mentioned.

    Ioannis

  10. #10
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Lightbulb

    Quote Originally Posted by flotulopex View Post

    Ioannis, your math is absolutely correct but when I take my FLUKE87 or my scope, they both show a maximum of 3,45 volts. This has to be, again, one of this famous frontier between theory and real life .

    ?
    Hi,

    IF we consider The 317 has a max ref voltage and a max Iadj current ... those readings are possible ... ( your 317 is "not so good" , Roger !!! )
    But that also mean ANOTHER 317 could damage the DS 1804 ...

    this design won't be good for series production ...

    Now, Roger, there's another point to verify ... your PCB tracks !!! are they sufficient to hold the required current ...
    And overall ... did you use a "star" config to link your ground tracks ???
    ( maximum care for R5 ground return path ...)

    Alain
    Last edited by Acetronics2; - 3rd December 2007 at 11:28.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  11. #11
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    I'm searching for this ELEKTOR info - but seems to be available only for members... Still looking for it.

    Using PWM, I will generate a voltage variation. If I'm right, a MOSFET can be "voltage" controlled; this is not true for a transistor.

    I assume it will be better to use a MOSFET, no?
    Roger

  12. #12
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex View Post
    I'm searching for this ELEKTOR info - but seems to be available only for members... Still looking for it.


    I assume it will be better to use a MOSFET, no?
    Hi, Roger

    Here : http://www.elektor.fr/magazines/2001...1).65895.lynkx

    a P mosfet will be easy to use ... a N Mosfet a bit harder ...

    But there's some more investigation to do with your circuit before throwing it to the wastebox ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  13. #13
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    I repeat again that, your final design might look like a Linear Power Supply.

    As such, a NPN pass transistor is the usual choice. The transistor acts like a voltage follower, so whatever voltage is present at the base, that voltage-0,7 is presented at the emitter, with current amplification of course.

    Ioannis

  14. #14
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Talking "KISS" ??? yess ... but without Pic !

    Hi, Ioannis

    just have a look to the NS Datasheet of the LM 350 page 10 ... there is a very simple Pb batt charger design ... easily usable with the 317 or 338 ( Paper datasheets included it in the 1982 Databook release ...).
    fits the I - V charging method ... Roger looks for ...

    But do not tell Roger ... he is a friend ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  15. #15
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    Hi Alain. Between us, yes there is a simple charger and many more everywhere!

    But Roger is looking for something to be controlled by his darling PIC. So, I can understand him trying to emulate a pot with an electronic pot. But this is not going to work as he is expecting... But don't tell him either! He is a friend and might be hurt!

    Ioannis

  16. #16
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Wink

    Hi, Ioannis

    Let's be honest ... It CAN work ...

    but it will ever be for his own pleasure ... and impossible to sell .

    the BTI CCS 9620 SL is the living proof it can work ... It's a dedicated Pic !!! ( probably 16HV xxx )


    Always the same : Amateur or pro ... solutions are not the same !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  17. #17
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    I agree Alain. I usually think on terms of reliable commercial product, that is well in the middle of the specs.

    It can work with little tricks and magic, but I won't trust it. Especially with the lead batteries!

    On the other hand the idea of the linear power supply is so simple... And prooved reliable.

    The Pic will only have to create the Vref and then a comparator will adjust the base voltage of the pass transistor. Thats it!

    Ioannis

  18. #18
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Wink

    He,he

    You just forgot the Battery tempco compensation ...

    ( -20 mv/ cell / deg C ... to be verified ! )

    seriously ... a High end Lead Acid Charger is a piece of cake !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  19. #19
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    Mmm, I really love to have one
    Quote Originally Posted by Acetronics View Post
    piece of cake !!!
    Seriously, yes it is. But not the way that Roger is doing it with that pot!

    Ioannis

  20. #20
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Talking

    ...

    Little Roger will become taller ... if you let him grow ...

    We all learnt a way or one other ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  21. #21
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default snif...

    ... but I love my digital pot so much... and my lovely PIC too...

    Are you all afraid by "parallel alternative technology" where selfmade difficulties make your baby almost impossible to get born?

    Well then, tomorow I'll get a power transistor, just to see how it looks like!

    But I won't let you sleep until I get it to work either

    NB: I don't give up my actual circuit anyway... but I put it on hold.
    Roger

  22. #22
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default

    [QUOTE=flotulopex;47145

    ... but I put it on hold.[/QUOTE]

    Ohhhhhhh .... noooooo !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  23. #23
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    Pssst! Alain, how will we ged rid of this Roger? May be tell him to connect the H of his pot to the +25Volts and wait for the "boom"?

    Seriously, Roger, leave it. I know it hurts, but do it! You will find soon the true love!

    Ioannis

  24. #24
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by mister_e View Post
    Weird idea this Zener Z1 so far...

    But yeah i'll second the PWM idea.. maybe just remove the LM317 as well and use a Mosfet/Transistor instead and do everything in software. a 12F683 would be perfect for that.

    1 current senses
    1 voltage sense
    1 PWM and
    remaining pins for leds and maybe other safety inputs.
    Hi,

    I didn't remember it at first ... but the 317 can be used as a "switching transistor" for PWM !!! ... just do not use too high a PWM frequency and it will work rather pretty ...

    YES ... the "off" state voltage will be 1.25 v ... but, here, no issue with that !!!

    do not laugh ! ... I have the proof ... it was ... 18 years ago, for a model train controller !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  25. #25
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    Very nice! State-of-the-art design! PWM with 1,25 offset!

    I'd like to have one! He, he.

    By the way have a look at the LM2576T-ADJ chip that is a 3A switcher.

    Very cheap and very easy! And adjustable too!

    Ioannis
    Last edited by Ioannis; - 4th December 2007 at 11:18.

  26. #26
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by Ioannis View Post
    Very nice! State-of-the-art design! PWM with 1,25 offset!


    Ioannis

    Hi,hi ...

    no problem here ... due the batt !!! the BY 500 will be reverse polarized during 1.25v level ...so, no current flowing ...

    CQFD !

    I can mail you a copy of the scheme ... just ask !


    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  27. #27
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    I can mail you a copy of the scheme ... just ask !
    Yeah, why not. Always collecting ideas!

    Ioannis

  28. #28
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    Yeah, why not. Always collecting ideas!

    Ioannis
    So, just have a look to LM317 datasheet ... NS gives 2 examples of 317 based switching regulators page 17 ...

    some kind of humour ... isn't it ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  29. #29
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    He,he. Alain, the great!

    Ioannis

  30. #30
    Join Date
    Dec 2008
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    BMW have actually made a charger using the PIC16F series PIC
    Have posted a pic of the charger in the schematics section (sorry if I got the forum wrong)

Similar Threads

  1. Replies: 14
    Last Post: - 6th March 2011, 06:08
  2. 18F2520 ADC issue
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 24th August 2009, 17:11
  3. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 08:12
  4. PIC backup power supply: switchover ???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 18th April 2008, 18:05
  5. Decent 24 volt Pic power supply
    By rwskinner in forum Schematics
    Replies: 7
    Last Post: - 18th December 2006, 13:27

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts