plcgcpm wrote: ↑
Wed Nov 21, 2018 8:57 pm
This is how i have connected.raspberry relay.png
Ok, so you got the relay board connected to RPi 5V and you are controlling the relay board ( D1) from a 3.3V GPIO pin,
RPi-J8-40 (GPIO21). I am guessing that you are sending either a 1 or a 0 out of GPIO21 to enable and disable the relay?
I'd not drive a relay coil directly from a GPIO pin, I'd use a MOSFET or transistor. The RPi GPIO pins do not have the current handling capacity to handle a relay coil.
I'd not cause the RPi which has 3.3V tolerant GPIO pins to be connected to 5V.
The combination, my guess, of driving a 5V relay coil directly from a GPIO pin is the most likely cause of your RPi failures.
Without knowing why you are deleting my postings, I will not know how...