0

I am trying to use Raspberry pi to control a 12V relay. Before doing that, I try to do it manually. Below is my wiring based on reference 1 and reference 2. In this wiring, the PWR light is on.

Question: when I try to wire IN to DC+, I expect the 12V motor will be ON. However, it doesn't. Only the LED1 Light is ON. Any suggestions? Thanks.

enter image description here

  • 2
    Try connecting the motor side between NO and COM. – ocrdu Oct 11 '21 at 09:28
  • 2
    What you have is not a *relay* but a *relay module*. If someone sells that module, there should also be some documentation how it works and how to use it. Also note that a 12V relay is likely not to work with 5V power supply so what you see is an expected result. – Justme Oct 11 '21 at 09:31
  • @ocrdu Tried but still not work. I also try to connect the motor side between COM and NC. The motor can run without connecting IN to DC+. – Pak Ho Cheung Oct 11 '21 at 09:47
  • @Justme Just ask the seller. They dont have the documentation. I also try to connect DC+ and DC- with 12V power supply, but still results the same. – Pak Ho Cheung Oct 11 '21 at 09:50
  • This is not a support site for random modules bought without seller documentation. Without documentation we also don't know how to use your module. Don't buy things with no documentation, the seller got your money and just used you as their waste disposal. – Justme Oct 11 '21 at 09:56
  • The motor connection should be NO to power supply to motor to COM. –  Oct 11 '21 at 10:05
  • @CharlesCowie Changed to ```NO to power supply to motor to COM``` but still motor is not ON and LED1 light is ON – Pak Ho Cheung Oct 11 '21 at 10:50
  • Does the relay click when LED1 turns on? –  Oct 11 '21 at 11:03
  • @CharlesCowie Yes. I do hear the "click" sound – Pak Ho Cheung Oct 11 '21 at 11:04
  • Have you checked the motor and power supply? –  Oct 11 '21 at 11:06
  • @CharlesCowie After I changed the 5v to 12v from the right side, it works now. But wondering if it is required 12v, how the raspberry pi work with it? – Pak Ho Cheung Oct 11 '21 at 11:10
  • You can probably use 5V for input signal with 12V for board power and motor. –  Oct 11 '21 at 11:21
  • @CharlesCowie When I changed to 5v, I can't hear the "click" sound and the motor wouldn't run. Any suggestions? – Pak Ho Cheung Oct 11 '21 at 11:34
  • 2
    I’m voting to close this question because there is no supporting documentation available from the vendor. "*No datasheet? No sale!*" – Transistor Oct 11 '21 at 17:01
  • @PakHoCheung the main problem appears to be that you do not understand how a relay works ... the switching contacts have no electrical connection to the controlling circuit ... think of it like a light switch on your wall ... do you get electrocuted every time you touch the switch? ... the blue box is the switch ... the circuit on the right side is your hand – jsotola Oct 11 '21 at 17:09

1 Answers1

3

Connect the module as in the edited picture below and see if it works. The module may need a 12v supply, but will more than likely trigger from a 5v input from the raspberry pi.

enter image description here

HandyHowie
  • 4,030
  • 1
  • 15
  • 22
  • See if it works? Are you sure or just guessing? What if it damages the Raspberry Pi? – Justme Oct 11 '21 at 14:07
  • @Justme. I said to connect it to 5v as in the picture and see if it works. Why are you reading more than is there? – HandyHowie Oct 11 '21 at 14:12
  • Hi. Your wiring works perfect. The motor runs. So if I need to connect it with Raspberry Pi, I only need to connect one wire, ```IN```, to one of GPIOs from Raspberry Pi? – Pak Ho Cheung Oct 11 '21 at 15:03
  • You need to have a common ground connection between the raspberry pi and the module too. Before you connect it to the raspberry pi, it is worth checking with a voltmeter to make sure that there isn’t a voltage higher than 5v on the input pin of the module. I can’t see how there would be, but it is worth checking. – HandyHowie Oct 11 '21 at 15:58
  • @PakHoCheung: you need to connect "IN" to a Pi GPIO pin, and "DC-" to a Ground pin on the Pi. – Peter Bennett Oct 11 '21 at 15:59
  • @HandyHowie It works perfect now with Pi. Thanks for your diagram. – Pak Ho Cheung Oct 11 '21 at 19:47
  • @PeterBennett It works. Thanks. – Pak Ho Cheung Oct 11 '21 at 19:48