I've been scratching my head for a day now. I'm using a 3.3V board (Wemos D1 R2), and want to remotely control a relay operating at 5V. Therefore, I bought the only LLC I could find nearby (see here), and hopefully wired it accordingly.
Here's my current wiring and measurements (I have a 30A 5V relay module):
I am new in this field, and it is a lot of fun but heck if I can figure this one out after all the research.
Also found a very similar situation, here, with no real solution.
You might not need a level converter, depending on the relay module. Some will operate on 5V for relay power, but will at the same time accept 3.3V control signals.
Strangely, you did not comment on whether it works or not, the way it is currently wired.
Such level converts are for bidirectional open-drain (open-collector) signals. They might provide only 0.5mA at the output. The relay module might have a transistor with a resistor to its base or a optocoupler. Maybe the transistor has enough current with 0.5mA, maybe not.
You might not need a level converter, depending on the relay module. Some will operate on 5V for relay power, but will at the same time accept 3.3V control signals.
Strangely, you did not comment on whether it works or not, the way it is currently wired.
It does not operate with the 3.3v signal unfortunately. The LED does light up, but the relay doesn't actually trigger. If I apply 5v to it, then it works just fine.
Please post a link to the relay module product page or data sheet.
I don't know where to get the data sheet from, but here's a link the actual relay
Also please revise the drawing so the relay connections aren't obliterated, or even better, draw a schematic.
Unfortunately I don't know what you mean .. nor do I know how to draw a schematic ... I only know some basic Fritzing (this is my very first "project").
EDIT: Since I could not find this specific relay in Fritzing, I just used one with the same idea. The wiring on it's end is correct, the voltages are correct, but the LLC only seems to send half of the voltage to the relay, eg. it receives 3.3v and outputs 2.8v for some unknown reason ...
I did order a new LLC (maybe this one is broken) which is weird becuase I used it up until yesterday, with another relay (10A) that also operated at 5V.
It has a led! That requires current and the Logic Level Converter can not give that.
We explained that it is a gamble if the wrong level converter can activate the circuit for a relay. Keep the bi-directional Logic Level Converter for the I2C bus.
The "same idea" is not precise enough for electronics.
Since this relay is central to your problem, please provide us with some information about it. Sometimes even a good picture is enough to do some sleuthing, and come up with wiring guides or even schematics. It would definitely go a long way to solving your problem. Don't become fixated on the level converter.
It does not operate with the 3.3v signal unfortunately. The LED does light up, but the relay doesn't actually trigger. If I apply 5v to it, then it works just fine.
Is that with 5V applied to the relay module power input, though? Or, 3.3V applied to the power as well as to the logic input?
The wiring you show is clearly incorrect for the relay you actually have.
However, the product description is so bad that I can't tell what the wiring should be, except that a logic level converter will not work. The input signal is opto-coupled and with correct wiring, will work on 3.3V. The relay coil may not work on 3.3V.
Description:
The Songle Single-channel 5V 30A Relay Module power failure relay is a 1-channel relay module board with LED indicators, It can be controlled by microcontrollers such as Ardiuno, AVR, PIC, ARM any other microcontroller operating at 5V.
The relay module uses an authentic quality mechanical relay and the industry’s top quality subminiature two-way isolation optical coupling which gives you the strong anti-interference ability, and stable performance.
The user can choose the relay control level, can be a high level off, also can be low level and off. The Songle Single-channel 5V 30A Relay Module Power Failure Relay contains a limited flow resistance, can directly use the power supply is negative control, you can also use the MCU I/O control.
The relay module equips a power indicator light RED, 1 road relay status indicator light BLUE.With this relay, you can easily control electrical appliances, lights, etc.
Fault-tolerant design, even if the control line is breakes, the relay will not move.
Module interface :
DC+: DC power supply positive pole
DC-: DC power supply negative pole
IN: signal triggering pin
JD+: relay control voltage positive
JD-: relay control voltage negative
Features :
Optical coupling isolation, driving ability is strong, stable performance; Trigger current is 5mA
The module can be set high level or low-level trigger by the jumper
Rated current of the interface is 16A
DC+ and JD+ shorted by jumper cap, DC- and JD- shorted with jumper cap, it is the same voltage between trigger terminal and relay control terminal.
High and low-level trigger mode selection. Jumper and L pin connection, IN pin, is low-level triggerJumper and H pin connection, IN pin, is the high-level trigger.
I feel that rather than there being some big problem with the relay, you have simply overlooked some minor detail. I would be ideal if you could post images of all your actual wiring, showing how the connections are made, and/or a real wiring diagram complete with pin labels made with pen and paper if necessary.
I think you can get the relay to operate without any level converter. Also to answer another question, no you can't run the relay itself on 3.3V.
I see on the "back" an L and H jumper selection. Try changing it to "L" and drive the relay LOW to turn it on.
I took a new board (wemos d1 mini pro), with the same relay, connected them directly as shown below. For some reason using the D3 pin it doesn't behave properly, so I switched to pin D4 and everything works fine, the wiring is as simple as this. Jumper seems to work OK on High, switching it to LOW prevents the relay from working (even if I'm only sending 3.3v)