xischaune
Full Member level 1
Hi all...
i have made a small circuit with 89C51 microcontroller acting as a counter...there is the low voltage side with a simple bridge-rectifier based dc supply which gives 5volts to microcontroller
There is a 220V AC lamp which operates with the help of a relay. The relay is controlled by microcontroller...
The switch on the lamp if pressed....give a 5volt to zero volt transition and the microcontroller counts 1....
But
The problem is that due to AC switching in the relay....the microcontroller counts erratically....i.e. even if the switch is not pressed...it counts one....
I need some help on how to isolate the high voltage side from the low voltage side....
I need a simple solution...maybe discrete component based solution...i know about optocouplers...or triac based solution...but can there be any shortcut...by connecting some diode across relay etc.....
Thanx in advance
i have made a small circuit with 89C51 microcontroller acting as a counter...there is the low voltage side with a simple bridge-rectifier based dc supply which gives 5volts to microcontroller
There is a 220V AC lamp which operates with the help of a relay. The relay is controlled by microcontroller...
The switch on the lamp if pressed....give a 5volt to zero volt transition and the microcontroller counts 1....
But
The problem is that due to AC switching in the relay....the microcontroller counts erratically....i.e. even if the switch is not pressed...it counts one....
I need some help on how to isolate the high voltage side from the low voltage side....
I need a simple solution...maybe discrete component based solution...i know about optocouplers...or triac based solution...but can there be any shortcut...by connecting some diode across relay etc.....
Thanx in advance