Pins 3 through 5 of IC1 are connected with EN, R/W and RS of LCD1 to control the LCD. Pins 25 through 28 of IC1 are connected with D4 through D7 data pins of LCD1. LCD1 shows the time, temperature, pressure and humidity on the screen. Pins 15 and 16 of IC1 are connected with USB connector at D- and D+ as shown in Fig. 2. Switches S1 through S4 are used to set the pressure reference and time. Switch S5 is used to reset the microcontroller.

Working of the weather logger is simple. Once powered on, the LCD shows the real-time values of the temperature, pressure and humidity on the screen. The microcontroller stores the values of temperature, pressure and humidity every 30 minutes up to 35 hours. When this system is connected to PC via USB, all stored values of temperature, pressure and humidity are transferred to the GUI program. This program displays these values in the form of a graph on the PC screen. The ‘time’ is shown on the x-axis, and humidity, pressure and temperature are shown in y-axis as shown in Fig. 1.

Software

The software program for the microcontroller is written in ‘C’ language and compiled in MPLAB with C18 compiler. Add source file as shown in Fig. 3. The program is burnt in the MCU using a suitable PIC programmer.

Steps to run the Visual Studio program in PC (supports only 32-bit windows operating system) are:

1. Download the USB drivers from microchip website for PIC18F2550 microcontroller and install them in PC.
2. Connect the circuit to PC and confirm the connectivity in device manager.
3. Run executable file of Visual Studio application named ‘Weather Logger.’
4. On the left-hand side, real-time values of temperature, pressure and humidity can be seen.

Construction and testing

An actual-size, single-side PCB for the weather logger circuit is shown in Fig. 4 and its component layout in Fig. 5. Assemble the circuit on the recommended PCB to minimise assembly time and errors. Use IC bases for all the ICs. IC3 and IC4 are SMD ICs, so solder these ICs very carefully at the solder side of the PCB.

Fig. 4: An actual-size, single-side PCB for the weather logger
Fig. 5: Component layout for the PCB

Download the PCB and Component Layout PDF: Click Here

Download Source Code: Click Here

To test the circuit for proper functioning, verify 5V power supply at TP1 with respect to TP0. The reset to the system can be checked at TP2.


The author is an M.Tech in VLSI and Embedded Systems from Cochin University of Science and Technologies. He is an electronics hobbyist and amateur radio operator

This article was first published on 13th January 2015.

SHARE YOUR THOUGHTS & COMMENTS

Please enter your comment!
Please enter your name here