I made myself a two-digit thermometer with a red ELD-515SURWA seven-segment display (soldered out of a Euroster 1100E thermostat) and a DS18B20 sensor.
The electronics fit on a 2x8 cm cutout of a 6x17 mesh universal board.
The housing is a white 2xRJ11 6P4C surface-mounted telephone socket.
Power supply from a 5 V / 120 mA switching power supply.
Schedule <br/span>
Firmware
The brain of the chip is the AT89C2051. The program in assembler takes 410 bytes. I attach the source and hex.
The thermometer can show a temperature from -9 to +99 °C.
I use the smallest resolution of the measurement i.e. 9 bits and show only the integer part of the result.
By using three wires (i.e. supplying power via a separate wire rather than parasitically), you can ask the sensor if it has finished measuring. When this happens, the program reads scratchpad , checks the CRC and updates the value on the display.
Multiplexing takes place in a timer interrupt at 1302 Hz. During the time-critical operations of receiving and sending a bit on the 1-wire bus, the interrupts are blocked (up to half a millisecond during 1-wire resets); I did not notice with the naked eye the effect of such multiplexing hang-up on the brightness of the display.
| -- | No sensor |
| E1 | The sensor reported completion of temperature measurement immediately after measurement order |
| E2 | The sensor failed to report completion of temperature measurement in a timely manner |
| E3 | CRC error data received from scratchpad a sensor |
| __ | Temperature ≤ -10 °C |
| 90c64cdcfda ^^ | Temperature ≥ +100 °C |
The sensor here measures the temperature of the hot water at the outlet of the cooker. I cleaned a piece of tubing with sandpaper and on a drop of thermally conductive paste applied the sensor with the inscription side to the tubing, stuck it on with silver repair tape and then wrapped it with a couple of layers of sponge.
It seems that despite these treatments the thermometer nevertheless underestimates the water temperature by about 2-3 degrees....
Cool? Ranking DIY