I'm new to electronics and have recently fallen in love with it, after buying a few NodeMCUs to play around with. I currently have a load of them around my house monitoring things like temperature and humidity, but would like to further extend their use to garage door controllers and maybe even control mains voltage, which is what my question below relates to.

I have two questions both of which relating to this relay module:

  1. I understand that the NodeMCU voltage out is 3.3V, however, the relay advertises itself as 3V. Does this small difference have any effect? (i.e. will it still work with a NodeMCU?)
  2. Whilst I am new to electronics, I do fully understand the risks related to mains power and will take every precaution when dealing with it, including having one of my friends who is a qualified electrical engineer watching over me. The question is: Can the relay module specified above handle European outlet power? (I.e. could this be plugged directly into the side of the relay which is being controlled and have the NodeMCU control it on/off or is the voltage/current etc. too high to work with the relay module linked; either causing a hazard or frying the relay module/NodeMCU?)

I would really appreciate any guidance people can give me, as I am just in the research phase of a possible new project and would like to have a better overall idea of what is/isn't possible specifically with these relay modules. I have been unable to find concrete information on the Amazon page and have instead been told "One Channel 3V Relay interface board, be able to control various appliances, and equipments with large current" and "Optical coupling isolation, input and output power optional independent control ( DC 3V )".

Thank you in advance for any help.

  • 2
    \$\begingroup\$ (1) No datasheet for the relay. No schematic for the module. Add your own misgivings about safety. Thus, assume it's not safe. (2) In general, consumer sites like Amazon and eBay aren't the best places to look for hardware when you're looking for non-consumer subsystems. \$\endgroup\$ Jul 25, 2018 at 16:15
  • 1
    \$\begingroup\$ You need to look at the underside of the relay board (not shown in any of the Amazon link photos) and check the clearance between 240v live tracks and 3v tracks. It should be many, many mm (8 maybe, 5 maybe, I don't know the required figure, but much more than the sub-mm you get between tracks on a normal PCB). \$\endgroup\$
    – Neil_UK
    Jul 25, 2018 at 18:13
  • \$\begingroup\$ @Neil_UK Thank you for the advice! I'll be sure to check that out when they finally arrive; it's not something I had thought about. \$\endgroup\$ Jul 25, 2018 at 18:34

3 Answers 3

  1. I found a maybe non-official PDF: here It shows the various ratings like 3V for yours, and a maximum of 120%, which is 3 * 1.2 = 3.6V, thus 3.3V is well within range.

  2. It also shows (also on the relay itself) 0-250VAC so well within the 220-240V European wall outlet.

You can have 10A attached to it, use some safety margin, but it's quite a lot. In principle 220 (safe side) * 10A = 2200 W total devices. However, keep in mind some devices when switched on use a lot of current temporarily.

Btw, I also use these (not sure if I have the 3V or 5V version) without any problem with 220-240V, never had a problem.

Always make sure the wires to the mains are NOT ABLE to be touchable, e.g. put them inside an enclosure, EVEN (especially) when testing.

  • 2
    \$\begingroup\$ We trust the 12V photo is just an example of all types and they actually use a 3V coil to drive coil with 120 mA. The opto. input has both anode and cathode , I believe so you choose the resistor for I= (3V -1.2V)/R at some current such as 2~5mA and you can drive high or low to activate. Then derate 10Aac for motors to 5A for acceptable life. ( shown in datasheet as inductive load) \$\endgroup\$ Jul 25, 2018 at 16:27
  • \$\begingroup\$ @TonyEErocketscientist In the Coil data shart all possibilities are mentioned, but the picture only shows one indeed. \$\endgroup\$ Jul 25, 2018 at 17:01
  • \$\begingroup\$ Thank you so much for your response! I really appreciate your help. I'll be sure to give them a test when they arrive (estimated delivery in 4 weeks?!) and report back on how they functioned both in terms of controllability from the NodeMCU but also handling mains voltage. I will be sure to take every precaution with the mains as you suggest. Thanks once again! \$\endgroup\$ Jul 25, 2018 at 17:18
  • 1
    \$\begingroup\$ EDIT: Would these be a better option? Despite the fact it says they're 5v, the description says they can be triggered by 2-5V? \$\endgroup\$ Jul 25, 2018 at 17:28
  • 1
    \$\begingroup\$ @MichelKeijzers - Actually, the top 4 pictures show a 12-volt unit, while the bottom 2 show 3-volt units. \$\endgroup\$ Jul 25, 2018 at 21:46
  1. Since it offers optical isolation (I really don't understand the reason, since relays offer, by default, electric isolation) you have to limit the current by putting a resistor. Hence, 3.3V output of your υC won't be a problem.
  2. As the seller advertises, the relay is able to "to control various appliances, and equipments with large current". To confirm this you can see what the relay states on its enclosure, when you receive the package. Obviously, you cannot trust 100% the display picture on the site.

Please, be sure to check every connection before hook up your system to the grid.

  • \$\begingroup\$ Thanks for your reply. As other people have suggested, it seems to be that it is entirely possible that the relay module will function as I intend it to (controlled by 3.3V and able to handle mains voltage); however, as others have pointed out, the picture displayed on the Amazon page doesn't seem to match up too well (12v relay coils) so I'll just have to try it out when it arrives. Thanks again for your response :) \$\endgroup\$ Jul 25, 2018 at 17:47
  • \$\begingroup\$ it's sad that amazon and ebay are sources of so many hobby electronics, but sellers don't bother to present proper documentation. Good luck with your project. \$\endgroup\$
    – thece
    Jul 25, 2018 at 17:58
  • 1
    \$\begingroup\$ I agree, it is a shame that so many of the electronics listed on Amazon/eBay are so poorly documented but feel that the reason so many people (including me) flock to these websites for their hobbies is because of the (usually) good prices and more so for the assurance and familiarity provided by these sites. Thank you! \$\endgroup\$ Jul 25, 2018 at 18:37
  • 1
    \$\begingroup\$ @thece Take a look at the schematic in this question. In some cases the microcontroller can only handle a 3.3V Vcc, while the relay board needs 5V or 12V JDVcc to operate (this is usually done for cost reasons, since 12V relays are usually less expensive than 3.3V relays due to the coarser windings). A capacitive dropper circuit is just a very inexpensive way to supply 12V by tapping directly off the mains. \$\endgroup\$ Jul 26, 2018 at 1:17
  • 1
    \$\begingroup\$ @thece In some cases that capacitive dropper circuit could be built right onto the relay board, meaning that the coil is not isolated from mains voltage, and everything on that side of the circuit is referenced to mains neutral. \$\endgroup\$ Jul 26, 2018 at 1:24

You promised you understood the dangers of working with higher voltages, so I won't make a warning here. Other than to suggest: fuse everything on the line side while you're experimenting.

The data sheet for the relay part (not the whole board, the relay itself) is available online from the vendor: Ningbo Songle Relay SRD-12VDC-SL-C

Tough luck for us, as the data sheet is in Chinese. With a little help from Google Translate, we can figure out that "最大切换电流" is "maximum switching current", and that rating is 15 amps. We also discover that "触点负载" is "contact load", and is "7A/250VAC 10A/250VAC 15A/250VAC".

There are three ratings for "Contact load" because there are three models. The switching load is designated by the last character of the part number. Looks like the part on Amazon has "C" as the last part number, so the relay should be able to handle switching 15 amps at 250 volts AC.

With all that, I figure you're safe to switch loads at European mains voltage up to 15 amps. But maybe I'm wrong as the lettering on the package in the picture at Amazon gives a limit of 10 amps at 250 volts AC.

Further clouding the issue is that the part number implies there's a 12-volt coil in the relay. That is, 12 volts is needed to close the contacts. The listing does indeed say that it's a 3-volt relay (which should be fine driven by your 3.3 volt output), but it's a little concerning that the part on the board doesn't match the description of the product.

So it must be that either that the description of the product is incorrect, or the part shown isn't the one actually used on the board you'll receive.

Maybe you can buy one and look up the data sheet for the part you actually receive. Or, contact the seller and ask them for complete specifications. Or, perhaps the best choice: choose a different part from a different vendor.

Edit: @JohnGreeny, "line" is the way Americans say "mains". So "mains side" would mean the side of the relay that's connected to the mains, along with the appliance or light you're controlling. If you short out 3.3 volts, not much is going to happen; you need a lot of current at 3.3 volts to get exciting, ad you don't have a power supply that makes enough current.

240 volts at even 2 amps is plenty of energy (almost 500 watts) and gives us heat and sparks and fires and melted connections and -- well, we tend to find those things inconvenient. If you've got a 2 amp fuse in the way, you've got cheap insurance.

  • 1
    \$\begingroup\$ Also clouding the issue is your datasheet excluded the 3V option, which may mean they obsoleted this part for some reason. \$\endgroup\$ Jul 25, 2018 at 16:36
  • \$\begingroup\$ Thank you for your detailed response! Just quickly to clarify, what do you mean when you refer to the "line side"; the side of the NodeMCU? It is concerning that much of the "information" listed on the Amazon page doesn't match up with that data sheet but I guess that's the compromise when buying cheap electronics from Amazon! Maybe it is entirely possible that the actual module won't match up to the one shown on the page as the description hints "Due to the different display and different light, the picture may notreflect the actual color of the item". Thank you once again for your help! \$\endgroup\$ Jul 25, 2018 at 17:23
  • \$\begingroup\$ EDIT: Would these be a better option? Despite the fact it says they're 5v, the description says they can be triggered by 2-5V? \$\endgroup\$ Jul 25, 2018 at 17:28
  • \$\begingroup\$ @JohnGreeny, if the coil really does trigger on your 3 volt signal, then it's a good choice. It looks like it's the same relay part as the other board you first posted. The specs here tell us that you won't need to souce much current to trigger the optoisolator (which is also working as an amplifier and a snubber). \$\endgroup\$
    – MikeB
    Jul 26, 2018 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.