Temperature and relative humidity display with adaptive brightness control

Summary of Temperature and relative humidity display with adaptive brightness control


This project demonstrates adaptive brightness control for a digital temperature and humidity meter using seven-segment LED displays. A closed-loop system employs an LDR to detect ambient light, adjusting display intensity via a PIC12F683 microcontroller and MAX7219 driver. This ensures optimal readability in varying lighting conditions while conserving power.

Parts used in the Adaptive Brightness Control Meter:

  • Eight seven segment LED displays
  • MAX7219 chip
  • DHT11 sensor
  • PIC12F683 microcontroller
  • Light-dependent resistor (LDR)
  • 10K fixed value resistor

The objective of this project is to illustrate a technique of implementing adaptive brightness control to Smart TrH Display and seven segment LED displays. It consists of a closed loop system that continuously assesses ambient light condition using an inexpensive light-dependent resistor (LDR) and uses that information to adjust the brightness of the display. For the proof of concept, the technique is applied to construct a digital temperature and relative humidity meter that adapts the brightness of the seven segment LED displays to the surrounding lighting conditions. There are 8 seven segment LED displays used in this project and they are all driven by one MAX7219 chip. The ambient temperature and relative humidity are measured using the DHT11 sensor. The microcontroller used in this project is PIC12F683, which is a low-pin-count (8) device from 8-bit PIC microcontroller family. Auto-adjusting the brightness of the seven-segment LED display with surrounding illumination enhances the readability in all ambient lighting conditions.

Temperature and relative humidity display with adaptive brightness control
Temperature and humidity display with auto-brightness control

Theory and circuit setup

Many smartphones, HDTVs, PDAs, tablets, and computer screens now come with an automatic brightness control that aims to conserve power as well as to make the display easier to see in a broad range of illumination conditions. This feature basically dims the display screen in a dark environment and brightens it when the ambient light level is higher. The brighter screen helps to counteract the effects of glare from ambient light and also takes into account for the decreased sensitivity of human eyes to brightness as the ambient light level increases.

An automatic brightness adjustment is basically a closed loop system that has the capability to assess ambient light and adjust the brightness of the display accordingly. In our project, a general purpose LDR and a fixed value resistor (10K) are connected in series between the power supply and ground pins to create a voltage dividing network, as shown in the circuit diagram below. The resistance of a typical LDR is less than 1 K? under bright lighting condition. Its resistance could go up to several hundred K? under extremely dark condition. Therefore, the voltage across the 10K resistor increases proportionally with the surrounding illumination. For the given setup, the voltage across the 10K resistor can vary from 0.1V (under dark condition) to over 4.0V (under very bright illumination). The PIC12F683 microcontroller reads this analog voltage through its AN3 (GP4) ADC channel and then sends out appropriate signals to the MAX7219 display driver to adjust the brightness of the seven segment LED displays.

Schematic Temperature and relative humidity display with adaptive brightness control
Circuit diagram

The MAX7219 chip provides a serial interface to drive 7-segment LED displays (common-cathode type) up to 8 digits and requires only 3 I/O pins from microcontroller. Included on the chip are a BCD decoder, multiplex scan circuitry, segment and digit drivers, and an 8×8 static RAM to store the digit values. The segment current for all LEDs is set through only one external resistor connected between the ISET pin and power supply. However, the device also provides a digital control of the display brightness (16 steps from minimum to maximum) through an internal pulse-width modulator. To learn more about the MAX7219 device, read my previous article Serial 4-digit seven-segment LED display. In this project, the GP0, GP1, and GP2 I/O pins of PIC12F683 are used to drive LOAD, DIN, and CLK signal lines of the MAX7219.

For more detail: Temperature and relative humidity display with adaptive brightness control

Quick Solutions to Questions related to Adaptive Brightness Control Meter:

  • What is the main objective of this project?
    The objective is to illustrate a technique of implementing adaptive brightness control to Smart TrH Display and seven segment LED displays.
  • How does the system assess ambient light conditions?
    The system uses an inexpensive light-dependent resistor (LDR) connected in series with a 10K resistor to create a voltage dividing network.
  • Which microcontroller is used in this project?
    The project uses the PIC12F683, which is a low-pin-count device from the 8-bit PIC microcontroller family.
  • Can the MAX7219 chip drive more than eight digits?
    No, the MAX7219 chip drives up to 8 digits in this setup.
  • How many I/O pins does the PIC12F683 use to drive the MAX7219?
    The GP0, GP1, and GP2 I/O pins are used to drive the LOAD, DIN, and CLK signal lines.
  • Does the MAX7219 offer digital brightness control?
    Yes, the device provides digital control of display brightness with 16 steps from minimum to maximum.
  • What sensors measure the ambient temperature and relative humidity?
    The DHT11 sensor measures the ambient temperature and relative humidity.
  • Why is auto-adjusting brightness beneficial?
    It enhances readability in all ambient lighting conditions by dimming in dark environments and brightening when light levels increase.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter