Logic Level Converter with half voltage

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.

Please post a link to the relay module product page or data sheet.

Also please revise the drawing so the relay connections aren't obliterated, or even better, draw a schematic.

With ESP32's, 3V3 devices, and 5V relay modules, I use relay modules that are opto-isolated.

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.

Just use a simple MOSFET (or BJT) to switch the relay, or consider optocoupler.

Ok so, taking the replies one by one here:

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?

I did provide a link with pics and details to the exact relay above, please check.

As for the question, I apply 5V to the power input, and 3.3v to the “signal” input.

The LED does light up this way, if connected from the board without the LC, but does not trigger.

If I apply the LLC, then the HV is split for some reason in half …

EDIT: should I try applying 3.3V instead of 5 to the relay power input to match the signal input?

Not home right now, but worth the try?

The level converter can output maybe 0.5 mA. Remove it from your circuit and find a better way.

The LLC (logic level converter) is designed for logic level signals.

You need a driver of some kind like a MOSFET/BJT as offered previously.

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 :

  1. DC+: DC power supply positive pole
  2. DC-: DC power supply negative pole
  3. IN: signal triggering pin
  4. JD+: relay control voltage positive
  5. JD-: relay control voltage negative

Features :

  1. Optical coupling isolation, driving ability is strong, stable performance; Trigger current is 5mA
  2. The module can be set high level or low-level trigger by the jumper
  3. Rated current of the interface is 16A
  4. 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.
  5. 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.

Here is a better image:

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)

1 Like

If you possess the skill set, look at the relay PCB foil pattern and draw the schematic.

Okay I believe it is as seen below:

See notes for 3V3 operation.

Yes the jumper would need to be set HIGH for 3V3 operation.

Another similar schematic.

Different way to present the schematic:

but did you invert the logic in the code? i.e. did you test both states, HIGH and LOW?

When setting the IN terminal to 0V and 3.3V (when the jumper is set to L) might be bad for the 3V3 logic. :thinking: