AdSense

Thursday 11 July 2013

ATMega - A simple and compact thermometer with the DS18S20

(Deutsche Version) I wanted to have a compact, completed project with an ATMega8 and the DS18S20. Therefor, I built a thermometer out of those things. The result:
For the project you need: 1 pinboard, 1 ATMega8, 1 DS18S20, 3 seven-segment displays with decoder, 1 quarz (not nessesary) for the ATMega and lots of cables.

Lets start with the temperature measurement: The ATMega reads the temperature of the DS18S20, as already shown in this post. The wiring is shown in the next image:
The data pin of the DS18S20 is connected to PORTD0 and PORTD1. PORTD0 is output, PORTD1 input. Afterwards, the ATMega converts the temperature into the 3 digits and passes it to the seven-segment decoder.
This is how the pinboard was looking like in the beginning. After taking this picture, I had to space the seven-segment displays a bit because the adaptor cables would not fit otherwise. The code for the ATMega can be downloaded here: Source code. The outputs are the following: PORTC0..3 for the ten digit, PORTB0..3 for the one digit and PORTD4..7 for the position after decimal point. I use 73HC4543 as the seven-segment decoders.

From the decoders there have to be 7 cables to the displays. Applying 21 cables would be very annoying, so I built special adaptor cables which already contain the needed 220 Ohm series resistor. The soldering was a lot of work but afterwards, it was worth it. If anyone has qusetions about this adaptor, i can provide extra information (or write a post), simply ask me in the comments. The adaptor looks like this:


No comments:

Post a Comment