You appear to be using the micro controller as a one shot. Just configure an I/O as a DI (Digital In) pin and place the push button on that DI pin. Configure another IO as a DO (Digital Out) to your load or to drive your load. Allow for switch bounce on your push button input pin. Use a pull up or pull down resistor on tthe input pin also and write your code accordingly.Hi All,
View attachment 155075
in the figure above when i press the button the load will turn on for a certain time .
the box includes pic micro ,keypad to set time and relay ...
how can i connect the push button as in figure to MCU ?
The button connected to neutral line of 220v a.c. source ..You appear to be using the micro controller as a one shot. Just configure an I/O as a DI (Digital In) pin and place the push button on that DI pin. Configure another IO as a DO (Digital Out) to your load or to drive your load. Allow for switch bounce on your push button input pin. Use a pull up or pull down resistor on tthe input pin also and write your code accordingly.
Ron
No, you do not place a momentary push button in a return 220 VAC neutral line. Your posted drawing makes no sense. You need to much better define your Black Box and exactly what you are trying to do.The button connected to neutral line of 220v a.c. source ..
Can I connect it directly to mcu ?
Why does the button have to be on the NEUTRAL line?
Your PIC MCU requires low voltage to operate.
Power your PIC properly from a low voltage power supply. Put the push-button on a digital I/O pin on the PIC. Then activ8ate power to the load with the appropriate mechanical of solid-state relay.
Hi ..No, you do not place a momentary push button in a return 220 VAC neutral line. Your posted drawing makes no sense. You need to much better define your Black Box and exactly what you are trying to do.
Ron
by Aaron Carman
by Jake Hertz
by Jake Hertz
by Duane Benson