GPY input to relay



  • Hi, in a prototyping project we need to connect a 230 V signal to the GPY and obviously I need to convert 230 V to 3V. I made a simple circuit with just a 230->3V relay and when the output goes high the GPY should wake up. With just a 3V jumper it works fine, with the relay it works fine as well. But‚ always the but, when the input signal comes unstable, if it is switching between on and off rapidly, the GPY stops its operation, dies for a few seconds and reboots. I am thinking we need a capacitor to stabilise the input, but I am not really sure if that is correct way of solving it, or if it will work, ideas/suggestions?



  • @ShanevanJ Super thanks a lot! We will look into this!



  • A simple way to do this is to use a optical isolator circuit such as this (update to work on 3V3)

    c58e9ba1-e570-4368-b0b2-22e97d24e25e-image.png

    The 555 timer acts as a monostable (one shot) timer that is triggered every time the AC drops to 0V - the moment the ac stops for longer than 20ms - the 555 output goes LOW. The delay can be adjusted by changing R6 and C2 using this formulae here

    The circuit does isolate the 230VAC from your IO - BUT BE AWARE the voltages are deadly!

    A second way to do this is to use a 230VAC to 3v3Dc power supply module - more expensive but very safe.


Log in to reply
 

Pycom on Twitter