Go Down

Topic: Help needed on connecting 5V relay module with Arduino (Read 362 times) previous topic - next topic

azelogose

Hi everyone

I bought this relay module which uses a Sharp PC817 optocoupler and a transistor I cant recognize



I use a 250W power supply from an ancient AT desktop (which means sufficient current supply)
and an Arduino Uno.
Both are common grounded

When I energize the coil directly (jumpwiring on the back of PCB)
I measure 65-67mA,
I get continuity on NO pin and of course
I hear the arming sound loud and clear
which means that relay is OK from electromechanical POV


What I need is your help on the electronic part

I connect PSU 5V to VCC and PSU 0V to GND (outer pins)

On the inner 3 pins I tried two scenarios:

a) When I connect 5V to COM and 0V to IN1/IN2 (see com-5v.png)
on-board led turns on but nothing more happens

b) When I connect 0V to COM and 5V to IN1/IN2 (see com-0v.png)
nothing happens at all; no led, no sound, nothing

Same response when I use 3.3V instead of 5V pin

What am I missing here?

Delta_G

Aren't those active low?  Don't you feed 0V to turn on and 5V to turn off?
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

azelogose

Aren't those active low?  Don't you feed 0V to turn on and 5V to turn off?
Yes. This is scenario A I mention above. When I apply 5V on COM pin and 0V on IN1 pin then led turns on.
My question is why the coil isn't energized as a consequence?

The only schematic I found on the Net that seems to be the right one is this link

If this assumption is fine then the question is:
why when I close the arduino-R1-led-optocoupler loop (led lit)
I still have the vcc-transistor-coil loop left open?
Is there a problem with the transistor or can be something with the diode?

Thanks

septillion

What is powering the Arduino? The Arduino is pretty poor at supplying current, especially when connected via the barrel jack.

Also, not saying the linked schematic is wrong, but it's quite different from others and it's a pretty dumb why to drive relays like that (NPN on HIGH side).

And it also doesn't show why there is a Vcc and a COM.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

JCA34F

Never seen one with "COM" on the input side, link says both "COM" AND VCC get 5V. I guess 1 for logic and 1 for coil power, but which is which?

azelogose

Not my schematic guys, but looks like kind of logical to me

Arduino is powered from USB.
Should this be a problem since is used to trigger the transistor via the optocoupler?

septillion

Can be a problem because USB can't supply much power. And even though it's triggered through a opto and a transistor, the power has to come from somewhere. Although, I think most USB should be able to drive a single relay.

But I think it's a god time to start reverse engineer the board a bit. I would start by checking where Vcc and COM are connected.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

azelogose

Can be a problem because USB can't supply much power. And even though it's triggered through a opto and a transistor, the power has to come from somewhere. Although, I think most USB should be able to drive a single relay.

But I think it's a god time to start reverse engineer the board a bit. I would start by checking where Vcc and COM are connected.
I've tried without the UNO,just with PSU, but with the same results (led on, relay off).
What I've accidentally noticed is that transistor is really hot

and here some measurements
GND-coil 5[Ohm]
coil-coil 70[Ohm]

VCC-Q1(collector) 5[Ohm]
VCC-Q2(collector) 5[Ohm]

VCC-Q1(emmiter) 886[Ohm]
VCC-Q2(emmiter) 887[Ohm]

VCC-opto(emmiter) 892[Ohm]
VCC-opto(emmiter) 771[Ohm]

VCC-opto(collector) 17[Ohm]
VCC-opto(collector) 23[Ohm]


GND-Q1(collector) 970[Ohm]
GND-Q2(collector) 890[Ohm]

GND-Q1(emmiter) 81[Ohm]
GND-Q2(emmiter) 17[Ohm]

GND-opto(emmiter) 970[Ohm]
GND-opto(emmiter) 894[Ohm]


COM-D1 1062[Ohm]
COM-D2 1016[Ohm]

IN1-opto(cathode) 6[Ohm]
IN1-opto(anode) 1608[Ohm]

IN2-opto(cathode) 11[Ohm]
IN2-opto(anode) 1612[Ohm]


septillion

Seems like Vcc is the positive for the coil. Pretty stupid but okay.

Quote
COM-D1 1062[Ohm]
COM-D2 1016[Ohm]
Where are those diodes?

Try to find the circuit for the opto, does the COM side go to the anode of the opto (possibly via a resistor)?
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Go Up