JLCPCB Prototype for $2(Any Color): https://jlcpcb.com
Connecting an LM324 quad op-amp as a LED flasher... weirdly.

By Julian

Youtuber, shed dweller, solar charge controller aficionado

14 thoughts on “Op amp led flasher weird version”
  1. Avataaar/Circle Created with python_avatars Pietro Noname says:

    ..and no Arduino needed.

  2. Avataaar/Circle Created with python_avatars Stephen Flynn says:

    What's a common application for this type of circuit?

  3. Avataaar/Circle Created with python_avatars Richard Bloemenkamp says:

    Fun, you may want to play with the oscilloscope and maybe with LTSpice a bit to see how it all compares. I think there are no real surprises. Relaxed video.

  4. Avataaar/Circle Created with python_avatars Nigel Johnson says:

    Might be worth converting the buffer to a voltage controlled current source, then the LED current would be dependent on the ramp voltage, making the brightness increase and decrease in a even more linear fashion.

  5. Avataaar/Circle Created with python_avatars Chris Albright says:

    Hey it's a new year, you know that means. Time to flash some LEDs, 6502 style. I enjoyed you z80 LED flasher and built one myself but now it's time for a new chip

  6. Avataaar/Circle Created with python_avatars EyesOnReality says:

    Yes Julian, that is weird where the only normal part of the circuit is the ‘unity-gain-follower/buffer’ on the output. What’s strange is the comparator operation value swaps in each Op-Amp with capacitors in place. So yes, a strange but delightful configuration overall.

  7. Avataaar/Circle Created with python_avatars NZ2Pepper says:

    What happens to the current draw in the new configuration? More or less than the standard configuration?

  8. Avataaar/Circle Created with python_avatars Helmuth Schultes says:

    Sadly email failed, so inserted here

  9. Avataaar/Circle Created with python_avatars Helmuth Schultes says:

    Julian,

    I hope this is able to reach you via EMail as comments in the YouTube vidoes always seem too short. Yet I will try to keep

    this short as well. I keep this to basic text format only, thus no pictures/diagrams, keeping it cleanest possible for

    virus etc issues.

    As already mentioned in the comments your "Wierd Oscillator" is using the LM324 in many respects outside of

    specifications. Many OpAmps would actually already be dead, and the LM324 many work but deterirorate over time.

    Critical parameters related to this system operation include the following

    For ESD protection, and often not well detailed in data sheets are diode, resistor networks on input pins, that absorb

    some level of Electro Static Discharge. That can be peak currents reaching amps, but of very short, sub microsecond

    duration. Typically data sheets will include a maximum average current. In the LM324 data sheet there is no secific limit

    but similar to normal can be expected.
    maximum input terminal current = 10mA,
    That level is to be ensure that any source voltage applied will have sufficient source resistance to limit current below

    that 10mA. Of course depending on pulse duration higher current could be applied, total energy should remain well below

    equivalent of clipping voltage times max current. The higher the energy to more likely long term detrioration and failure.
    In this LM324 case the diagram at sect 8.2 shows only negative side clipping diodes, but also stated is input must not

    exceed Vcc-1.5V first paragraph sect 8.1. Any higher and the input transistor base emitter junctions will be destroyed.

    These are tiny junctions, designed transistors are only uA collector current and input bias current in 10's of nA, and

    most certainly will not safely take even 10mA.

    Differential input voltage is stated in the data sheet at up to maximum Vcc voltage, sect 6.1, but caution the above

    mentioned max input must be less than Vcc-1.5V so what ever supply voltage, inputs must not go above Vcc-1.5, at 5V

    supply that will be 3.5V. Negative side is listed at -0.3V, that is so those clipping diodes mentione dbove, do not get

    active condition. These limits are however mainly for linear OpAmp operation, and that is not yet breakdown of the double

    base-emitter junction, or negative clipping byhe diodes. So for typical silicon devices that B-E breakdown would likely

    not be for up to 10V higher. But also the equivalent circiuit in 8.2 is not true complete circuit, with transistors on the

    chip having isolation junctions (diodes) etc. Beyond Vcc the chip is in potential danger of various interconnects and

    possible through conduction supply to ground. Some older devices suffer SCR latchups but modern designs try to minimise

    that risk.

    Finally one critical parameter to consider is the output drive capability. As the output is switched at Vcc/2 threshold,

    the capacitor has about Vcc/2 on it, and being driven by change of state on output will try to go to Vcc+ Vcc/2 on low-

    high and Gnd-Vcc/2 on High-Low transistions. The indicated negative end diodes will clip at about GND-0.7V with whatever

    peak output drive is available. What happens on the positive side is not certain but definite beyond the Vcc-1.5V spec,

    but maybe still under B-E breakdown is supply is <12v.
    Iout MAX = +-60mA SHORT and around 20-60 source and 10-30mA sink.
    ———
    PROPER OSCILLATOR USING AN OPAMP IS USING ONLY ONE AMPLIFIER.

    Place a Capacitor to ground from -ve input to ground, and oscillation rate resistor from output back to -ve input and

    capcitor. Now to oscilate we need to use positive feedback hysteresis using the +ve input. This is done with two

    resistors giving the 1/2 supply level to the +ve input a divider much as you inlcuded in your circuit, and a feedback

    resistor from output to +ve input and supply divider. The feedback resistor in ratio to the equivalent divider resistance

    will set the hysteresis, taht now will give an upper and lower switching pioint of the charge volatge on the capacitor.
    Say we use 10K resistors across the supply, that gives 1/2 supply level and equivalent resuistance of two 10K in parralel,

    thus 5K. To get upper and lower threshold 75% and 25%, other levels equally feasible, and assuming full supply swing out

    the output, calculate Vcc*5K/(Rf+5K) =0.25Vcc, clearly Rf =3* 5K. Note the LM324 does NOT drive full supply level at

    lower loads, a load 2K only to Vcc-1.5V, the output for >10K load is not well specified but probably still a bit short

    of full Vcc. Anyhow for practical purposes affects the actual threshold on high side so not quite 75% attained.

    Vcc ——–
    | ——-| 15k |—–
    —– | ——– |
    | | | |
    10k | | | | \ |
    | | ———————| + \ |
    —– | | \ |
    | | | >—————-
    | | ——–| – / |
    ———- | | / |
    | | / |
    | | |
    —– | ——– |
    | | ——–| |——-
    10k | | | ———
    | | | Rt
    —– _______
    | _______ Ct
    | |
    ===== |
    ======

    TRY IT, As the capacitor charges, from 0V, the output will of course be positive a -ve is less than +ve input, and the

    threshold will be upper limit as output is high. Once the capacitor has reached high enough, the +ve threshold is crossed,

    forcing output to go low, causing the threshold on +ve also to go to low limit. As output is low and thus discharging the

    capacitor, the -ve input will move downwards till the low threshold on +ve is reached and the cycle reverses. And thus is

    born a oscillator that has frequency controlled by Rt, Ct and the threshold chosen for switching. At no time will the

    device limits be exceeded, as lomng as the OpAmp can acces larger input differentials on input like the LM324. NOT ALL

    OPAMPS can acces large differential inputs! A comparator can also work fo this oscillator but usually is open collector

    output, but the hysteresis ntwork can be used as load, and carefull design uses no more resistors, though more complex

    calculations.

    good luck, leave the weird circuit it is not using devices within specification an depending on capacotor stored energy

    may long term fail or even immediate fail for manyopamps. as the LM324 has 10's nA input bias the resistor values can

    crtainly go to 100's K ohm even Meg Ohm if some bias inflince is allowed. There by usin much lower power to run, than usin

    K ohm range values, and smaller capaciors for longish periods.

    hope this is of use to you. Have a Merry Christmas and Happy New Year.

  10. Avataaar/Circle Created with python_avatars keith king says:

    another channel ":Paul" over at "Learn  Electronics" WEB-  SITE   asked to check out your MOSFETS experiments HELP  elp get a better grasp  me.

  11. Avataaar/Circle Created with python_avatars Tom George says:

    Merry Christmas Julian… Can you put a scope on the circuit?

  12. Avataaar/Circle Created with python_avatars jp040759 says:

    Merry Christmas.

  13. Avataaar/Circle Created with python_avatars TheTotalFunction says:

    Is there a way to make "flasher" but instead of LED it would turn on/off small heating element?

  14. Avataaar/Circle Created with python_avatars Willtor racker says:

    hello good video of what book you used to make the osculator

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.