0

I designed a pcb which has two AC channels connected to relays which are eventually controlled by gpios for sure...

the first channel is working great

except for the second channel ... when I set its GPIO hight it works for about 0.5 to 1 second then it turns back off ...

The gpio it self goes of ... I am trying this by terminal not using python or anything..

sudo gpio -g mode 04 out
sudo gpio -g write 04 1
// Now gpio works for 1 second and then goes back to DOWN state

Any ideas why this is happening ??

  • 1
    How exactly are you driving the relays? Is there sufficient current to run both at the same time? Does it happen only when both are on? – Steve Robillard May 27 '17 at 9:40
1

I am assuming the command you issue is intended to set GPIO 4.

The most likely explanation is you have the 1-wire bus enabled. By default the 1-wire bus is implemented on GPIO 4 and checks devices every few seconds. That will change the GPIO back to being an INPUT.

Either disable the 1-wire bus by removing or commenting out the dtoverlay=w1-gpio,gpiopin=4 entry from /boot/config.txt or change the GPIO it uses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.