voltage divider vs logic level converter?

I purchased an arduino which is based on 5v but I will need to drive some 3v RF modules. I was planning on using a voltage divider, built with some simple resisters. In reading about them, I found several posts which indicated voltage dividers imposed a performance hit. As such, others recommend the use of a logic level converter rather than a voltage divider. I was under the impression no such performance hit would occur since it was built strictly with resisters, having no capacitors.

1 Can someone please clarify if a voltage divider does in fact impose certain performance negatives and if so, why?

2 Can someone please clarify when one should use a voltage divider and when one should use a logic level converter?

For completeness, if I do need a logic level converter, I'm looking at these. And the RF modules I'm looking at these.

Thanks.

1 Like

gerg:
I purchased an arduino which is based on 5v but I will need to drive some 3v RF modules. I was planning on using a voltage divider, built with some simple resisters. In reading about them, I found several posts which indicated voltage dividers imposed a performance hit. As such, others recommend the use of a logic level converter rather than a voltage divider. I was under the impression no such performance hit would occur since it was built strictly with resisters, having no capacitors.

1 Can someone please clarify if a voltage divider does in fact impose certain performance negatives and if so, why?

No performance hit if the reduced voltage is for logic signal inputs for external components (like your RF module), if for providing significant current for some purpose then it's not a solution.

2 Can someone please clarify when one should use a voltage divider and when one should use a logic level converter?

Again it's about what current demand is as well as voltage level. If significant current is required then don't use resistors.

For completeness, if I do need a logic level converter, I'm looking at these. And the RF modules I'm looking at these.

Voltage dividers should work fine. Of course you only require voltage dividers for the arduino digital output pins driving the RF module. The 3.3vdc logic signal outputs from the RF module wired to the arduino input pins must be wired directly as a 3.3vdc logic high is high enough to be read as a high logic level in a 5vdc arduino board.
Thanks.

Thank you for the clarification.

retrolefty:
Voltage dividers should work fine. Of course you only require voltage dividers for the arduino digital output pins driving the RF module. The 3.3vdc logic signal outputs from the RF module wired to the arduino input pins must be wired directly as a 3.3vdc logic high is high enough to be read as a high logic level in a 5vdc arduino board.

I'm not sure I entirely understand you so I'll try to paraphrase. The 3v3 out of the RF module should be wired directly to the arduino's 5v input. I read the arduino could be driven with 3v3 inputs. This is what you're saying? Perhaps this is why many recommend the logic level converter as 3.3v doesn't technically meet the 5v TTL high requirements and the converter is sure to the right thing for a small price?

Thanks,

I'm not sure I entirely understand you so I'll try to paraphrase. The 3v3 out of the RF module should be wired directly to the arduino's 5v input. I read the arduino could be driven with 3v3 inputs. This is what you're saying? Perhaps this is why many recommend the logic level converter as 3.3v doesn't technically meet the 5v TTL high requirements and the converter is sure to the right thing for a small price?

You paraphased correctly. The arduino digital voltage input minimum for a legal HIGH is .6 X Vcc so at 5vdc a high must be 3.0 volts or higher (to Vcc + .5vdc max), so a 3.3 volt signal will be read as a HIGH but with only .3vdc noise margin. So for industrial or commercial use one might want to use voltage level convertors for both inputs and outputs, but most arduino users have had little problems with reading 3.3v logic signals directly as inputs. Output conversion, using either convertors or voltage dividers are required when driving signal to 3.3v systems unless those 3.3v logic input pins are so called 5 volt tolerant (which some are) in those case you can wire directly also.

Lefty

1 Can someone please clarify if a voltage divider does in fact impose certain performance negatives and if so, why?

There can be a performance issue with resistors. The reason is that all signals have capacitance on them, mostly contributed by the IC pins the signal is connected to, with a small contribution from the PCB traces themselves. The resistance you are adding combined with this capacitance forms an RC filter which smooths out the sharp edges of the digital signals, and for some receiving devices sharp edges are required for proper operation. We've seen 1k resistors added in series with digital lines cause an SPI device to cease working, and reducing the resistor to 100 ohms restores proper operation. Some digital edges are just expected to be "fast".

2 Can someone please clarify when one should use a voltage divider and when one should use a logic level converter?

One should use a voltage divider when cost is an issue and speed of signal rise/fall time doesn't matter (e.g., SPI data lines instead of the SPI clock line).

Perhaps this is why many recommend the logic level converter as 3.3v doesn't technically meet the 5v TTL high requirements and the converter is sure to the right thing for a small price?

Right. Some 3.3V devices output voltages very close to 3.3V and work just fine when connected to an Arduino input. Other "3.3V devices" output voltages that are "high enough" for other 3.3V devices (e.g., 2.5V) but no longer work with a 5V Arduino.

If you're dropping money at Sparkfun anyways I don't think it would hurt to spend $1.95 to buy a little insurance. But get the resistors as well and try them -- it sounds like there's a learning opportunity here :slight_smile:

--
The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

Thanks so much for your patience and time. This place is a wonderful resource.

gerg:
So so much for your patience and time. This place is a wonderful resource.

Yes it is, for all of us. My only direct experiance with interfacing an arduino to a 3.3vdc module was for a bluetooth modem module. I used a small 10k trimmer pot for the data to the module adjusted for 3.3vdc and wired the recieve data line directly to the arduino input pin. It works fine at 57600 baud.

Lefty

You can also get a performance hit on things like SD card readers. Some SD cards are more fussy than others when it comes to signal edges. Lady Ada does a wave shield that incorporates an SD card. On the first release of the electronics she used voltage dividers, but some customers were reporting troubles so now she uses logic level converters.

Grumpy_Mike:
You can also get a performance hit on things like SD card readers. Some SD cards are more fussy than others when it comes to signal edges. Lady Ada does a wave shield that incorporates an SD card. On the first release of the electronics she used voltage dividers, but some customers were reporting troubles so now she uses logic level converters.

But which was the root cause? Was it a problem because a voltage divider was used or because the provided voltage was right at the trigger threshold, or perhaps because the SD reader's threshold specifications were pushed at its limits and didn't provide for consistency? That would appear to be rather anecdotal. Isn't the divider only changing the voltage and not the speed of the signal? If so, doesn't that imply the root problem lay elsewhere and that replacement of the voltage divider was just the cheapest, fastest route to a solution?

EDIT: To be clear, I'm not trying to be a smart arse here. I'm asking because clarification would be nice. Based on the above comments, my assumptions (to me) appear to be legitimate.

Was it a problem because a voltage divider was used

Yes it slowed down the edges like I said.

perhaps because the SD reader's threshold specifications were pushed at its limits and didn't provide for consistency?

No they left that bit alone, the logic converters only replaced the voltage dividers.

Grumpy_Mike:

Was it a problem because a voltage divider was used

Yes it slowed down the edges like I said.

Please keep in mind my background is not hardware. Sorry if this is a dumb question. How does a resister "slow down the edge"?

How does a resister "slow down the edge"?

Not at all a dumb question but given that RuggedCircuits described how it does it in reply #4, well ....

Anyway it does it because of the combination of resistance and the capacitance in the tracks an on the input to the device. This is known as stray capacitance and is always present in every practical circuit. The combination of a series resistor and capacitor to ground forms a low pass filter. A perfect edge, that is a change from one logic level to another, consists of an infinite number of harmonics or frequencies. If those harmonics don't go all the way up to infinity but stop short (as all practical circuits will) then the edge can't be perfect and therefore the edge has a finite rise time. The resistor and stray capacitance form a filter that limits the number of harmonics in the edge more than it normally would be, and so the rise time is longer than it normally would be. The bigger the resistance or large the capacitance the slower the edge rises.
All digital components need the rise time on the edges to be a minimum value, this varies considerably so see the data sheet on the component you have in mind.
An SD card with it's socket is a particularly rich source of stray capacitance and cheap memory in SD cards sometimes do not have the specification you would hope for.

Okay. That makes sense.

I think you said it, but I want to clarify. In this case, the capacitance comes from circuits in the IC on both sides of the divider? Whereby the divider only adds to the harmonic? Correct me as need.

So it seems there was a some truth in what I had originally read.

Thanks.

Whereby the divider only adds to the harmonic?

Not quite, there is capacitance all round but the resistor works with the capacitor to make a filter. For a discussion of simple RC filters see this page:-
http://www.thebox.myzen.co.uk/Tutorial/PWM.html
It is the reduction of the number of harmonics not the addition that makes the rise time slower.

Grumpy_Mike:

Whereby the divider only adds to the harmonic?

Not quite, there is capacitance all round but the resistor works with the capacitor to make a filter. For a discussion of simple RC filters see this page:-
PWM
It is the reduction of the number of harmonics not the addition that makes the rise time slower.

Ohhh....

Thanks for the link. I'll check that out.

Again, thanks for everyone's patience and contributions.