The Nano 33 IoT and DS18B20

Hello all,

I'm thinking to buy a Nano 3 IoT together with the DS18B20 temp sensor and a Humidity sensor so I can monitor my Vivarium continiously. This all works fine with my Mega 2560 but as I read that the max voltage for the Nano 33 is 3.3V for the digital and analoge ssignals I was wondering if this goes fine?
The signal wire from the sensor to pin4 (pwm) is connected with a pullup resistor connected to the 5Vdc.

Anybody has exerience with this Nano and sensor combined?

Thanks in advance


Yes, I have one sensor on an ESP32 (3.3V) running for many months without any issue and I just connected another to an Arduino Nano 33 IoT. The example "Tester" run within a minute without any modifications.

I used the DallasTemperature library version 3.9.0 from the Arduino IDE Library Manager.

I powered the sensor from the 3.3V pin on the Arduino.

The datasheet says the supply voltage Vdd can range from 3.0V to 5.5V.

Sorry for the late response but thanks for your answer after downloading the datasheet I found indeed that the DS18B20 should be able to handle 3.3V

could you send me the code I can't program it thanks

Welcome to the forum.

Did you try the examples from the library?

yes but it always gives me 127 degrees

1 Like

Sorry, I have very little time currently. Try Google DS18B20 127 degrees. I found another post in the forum as first hit. It looks like this is an error code.

If you cannot find a solution, please post a schematic of your system (hand drawn is OK) and tell me what you tried. Also please post the the version of the board support and the libraries you are using.

My system is still running 24/7 without any changes ever since I posted.

Hi, I can confirm, the sensors are ok to be used with 3.3v @vcc
the error you get is "127" or "-127", if you are getting "-127" that means the sensors are not present in the bus or not recognized .
this error is usually wrong connection regarding sensor by front side (pins down, in the sense you can read the sensor labels ) the VCC pin is on the right data pin is in the middle and ground pin at the left
a resistor should be used between data pin and VCC pin
4.7KOhms for 5V / 3,3KOhms for 3.3V
if you get a +85 reading that means your sensor is recognized but it hasn't had enough time to make the conversion and answer.
sometimes a power failure at the Arduino power source could have the sensors blocked at 85 and its necessary to make a hard reset or fully power-off the Arduino and the sensors and recover from error condition
hope this helps

1 Like

Just a confirmation of what Ale-X said: here the schematics for Nano33 Iot connected to 3 different sensors:

Ds18b20 with a 2.2KOhms resistor works fine :grinning:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.