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 ----------
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**?
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 ..
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**?
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 ..
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?
---------- 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.
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?
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?
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
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 ..