Voltage control using PWM from a PIC

Discussion in 'The Projects Forum' started by finne, Aug 4, 2014.

  1. finne

    Thread Starter New Member

    Jul 29, 2013
    9
    0
    Hello, I have some questions regarding a project I'm working on.

    Whats the recommended way to cool this LM1084 5A regulator? https://www1.elfa.se/data1/wwwroot/assets/datasheets/hrLM1084_data_e.pdf

    I have these TO220 heatsinks http://www.fischerelektronik.de/uploads/pics/FK252gr_01.jpg but it seems that I need active cooling as well if I'm using the regulator to its full potential. However I have no experience in designing active cooling. Fan types, placement etc. There are some graphs with temperature shown in the LM1084 datasheet but I dont know what to make of them.

    So the longer question. I'm designing a PIC controlled battery charger for lithium ion batteries and just want some general feedback on it. Actually it will have more functions than charging, including destructive stress testing which is why I need all the current. I have succesfully used this little guide to create a D/A converter for my PIC http://www.edn.com/design/analog/4363990/Control-an-LM317T-with-a-PWM-signal

    The ciruit I have is this, simplified a bit to capture the essentials:

    [​IMG]



    The PIC controls for example the current with a feedback loop, mesuring current using Ai0:

    PWM_new = PWM_old - Measured_Current + Target_Current

    So in general, what stupid mistakes have I made? :) What would you do differently?
     
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    I wouldn't do the destructive testing bit :). Are you aware of the fire and explosion risks when charging/using lithium batteries?
     
  3. finne

    Thread Starter New Member

    Jul 29, 2013
    9
    0
    Yes. We at this university have the labs needed to blow up batteries safely :) But thanks for caring.
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    First off you need to determine where ground connects.

    When reading the battery voltage you need to subtract the current sense voltage.

    The current sense voltage will be very tiny and thus an inaccurate measurement. Use an amp here, and if you use a high side current monitor amp you can put the resistor before the battery.

    Those are tiny tiny heat sinks. Buy one that is a big hunk of metal.
     
  5. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,770
    970
    Bernard likes this.
  6. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    I second everything that ErnieM said.

    I have integrated the PWM output from a PIC to make a cheap DAC. It works fairly well but is very slow and by its nature has ripple. You will need to account for this in your code, otherwise, you could run into instabilities in your control loop.
     
  7. NorthGuy

    Active Member

    Jun 28, 2014
    604
    121
    I wouldn't use almost 50% of my energy to heat the regulator. I would use buck SMPS topology controlled by PWM from the PIC.
     
  8. RichardO

    Well-Known Member

    May 4, 2013
    1,235
    384
    Cool! Do we get video of your results so we don't have to do the experiment ourselves? :D
     
  9. finne

    Thread Starter New Member

    Jul 29, 2013
    9
    0
    Right now ground is the negative pole of the 7,5 V power supply. Is that ok? Also I was thinking of putting a diode in series with the battery in case someone puts a battery in the wrong way. Is that enough protection and will it affect my measurements?

    Yep, thought about that.

    Is it somehow better to have them in that order? Why?

    Fixed that issue, we had something lying around that's overkill but not needed for anything else. A cpu cooler+heatsink. Just drilled a hole in it. It's ugly and hilarious but works.

    Thanks! The problem is solved but that text will come in handy.

    I looked it up and I'm sure you're right. However from what I read it seems like it might make my project a bit too complex. My time is a bit limited I'm afraid.

    Haha. Actually maybe :) All previous destructive tests that I know of have been filmed.
     
Loading...