[SOLVED] Jumpers? - 3V 1 Channel Relay Power Switch Module

Thread Starter

haukeg

Joined Dec 9, 2018
66
I bought a set of these cheap Relay Power Switches on Amazon and I cannot figure out how the jumpers work on these units. See link and attached photo for more detail on my specific units.

I am using these with a ESP82666 NodeMCU MicroController and want to switch a 12v DC line for a CPU fan. I have read reviews and posts saying the an ESP8266 NodeMCU doesn't reliably provide enough current to power these reliably, so I was planning to power the relay via VCC & GND with a separate power supply so my MicroController doesn't have to power it. But there are not instructions with these units and the details on the Amazon page are weak.

1. Looking for an explanation on when to keep the jumpers connected or remove - and which jumpers for various cases.
2. If powering with a separate supply (like I intend) - should I target a specific voltage/current?

Any advice or help much appreciated, thanks.

61eqxdAGF9L._SL1000_.jpg
 

ericgibbs

Joined Jan 29, 2010
18,840
hi h,
I use the 5V version with more relays/channels on the PCB.
All that jumper does is use Vcc , 3.3v in your case to power the relay coils, which are 3V on your PCB and the Opto isolator & transistor, when the jumper is ON.

Without the jumper the relay coil and transistor driver need to be powered by an additional 3V, to the 3v being supplied by the Vcc terminal to the Opto input

Note: On my PCB by removing the jumper and powering separately, you would think you have isolation via the opto, this is not the case, the PCB circuitry always shares the same 0V/common connection.

Hope this helps.

E

BTW: some versions of these PCB's require a LOW input on IN to power the relay, check yours in case.
 

Attachments

Thread Starter

haukeg

Joined Dec 9, 2018
66
Thanks for the exploration and schematics, that helps a lot!

What still confuses me: If I powered the VCC and GND from a separate power supply BUT do not remove the jumper and connect a pin out on my ESP board to trigger, what happens that is different than supplying 3v from my ESP 3.3v pin to VCC and GND to ESP GND?

Also, would it be better to give 5v to the VCC to help ensure enough power (some reviews say the ESP voltage may not suffice). Or maybe it’s more about current?

Thanks again!
 

ericgibbs

Joined Jan 29, 2010
18,840
hi,
Assume the Vcc of 3.3V from the Arduino supplies the relay module, this would mean that the relay current of ~150mA would be drawn from the Arduino's regulator, which I would not recommend.
If you have a separate 3.3v supply that will supply at least 250mA, connect the Arduino and separate psu 0v's together , remove the jumper and connect separate supply to the un jumpered pin [ check which one it is] .
So the relay board will only draw a few mA from the Arduino PCB and the relay gets its 150mA from the separate 3.3v supply.
OK.?
E
 

Thread Starter

haukeg

Joined Dec 9, 2018
66
Thanks E.

Yeah, that is about what I was thinking, which is why I was confused on the config for the jumpers. But was hoping for a slight variation to work (but maybe these are the wrong relays for my goal?):

I have a 5v supply onto my proto board to power the Vin on my ESP board (it has a built in step down to 3.3v which the board runs on).

Then I was hoping to supply VCC to the relay from the same 5v to supply enough current - but maybe that is a bad idea with this 3V board.

Looking up the data sheet here for this relay, I also found a call out on Adifruit saying “Can be driven by Raspberry Pi, ESP8266 etc. Make sure you drive via a transistor. Don't overload the 12ma max for an ESP8266 pin.” Would this be an approach to letting the ESP to rub the relay with its low output voltage? And if so, any Help on how to use a transistor to do so?

Otherwise, I assume I will need to get a 5v relay for my original approach...
Thanks!
 

ericgibbs

Joined Jan 29, 2010
18,840
hi,
The 5V relays draw approx 90mA, so the 5v supply should power the relays.
If you change to a 5V relay PCB be aware that some users have had problems driving the Inp from a 3.3V port pin.
E
 

Thread Starter

haukeg

Joined Dec 9, 2018
66
Ok, good to know, thanks. Any idea what the transistor option in the quote might yield for sticking with this 3v relay?
 

ericgibbs

Joined Jan 29, 2010
18,840
hi h,
If I follow you correctly that quote refers to a direct drive of a relay.
When using the relay PCB module there is onboard a relay drive transistor, with the jumper link On or Off, a 3.3V PORT pin would drive at ~10mA.
The problem arises when the relay energises it will draw ~150mA from the ESP onboard 3.3v regulator.
Consider removing the jumper and use say a separate 3.3V source to drive the relay coil, or from 5V using a series 15R resistor

E
 

Thread Starter

haukeg

Joined Dec 9, 2018
66
I tried your suggestion "...removing the jumper and use say a separate 3.3V source to drive the relay coil, or from 5V using a series 15R resistor" and had the following results:

3.3v stepped down from 5v source on proto board:
  • J1P (VCC Side Jumper) REMOVED or J2P (GND Side Jumper) REMOVED or Both JP1 & JP2 REMOVED
= No Relay switching, Onboard LED Lights up, 0mA drawn for VCC&GND
  • JP1 & JP2 CONNECTED
= Relay switching occurs, however some “studdering” in the Relay, like it’s struggling to switch (multiple clicks). It eventually switches and draws 80-90mA @ 3.27v to VCC/GND. Successive switching attempts seems to get caught in a on/off “shutter” where it sometimes switches and sometimes doesn’t. Definitely not good behavior.

3.3v completely separated power (external power source):
  • All Jumper configurations
= No Relay switching, Onboard LED Lights up, 0mA drawn for VCC&GND

5v from board power (not stepped down):
  • J1P (VCC Side Jumper) REMOVED or J2P (GND Side Jumper) REMOVED or Both JP1 & JP2 REMOVED
= No Relay switching, Onboard LED Lights up, 0mA drawn for VCC&GND
  • JP1 & JP2 CONNECTED
= Relay switching occurs as expected drawing 120-130mA @ 4.92v to VCC/GND.

---

Not sure if in the long run its a good idea running ~5v to this relay?
Perhaps I do not have enough current when I drop to 3.3v before going to the relay? Although it seems odd that the stepping down from 5v to 3.3v wouldn't have enough current since the 5v source seems to supply enough. I did not use a 15R resistor, but dropped with a standard linear regulator (LD33V) and some capacitors (all voltage looked good and stable).
 

ericgibbs

Joined Jan 29, 2010
18,840
hi,
It is J1 jumper that sets the supply to the transistor/relay coil, I do not have J2 jumper on my PCBs'?
That initial posted photo image of the module shows that they are 3V relay coils.

Pretest of the basic module.
a. Both jumpers ON, apply 3.3Vdc to the Term Block VCC and GND, when powered, the relay should not energise.
b. Connect a 220R resistor from VCC to the IN of the Term Block, the relay should energise.
IF the relay does not energise, it maybe that the module requires a LOW signal on IN of the term block, so try by connecting IN to 0V

If the relay does not energise at all, there is a circuit fault.

Assume the above pretest shows it works with both J1 and J2 ON, do the following test.

1. Have J2 jumper ON
2. Remove J1 jumper.
3. Apply 3.3Vdc to VCC+ and Gnd.
4. Measure the voltage on the free J1 jumper pins on the PCB
One pin should show 3.3V, the other 0V.
The measured pin showing 0v is the pin to which you connect an external 3.3V to power the drive transistor/relay coil
[ use the same Gnd pin on the TB1 [terminal block] for the 0v of the external 3.3v supply.

Now repeat the checks of [ a & b] of the pretest.

Post back your test results.

E
 

Attachments

Thread Starter

haukeg

Joined Dec 9, 2018
66
Ok, thank you for the test procedures, I’ll give it a go tomorrow and post my findings. In the mean time, here are. A couple more images from the product page, not sure if that will help your understanding of this board any better.
1581066857773.png
1581066906104.png
 

ericgibbs

Joined Jan 29, 2010
18,840
hi,
I would say that this image confirms what we understand of the VCC selection for the Relay and Opto.
When J1 is OFF then you need to supply a separate 3.3v to the free jumper pin.

It looks as though they use J2 to isolate the 0V line to the transistor and relay.

On earlier modules without J2, you could not isolate the 0v ground line of the input and output sections of the circuit
 

Attachments

Thread Starter

haukeg

Joined Dec 9, 2018
66
When you say “supply separate 3.3v to the free jumper pin,” do you mean like in this image?

1581088373332.jpeg

If so, I have just been connecting voltage to the VCC terminal block.
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,840
hi,
Just got one of my 4 Relay PCBs out to check,
The J1 pins are coded VCC and JD VCC.
The VCC goes to the Terminal Block VCC and the JD VCC goes to the transistor and relay coil. [ assume JD means Jumper Disconnected]

So without J1 in place I have to put 5V on the JD VCC pin, you will put 3.3V on that pin.

Your RED line is correct. [ keep J2 ON]


E
 

Thread Starter

haukeg

Joined Dec 9, 2018
66
Ok, thank you! That was not very clear from the original drawing/photos, makes sense that I was getting nothing when J1 Jumper was removed and I kept feeding power to the terminal block. Will give that a try when I get hone today and report back. I really appreciate all the help E.
 

Thread Starter

haukeg

Joined Dec 9, 2018
66
Well, initial test on connecting 3.3v to the jumper pin I have the arrow pointing at yields nothing, not even the on board LED lit up. I guess I will try to go through the protest on the basic module as you suggested next. This thing is proving to be quite a puzzle.
 

ericgibbs

Joined Jan 29, 2010
18,840
hi h.
Searched online, this video covers and confirms how your pcb module is configured and should be used., its a double relay, but the principle is the same.
Its a bit long winded, but has a circuit diagram etc.
Ask if you have a query.
E
BTW: not even the on board LED lit up.
It is the IN signal that lights up the LED , not the VCC connection.

 
Top