Having problem getting level shifter board to work with relay.

Hello,

I have https://www.sparkfun.com/products/12009 the level shifter board based on BSS138. And am trying to use it to allow a raspberry pi to control a relay that requires 4+ volts as trigger. So I have the LV/HV connected to the 3.3/5V busses of the pi, and the LV1 connected to a IO pin. The problem is it seems to get a 5V signal on HV1 without anything connected, but when I connect the actual relay I only see 2.7V volts on HV1. The relay says the trigger uses 4mA. Can this work?

Hi LakeWorth. Thanks for posting.

I feel like your circuit should work as I cannot think of a reason why it should not. I feel like you may only be seeing a voltage drop if the relay is pulling more power to actuate than expected.

Have you tested the current draw of the trigger circuit for the relay? Also, if you could provide photos of your setup, that would greatly help.

Cheers for now.

I am away at work right now so can’t get a picture, but here it is in words.

  1. 5V power supply to raspberry pi and to power relay coils.

  2. Connect the level shifter board to raspi:

  3. LV → 3.3V pin on raspi

  4. LG → Gnd pin on raspi

  5. HV → 5V pin on raspi

  6. L1 → Digital IO pin on raspi (have also tried just connecting to a 3.3V output to verify it is not a control problem).

  7. H1 → to trigger line on relay.

  8. Relay controls a 12V line.

Note that if I directly connect the 5V to the trigger line it does cause the relay to close, and disconnect when I remove the power. But I don’t know what the min voltage is to trigger it. Also I have not tried doing measuring the current on this trigger line, but can try tonight.

Hi LakeWorth.

It’s important to remember that a level shifter board is just for changing the voltage of a logic signal that can only drive about 1mA of current. Something like a relay needs much more current than a level shifter can handle and that’s why you’re not seeing your relay actuate.

What you need is a larger transistor or MOSFET to drive your relay. Our [MOSFET Power Control Kit would work but it’s most likely overkill for a small relay. Another option would be our [Beefcake Relay Control Kit. If you supply that with 5 volt power, a 3.3 volt signal from your Pi will be able to turn the relay on and off.](https://www.sparkfun.com/products/13815)](SparkFun MOSFET Power Control Kit - COM-12959 - SparkFun Electronics)

Thanks,

With your hint about the 1mA of current, I was able to get a workaround. Since I only need one output, I daisy chained all 4 channels in parallel, and it works. Not pretty but since I already had the board on hand it will suffice.