NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » Using Devices With Different Voltages

February 02, 2011
by Keyster
Keyster's Avatar

Hey Guys/Gals, i have a problem that i have not had to deal with yet and i need some advice. i am using the ~5v Nerdkit and i want to connect it to a ~3.6v wireless transceiver (RFM22B). how do i accomplish this type of feat?

my guesses are as follows:

for the Vdd line use a 3.3v voltage regulator (i have a few laying around).

for the input to the transceiver use a voltage divider; the output from the Nerdkits PIN will be ~5v and i would divide it down to ~3.3v.

for the output back to the nerdkit use a transistor; use the transceiver's output to connect to the gate of a MOSFET and use it to give +5 to the nerdkit (atmega) PIN.

am i on the right path? OR would it just be easier to purchase a different transceiver then try to do all this?

please note: i am purposely being a little vague about the specifics because i mainly want to know if the idea is sound. i think/hope i can figure out the specifics if this is the correct/best way to do it.

Thanks guys,

bryan

February 02, 2011
by JKITSON
JKITSON's Avatar

I just used a 3.3v regulator supply for the VCC on xmtr/rcvr.

The data lines for both are RS-232. The system worked very well...

See the thread on Tractor Pull Sled Monitor...

Jim

February 02, 2011
by BobaMosfet
BobaMosfet's Avatar

Keyster,

What you're trying to do is very common. It's called 'level-shifting'. Use 2 AND gates, one for each direction. Power each gate with the voltage you are going TO.

So, let's say you've got an LM7805 powering your ATMEGA168. If you power your first AND gate with 5V from the LM7805 as well, and input a 3.3V signal, it will get converted to a 5V signal on output- no resistors, no loss, no mess. Use the second gate to go the other direction- Simply power that gate with an LM1117 (or whatever you have) to shift voltage down. Just make sure the current requirements of the load are met by the gate and the regulator. Most AND gates are fairly tolerant to voltage.

I do this on larger projects and use an HD74LS08 (2-input Quad AND gate).

BM

February 02, 2011
by dgikuljot
dgikuljot's Avatar

Isnt it possible to set up like resistors in series or parallel to reduce the voltage?

February 02, 2011
by mongo
mongo's Avatar

It is easier to use a couple of diodes. They have a drop of .7V each. Two diodes will drop the voltage 1.4V without any special circuitry.

February 02, 2011
by Keyster
Keyster's Avatar

Very Cool, not only did you guys point me down the right path you gave me a road i could drive a tractor trailer down... awesome!

Boba, thank you for telling me what it is called. once you know what to search for it is like opening up the flood gates on the internet. :)

i do have a follow up question for you Boba. i see that you state "Most AND gates are fairly tolerant to voltage". just so i am reading the data sheets correctly, most of the AND gates i have looked at on digikey so far state that the input voltage should be MAX Vcc + .5v . What you are saying is i "should" be good with the 3.3v Vcc and a ~5v input? (i know i could be reading the datasheet wrong)

thanks again guys,

keyster

February 02, 2011
by Keyster
Keyster's Avatar

mongo, very cool idea. i just checked the datasheet (i should already know this) and it looks like the Atmega, with an apx 5v Vcc, only needs 3v to reliably force a PIN high. (as i read it .6 x Vcc). so as long as my Transceiver puts out at least 3v i should not need a voltage step up. Using two Diodes to step down the voltage wherever needed i should be good.

talk about learning something new every day... today was a doozy!

once again, thanks guys!

keyster

February 03, 2011
by BobaMosfet
BobaMosfet's Avatar

Keyster,

If you give me a part number, I'll take a look at the datasheet, I think you're misunderstanding something you're reading, which I can explain.

Just remember, you have input voltage (high & low) output voltage (high & low), and supply voltage. Usually, output high = supply voltage.

BM

February 03, 2011
by BobaMosfet
BobaMosfet's Avatar

Keyster,

I meant 'misunderstanding something' in the datasheets you're reading. If a gate has an upper limit for voltage, usually, any voltage below that will also work, as long as it's above the "digital" threshold you're trying to preserve as a square-wave.

BM

February 04, 2011
by Keyster
Keyster's Avatar

Boba, i could very well be misunderstanding the datasheet ;) . usually when i start working with something new, like these AND gates, i go to digikey and look at the datasheet from several different brands to "get the feel for it". for me, some company's datasheets just seem to be easier to understand than others...

as an example, digikey part number (568-1702-5-ND) in section 7 named "Limiting values" i see where it states:

<symbol> <Parameter> <min> <max>

Vi / input voltage / −0.5v / VDD + 0.5v

my assumption was that if i wanted to go from 5v to 3v (using the AND gate) that i would make the Vdd 3v and then use a 5v line(PIN) of the Atmega chip to drive the AND gate's input. that would be Vdd + 2v and would "overdrive" the AND gate.

another problem could be that i am looking at the wrong "kind" of AND gate. when i search for AND gates at Digikey it comes back with 16,000 hits. i narrowed it down by choosing "Gates and inverters" and also "Through Hole" which narrows it down to about 7 pages. i then looked for gates that could carry voltages that included 3v and 5v (3 to 15 on the above example)

February 05, 2011
by BobaMosfet
BobaMosfet's Avatar

Keyster,

My apologies. I was certain I had used an AND gate to shift down (5v to 3.3v)-- I went through my schematics to find a working example (with all the other calc's) so I could give you a detailed response, and found instead that I've only done it to shift up (3.3V to 5v).

Here's why the datasheet has the limits it has:

  1. Too high a input potential, compared to Vdd (supply) can cause the polarity through the input side to be biased the wrong way, and
  2. Too much potential can cause too much current to flow, which the transistors in the chip probably won't like. :D

However, if you know what voltage and current you need to drop to, it's easy to do the drop with a single resistor. Just make sure the resistor is the right size for the wattage it is expected to dissipate.

For example: If you know your load needs 3.3V at .020mA, then 5V - 3.3V = 1.7V. To find the resistor we finish the calculation as: 1.7V / .020 = 85 Ohms. The resistor must dissipate just approximately 34mW, so a 1/8W resistor is more than sufficient.

Hope that helps, and EXCELLENT question!

BM

Post a Reply

Please log in to post a reply.

Did you know that signed numbers need to be sign-extended when chaging variable sizes? Learn more...