Thermometer width DS18S20

In my new Dacia Duster is missing unfortunately an outside temperature indication. A finished thermometer with LCD did not separate from there while the contrast with sunlight usually particularly is. I had still alphanummeric LED display in red there for this project in the best way am suitable. As microcontroller i used a ATTINY 2313. The temperature sensor is a 1-Wire-digital sensor, thus the alignment of the sensor is void.

Hardware

There electronics in the car to the employment comes I to the current supply special attention dedicated. The 12V can of 7V - 15V vary with peaks to 40V positively as negative. Further no disturbances are to retroact on the car. Around this to keep different screening measures are intended. In addition an entrance protection against the voltage peaks. The display was inserted set off to control electronics and both housings inside with a EMV spray on copper basis was treated. Around this to keep different screening measures are intended. In addition an entrance protection against the voltage peaks. The LED display was inserted set off to control electronics and both housings inside with a EMV spray on copper basis was treated. The housings was put on Ground. The +5V for ATTINY, sensor and the LED display is produced by a regulator controller LM2574. So that the display in the dark does not dazzle with to switch on the light form the car the display is somewhat dimming.

schematic:

circuit controller board

to increase click

finished pcb:

final soldered PCB

to increase click

Software

The software is written with WINAVR20090313. All 10msek. takes place an interrupt where a time variable is counted up. In the major loop with „switch case“ program sequence is then steered. First tries the DS18S20 to initalised and with success the measurement is started. The transformation lasts approx. 800msek. Afterwards the memory of the sensor is selected. At a negative temperature (scratchpad [1] not equal 0) another computation is used than at a positive temperature. The leading zero are still faded out and the result is sent to the LED display. Afterwards the cycle begins again. After the start of the measurement still queried whether switches light on from the car. Is the light indicates then dimmed the LED display.

Program flowchart:

programm flow chart

final

The Display is directly connected to the Controller-Board. The cover plate is placed in front of the Display width distance bold.

complete

installation location

to increase click

Download

Eagle files from the pcb and schematic:

Eagle files

AVR-Firmware:

sourcecode

 
en/projekte/thermometer_mit_ds18s20.txt · Zuletzt geändert: 2012/04/08 17:40 (Externe Bearbeitung)
Recent changes RSS feed Creative Commons License Driven by DokuWiki Made on Mac