Current-controlled triangle+square-wave generator

Discussion in 'General Electronics Chat' started by Alec_t, Apr 9, 2016.

  1. Alec_t

    Thread Starter AAC Fanatic!

    Sep 17, 2013
    5,813
    1,105
    Thought this concept might be useful for anyone wanting a variable-frequency oscillator :-
    ICO-1.PNG
    The anti-paralleled transistors in the optoisolators behave as a variable bi-polar current source to determine the oscillation frequency. Frequency is approximately linearly dependent on the photodiode input current, with a range of at least one decade for any given timing capacitor. U3a is configured as a Schmitt trigger with upper and lower thresholds as close to the rails as is reasonable (to maximise the triangle-wave amplitude), given that the opamp is not a rail-to-rail one. U3b is a unity gain buffer. The use of optoisolators naturally has the advantage that the frequency control can be floating with respect to the oscillator output if desired.
    The el cheapo variant below uses one optoisolator in a diode bridge, but is otherwise similar. Its triangle wave-shape is kinked slightly due to the diodes.
    ICO-2.PNG
    I haven't investigated the upper frequency limit, effects of temperature or using alternative op-amps/optos.
    Have fun.
     
    cmartinez, hrs and Sinus23 like this.
  2. dannyf

    Well-Known Member

    Sep 13, 2015
    1,835
    367
    The upper end will be limited by the current source (or a voltage source + a resistor): to maintain linearity, you have to charge up / discharge the capacitor a little bit at a time, and you don't want to charge it up or discharge it too much. And it should on average sit at around the upper end and lower end of the opamp's swing.

    If you replace the opamp with a st inverter (HC132 for example), ....

    I am not quite sure where it can be used.
     
  3. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,574
    2,550
    Would be nice if you posted the .asc files too
     
  4. Alec_t

    Thread Starter AAC Fanatic!

    Sep 17, 2013
    5,813
    1,105
    See attached. If you don't have an LM324 model, just use any opamp model you do have.
    I did play around with an HC132 (actually 74HC14) instead of the LM324, but that produced a less symmetrical triangle of lower amplitude and wouldn't tolerate much loading without severe distortion of the triangle.
     
    Last edited: Apr 10, 2016
    Sinus23 and cmartinez like this.
  5. dannyf

    Well-Known Member

    Sep 13, 2015
    1,835
    367
    The symmetry / duty cycle of the triangle wave is determined by the charges put to and withdrawn from the capacitor. That charge is a function of the optos' imbalance, and where the capacitor sits.

    In a sim, the optos are perfectly balanced. With a HC132, its transition points (to high and low) are 1.5 - 2.5v, give or take a few. In a 5v system, that means the capacitor gets charged up more per pulse than discharged down per pulse. So you have a shorter up-swing and longer down-swing.

    The cure is to put a resistor / pot on one of the optos.

    the same problem may exist with the opamp solution - you can adjust the "mid-point" to counter that, however.
     
  6. RichardO

    Well-Known Member

    May 4, 2013
    1,238
    385
    What not a 555???
     
  7. Alec_t

    Thread Starter AAC Fanatic!

    Sep 17, 2013
    5,813
    1,105
    No, actually. But it's yet another use for one :).
     
  8. Bordodynov

    Active Member

    May 20, 2015
    643
    188
    See
    CCTS_generator.png
     
  9. Alec_t

    Thread Starter AAC Fanatic!

    Sep 17, 2013
    5,813
    1,105
    So, various solutions. All we have to do now is find problems where they would be useful :D.
     
  10. Bordodynov

    Active Member

    May 20, 2015
    643
    188
    I used a similar scheme of my generator (using 555) to create a medical home machine type "Vitaphone".
    This is a simple, low-power, sound generator with variable (swinging) frequency. The frequency ranges 50 - 15,000 Hz. Industrially manufactured apparatus (prototype) showed high effectiveness in the home and clinical settings. Effect is determined by the fact that the small blood vessels in their resonate frequencies, which improves blood flow and lymph flow through small vessels. It is effective in the treatment of human kidney.
     
Loading...