Electronics > Beginners

Drive a 12V analog switch from logic level input

(1/4) > >>

hermitengineer:
I'm looking for a quick and dirty way to interface with a 4066 analog switch from a MCU.  The 4066 is supplied with 12V, and if I read the datasheet right, that means it needs close to 9V to turn it on.  So I need a logic to 12V level shifter (I picked 12V because there's a rail for that).  One quick and dirty solution is to drive a PNP transistor with an NPN transistor.  But I'd like to simplify that even more.

Would an optocoupler be a viable way to supply the 12V?  I'm thinking, MCU digital pin -> resistor -> LED side of optocoupler -> ground; 12V -> collector -> connector to switch.  Possible IC would be VOM617A-3.

A Hellene:
How about just using a low power N-Channel MOSFET (e.g. the 2N7000 or its SMD version 2N7002) in common Gate topology, and a 1..22k pull-up resistor?

Input will be the Source pin, the Gate pin will be connected to the low voltage Vdd supply rail, and output will be the Drain pin with a 4k7..12k pull-up resistor to +12V.

-George

jhpadjustable:
Invert the control input and use just one transistor? :)

Less dirty is to use complementary PNP/NPN transistors in 6-pin small packages.


--- Quote from: A Hellene on November 22, 2019, 07:32:05 am ---How about just using a low power N-Channel MOSFET (e.g. the 2N7000 or its SMD version 2N7002) in common Gate topology, and a 1..22k pull-up resistor?

--- End quote ---

That level shifter design depends on the difference between the two rails being smaller than Vgs(th). 7V is way too much.

A Hellene:
Nah! The transistor doesn't care about Vdg being 7V, as long as its Source is tied to the Gate! It is a 60V device with a Vgs_th of  1.0 .. 2.5V, so a Vgs_th of 3.3V will open the channel all right in order to pass the 1..2mA pull-up Drain current.

Also, being in common Gate topology, it does not need any inversion at its input:
- When its input is logic-high Vgs == (Vdd-Vdd) = 0V, so the channel is closed and no Drain current flows; the output becomes +12V via the output pull-up resistor.
- When its input is logic-low Vgs == (Vdd-Vss) = (Vdd)V, so the channel opens and Drain current flows; the output becomes 0V via the logic output transistor of the level-shifter driver and the 5Ω transistor channel.

Actually, that circuit above, is a stripped-down version of the bi-direcrional level-shifter Philips proposed at their IIC protocol specification!

-George


EDIT: Clarifications and corrections.

magic:
You should probably use BSS138 instead of 2N7000, though. The latter is rather marginal at 3.3V.
Not sure what to use in THT.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod