Charalampos / Haris Andrianakis, Greece
Introduction
I designed this version in the need of a thermometer for my room, built in a small pack and easy to control. The hardware is designed on a way so that the pcb can be wall mounted. At the top side of the device the PCB extents giving space for two keyhole type holes which are able to keep the device mounted on the wall. The LCD display plugs at the front side of the PCB, covering all the electronic components and giving a compact design view. The user can interact with the device using the left side switch button. The design includes a 6-pin header which gives connectivity for UART (RX,TX,GND) and for the external sensor DHT-11(DHT-22) (VCC,GND,DATA). Also there is an ISP-6 pin header which gives the option of on board programming. Finally there is an optional Bluetooth plug on the back side connected with AVRs UART for possible communication to other devices like mobile phones, home automation devices, pc's or whatever you imagine.
The code is written in C and is well performed in a readable way so anybody can read and modify it. For the LCD driving i have used Peter Fleury's library.
Function Modes
- Display modes: Celsius, Fahrenheit
- Backlight modes: Fast mode (press the button, light on, 2 seconds delay, light off), Light switched off, Light switched on
Hardware description:
The power supply
The power supply is a basic LM7805 power supply using two pair's of decoupling capacitors before and after the regulator. Additionaly can be used the AMS1117 regulator at 3.3V. This regulator is included in the design to give the option of using a Bluetooth module which usually work at 3.3V.
The LCD HD44780 16×2 Char
A 16×2 character LCD HD44780 display is used to display data to user. The only thing that somebody may not understand here is the use of BC547. BC547 is used as a switch to switch on/off LCD's back light or to pulse it using PWM adjusting the back light lightness and giving nice fading options. R3 is used to limit the current flow to transistors base, and R1 is there to pull down base voltage.
Main Brain Atmega8
The main brain of this device is Atmel ATmega8. Note: A 16Mhz crystal has been used in order to read DHT data easier.
Peripherals
- The Bluetooth module IC3 GP-GC021, this module is optional. It is connected to avr's uart so everything in UART can be sent via Bluetooth. For example it can send the sensor reading on a pc, a mobile phone, e web server.
- The DHT-11 sensor (JP3 connector) is used for outside humidity and temperature measurement. It has a 5k pull up resistor to Data pin to pull data bus to VCC and a 100nF decoupling capacitor to filter noise
- Including an ISP header J1 on the design makes it easy to update the software and debug on board.
- For inside temperature sensing has been used the IC5 LM35.
- A button SW1 is used to interact with the user. This button is pulled up with avr's internal pull up resistor and is connected to INT0 interrupt pin.
- Also there is a UART pin header JP1 for optional module installation or for serial connection to PC.
DHT-11 is a temperature & humidity sensor in one package. It utilizes exclusive digital-signal-collecting-technique and humidity sensing technology, assuring its reliability and stability. Its sensing elements is connected with 8-bit single-chip computer. Every sensor of this model is temperature compensated and calibrated in accurate calibration chamber and the calibration-coefficient is saved in type of program in OTP memory, when the sensor is detecting, it will cite coefficient from memory. Small size & low consumption & long transmission distance(20m) enable DHT-11 to be suited in all kinds of harsh application occasions.
Characteristics:
- Low Cost
- Supply voltage 3 to 5V
- Max current 2.5mA (while requesting data)
- 20-80% humidity range with 5% accuracy
- 0-50C temperature range with +-2C
Inside the package looks like this:
More photos:
Inside and Outside Thermometer on AVR micro: PCB
Inside and Outside Thermometer on AVR micro: Eagle PCB project
Inside and Outside Thermometer on AVR micro: PCB with installed components
Inside and Outside Thermometer on AVR micro: PCB with installed Bluetooth module
Downloads
Schematic and PCB (Eagle), firmware – download
Peter Fleury's library for driving LCD – download
GP-GC021 Bluetooth module datasheet – download