I have set up a Pi-Zero which controls several relay switches. The Schematic is positioned below.

import time
import board
import busio
import digitalio
from board import *

from datetime import date

jet_Nozzle = digitalio.DigitalInOut(D23)    #should change the pin
jet_Nozzle.direction = digitalio.Direction.OUTPUT

jet_Spray_led = digitalio.DigitalInOut(D16)  #should change the pin too
jet_Spray_led.direction = digitalio.Direction.OUTPUT

def spray_function():
    while True:
        jet_Nozzle.value = True
        jet_Spray_led = True
        time.sleep(6)               # how long its on for... make this 5 in future.
        jet_Nozzle.value = False
        jet_Spray_led = False
        time.sleep(10)              #how long off for - make this 300 for 5 minutes off


For reasons unknown to me, the system seems to just run the dose motors 100% regardless of the status of the relay. The relay light on the Pi side flashes on/off as expected. But obviously, there is something wrong...

Initially when i first hooked up, nothing went on at all, so I'm very confused.

enter image description here

This is the relay board: https://www.makerstore.com.au/product/elec-2chan-ss-relay-module/

  • Spec:

    • 2 Channels
  • List itemSize: 55 x 33 x 25mm (L * W * H)

  • Input Power: 5V DC (160MA)

  • Input control signal voltage:

  • 0-2.5V state low relay ON

  • 3.3-5V state high relay OFF

  • Voltage Current: 12.5mA

  • Trigger Voltage: 0-2.5V

  • Trigger Current: 2mA

  • Voltage: 5V Quiescent Current: 0mA

  • What is the specification of your solid state relay board?
    – CoderMike
    Oct 15 at 15:43
  • The "schematic" is meaningless. All we are interested in is the Pi connections and specifications of the relay. If it is low level trigger and powered by 5V (like so much rubbish made for Arduino) you are likely to damage the Pi and it is unusable without additional interfacing circuitry.
    – Milliways
    Oct 15 at 21:48
  • Updated with details of the relay - @Millways, I'm not sure why it's meaningless as the Pi connections are specific and I assumed you'd want to see how it's wired up. Can you please explain how/why it would damage the Pi? It's a relay, not damaging the pi is the entire point of it... What additional circuitry are you referring?
    – GlennB
    Oct 15 at 22:54
  • Those solid state relays may only work correctly at 240V AC with a certain load.
    – CoderMike
    Oct 15 at 23:00
  • Load should be 240V AC according to solid state relay spec mouser.co.uk/datasheet/2/307/g3mb_0609-1189645.pdf
    – CoderMike
    Oct 15 at 23:11

As outlined by the comments, the issue was that the relay requires 240V load.

I was running it with 12v load -

Fixed by getting new relay...

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.