Shop OBEX P1 Docs P2 Docs Learn Events
Need some help with a simple voltage converter - this should be simple — Parallax Forums

Need some help with a simple voltage converter - this should be simple

GICU812GICU812 Posts: 289
edited 2008-09-30 20:01 in General Discussion
I have a MC·that puts·out 3.3v, I need to output 5v on two lines. (VRStamp if it matters)

I·get things to work if·I use a·BS2·script, if in14=1 then high pin1 , etc, you get the idea, and use the BS2 to convert the voltage

I tried to build a transistor based circuit. Using 2n3906 transistor. But the output is always on whenever I connect the base·to the MC.

It works when not connected to the MC, if I ground the base, the output goes high, if I apply + to the base, the output shuts off. But when connected to the MC, its always on, even when I apply 3.3v directly to the base resistor.

My circuit:
There is 5v to emitter,
2k resistor on on the base - connected to the "switch"
1k resistor on the collector, connected to a LED, which is then connected to ground. This is just for testing, I just need to get 5v out when commanded.


I dont know what is going on with the MC, does anyone have another idea or advice?

I try to figure this stuff out myself, but Im stumped here.

·

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-09-30 03:05
    The reason your circuit is always "on" is that the PNP's base voltage is always more than 0.6V lower than the emitter voltage (5V - 3.3V = 1.7V > 0.6V). To switch a higher voltage than your own Vdd with transistors, you need two of them: your original PNP, and an NPN, connected as an open collector, to drive the base of the PNP (pulled up to 5V) low.

    But if you only need a logic output, there are some easier things you can do:

    1. Check the input requirements of the VR Stamp. If it's TTL compatible, you don't need to do anything very special. Just connect the MC pin to the VR Stamp pin through a 2.2K resistor.

    2. If that doesn't work, use a 74HCTxxx inverting or non-inverting buffer (e.g. 74HCT04) with it's Vdd connected to 5V.

    -Phil
  • GICU812GICU812 Posts: 289
    edited 2008-09-30 20:01
    got a 7432 (cant believe I didnt have one on hand) and that works great. Thanks a ton.
Sign In or Register to comment.