Ha ha God damn ha --> Sainsmart 12V relay

OK. am totaly confused with this relay board.
Am using 12VDC, 2X relay, sainsmart board with optocuplers.

I need this relay to open electrolock, which is powered with external 12V.
To to so i have connected external 12VDC power adapter (12V/1A ).

This is current connection:
JD-VCC ---> 12V positive, from power adapter
GND --> GND from power adapter

VCC ---> 5V ardouno pin
GND --> GND pin of arduino
IN1 --> signal pin on arduino.

As test i have connected signal pin to arduino GND and then to 5V pins ( low / high state ), but there's no relay click.
Any suggestion what's wrong with this setup ?

Btw. because i can not change installed AC electro lock to my DC lock,
i will use existing AC lock an if needed i can set stronger power adapter...

Arnix

I suspect this will not work on 5v to drive the opto couplers.

Make sure the JD-VCC to VCC jumper is not fitted.

There are a couple of LEDs on the relay board which I think are in series with each optocoupler, do they light when you have GND -> Arduino GND and VCC -> Arduino 5v and ground the IN1 pin ?

If there's anything of a glimmer, you can try shorting out the IN1 LED while IN1 is connected to GND and see if the relay goes 'click'.

Yours,
TonyWilk

You seem to think that the switched voltage has something to do with the control voltage, which is not the case. I would use a 5V relay to avoid a second power rail.
From your description it is not clear what could be the problem.

Apart from that, I have this running, and despite quite little usage, one relay already died on me. Might be bad luck, but might also be related to the fact that you switch an inductive load without taking any care of the phase. I know that these cheap relays certainly do not like this with mains voltage. My rollershutter motor can reproducibly kill them really quickly.
You can try it, but don't be surprised if it fails after a while and do not put it anywhere inaccessible. Unfortunately, the two supercommon types of SSR modules are not suitable for 12VAC, but this may be the direction you want to go in, paired with a MOV (my rollershutter motor runs fine with those bulky "25A" SSRs and MOVs across.).

I have used this schematics with old 5V setup ( now i need 12V ).

and this is how it was connected to RSP ( didnt work because it burned power supply) .
Now i want to use the same approach with arduino because this schematisc should work...
To be honest, i have no clue why power supply shorted out.

https://ibb.co/h6W5H6
Regarding sainsmart... i have few 5V relays installed on different locations and most of them are not working.

///////////////////
There are a couple of LEDs on the relay board which I think are in series with each optocoupler, do they light when you have GND -> Arduino GND and VCC -> Arduino 5v and ground the IN1 pin ? *** Yes IN1 lights up, but there no click sound...

shorting out the IN1 LED while IN1 is connected to GND
****if i understand you correctly i have shorted out this IN1 LED but no sound..

Hi.
Schematic used by OP.


But it is not the relay assembly that you have.

I believe this is the relay PCB you have with the jumper.

Tom.. :slight_smile:

We misunderstand us. I have both PCB's. One is sainsmart and other the one we made.

The problem with the one we made, is that when i put 12V on COM line, lock stays open all the time and i can not control it with 0/5V .... I was thinking that maybe there is something wrong with transistor, but this should not be a case...

Hope you had the JD-VCC Berg jumper removed on the SainSmart relay board. If not there was a direct path from the 12V supply to the Arduino's 5V circuits.
p5UBRLY.png

arnix:
We misunderstand us. I have both PCB's. One is sainsmart and other the one we made.

The problem with the one we made, is that when i put 12V on COM line, lock stays open all the time and i can not control it with 0/5V .... I was thinking that maybe there is something wrong with transistor, but this should not be a case...

Can you post a picture , component and copper side, and a circuit diagram of your relay you made please?

Can you please post a copy of your complete circuit including power supplies, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile:

elektr mont vod hosted at ImgBB — ImgBB.
The only thing i have changed is 12V relay and 12V power adapter.

and based on this, i made my PCB.

I can take picture of my pcb first thing in the morning...

///////////////////

I have made few additional tests and this is the results for this connection --- https://ibb.co/h6W5H6

Instead of AC lock i have used DC one
Instead of power adapter i have used 12V/7Ah battery.

When i connect like in the upper diagram, lock opens itself but i can not control it.
It stays opened, regardless if PIN state is 3,3/5 or 0V.
If i connect it to NO then it stays closed and i still can not control it.

Arnix

Unfortunately, a really board that is set up for 12 V, may not work reliably at 5 V trigger voltage. The optical coupling is somewhat linear. Basically, if you put less than half current into the input side, you will get less than half current on the output side. This is the case with the relay board that I have. Some relays would just barely work at 4.8 V others would require 5.2 V. Consider it as an NPN transistor. In many cases you can put 12 V on the VCC pin, without damage to the Arduino if the current is less than the maximum current of the Arduino pin.

Remove the Arduino, and place 12 votes to the VCC pin. See if your relay works when grounded manually. Measure the current and make sure that it is below the Arduino maximum current limit.

Hi,
Make sure you have the BC337 pinout correct.

Tom... :slight_smile:

This would have been a better title.

Ha ha damn ha --> Sainsmart 12V relay.

This is the test board. It's not representative one but...

Hi,
OPs board.

Cab you post a pic of the other side please?

Tom... :slight_smile:

Hi,
With your DMM, can you measure the voltages at A, B, C, D and E with respect to GND.

One set of readings with just the 12V supply that you are using to power the relay coil connected, but with the controller disconnected.

Then another set of readings with the controller connected but the output of the controller LOW.

Then another set of readings with the controller connected and the output of the controller HIGH.

Thanks.. Tom.. :slight_smile:

I will make tests in few minutes...
Arnix

Hi,
OPs copper side


Tom.. :slight_smile:

i try to upload image, but without success.

So, what do you think, what should i do to make this work ?
If necessary i can make new board.

I have to finish this tomorrow, so please, share some suggestions.

You have some things that look like hairline solder shorts on the IC pins.