ThermometerV2.0 is coming to replace in hardware and software V1.0.
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 (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.
1)Fast mode (press the button, light on, 2 seconds delay, light off)
2)Light switched off
3)Light switched on
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 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 Atmega8.
Note. A 16Mhz crystal has been used instead of 8Mhz shown on the schematic in order to read DHT data easier.
Above are the peripherals used. From left to right,
- The Bluetooth module, 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 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 on the design makes it easy to update the software and debug on board.
- For inside temperature sensing has been used the LM35.
- A button 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 for optional module installation or for serial connection to PC.
The PCB Board:
From Design to reality
The back side of the PCB and all the parts nedded for this project.
While testing the Hardware and the Software on breadboard proto.
The final device view.
Sending sensor readings over Bluetooth.
The source code can be found here: