Convert 1-50mA to 0-5V using LM324

Discussion in 'Embedded Systems and Microcontrollers' started by Iman Zahari, Oct 29, 2010.

  1. Iman Zahari

    Thread Starter New Member

    Oct 10, 2010
    Hi and good day all,

    I wanted to measure current from a motor. I measured that at normal operation the motor takes about 40mA. I am using a current sense resistor of 0.1ohm. Usually I use a HCPL-7520, but this time around I am trying to use a LM324 to solve the problem.

    With a HCPL-7520 it is really easy, just parallel the current sense resistor to the HCPL-7520 and input it to the microcontroller (PIC) ADC pins and adjust the codings.

    But with a LM324, I really am not sure how to do this. Just for safety, I put the maximum value to 50mA so it would detect the little overcurrent there. As the PIC ADCs could only detect 5V it would be nice that at 50mA the PIC will detect about 5V. The motor is dc to begin with.

    Anyone got any idea? Really stuck here. Thanks in advance guys. :)

  2. bertus


    Apr 5, 2008

    Can you post the schematics of what you have upto now?
    That way we can see how to adapt it for your needs.