![]()
The Dallas Semiconductor DS18B20 is a 12-bit resolution temperature sensor that interfaces to a microcontroller via the Dallas 1-Wire bus. I have written three MC68HC11 programs that display temperature to one tenth degree Fahrenheit on a 4 digit 7-segment LED display, a plotting program or a PC terminal screen. Get more information and the code.
I've ported the 1-wire code to the new MC9S12DP256. This program displays to a LCD on the MC9S12DP256 Development board, DRAGON12, from WYTEC. There is a photo on my USB page. Source code in same zip as above.
| I recently ported my DS18B20 software to the new Freescale MC9S08QG8. This little 16-pin gem has 8K of flash memory and a great many peripherals. | ||
![]() |
The DS18B20 is in a TO-92 package and in most cases you would want to remove
it from the printed circuit board out to free air. I use a three
position Molex type socket. Here is how someone else did it.
|
|
![]() |
In this photo you can see the MC9S08QG8 in a solderless breadboard with the
temperature sensor six inches out the back of the enclosure. The CPU
displays the temperature on a four digit LED board controlled by a
MC14489 driver. The display board is a DB1 NUMERIC |
|
![]() |
The enclosure is a CM5-125 from
Pactec. I bought it from Mouser.
I believe the 150X5 from SIMCO and
the Bud 11402 are equivalent. The red color acrylic lens/filter has a special non-glare surface to make viewing easier. |
|
![]() |
Here is a picture of the completed project. All of the photos are un-retouched available light. The lens/filter causes the red digits to appear to float on a black background. It makes an attractive appearance. | |
The MC9S08QG8 is a great chip but it does require a 3.3 volt supply. The MC14489 requires 5 volts so we need two voltage regulators. Here is the schematic and the software. (Note that the program, on power-up, first sends out some data on the none implemented serial port. The display starts after 5 seconds.) The DB1 board uses a 3.3 K ohm resistor to set the LED current at the low end of the usable range. This is fine for my breadboard which uses a 78L05 regulator. If you like a "light up the room" bright display you can use a heftier regulator and choose a lower value for the current setting resistor.
![]() |
I decided to design a printed circuit board to run this and other MC9S08QG8 projects. To the left is a bare board leaning against a completed project. If you click on the thumbnail you will get a very high resolution photo. | |
![]() |
Here is the MC9S08QG8 project board populated with just the
parts needed for the digital thermometer project. Notice the one amp 5
volt regulator as well as the 100 ma 3.3 volt low dropout regulator. There are also parts for a RS-232 interface that are not needed for just the temperature display. |
|
![]() |
Here is the board mounted in the CM5-125 enclosure. Two holes in the project board fit mounting bosses in the enclosure. Also visible are the DB1 display board and the red lens/filter. | |
![]() |
Here we have added the wires for signal and power and the
back panel with the DB9 RS-232 plug. I expect to offer the MC9S08QG8 project board for sale in early 2009. If you would like to be notified send me an email.
|
|
![]() |
Here is the back side with the DS18B20 temperature sensor, power jack and optional RS-232 interface. |
Roger's Embedded Microcontrollers Home Page
This page written by Roger Schaefer. Last updated July
22, 2009