Consumer home equipment in this day and age hardly have a proper mains switch. Instead, appliances are fliped on and off on the contact of a button on the faraway control, similar to any other perform. This circuit displays how a tool (as lengthy because it does not draw too excessive a present) can be swaped on and off the utilization of a pushbutton. The means requires that a microcontroller is already available within the circuit, and a spare input port pin and a spare output port pin are required, along with just a little software program. When power is applied T1 initially is nonetheless fliped off. When the button is pressed the gate of T1 is taken to floor and the p-channel energy MOSFET conducts. The microcontroller circuit is now equipped with energy. Within a short duration the microcontroller must take output PB1 excessive. This activates n-channel MOSFET T1 which in flip preserves T1 turned on after the push-button is launched.
Now the microcontroller must poll the state of the push-button on its enter port (PB0) at regular intervals. Immediately after change-on it will observe that the button is pressed (a low degree on the input port pin), and it must look ahead to the button to be launched. When the button is next pressed the software should swap itself of f: to are attempting this the firmware running in the microcontroller must set the output port pin to a low stage. When the button is subsequently launched T1 will now flip off and the availability voltage will be removed from the circuit.
The circuit itself draws no present within the off state, and for (rechargeable) battery-powered appliances it is therefore absolute best to position the switch ahead of the voltage regulator. For primarys-powered instruments the change can be geared up ahead of the voltage regulator (after the rectifier and smoothing capacitor). Since there's no majors switch there will nonetheless be a small standby current draw on this case because of the transformer. Be careful not to exceed the maximum gate-source voltage specification for T1: the IRFD9024 software prompt can face up to up to 20 V. At decrease voltages R2 could be changed by way of a wire link; otherwise appropriate values for the voltage divider formed by using R1 and R2 must be chosen.
Circuit diagram: The Gentle Touch Circuit Diagram
The writer has arrange a small website for this challenge at http://reweb.fh-weingarten.de/elektor, which gives source code examples (which embody dealing with pushbutton contact bounce) for AVR microcontrollers suitable for use with AVR Studio and GNU C. Downloads are additionally on hand at http://www.elektor.com.
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.