0

I have a raspberry pi 2 and an 8 module relay board (http://nettop.gr/index.php/en/hlektronika/relay/8-channel-5v-relay-module-with-light-coupling-5v.html). Between the relay board and the raspberry I have an 2N3904 Transistor as depicted here (https://myhydropi.com/connecting-a-relay-board-to-a-raspberry-pi). I use PI4J for my program (https://pi4j.com/1.2/index.html). As an operating system I have ubuntu. I have a power adapter of 2A that powers the raspberry and the relay module. I have spliced the power source before the raspberry in order to power the relay module.

I have noted that sometimes there are some glitches (open/close) of some relays for a few fractions of the second. It looks that this random since it can happen at any relay.

Am I doing something wrong in terms of design (raspberry + transistor + relay module? What could be wrong and how should I debug this situation?

Please consider that I am mainly a software developer and not specialized in hardware.

Thank you a lot in advance!

Investigator
  • 101
  • 2
  • 1
    What relay module? What software? What glitches? Under what circumstances? This doesn't sound like a problem specific to the Raspberry Pi. – joan Nov 22 '20 at 10:16
  • I have both the Saint smart and one Chinese module. With both I experienced issues. When I say glitches I mean very quick on/off for fractions of the second that I assume did not originate from the software. I will try to observe if this is specific for this relay or if it is random. I will try to change the transistor as well. Do you have any suggestions how to pinpoint the issue? Maybe the fact that I use the same power adapter for both the raspberry and the relay module? I have splited the cable to two positive and two negative. – Investigator Nov 22 '20 at 12:16
  • You need to add any additional information to your question (not in comments). I shall point out that there are thousands of different relay modules. – joan Nov 22 '20 at 12:39
  • 1
    Does this answer your question? [Can you use a 5V Relay Module with the Pi?](https://raspberrypi.stackexchange.com/questions/118116/can-you-use-a-5v-relay-module-with-the-pi) – Milliways Nov 22 '20 at 23:14
  • Hi I have updated my description with the relay link. Thank you – Investigator Nov 23 '20 at 06:45
  • 1
    I think you will be better of with relay-boards designed for the Raspberry Pi which has 3.3V GPIOs... For instance https://www.amazon.com/gp/product/B07Q2P9D7K/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 as I used in a project of mine https://webtechie.be/post/2020-03-30-drumbooth-controller-with-java-javafx-raspberrypi-arduino/ – Frank Nov 23 '20 at 07:09

0 Answers0