SparkFun Forums 

Where electronics enthusiasts find answers.

Questions &/or issues related to products in the Miscellaneous category should be posted in this forum. For Kits, please post in the Kits forum.
#206951
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?
#206954
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.
#206959
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:
1. LV -> 3.3V pin on raspi
2. LG -> Gnd pin on raspi
3. HV -> 5V pin on raspi
4. L1 -> Digital IO pin on raspi (have also tried just connecting to a 3.3V output to verify it is not a control problem).
5. H1 -> to trigger line on relay.
3. 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.
#206962
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.