Solar Energy Meter

Wichit Sirichote,

Simple project that turns 8051SBC to be a dedicated instrument for measuring the amount of energy produced by photovoltaic power system.

The 8051SBC is a microprocessor learning board that has eeprom for program saving and later with the SW1 dip switch set to 0, will enable bootloader function. This simple project, the Solar Energy Meter demonstrates the use of such boot loader function. The meter measures amount of AC energy produced by photovoltaic power system. It uses photocoupler attach to electromechanical energy meter to detect the number of revolution. Total AC energy will save everyday in NVRAM. Reading of recorded data can be made via Telnet.

Figure 1: Block diagram of the Solar Energy Meter















Hardware Description

Figure 1 shows the block diagram of the Solar Energy Meter. The PV power system converts solar energy to electrical AC energy. The system is utility AC line backup, so the AC load draws electric current from AC line and solar power concurrently. If the solar power provides less than the amount needed by the load, the rest power will draw from AC line. If solar power is equal to the load, there will no power drawn from AC line.

The electromechanical energy meter measures the power by magnetic flux produced by current and voltage coils. The force produced from induced magnetic flux on the aluminum disk reacts the external magnetizing field making the disk to spin. The higher power drawn, the spinning speed is faster. AC Energy is then measured by accumulating the number of revolution and the total energy is displayed on mechanical counter.

The location of energy meter shown in Fig 1 is at input terminal of the inverter. The input voltage of the inverter is 220Vrms. When sunshine, output AC current which is out of phase to the input voltage by 180 degrees will make the meter spin backward (the power is negative). The spinning speed depends on the amount of sun power strikes on PV array. Spinning is started spin slowly when sunshine in the morning and faster at noon. The resolution of energy meter is 600Rev/kWh. We made a small hole, 2mm on the disk and have photocoupler to detect spinning. We can use any photocoupler module that has NPN output. A typical pin signal for a given photocoupler is shown in Figure 2. You may add 4.7k pull-up resistor to the output pin. Some photocoupler has small LED that blinks when the receiver detects IR from transmitter.

Figure 2: Typical pin signal of photocoupler


Example of installation of the optocoupler. Red wire is +5V, black is GND and white is pulse signal. See the meter spins backward with Quicktime, click here (1535kB).

The pulse produced by photocoupler is negative pulse, thus we can tie it to interrupt0 (P3.2) pin of the 8051 chip directly. When cpu was interrupted, the program counts the number of pulse and computes kWh by dividing with 600. The Tibbo EM100 module converts serial port, RS232 of 8051SBC to 10BaseT. We can use telnet to connect the 8051SBC and read AC energy from remote terminal.

Figure 3: Connect the Solar Energy Meter by Telnet

Connecting by Telnet

Figure 3 shows sample of using Telnet command to connect the Solar Energy Meter. The EM100 module must be set for TCP port 23. You can also use Hyperterminal to connect the meter. Figure 4 shows the sample connecting with TCP/IP. In the properties window, you must set IP address, port 23 for telnet and mode of connection to TCP/IP.

Figure 4: Connect the Solar Energy Meter by Telnet with Hyperterminal using TCP/IP


With command 'R', we can read all recored data and save it with capture text. Figure 5 shows sample of making graph by Excel for 17-30 October 2004.

Figure 5: Sample graphing with Excel for 17-30 October 2004.



Schematic NA


1. Firmware was written by my student, Sarayut luengruengroj.
2. Diagram shown in Figure 1 and 2 were drawn by draw program comes with Pladao Office V1.0

10 January 2005

recovered 17 December 2015