Tampilkan postingan dengan label Timer_Clock. Tampilkan semua postingan
Tampilkan postingan dengan label Timer_Clock. Tampilkan semua postingan

Rabu, 02 Januari 2013

Building A Synchronous Clock

The quartz clocks which have dominated time-keeping for the past 20 years or so have one problem: their errors, although slight, are cumulative. After running for several months the errors can be significant. Sometimes you can correct these if you can slightly tweak the crystal frequency but otherwise you are forced to reset the clock at regular intervals. By contrast, mains-powered synchronous clocks are kept accurate by the 50Hz mains distribution system and they are very reliable, except of course, when a blackout occurs.

This circuit converts a quartz clock to synchronous mains operation, so that you can have at least one clock in your home which shows the time. First, you need to obtain a quartz clock movement and disassemble it down to the PC board. For instructions on how to do this, see the article on a "Fast Clock For Railway Modellers" in the December 1996 issue of SILICON CHIP. Then isolate the two wires to the clock coil and solder two light duty insulated hookup wires to them (eg, two strands of rainbow cable). Drill a small hole in the clock case and pass the wires through them. Then reassemble the clock case.


To test the movement, touch the wires to the terminals of an AA cell, then reverse the wires and touch the cell terminals again. The clock second hand should advance on each connection. The circuit is driven by a low voltage AC plug pack. Its AC output is fed to two bridge rectifiers: BR1 provides the DC supply while BR2 provides positive-going pulses at 100Hz to IC1a, a 4093 NAND Schmitt trigger. IC1a squares up the 100Hz pulses and feeds them to the clock input of the cascaded 4017 decade counters. The output at pin 12 of IC3 is 1Hz.

This is fed to IC4, a 4013 D-type flipflop, which is connected so that its two outputs at pins 12 & 13 each go positive for one second at a time. As these pulses are too long to drive the clock movement directly, the outputs are each fed to 4093 NAND gates IC1b & IC1c where they are gated with the pin 3 signal to IC4. This results in short pulses from pins 3 & 10 of IC1 which drives the clock via limiting resistor R1. The value of R1 should be selected on test, allowing just enough current to reliably drive the clock movement.

555 Timer Circuit With Variable On/Off Times

This circuit enables the on/off times of a 555 timer to be independently varied over a wide range. This is not possible with a conventional 555 circuit with the RC network being charged from the positive supply rail and discharged via pin 7. Instead, the capacitor at pins 2 & 6 of IC1 is charged and discharged from the output at pin 3. Furthermore, the charging and discharging circuits are different, being isolated by diodes D1 & D2.


Therefore the capacitor at pins 2 & 6 is charged via diode D2 and trimpot VR2 and discharged via D1 and trimpot VR1. With this arrangement you can have very long on times combined with very short off times and vice versa, or you can adjust the duty cycle to exactly 50% and so on. This circuit also employs a second 555 timer (IC2) as an inverter so that complementary pulses are available, if required. If not, delete IC2.

Multipurpose Flip-Flop Timer

This particular timing circuit can be used to time one-shot events from a few seconds to a few hours. And in standby mode (ie, with RLY1 and LED1 off), its power consumption is very low. The heart of this circuit is a low-cost CMOS 4011 quad NAND gate, with IC1a & IC1b configured as a standard Set/Reset flip-flop. Briefly pressing switch S1 to start the timing sequence pulls pin 1 of IC1a low and, as a result, pin 3 switches high. Two things happen while pin 3 is high: capacitor Cx begins charging via potentiometer Rx; and (2) pin 11 of IC1d will be low, which means that transistors Q3 and Q1 are both on.

As a result, both LED 1 and relay RLY1 are also on. RLY1 and LED 1 remain on until Cx has been charged up to about 70% of Vcc (ie, the supply rail). At this point, pins 8 & 9 of IC1c are pulled high and so its pin 10 output goes low and resets the flip-flop by applying a low to pin 6 of IC1b. This causes pin 3 of IC1a to go low and so LED1 and RLY1 switch off and the timing period ends. At the same time, pin 4 of the flip-flop goes high and this turns on transistor Q2 while ever the flip-flop is held reset. This ensures that Cx is discharged, so that the circuit is ready the next time S1 is pressed.
 

Diode D1 and its associated 10µF capacitor reset the flip-flop when power is first applied, so that LED1 and RLY1 remain off until S1 is pressed. D4 is included to protect Q1 against the back-EMF that's generated when the relay switches off. Choosing appropriate values for Cx & Rx for a given time delay is straightforward. The formula is T = 1.24 x Rx x Cx, where T is the delay time in seconds. As an example, let's assume that we require a time delay of 10s using a value of 100µF for Cx. Now we just need to calculate the value of Rx as follows:
  • Rx = 10s/(1.24 x Cx) = 80,645O
In this case, an 82kO resistor would be the closest value. You can use either a fixed resistor for Rx or you can use a potentiometer (or trimpot) which can be adjusted to give the required time delay. Note that the value of Rx should not be any more than a few megohms. Power for the circuit can be derived from any 12V DC source. This is then fed to 3-terminal regulator REG1 to derive a 9V rail to power the circuitry. The exception here is the relay circuit, which is powered from the 12V rail. Diode D3 protects the circuit against incorrect supply polarity.

Senin, 19 November 2012

Generating a Delayed Pulse Using The 555 Timer


The circuit below illustrates generating a single positive pulse which is delayed relative to the trigger input time. The circuit is similar to the one above but employs two stages so that both the pulse width and delay can be controlled. When the button is depressed, the output of the first stage will move up and remain near the supply voltage until the delay time has elapsed, which in this case is about 1 second. The second 555 stage will not respond to the rising voltage since it requires a negative, falling voltage at pin 2, and so the second stage output remains low and the relay remains de-energized. At the end of the delay time, the output of the first stage returns to a low level, and the falling voltage causes the second stage to begin it's output cycle which is also about 1 second as shown. This same circuit can be built using the dual 555 timer which is a 556, however the pin numbers will be different.

555 timer Mono stable (one shot) circuit


The two circuits below illustrate using the 555 timer to close a relay for a predetermined amount of time by pressing a momentary N/O push button. The circuit on the left can be used for long time periods where the push button can be pressed and released before the end of the timing period. For shorter periods, a capacitor can be used to isolate the switch so that only the initial switch closure is seen by the timer input and the switch can remain closed for an unlimited period without effecting the output. 

In the idle state, the output at pin 3 will be at ground and the relay deactivated. The trigger input (pin 2) is held high by the 100K resistor and both capacitors are discharged. When the button is closed, the 0.1uF cap will charge through the button and the 100K resistor which causes the voltage at pin 2 to move low for a few milliseconds. The falling voltage at pin 2 triggers the 555 and starts the timing cycle. The output at pin 3 immediately moves up to near the supply voltage (about 10.4 volts for a 12 volt supply) and remains at that level until the 22 uF timing capacitor charges to about 2/3 of the supply voltage (about 1 second as shown). Most 12 volt relays will operate at 10.4 volts, if not, the supply voltage could be raised to 13.5 or so to compensate. The 555 output will supply up to 200mA of current, so the relay could be replaced with a small lamp, doorbell, or other load that requires less than 200mA. When the button is released, the 0.1uF capacitor discharges through the 100K and 2K resistors. The diode across the 100K resistor prevents the voltage at pin 2 from rising above the supply voltage when the cap discharges. The 2K resistor in series with the 22uF cap limits the discharge current from pin 7 of the timer. This resistor may not be necessary, but it's a good idea to limit current when discharging capacitors across switch contacts or transistors.

Relay Toggle Circuit Using a 556 Timer


This toggle circuit operates by using a couple 555 timers wired as inverters. Pins 2 and 6 are the threshold and trigger inputs to the first timer and pin 5 is the output. The output at pin 5 will always be the inverse of the input at pins 2 and 6. Likewise, the output at pin 9 of the second timer will always be the inverse of the input at pins 8 and 12. A 100K resistor connects the output of one inverter to the input of the other so the state of one will be the opposite of the other. 

In operation, the 1uF capacitor will charge to whatever voltage is present at the output on pin 5. When the button is pressed, the capacitor voltage will be applied to the input of the other timer which will reverse the state of both timers and toggle the relay, either on or off. 

To follow it more closely, assume the output at pin 5 is +12 volts and the second output at pin 9 is zero volts. The 1uF cap will be charged to 12 volts. When the button is pressed, the cap will apply +12 to the inputs at pin 2 and 6 which will cause the output at pin 9 to go to zero, turning off the relay. When the button is released, the cap will discharge to zero, since the voltage at pin 5 is now zero. When the button is again pressed, the capacitor will apply zero to pins 2 and 6 causing the output at pin 9 to switch positive and engage the relay, and the cycle repeats. 

The advantage of this circuit is the large hystersis range on the inputs. The button can be held closed indefinetly without upsetting the state of the outputs since the input voltage will be 1/2 the supply due to the equal value 100K resistors. The switching points are 1/3 and 2/3 of the supply so that a voltage of 50% has no effect. The circuit will also toggle very fast and needs no switch debouncing. One disadvantage is that it may turn on with the relay either engaged or disengaged. To solve that problem, you could use a resistor in series with one of the reset lines (4 or 10) and add a capacitor from the reset line to ground. 

The 100 ohm resistor and 100uF capacitor serve to filter noise on the supply line if the circuit is used in a automotive application. They may not be necessary. The circuit may work well without those parts.