enter image description herePower to solenoids through relayGPIO connections to relay Spec Sheet

Hi, I'm newbie and I'm trying to drive solenoids through Pi. I'm not sure about the connection between Pi and Relay and also from Power source to relay and solenoids. Could you help me about these two doubts? Thank you

  • Rather than posting pretty pictures (with illegible markings) you would be better to post specifications of the relay module and which PI PINS YOU ARE USING. Most can be controlled by the Pi, although there are a few (allegedly designed for Arduino) which aren't. – Milliways Jun 23 '18 at 11:20
  • Sorry, here are the tech spec of the relay: Elegoo 4 Channel DC 5V Relay Module with Optocoupler for Arduino UNO R3 MEGA 2560 1280 DSP ARM PIC AVR STM32 Raspberry Pi This relay module is 5V active low. Relay output maximum contact is AC250V 10A and DC30V 10A. Standard interface can be directly connected with microcontrollers. Working status indicator lights are conducive to the safe use 4-channel relay interface board, which can be controlled directly by a wide range of microcontrollers such as Arduino, AVR, PIC, ARM, PLC, etc. It is also able to control appliances and other equipments – Rivadolmo Jun 23 '18 at 11:39
  • As far as the Pi pins are concerned, I plan to use GND, 5V GPIO17, GPIO27 and GPIO22 – Rivadolmo Jun 23 '18 at 11:46
  • 1. DO NOT post detail in Comments, edit into your answer. 2. "5V active low" indicates this is probably one of the unsuitable (IMO poorly designed) modules which can only controlled by the Pi with additional circuitry. See raspberrypi.stackexchange.com/a/83495/8697 for comments on similar. There are hundreds of modules controlled by 3.3V logic which are suitable. – Milliways Jun 23 '18 at 12:03
  • that diagram looks ok, as long as the power supply output voltage matches the rating of the valve solenoids – jsotola Jun 23 '18 at 22:22

Your diagram scares me. Specifically, the 220V label. That potentially fatal voltage combined with inexperience ("newbie") is very risky. If a screw comes loose and line voltage comes into contact with something else, lots of dangerous things can happen. I work with electronics and still choose to purchase a commercial power relay that I can control with my Raspberry Pi. I'm sure you could find safer alternatives.

If you really do wish to continue with this risky design against all caution, you will also need to use the right relay. Please consult the 05VDC label on your blue relays. Those relays do not really work well with the Raspberry Pi, which has 3.3V GPIO, not 5V. Use a Raspberry Pi relay. Those are Arduino relays.

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.