Yes(JD-VCC & VCC are not connected by jumper). Connections are as below.
I don't think so. Relay board works fine without fan connected. I have switched on all the 8 channels on 5V 10A relay board and 1 channel on 5V 30A relay board for 1 minute without any issue. Both relay board connected to raspberry pi zero and externally powered.
OK you only did half of the test.
Code: Select all
# Setup the GPIO pin to use with the use shutdown button user_shutdown_pin = 26 user_shutdown_setup(user_shutdown_pin) def user_shutdown_setup(shutdown_pin): # setup the pin to check the shutdown switch - use the internal pull down resistor GPIO.setup(shutdown_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # create a trigger for the shutdown switch GPIO.add_event_detect(shutdown_pin, GPIO.RISING, callback=user_shutdown, bouncetime=1000) # User has pressed shutdown button - initiate a clean shutdown def user_shutdown(channel): global safe_mode shutdown_delay = 10 # seconds logger.info("user_shutdown()>shutdown request received") # in Safe Mode, wait 2 mins before actually shutting down if(safe_mode): logger.info("user_shutdown()>System shutting down(user request) in 2 minutes - SAFE MODE") cmd = "sudo wall 'System shutting down(user request) in 2 minutes - SAFE MODE'" os.system(cmd) time.sleep(120) logger.info("user_shutdown()>System shutting down(user request) in %d seconds" % shutdown_delay) cmd = "sudo wall 'System shutting down(user request) in %d seconds'" % shutdown_delay os.system(cmd) time.sleep(shutdown_delay) # Log message is added to /var/log/messages os.system("sudo logger -t 'pi_power' '** User initiated shut down **'") GPIO.cleanup() os.system("sudo shutdown now")
If without FAN's connected works fine, it's not EMF issue. Are you using the same power supply for FAN's and Raspberry Pi? If yes, try with separated power supply.
Is my optocoupler connections correct?boyoh wrote: ↑Fri Nov 09, 2018 10:14 am
You have the Pi 5v from the Power bank, Use a 5v power adapter
To feed the Pi ,don't common the grounds, The opto isolator will keep
Both power supply's isolated. Then run the system to see if you get
The problem when you stop the fans, This might help,to find the problem.
That's badly worded and may not convey what boyoh meant.
I am using relay board to stop the fan. From pi relay board signal pins and 'BAT' and 'EN' pins of Adafruit powerboost are connected.boyoh wrote: ↑Sat Nov 10, 2018 4:17 pmYes your Opto Circuit is correct. What I am trying to do is take you through the process of elimination
First what I mean by not common the Ground 0-v is as follows Pi ground 0-v--------X-------ground 0v--Battery Power
When using opto isolators you don't need any return connection back to the Pi
Do you have any other connections from the Pi to your project, How do you stop the fans
Try using a separate power supply as temporary measure for the Pi.
My advice do some reading on electronics and some bread Board work