how can i interface push button with pic microcontroller and neutral line ?

Status
Not open for further replies.

Thread Starter

vtc

Joined Apr 3, 2018
37
Hi All,

des.png

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 ?
 

Reloadron

Joined Jan 15, 2015
7,523
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 ?
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
 

Thread Starter

vtc

Joined Apr 3, 2018
37
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
The button connected to neutral line of 220v a.c. source ..
Can I connect it directly to mcu ?
 

MrChips

Joined Oct 2, 2009
30,824
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 activate power to the load with the appropriate mechanical or solid-state relay.
 

dendad

Joined Feb 20, 2016
4,481
Connecting to the mains is very dangerous. I think you need to get some qualified assistance before you electroplate yourself.
 

Reloadron

Joined Jan 15, 2015
7,523
The button connected to neutral line of 220v a.c. source ..
Can I connect it directly to mcu ?
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
 

Thread Starter

vtc

Joined Apr 3, 2018
37
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.

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
Hi ..
The buttons are already installed on the staircase of our building and they are connected to neutral line ..

They are connected to staircase timer switch LIKE this
SD542-2019-MTM2000E-wiring-to-phase-with-4-wires.gif
so iam trying to build the timer using pic microcontroller ,keypad,lcd or segments ....

if one of the buttons pressed the lamps will turn on for a certain time sets using keypad and lcd ..
regards
 

MrChips

Joined Oct 2, 2009
30,824
We cannot discuss the design or construction of a timer circuit directly connected to AC mains without proper isolation. This constitutes a shock hazard and any discussion is prohibited as stated in the User Agreement of All About Circuits.

For that reason, this thread is now closed to further discussion.

We cannot prevent you from purchasing and installing a ready-made timed push-button.
 
Status
Not open for further replies.
Top