Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

Iman12

Newbie level 6
Joined
Sep 27, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,391
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.

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

---------- Post added at 05:01 ---------- Previous post was at 04:58 ----------

Btw, the motor is dc.
 

Wouldn't the first single supply application circuit from the data sheet (non-inverting) work with a gain of 100 or the current monitor application circuit **broken link removed**?
 
  • Like
Reactions: Iman12

    Iman12

    Points: 2
    Helpful Answer Positive Rating
From this thread:
https://www.edaboard.com/threads/171596/
you can learn how to scale and shift voltages using opamps ..

As far as the opam is concerned, you should look for rail-to-rail opam that can produce the output from GND to Vcc (full swing); the LM324 can't do this, so with the supply voltage of Vcc=+5V you can expect the output range somewhere between 0.3V to 3V ..

IanP
:wink:
 
  • Like
Reactions: Iman12

    Iman12

    Points: 2
    Helpful Answer Positive Rating
Wouldn't the first single supply application circuit from the data sheet (non-inverting) work with a gain of 100 or the current monitor application circuit **broken link removed**?

Oh yeahh~ Never know this datasheet before. I see it got a current sensing design there~ Thanks KJ6EAD

---------- Post added at 13:29 ---------- Previous post was at 13:27 ----------

From this thread:
https://www.edaboard.com/threads/171596/
you can learn how to scale and shift voltages using opamps ..

As far as the opam is concerned, you should look for rail-to-rail opam that can produce the output from GND to Vcc (full swing); the LM324 can't do this, so with the supply voltage of Vcc=+5V you can expect the output range somewhere between 0.3V to 3V ..

IanP
:wink:

Thanks IanP, I'll try to look at KJ6EAD and yours. Will tell the updates later yea
 

I took it directly from the circuit but it doesn't work. The output just shows my Vin. Got any idea how to test this to work?

20_1288522246.jpg


---------- Post added at 18:53 ---------- Previous post was at 18:51 ----------

Is there any big difference if I took out the transistor? I used 2N3904 for this purpose. Tried with the transistor and not. But it just doesn't make that voltage difference say if I put a 15mA LED and 30mA dc motor.
 

Anyone can help me with this? This is the last part of my project. Really could use some help. Thanks
 

There are certain conditions that have to be met if you wants this circuit to work ..
First, for small currents you have to increase the value of R1, which was meant to work with amps rather than mA, to, say 1ohm ..
Next thing you have to keep in mind is that the opamp’s supply voltage has to be higher than V[L], voltage used to supply load ..
And (I hope) you have connected a load in place of R[L], correct?

IanP
:wink:
 

There are certain conditions that have to be met if you wants this circuit to work ..
First, for small currents you have to increase the value of R1, which was meant to work with amps rather than mA, to, say 1ohm ..
Next thing you have to keep in mind is that the opamp’s supply voltage has to be higher than V[L], voltage used to supply load ..
And (I hope) you have connected a load in place of R[L], correct?

IanP
:wink:

Is there a way that I can still use the 0.1ohm resistor without changing it to 1ohm? And yes, I have connected the necessary load. first is to make 20mA and the other is 30mA just to know is there any increase in the voltage. I am using 5V rite now, so maybe the maximum limit is 3V like you've said? It is still ok for me I think
 

0.1 0hm x 20mA => 2mV

And 2mV is the opamp’s input offset voltage, so the usable signal is on the same level as errors ..
Consider even higher resistance, maybe 10 Ohm; 1 Ohm will be the absolute minimum ..

IanP
:wink:
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top