Connect with us

Current measuring problems

Discussion in 'General Electronics Discussion' started by mhalak, Dec 3, 2013.

Scroll to continue with content
  1. mhalak

    mhalak

    2
    0
    Dec 3, 2013
    Hi everyone,

    I'm trying to build my bench power supply with LM317 and Atmel ATMega8 microcontroller which would control output, measure and display output voltage and current.

    Everything was fine until I got to part where I had to measure current. Idea was to place shunt resistor in front (input side) of LM317 instead of on load side so that LM317 compensate for voltage drop on shunt and output voltage on load should be stable and not dependable on current.

    Voltage drop on shut is measured with LM358 (set to 10x gain) but unfortunately output from LM358 is not as expected. I get 24-25mV regardless of voltage drop.

    I tried connecting shunt on low-side with load in series and got some reasonable results but it's not what I'm trying to do.

    I attached JPEG of my circuit running in Proteus which indicates that this should work...

    Any ideas???
     

    Attached Files:

  2. duke37

    duke37

    5,364
    769
    Jan 9, 2011
    Some comments.

    The LM357 can measure down to ground but a look at the IC circuit would indicate that it cannot measure within a couple of volts or so of the supply.
    Dividing the input signal by two could be used.

    The LM317 needs input and output capacitors to stop oscillation.

    The B2 battery can be replaced by two resistors.
     
  3. Harald Kapp

    Harald Kapp Moderator Moderator

    10,069
    2,150
    Nov 17, 2011
    My first thought, too. The datasheet states an input common mode voltage of Vcm=V+ - 1.5V.
    The resistors provided (100k 10Meg) result in an input voltage of 10.18V to the OpAmp, that's only 1V below V+.
     
  4. mhalak

    mhalak

    2
    0
    Dec 3, 2013
    B2 battery represents ATmega8 PWM output going through low-pass filter and op amp with 2x gain. It was easier to set battery for this purpose of simulation just to get output voltage.

    Of course. Capacitors are included in breadboard version. My mistake for not including those in simulation scheme.

    So should I divide signal inputs with additional resistors or maybe better choose existing ones?
     
  5. duke37

    duke37

    5,364
    769
    Jan 9, 2011
    If you take two resistors of 100k in series from one sde the sense resistor to ground and another two at the other side of the sense resistor to ground, then connect the op-amp to the centre of the resistor chains. This in effect will replace R1 and R3
    The op-amp input resistance will be 50 ohms so you will get a different amplification factor.

    You may need to trim the input bridge since the resistors will not be exact.
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    10,069
    2,150
    Nov 17, 2011
    That should be 50kOhms, shouldn't it?

    The circuit looks like this:
    [​IMG]

    As it is, it generates 330mvV per 1A. You can tweak the resistors to change the gain of the amplifier or add a second anmplifier to match the output voltage to a suitable input voltage for teh mester.
     

    Attached Files:

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-