You are on page 1of 4

EE314 MICROPROCESSORS AND MICROCONTROLLERS LABORATORY

Introduction
In modern times where power management and power saving are given prime importance considering the shortage of resources in the existing scenario. Power monitoring plays an important role in performing energy audit and zeroing into the places where excess power is being consumed. This project aims at providing a system capable of monitoring the power and logging it into the computer or laptop. The power can be sampled at any required duration, and the power measured and the time of sampling is recorded into the laptop in a file.

Fig 1. Block Diagram of the System

MSP430G2553
The microcontroller used is MSP430G2553 from Texas Instruments; it is 16 bit low power mixed signal microcontroller. It has maximum operating frequency of 16Mhz.It has 8kb program memory and 256bytes of RAM. It has 2 16-bit timers, 10-bit, 8 channel ADC and USART peripheral. It consumes very less power and operates at 3.3V power supply.

Analog to Digital Conversion (ADC)


The project uses MSP430G2553, low power microcontroller of Von-Neumann architecture from Texas Instruments. It has inbuilt 10 bit Successive Approximation Register

ADC which is used to sample the voltage and current. The data is reduced to 8-bit and the data is processed by the microcontroller. The ADC provides a resolution of 12.8mV.

Fig 1. Pin-out of MSP430G2553

Universal Asynchronous Receiver Transmitter (UART)


The data sampled using ADC is sent to the laptop using serial communication, USART is used to for this purpose. It is operated in asynchronous mode with data length 8bits, baud rate: 9600, 1 stop bit and no parity. The on-board TTL to USB level shifter TUSB3410 is used to interface the microcontroller with laptop.

Fig2. Block Diagram of MSP430G2553

Storing Information into the Computer


Information is obtained from the Microcontroller MSP 430 using serial communication. The Microcontroller sends blocks of data using UART protocol on request from the terminal device. The terminal device is a computer that has a serial port. The serial port is configured in the terminal side and the baud rate, parity bit, stop bit etc. are set by the terminal. The device is now configured and sends request to the Microcontroller to send the data. The request is accepted by the Microcontroller and the data is sent to the terminal. The information is parsed and the voltage and current values are obtained. The power value which is the product of V*I is calculated by the terminal and the value is stored in a file. A simple C++ program is written and executed to perform the above functions of terminal device in the laptop. The data is stored by using File Handling functions in C++. The screen shots of the C++ application are shown below:

You might also like