24V output square wave

Thread Starter

Martino Chiro

Joined May 1, 2015
128
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.
 

Hypatia's Protege

Joined Mar 1, 2015
3,228
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
 

AnalogKid

Joined Aug 1, 2013
10,986
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
 

ScottWang

Joined Aug 23, 2012
7,397
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
 

Thread Starter

Martino Chiro

Joined May 1, 2015
128
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
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,
 

Thread Starter

Martino Chiro

Joined May 1, 2015
128
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.

View attachment 86463
Thank You ScottWang,
very interesting for my needs. What do you mean for "flase load " ?

Regards,
 

ScottWang

Joined Aug 23, 2012
7,397
Thank You ScottWang,
very interesting for my needs. What do you mean for "flase load " ?

Regards,
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.
 

AnalogKid

Joined Aug 1, 2013
10,986
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
 

Thread Starter

Martino Chiro

Joined May 1, 2015
128
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
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.
 

MikeML

Joined Oct 2, 2009
5,444
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.
 

ScottWang

Joined Aug 23, 2012
7,397
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.
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.
 

Thread Starter

Martino Chiro

Joined May 1, 2015
128
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
What is "cross-conduction protection" ? A protection of the: output stage, input stage or load ?
 

AnalogKid

Joined Aug 1, 2013
10,986
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
 

Thread Starter

Martino Chiro

Joined May 1, 2015
128
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
Very well explained, thank you.
How do you choice the 1K and 2.2uF (2.2ms time constant) given a 1KHz input frequency ?
 

AnalogKid

Joined Aug 1, 2013
10,986
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
 

MikeML

Joined Oct 2, 2009
5,444
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...
 
Top