Here is a circuit that consists of two different pulse generators and an interesting pulse voltage integrator combined to produce a stair step voltage output. It is my version copied from W2AEW Stair Step Generator. My goal was to duplicate Alan's circuit and to experiment with adjustments to the timings and to see if any practical applications emerged.
The output looks like this:
The purple stair-step trace is the target output; the blue trace is the train of pulses and the yellow trace is the reset pulse.
Here is the complete circuit (the dashed blocks indicate the units that produce each of the traces above):
KL0S provided an EXCELLENT explanation if how the circuit works: KL0S explanation
555 Pulse Generator
A common circuit using a 555 timer in astable mode to generate a train of square wave pulses. Length of the positive pulse is controlled by RV1& R4 that charge C2 via a steering diode. The variable resistor allows the positive width to be adjusted so that the voltage step increment is such that Vcc is just reached on the last step before a reset. Positive pulses that are too long results in Vcc being hit well before a reset occurs. Pulses that are too short limits the range of the stair step to something less than Vcc. The length of the negative duration is controlled by discharging C2 via R3 through another steering diode.
When RESET is taken low the 555 stops producing pulses - the first one occurs when RESET goes high. In this circuit the reset pin is controlled by Q1and is triggered by the op amp pulse generator.
Op amp pulse generator for reset
This module reset the staircase to 0V and is another common circuit. It uses an op amp as a relaxation oscillator. Here we are using half of a TLV2372.
Timing is controlled by C1 charging through and discharging through R6 & D3 and discharging through R7 & D4. The values were chosen to give a positive pulse that short in relation to the negative length - the positive period holds the 555 in reset mode (Q1 collector is at ground). When this reset pulse ends Q1 is turned off and the 555 resumes pulse generation. C1 discharges through R7 and D4 but at a slower rate than charging so the negative duration is longer than the positive. The op amp output is, of course, inverted by Q1's switching action.
Pulse Integrator
Pulses from the 555 are fed via R10 to the non-inverting input of an op amp. The 4 10k resistors for a pair of voltage dividers on both the inverting and non-inverting inputs to the op amp. The voltage on both inputs is therefore the same and no change in output occurs. When a positive pulse arrives from the 555 the output goes high and C4 begins charging - the rising edge of the stair case. This continues until the output reaches Vcc or a reset occurs.
I found that it was useful to make RV2 variable rather than fixed because this allows how hard Q2 is turned on to be varied. I adjusted it to ensure that C4 was fully discharged well before the end of the reset pulse.
Notes:
- a rail to rail is required for this circuit to function as described but it is possible to use other op amps. I tried an LM324 and it worked ok but needed changes to R6 & R7 because the HIGH output level is well below Vcc. Also the value of RV2 needed to be lower for the same reason - initially the base drive was too low to turn on Q1 and Q2.
- R8 is only required for some op amps. I found that both the TLV2372 and LM324 worked fine without it but some op amps may need this resistor to pull the output fully to ground.
- Vcc is not critical and the circuit worked well below 5V and up to 12V. Didn't check any higher than that.
- Component values have been chosen to provide 29 steps between resets. It is easy to change this by changing resistor values or even C1 or C2. My objective was to for a complete stair step sequence to last a few mS and to extend from 0V to Vcc in about 20 - 30 steps.
- Q1 is configured as a switch to take the 555 reset line low when a positive pulse arrives on its base. At the same time Q2 collector goes low discharging C4 hence reseting the stair step.
References:
Comments
Post a Comment