On-off push button

On-off push button with a 12F675 microcontroller.

More details

Data sheet

DesignSchema
ViewNo display
Supply voltage5 Volts
ElectronicDigital
PhotoNo

More info

This circuit can be implemented in any unit, and it can substitute the classic switch with the push button.

The circuit is based on a microcontroller PIC 12F675. It is an eight pines microcontroller, it is quite cheap and it has an important advantage, it doesn’t need a quartz crystal to make the program work.

The clock frequency needed for the program cycle to function is generated by an intern oscillator, so we don’t have to place a quartz crystal and the two related condensers to generate the work frequency.

When we first power the PIC, the output of pin 7(GP0) is at the low level, at zero.The program we have designed generates a positive impulse when we press the push button, and it generates a negative impulse if we press it again.

The mentioned impulse is connected by 10K resistor to the base of the transistor, which touches the relay that activates the switch, thus activating the unit to which is connected.

If an impulse is 1 (5 volts), the relay is stimulated and it connects the cables in the electrical connector’s terminals, marked as on-1 and on-2. And if an impulse is a zero (0 volts), the relay disconnects the previously mentioned cables.

Obviously, the PIC 12F675 has to be constantly empowered so that we can turn the unit on again. If you don’t like this last solution, don’t worry, because each time we press the button, the PIC passes to “sleep” mode and in this mode the power consumption is practically zero.

In fact, if we measure the PIC consumption with an ammeter, it will show the value of 0,00 amperes.

The .hex code is a program which should be saved in the microcontroller PIC 12F6755.

The wiring diagram.

Esquema on-off con un pulsador

The circuit board

Circutio on-off con un pulsador



The scheme and the circuit board should be in the same folder and they should have the same name, you should only change the extension to .sch for the scheme and to .brd for the circuit board, this way both of them will be recognized and associated by Eagle.

The .hex code, the image and the .sch schema is compressed, to extract it, you should enter a password: www.kemisa.es

If you do not know how to program microcontrollers click here.

If you don´t know how to make a printed circuit boards click here.

Download