Go Down

Topic: 3.3v ttl. How about just a resistor? (Read 2500 times) previous topic - next topic


I've seen a few posts around the interwebs on interfacing 3.3v ttl device (wrt54g, NSLU) that say you can just put a 10kohm resistor inline to drop the 5v out of arduino enough to not fry the other device.  Seems to make sense to me ;)
But what about on the device -> arduino?  Whats the min voltage that the arduino can read as serial? 
In most posts they just wanted to get data from arduino to device.  I need to be able to go both ways.
I realize a logic level convertor from sparkfun is less than $2 but I'm inpatient..  But not so impatient that I wont ask here before torching one or both devices testing it myself.


But what about on the device -> arduino?

Sometimes...nothing. If a device outputs exactly 3.3V that is high enough to be recognized by the Arduino (specs say 0.6*5V or 3V is minimum to guarantee a logic high).

If a 3.3V device outputs ~3V then it's on the edge and you should either use a level converter or pull-up resistor to 3.3V to try to get the voltage higher. I'd go with the second as it's simple enough.

The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons



you can just put a 10kohm resistor inline to drop the 5v out of arduino enough to not fry the other device.  Seems to make sense to me

Well it doesn't to me, a resistor limits current flow NOT voltage. What these systems are working with is they are hopping to use the static protection diode inside the 3v3 device to clamp the voltage at just above the supply. These diodes were not designed for this purpose and if you exceed the current rating you will fry the device. Also you will slow down the signal edges as you have to charge the input capacitance though your series resistor, this means things that need fast signals like SD cards will struggle to work.

pull-up resistor to 3.3V to try to get the voltage higher. I'd go with the second as it's simple enough.

Problem with a pull up is that it exposes the output to greater than 3v3 and could damage the device.


so we are lowering the current with the resistor and hoping since its a lower amount of current that the diode will block the excess voltage without frying. 
OK warning noted.  I'll order the logic level convertors.  But since the device Im working with isnt expensive and easily gotten I'll try the resistor in the mean time.


I should be able to do this with a max3232.  I wonder if Radio Shack stocks them.  Frys is to far away for tonight.


No that chip is not a logic signal converter, it converts to RS232 voltage levels and uses 3V to 5V logic inputs / outputs.


ah right.  I have to many searchs going and got confused. thanks


Since all devices (to a close approximation) these days have CMOS outputs that drive rail-to-rail it is rare to find a 3.3V device that can't talk to an Arduino pin.  You can use a strong pull-up to 3.3V on any devices that are open-drain or open-collector if worried that 5V is too high.

Its true though that the levels are a bit close for comfort and switching speed is compromised without level conversion, but since the Arduino is clocked at 16MHz that's unlikely to be a problem (SD cards in native mode rather than SPI mode are much too fast for the Arduino anyway).
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


SD cards in native mode rather than SPI mode are much too fast for the Arduino anyway).

Lady Ada's wave shield used to use a resistor on the SD card but they had so much trouble with it that the circuit (issue 2) now sports a level converter.


What about simply using an optocoupler.
You can drive it with whatever voltage on the LED side.
To invert the signal, connect the collector to the pin and have a resistor to +vcc, and the emitter to ground. This pulls down.
For non-inverting, connect the emitter to the pin and have a resistor to ground, connect the collector to +vcc. This pulls up.

This might solve waiting, but is suitable for any form of isolation, and any voltage.

PS. its a good idea to tie the base to the emitter  with a 10k to 47k resistor, to stop it floating and causing issues.

Also regarding the resistor dropping the voltage. As Grumpy_ Mike said it limits the current. BUT if you connect a 3.3 or 2.7v Zener diode between the resistor and ground, the voltage will not exceed 3.3 or 2.7v.

Its all based on the fact that inputs should not have a voltage applied that is greater than the supply voltage. So if the device has no power, the inputs shouldn't have power on them either. Some devices include internal diodes to the supply pin, to prevent damage...its just good design practice.


just a followup.  Going from 5v arduino to a 3.3v router I could talk from arduino to router (5v -> 3.3v) with no problem using just the resistor.  When I hooked it up without the resistor there was no blue smoke but it didnt work.

I cant get any communication from router to arduino (3.3v -> 5V)
But when I put my voltmeter in parallel it shows a solid 3.3v going to arduino.

I just got my logic level convertors from SF (and a rs232 convertor for my pc) so I'll test and see if its the TX on the router thats bad or it just wasnt enough signal for arduino to read.

I tried connecting TX/RX together on the router to try to loop back but that didnt work at all.  I suspect because I didnt do anything with the ground wire since theres only one...
will post back with result of the adapters/convertors.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131