Thank you.Logic level shifter. The same chip is used on a dozen modules available through as many distributors. Nice feature is bi-directional. That assumes you only want to go from 3.3 volts to 5.0 volts or 5.0 volts to 3.3 volts.
Ron
That relay draws 47 mA at 3 Vdc, which is too much for a uC I/O pin. Use a general purpose npn transistor such as a 2N4401, 2N3904, or 2N2222 as a saturated switch. A high GPIO output will turn on the transistor and drive the relay. Place a 470 ohm resistor in series with the base to limit the base-emitter current.I need the 5v signal to drive the 3Vdc device, omron mini relay g6s2f 3vdc:
I just got boards from JLCPCB in 7 days. $5 for the boards $20 for shipping.At least 6 weeks for anything coming out of china now... Sometimes 4 weeks in Shanghai alone.
that’s different, it’s air freight. Most product though the China market consolidates and get shipped ocean freight.I just got boards from JLCPCB in 7 days. $5 for the boards $20 for shipping.
Bob
Yes, for a while now, china postal sorting puts packages going to the same address into a consolidated package for further shipping. All of mine go by air but apparently there is also a pileup at the air shipping warehouses in china. Shanghai seems to be the big black hole for china shipping when following package routing. Not too bad coming from Hong Kong or Taiwan. And if you want it overnight you can pay the bill in gold. Also, for some time now, china packages in a plastic bag instead of boxes and the packages get beat all to hell unlike when they were boxed.Most product though the China market consolidates and get shipped ocean freight.
I've been getting items from Ali Express in 2-4 weeks. The first time I needed those level shifters, I made the board using parts I had on hand.forget about it, by the time it arrives you will have bought something else unless you can wait months between getting parts for a project.
ThanksHave you looked at the relay PDF to see how many mA to pull it in? I often use a transistor switch for more than a 20mA draw needed on an I/O pin and supplied from an external PSU.
Thank you AnalogKid.That relay draws 47 mA at 3 Vdc, which is too much for a uC I/O pin. Use a general purpose npn transistor such as a 2N4401, 2N3904, or 2N2222 as a saturated switch. A high GPIO output will turn on the transistor and drive the relay. Place a 470 ohm resistor in series with the base to limit the base-emitter current.
ak
Thank you ReloadronYou have about a 47 mA relay coil. The BSS138N MOSFET used in these cheap logic level converters is a 200 mA Drain Current device. I would just run with Post #3. Buy a bucket of them.
Belay that, my bad. Looking at a schematic of one of those boards I see the problem is the current will be limited by the current in. The uC pin is not going to give you the current you need. Transistor used as a switch time, as was suggested.
Ron