# Search for DS18B20 in Topics

### Stopper thermowell for DS18B20 temp sensors?

Does anyone know of a thermowell stopper that would fit a DS18B20 temp sensor? The ones I've come across look to have an inner diameter of .25 inch, and the DS18B20 probe diameter says .24 inch. Are there any other thermwell stoppers out there with a wider inner diameter? I'd like to go with a thermowell stopper so I can use it on buckets and maybe carboys as well.

Question by DELETED_MakiY2    |  last reply

### Convert DS18B20 temperature to string?

I want to convert DS18B20 temperature (4-bytes code from datasheet) to string with accuracy 0.1°C (like sprintf %.1f). AVR. C language (avr-gcc). I need for small code, so sprintf, floating-point types and round from math.h is bad idea. My following current code is bad also: This is the date sheet of DS18B20 void reverse_string(char *s) {     char *p, c;     for (p = s + strlen(s) - 1; s <= p; ++s, --p) {         c = *p;         *p = *s;         *s = c;     } } void ts_to_string(uint16_t ts, char *s) {     int8_t n = (int8_t)(ts >> 4);     uint8_t neg = n & 0x80;     char *p = s;     float f;     if (neg)         n = -n-1;     do {         *p++ = n % 10 + '0';     } while ((n /= 10) > 0);     if (neg)         *p++ = '-';     *p = '\0';     reverse_string(s);     *p++ = '.';     f = (float)(ts & 0xf) / 16.0;     if (neg)         f = 1.0-f;     *p++ = (char)round(f * 10.0) + '0';     *p = '\0'; }

Question by DELETED_MakiY2    |  last reply

### Strange behaviour from DS18B20 temperature monitor on ESP8266.

Hi. I have a DS18B20 attached to an ESP8266 which is now feeding temperature info back to a domoticz home automation server hosted on a raspberry pi. I am getting some strange readings and need to work out which part is not working properly. The temperature graph from domoticz is here and the date sheet of ds18b20 I think the lower value is probably accurate as the temperature in my utility room dropped steadily overnight but why does it jump up to over 40 for the majority of the time. Has anyone had this issue with the sensor when it's attached to an ESP8266 or might my problems lie elsewhere? Perhaps easiest to buy another sensor to test and narrow down the options. Thanks for any pointers. Don

Question by DELETED_MakiY2

### Is a resistor required between VCC and Data for my temperature sensor?

I'm using a TinyDuino with a Protoboard to measure temperature with a DS18B20 (here is the datesheet of ds18b20). I was following this tutorial but am not getting any valuable information back on the arduino when I try to read the value on the data port. I just started reading around and it looks like most people put a resistor between VCC and Data. I'm fairly new to electronics, so 1) I don't know why the tutorial doesn't mention this and 2) I'm not sure what putting a resistor between those two would do? Any help or explanation appreciated. Edit Here's a schematic from a site which uses a resistor. The only difference is my board has VCC, one site said to connect VDD on the sensor to VCC, this one shows it connecting VDD to 5V. I'm not sure the difference

Question by DELETED_MakiY2    |  last reply

### Arduino D1 temperature code is not working for me.

Question by ealemanypr    |  last reply

### Help with some functions with arduino and ds18b20. Ello every

Hello folks, im having some troubles to control some rellays based on the temperature read of one ds18b20. The sensor stay under water, and when the water temperature is higher than 44°C the rellay turns off, but the rellay must be off until the water temperature fall to 38°C. I have no ideia of how to code it, some one can help me?

Question by scyklon

### Need help with DS18B20 1-wire thermometer IC

So I recently bought a DS18B20 1-wire digital thermometer IC to use with an arduino.  But when I hooked it up, I couldn't get any reading at all out of it.  I have the VDD pin wired to 5v on the arduino, the gnd wired to gnd, and the data pin wired to analog pin 0.  Any help would be awesome.

Topic by dudes    |  last reply

### Monitoring a baby with an Arduino and some sensors. Ideas?

Hi dear lads and gals, I'm working on my Electrical Engineering bachelors thesis and it evolved into something that I couldn't have foreseen. I'm trying to build a baby monitoring package that would involve 3 major things; Baby's -Temperature changes -Breathings -Positions in the crib (in or out) and all these should be controlled through a mobile app. I have a couple of challenges. First of all there can't be wires all around the place to detect these changes and I'm not quite lost about how the package would be. I've experimented on a waterproof ds18b20 temperature sensor (got the temperature saved on a web server) and a flex sensor (thought of planting it under the crib) so far. For the breathings I thought of using a microphone but didn't really get my hands around that. What better sensor there are that would simplify the process? What should this package consist of? Any ideas/directions are welcome!

Topic by kaanorgunmat    |  last reply

### Need help programming an Adruino to function as a solar differential controller Answered

Hi I need help to write a program for an Arduino to allow it to function as a Solar Differential Controller (SDC). An SDC simultaneously reads the temperature of two different elements,1) the water inside the thermal storage tank and 2) the inside of the solar collector. When the sun rises in the morning it begins to heat up the inside of the collector. When the SDC senses that the collector is a few degrees warmer than the storage tank it signals a circulation pump to turn on to circulate water from the tank, through the collectors and back to the tank. When the sun starts to set in the evening and the collector cools to within a few degrees of the storage tank, it signals the pump to shut off. So basicly I need the Arduino mega 2560 to read the temperature from two DS18B20 digital temperature probes. When one of the probes shows a reading 5oC higher than the other, the Arduino changes an output to high. When the higher probe's reading drops to within 5oC of the lower one, the Arduino changes the output back to low. I don't even know where to start really, this programming is way over my head. Any help would be appreciated. This program is for a large project I'm working on for this site and any help you give me will be credited to you. Thanks.

Question by EcoMotive    |  last reply

### Controlling anaerobic digesters with arduino

Hi I am new on the Arduino scene and I am trying to build eight anaerobic digester tanks to conduct experiments for my thesis in engineering. The setup will look as follows: -Arduino mega -Arduino motor shield R3 -Two motor stirring the digester at different RPMs. Motors will run at 12 V and around 0.5-1 A. -The motor shield will use the wall jack as power supply via an AC-DC adapter. -Biogas volume measuring device (tipping sensor) -Aquaria air pump to supply Hydrogen Sulphite consuming bacteria with oxygen. This will be controlled with a relay and the volume measuring device. -The pump will use the wall jack as power supply -Temperature sensors DS18B20. -Immersion heater controlled by the temperature sensor and a relay. The digester is supposed to be kept at 37°. Everything will be logged but I haven’t decided if I will connect a Ethernet shield or if I should log on a SD card. I think that I can manage to build it but I have some questions (a lot) but will just post some and post more later. The experiments will run for 4-6 months how will the Arduino, shield and relays handle being on for that long? Do I need something with higher quality? (It would suck to burn down the university) Any spontaneous thoughts that I should know or that could help me?

Topic by joche11    |  last reply

### Arduino-Based Solar Heater for My Above Ground Pool

A few weeks ago I grabbed the garden hose to top off the pool and noticed how hot the water was as it came out. (the hose had been lying in the sun). So, I decided to put it to good use. We've been looking at solar heaters for the pool but found the prices prohibitive, and being a DIY'er I decided to build my own. I have 50' of black, tangle-free hose coiled on a 2' by 4' piece of Wolmanized, 3/4" plywood. This is perched on top of an 8' 4by4 post which I sunk into the ground near the pool's filter. To feed the hose I installed a faucet in the filter's return line which is under sufficient pressure to travel up and into the hose. The other end comes down to an electric valve before emptying back into the pool. The Arduino portion of the project consists of an Arduino Uno board, a DS18B20 temperature sensor probe, a 12-volt, 3-amp power supply, A small prototype board that holds two 12-volt relays and two 2N3904 transistors which the Arduino triggers, two 12-volt car-type relays which are triggered by the smaller ones, and a Mallory Sonalert. My idea was to have the Arduino monitor the temperature in the return line from the solar hose coil, and when it reaches 80 degrees F, the Sonalert goes off for 5 seconds to warn swimmers that hot water will be coming out of the return spout in the pool. And after the warning sounds, the electric valve then opens for 2 minutes, flushing the warmed water into the pool. Since the system is driven by the pool's filter, the solar hose is replenished during this flush period, and when the valve closes, that new water is then heated, and the whole process starts over. The Arduino code consists of a couple libraries to incorporate and read the temp' probe's output, a subroutine which tests both the Sonalert and the valve when the system is first plugged in, and then the necessary code in the Void Loop section which simply waits for the temp' to reach a preset level and then sound the alert and then open the valve.The system is built into an 8" by 6" electrical box that mounts on the 4 by 4 post just under the solar hose panel.The systems been up and running for about a week now and I've averaged about a 2 degree rise in the pool's water temp' per day.If anyone is interested in seeing photos of the project, or the Arduino code, I'll be happy to provide. UPDATE: Here are some phots of the project...

Topic by bnelson218    |  last reply