Wednesday, March 29, 2023

Digital Thermometer-Cum-Controller

This circuit can control the temperature of a device according to its requirement and displays the temperature in the range of –55°C to +125°C on four 7-segment displays.

- Advertisement -

The software

The software for the temperature controller is compiled using Bascom51 version. The demo version of Bascom-8051 is available on MCS Electronics.

First, define the crystal speed and include the header file for microcontroller. Initialise all ports to ‘0.’ Timer-0 is used as an internal counter and increments by a second. This is used here for timing delays. Pin P3.0 of the microcontroller is configured for single-wire communication. Normally, DQ pin (single-wire bus) of DS1821 is high. Through DQ, the device gets its power to perform tasks.

- Advertisement -

When the microcontroller waits for the event through single-wire bus, it issues a reset command. Then DQ goes low for some time. This resets the device and it acknowledges a pulse and then follows the microcontroller. The communication on the single-wire bus is initiated by the microcontroller, and issued by low time slots on a normally-high DQ line, issued by the device.

Declare the variables as bits, bytes and words. Define the various port pins as per the connections. Set the maximum temperature to ‘40’ as default. Subroutines ‘dispset’ and ‘disptemp’ are used for display preset and real temperature, respectively. The source program is well commented for easy understanding.

Download PCB and component layout PDFs: click here

Download Source code: click here




What's New @

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Tech Contests