0
\$\begingroup\$

I made this circuit:

image

The op-amp is LM358.

The problem with this ciruit if the charging current get to drop about 0.10A the red and the green leds are flashing together. I want the following: if the current drops below 0.10A the red light stop to light and the green light get to light. Do not flashing the LEDs.

\$\endgroup\$
  • \$\begingroup\$ Please edit your question to show the part number and link to the datasheet for the chip. \$\endgroup\$ – Transistor Jul 28 '17 at 21:17
  • 2
    \$\begingroup\$ Add hysteresis to start. \$\endgroup\$ – jonk Jul 28 '17 at 21:23
2
\$\begingroup\$

You need to add some hysteresis, so that when the green LED lights up it stays on until the charging current rises to a higher value.

Try this:-

schematic

simulate this circuit – Schematic created using CircuitLab

When charging current falls to 100mA op amp OA1's output starts to go high and lights D2. Green LED current flows through R3, causing the voltage at OA1's noninverting input to increase from 100mV to ~250mV. This positive feedback 'snaps' the output high and causes D2 to stay lit until charging current rises above ~250mA.

You can change the charging current required to light the red LED by adjusting the value of R3. Theoretically you should also change R2 to make R2 + R3 = 100Ω (which is why I changed R2 to 99Ω), but using a fixed value of 100Ω should be close enough.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.