Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Reading Temperature from DS1820 using 1-Wire Protocol

Temperature sensors come in various shapes and sizes, they also come in different colors and number of pins but above all these differences one difference must not be taken for granted- how to read the temperature data from it. Maybe the simplest form of a temperature sensor is the thermistor, it has two wires, and the resistances between these two wires vary depending on the temperature. This type of sensor requires an ADC to convert the analog signal into digital. However modern temperature sensors now come with their built in ADC and their outputs can be accessed serially. There are three commonly used serial protocols SPI, I2C and 1 Wire, these vary on the number of wires and on the way data is accessed. In this project the DS1820 is used to demonstrate how to read temperature data from a temperature sensor which communicates using the 1-Wire protocol. The DS1820 is a three pinned temperature sensor, it actually looks more like a transistor – but it’s not! PIC16F628A was used to read the temperature data from the sensor, after data… Continue reading

Reading DS1820 temperature sensor with PIC16F628A

This project demonstrates a simple temperature reading routine from DS1820 temperature sensor. PIC 16F628A microcontroller simply reads temperature value from sensor and displays it on a multiplexed 4 digit seven segment LED display. Temperature reading resolution is 1 degree – so it is enough for general monitoring. Code example is also available. Continue reading