Advertisement

Low cost temperature data logger using PIC

Not rated 27,211

#PIC #temperature sensor #data logger #USB-UART #MCP9701 #digital thermometer #PC interface #low cost
Low cost temperature data logger using PIC
Low cost temperature data logger using PIC

Description: This project outlines a simple and cost-effective method for integrating a digital thermometer and data logging capability into a PC. It utilizes a PIC microcontroller to obtain temperature data from the Microchip MCP9701 sensor and transmits this information to a PC via a USB-UART interface. The USB port of the PC also serves to power the device. An open-source Processing programming platform is employed to create a PC application that visually displays the temperature in a graphical window. Additionally, the application logs temperature samples along with date and time stamps in an ASCII file. This project utilizes the Microchip PIC12F1822 microcontroller, which belongs to the enhanced mid-range PIC family and features a total of 8 pins, with a power supply voltage range of 1.8V to 5.5V. The microcontroller includes four 10-bit ADC channels and one Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART) module for serial communication. The MCP9701A temperature sensor, a Low-Power Linear Active Thermistor IC from Microchip Technology, is capable of measuring temperatures from -40 °C to +125 °C. The sensor's output voltage is directly proportional to the measured temperature, calibrated to a slope of 19.53 mV/°C, with a DC offset of 400 mV corresponding to 0 °C. This offset enables the reading of negative temperatures without requiring a negative supply. The sensor's output is connected to an ADC channel of the PIC12F1822 for analog-to-digital conversion. The internal fixed voltage reference (FVR) module is set to produce a stable 2.048 V reference voltage for precise A/D conversion, ensuring accuracy even with unstable supply voltages. The PIC12F1822 microcontroller subsequently serially transmits the 10-bit ADC output to the PC. The circuit diagram for this project is straightforward, with the microcontroller reading the temperature sensor's output through the RA2/AN2 pin and converting it to a 10-bit digital value. The Tx (RA0) and Rx (RA1) pins of the EUSART module are connected to the corresponding pins of the USB-UART module.

The design of this digital thermometer and data logging system is structured around the efficient interaction between the PIC12F1822 microcontroller and the MCP9701A temperature sensor. The MCP9701A's output is fed directly into one of the microcontroller's analog-to-digital converter (ADC) channels, allowing the microcontroller to convert the analog voltage signal into a digital representation. The ADC conversion provides a 10-bit output, which is suitable for precise temperature readings.

The EUSART module within the PIC12F1822 facilitates serial communication with the PC, enabling the transmission of temperature data in real-time. The use of the USB-UART interface simplifies connectivity, allowing for both data transfer and power supply through a single USB connection. This approach reduces the complexity of the system while maintaining functionality.

The Processing application on the PC is designed to receive and interpret the serial data from the microcontroller. It presents the temperature readings in a user-friendly graphical interface, making it accessible for monitoring and analysis. The application also includes features for data logging, which records temperature readings along with timestamps in an ASCII format. This capability is essential for applications requiring historical temperature data analysis.

In terms of power management, the PIC12F1822 microcontroller's operational voltage range of 1.8V to 5.5V allows it to be powered conveniently through the USB connection. The internal fixed voltage reference (FVR) module not only enhances the accuracy of the ADC but also ensures stable performance across varying supply voltages, which is critical for reliable temperature measurement.

Overall, this project exemplifies a practical application of microcontroller technology for environmental monitoring, combining hardware and software elements to create an effective digital thermometer and data logging solution.This project describes an easy and inexpensive way of adding a digital thermometer and data logging feature to a PC. It involves a PIC microcontroller that gets the surrounding temperature information from the Microchip MCP9701 sensor, and sends it to a PC through an USB-UART interface.

The USB port of the PC is also used to power the device. The open-source Processing programming platform is used to develop a PC application that displays the temperature in a graphics window on the computer screen. The PC application also records the temperature samples plus date and time stamps on an ASCII file. This project is based on Microchip`s PIC12F1822 microcontroller from the enhanced mid-range PIC family.

It has got 8-pins in total and the power supply voltage range of 1. 8V to 5. 5V. The microcontroller has four 10-bit ADC channels and one Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART) module for serial communication. The temperature sensor used here is MCP9701A, which is a Low-Power Linear Active Thermistor IC from Microchip Technology.

The range of temperature measurement is from -40 °C to +125 °C. The output voltage of the sensor is directly proportional to the measured temperature and is calibrated to a slope of 19. 53mV/ °C. It has a DC offset of 400mV, which corresponds to 0 °C. The offset allows reading negative temperatures without the need for a negative supply. The output of the sensor is fed to one of the ADC channels of the PIC12F1822 microcontroller for A/D conversion.

The internal fixed voltage reference (FVR) module is configured to generate a stable 2. 048 V reference voltage for A/D conversion. The use of FVR module ensures the accuracy of the A/D conversion even when the supply voltage is not stable. The PIC12F1822 microcontroller then serially transmits the 10-bit ADC output to a PC. The circuit diagram of this project is pretty simple. The microcontroller reads the temperature sensor`s output through RA2/AN2 pin and convert it to a 10-bit digital number.

The Tx (RA0) and Rx (RA1) port of the EUSART module are connected to the corresponding pins of the USB-UART module.

Related Circuits