24V output square wave

Discussion in 'General Electronics Chat' started by Martino Chiro, May 29, 2015.

  1. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
    I have a 24VDC supply, and a generator that outputs a 1KHz square wave with an amplitude of 10V referred to ground. How can i get a square wave of 24V amplitude (referred to ground) ? The signal will be loaded with 20 or 30 mA.
     
  2. Hypatia's Protege

    Distinguished Member

    Mar 1, 2015
    2,800
    1,237
    To generate a square wave at a given peak-to-peak amplitude, merely 'chop' a DC source of the desired EMF at the desired frequency and duty cycle -- Be advised, however, that stray reactances will 'wreck havoc' upon transient times with increasing (fundamental) frequency...

    Best regards
    HP
     
  3. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,544
    1,251
    Do you want to buy something, or build a small circuit from scratch. Without more details, this sounds like two transistors, two 15V zener diodes, two resistors, and one capacitor.

    How "square" of an output do you need? Risetime, over/undershoot, etc.?

    ak
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    The circuit is a standard of voltage converter, the output current calculating as this:
    Vce_Q1 = 0.2V
    Vbe_Q2 = 0.7V
    Vce_Q2 = 0.2V
    I_R4 = (24V - Vbe_Q2 - Vce_Q1)/R4
    = (24V - 0.7V -0.2V)/4.7K
    = 23.1V/4.7K
    = 4.91 mA
    Ic_Q2 = I_R4 * 10 = 49.1 mA
    So if you want to reduce the current then you can increase the value of R4, or you want to increase the current then you have to reduce the value of R4, you just calculate as above formula.
    Vo = 24V - Vce_Q2 = 24V - 0.2V = 23.8V
    R5 is a false load.

    12Vto24VSquareWave_Martino Chiro_ScottWang.gif
     
  5. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
    Thank You AnalogKid,
    I prefer a small circuit from scratch. I think two transistors, zeners, resistors and una cap is enough for me: have you a schematics ?
    Regards,
     
  6. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
    Thank You ScottWang,
    very interesting for my needs. What do you mean for "flase load " ?

    Regards,
     
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    The false load means that it just provide a ground for the output signal, but maybe the value will be too high for the device, if the input of device has its own ground then there is no grounding problem, otherwise the false load should be reduce the values to suits the device.
     
    Martino Chiro likes this.
  8. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    If the load is grounded, then the simple level shifter is all you need:

    226.gif
     
    Martino Chiro likes this.
  9. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
    Thank You MikeML,
    what is a good choice for Q1 and Q2 ?
     
  10. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,544
    1,251
    Both circuits posted have vastly asymmetrical output impedances. The rising edge output impedance is almost zero, while the falling edge impedance is either 1 k or 47 k, or left to the load to discharge itself. We still don't have load details.

    ak
     
    Hypatia's Protege likes this.
  11. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
    The load are the digital inputs of a group of PLC i need to test togheter. The load is resistive and is betwwen 4 to 28mA.
     
  12. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,544
    1,251
    This is a symmetrical driver with cross-conduction protection. The output resistor can be adjusted to a compromise between max output current and required voltage across the load.

    ak
     
  13. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    For a resistive input to a plc, it is more than likely that an active high side driver (the level shifter of post #8) is just fine. R1 in my circuit repesents the input to the plc.

    If I was building it, I would go to my junk box and pull out a 2n3906 and 2n3904. There are probably 10,000 transistors that would work in that circuit...

    ps, I just noticed that Scott posted almost the same circuit.
     
    Martino Chiro likes this.
  14. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    I usually use 2SC945, 2SA733, because I can buy they from local stores easily, I labeled the 2N3904 and 2N3906 that it just for the members may easy to buy or already have some.
     
    Martino Chiro likes this.
  15. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
    What is "cross-conduction protection" ? A protection of the: output stage, input stage or load ?
     
  16. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,544
    1,251
    The output stage has one transistor to pull the load up and another one to pull it down. This is called a totem-pole output stage. One possible problem is that both transistors might be on, or partly on, at the same time, appearing as a very low impedance or dead short across the circuit power supply. This is called cross-conduction or shoot-through. To prevent this, you want to make sure one transistor is off before the other comes on. Because the two zener diodes add up to more than Vcc, the current path through both emitter-base junctions and both diodes never is forward biased, so cross-conduction is prevented.

    ak
     
    Martino Chiro likes this.
  17. Martino Chiro

    Thread Starter Member

    May 1, 2015
    56
    0
    Very well explained, thank you.
    How do you choice the 1K and 2.2uF (2.2ms time constant) given a 1KHz input frequency ?
     
  18. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,544
    1,251
    Each transistor has to be turned on for 500 us, and you don't want the capacitor to run out of charge before each period is over. 2.2 ms is over 4 times that. 3 time constants is 95% and 5 time constants is 99%, so at least 95% of the charge in the cap is available to drive the transistor bases, more than enough margin. 1 k limits the peak base current to 2.8 mA, but over 1 ma is stolen by the 10 k resistors so I would increase them to 22 k. With that change you can decrease the cap to 1.0 uF. Simulation looks good, but it takes 3 cycles of the input square wave before anything shows up on the output. The left side of the cap averages 5 V and the right side averages 12 V, so it takes a few cycles for the cap to charge up to that potential difference.

    ak
     
    Martino Chiro likes this.
  19. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Why capacatively couple it? By definition, the inputs to a PLC are "logic" inputs; they could be high or low nearly forever. Putting a capacitor in that path is pure folly...
     
    Martino Chiro likes this.
  20. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    AnalogKid designed a analog amplifier to amplifying the digital signal, why?
     
Loading...