Go Down

Topic: Working with 5v component(s) in 3.3v Arduino? (Read 384 times) previous topic - next topic


Hi everyone

Lately I've been reading about how once has to use a resistor in the data line for an DHT22 sensor when using an Arduino (since my understanding is that the ATmega is being powered with less than 5v). This is detailed in the Adafruit tutorial (http://learn.adafruit.com/dht/connecting-to-a-dhtxx-sensor). I understand that due to the difference voltage references from the chip & the sensor, one needs to use a resistor in the signal line (as also explained http://jeelabs.org/2010/12/16/voltage-3-3-vs-5/).

However, I am a bit confused about all this, and so I was hoping to ask a few questions to see if I can understand a bit better:

1. why does the adafruit example use a 10K resistor, and in the Jeelabs they talk about a 1k resistor? In a recent forum discussion (http://forum.arduino.cc/index.php?topic=107333.0), there was a mention of using a DHT22 with resistors with a range between 3.3K - 10K. How are these values determined?

2. If I was to have an Arduino Pro Mini 3.3v:
a. which resistor value would I need to get reliable results from a DHT22?
b. if I wanted to use a chronodot, I would a pullup resistor as well, correct? If so, how can I determine what resistor to use?

Thanks so much in advance... and I'm sorry for my "beginner" questions :)



You're refering to a pull up .. (or pulldown but not with this sensor)

Think of a pullup as a rope, the rope pulls keeping the object securely to the wall, how strong the rope is the resistance value, lower the resistance stronger the rope. Without the rope the object will move around the room giving you false results.

In Arduino terms, this is called floating, to keep it from floating a resistor keeps the value high at 5v or low at 0v  so a 1k or 10k would work just fine if the sensor is able to overcome the current from the resistor.


Jan 07, 2014, 01:11 am Last Edit: Jan 07, 2014, 01:14 am by lemming Reason: 1
The resistor for the DHT22 is a pullup resistor and has nothing to do with voltage differences between devices. The idea is to pull up that pin with the device pulling it to ground for signalling.

The Atmega in most Arduinos is powered with 5 volts. Some Arduinos run at 3.3 volts but these are clearly marked as 3.3v versions.
The advantage of running a 3.3v Arduino is that it can interface dirrectly with 3.3v devices.

If you have a 5 v Arduino and a 3.3v device you usuualy need to level shift between the two. A simple way is to use a voltage divider (http://en.wikipedia.org/wiki/Voltage_divider) to downshift the voltage from the Arduino to the device. The device will only give a 3.3v signal back but but this is enough for a logic high in the 5v Arduino and therefore still works. Without going into detail, some sensitive devices do not like voltage dividers due to speed of rise times and therefore you need to use voltage translators (http://www.adafruit.com/products/395) between the two.


Thanks guys for the great explanations! It actually makes a lot of sense. Now I understand why it is so important to use the appropriate pullup resistors in order to minimize potential signal noise. Makes total sense :)

One quick question about the use of the logic converters. So, I understand that you would use these in the signal wires when connecting a 5v chip to a 3.3v device in order to make the voltages in the signal wires match between the two. My question is... is the logic converter capable of powering the device with 3.3v, or you would need a separate power source (i.e.: a separate 3.3v power regulator)?

Thanks!! :)


Never mind... I just realized that the 3.3v devices can be powered right off the logic board...


Just confirming that you shouldn't have any problem at all...both the DHT22 and the ChronoDot should work as-is on 3.3V.
Unique RGB LED Modules and Arduino shields: http://www.macetech.com/store

Go Up