Design of Sinusoidal Inverter with Light Source Tracking

This project presents the development of a novel sinusoidal inverter integrated with solar light-tracking technology, aimed at enhancing energy conversion efficiency and delivering high-quality sinusoidal AC output. As global energy structures transition and renewable energy sources gain prominence, solar power has become a widely adopted solution. The types of solar inverter available in the market vary from string inverters to microinverters and central inverters, each suited for different scales of application. Our design focuses on a compact, low-cost solution that combines efficient power conversion with automatic light orientation, making it particularly suitable for small-to-medium power devices. Through extensive theoretical analysis, hardware optimization, and software algorithm implementation, we have achieved a system that automatically aligns the solar panel perpendicular to the light source within 2 seconds, outputs a sinusoidal waveform with total harmonic distortion below 5%, and maintains a conversion efficiency exceeding 90%. This paper details the system architecture, hardware circuit design, control strategies, and experimental validation, demonstrating the practical viability of integrating light-tracking with sinusoidal inverters.

Introduction

The rapid advancement of power semiconductor devices and the increasing demand for clean energy have propelled the adoption of photovoltaic systems worldwide. Inverters, as critical interfaces between DC sources and AC loads, play a pivotal role in solar energy utilization. Among the various types of solar inverter, the choice of topology and control strategy directly affects system efficiency, cost, and reliability. Traditional fixed-mounted solar panels suffer from suboptimal energy capture because they cannot maintain perpendicular alignment with the sun throughout the day. To address this limitation, we propose a sinusoidal inverter design that incorporates a two-degree-of-freedom light tracking mechanism. The system employs sinusoidal pulse width modulation (SPWM) to generate a high-quality AC waveform, while a photoresistor-based sensor array and servo motors ensure continuous alignment with the light source. This approach not only improves energy harvesting but also reduces the overall system cost by using readily available components. In this paper, we present the complete design process, including hardware circuits, control algorithms, software flow, and experimental results, to demonstrate the effectiveness of our solution.

System Overview

The overall system architecture comprises two main functional blocks: the sinusoidal inverter section and the light tracking section. The inverter section uses SPWM technology, where the microcontroller unit (MCU) generates control signals that are amplified by a driver circuit to control the H-bridge inverter. The modulated output is then filtered by an LC filter to obtain a pure sine wave. The light tracking section consists of four photoresistors arranged in a quadrant configuration on a two-axis servo gimbal. The MCU reads the voltage dividers through its ADC channels and determines the direction of maximum light intensity. Based on this information, it controls the two servo motors to orient the solar panel perpendicular to the light source. The system supports multiple power inputs: an external 12 V DC supply, a solar panel input, and a 12 V lithium battery, selectable via toggle switches. A 4×4 matrix keypad provides user input, and a 0.96-inch OLED display shows system status. The core controller is an STM32F103C8T6 MCU, chosen for its balance of performance and cost.

The integration of light tracking with a sinusoidal inverter represents an advancement over conventional fixed-panel systems. By continuously optimizing the incident angle, the system maximizes the energy captured from the sun or any artificial light source. This is particularly important for regions with variable solar angles or for portable applications where the light source direction changes frequently. Our design demonstrates that efficient, intelligent power conversion can be achieved without resorting to expensive tracking hardware, making it accessible for a wide range of users.

Hardware Circuit Design

Power Supply and Voltage Regulation

The system is powered by multiple input sources: an external DC 12 V adapter, a solar panel output, and a 12 V lithium battery. Three self-locking switches allow seamless selection between these sources. The LM2596S switching regulator provides a stable output voltage, while the AMS1117 linear regulator further steps down to 5 V and 3.3 V for the MCU and other logic circuits. The power stage is designed to handle up to 12 W of output power, suitable for small appliances and lighting.

H-Bridge Inverter Circuit

The full-bridge inverter consists of four N-channel MOSFETs arranged in an H configuration. The MOSFETs are driven by an IR2110S driver chip, which provides high-side and low-side gate drive with bootstrap capability. This driver can withstand up to 600 V and delivers 2 A gate current, ensuring fast switching and low losses. The inverter operates with a DC bus voltage of 12 V and uses SPWM signals with a carrier frequency of 1 kHz. The switching scheme ensures that no two MOSFETs on the same leg are turned on simultaneously, preventing shoot-through. The output voltage amplitude can be adjusted from 3 V to 12 V (RMS), and the frequency can be set to either 50 Hz or 60 Hz, accommodating different regional standards.

The design parameters for the LC filter are crucial for suppressing the switching harmonics while preserving the fundamental frequency. Given a fundamental frequency of 50 Hz and a carrier frequency of 1 kHz, the filter cutoff frequency is chosen to be around 100 Hz to attenuate the third harmonic (300 Hz) effectively. Using the standard LC filter formula:

$$
C = \frac{1}{2\pi f R} = \frac{1}{2\pi \times 300 \times 50} \approx 10.6\,\mu\text{F}
$$

$$
L = \frac{R}{2\pi f} = \frac{50}{2\pi \times 300} \approx 26.5\,\text{mH}
$$

We select standard values of 10 μF and 27 mH for the capacitor and inductor respectively. This combination provides adequate attenuation of high-frequency components while maintaining good voltage regulation.

Light Sensing Circuit

The light intensity detection circuit uses four photoresistors (LDRs) arranged in a planar quadrant configuration. Each photoresistor is connected in series with a fixed resistor to form a voltage divider. The output voltage is directly proportional to the resistance of the LDR, which decreases with increasing light intensity. The four analog signals are fed to the MCU’s ADC channels. By comparing the voltages from opposite quadrants, the MCU determines the direction from which the light is strongest. The threshold for stopping servo movement is set to a small voltage difference to prevent oscillation. The circuit is simple, low-cost, and reliable, making it ideal for this application.

Driver Circuit

The IR2110S driver is used to interface the MCU’s low-voltage SPWM signals to the high-voltage MOSFET gates. The bootstrap diode and capacitor (typically 10 μF and 1N4148) provide the necessary gate voltage for the high-side MOSFETs. The driver also features under-voltage lockout and overcurrent protection. With only one 10 V to 20 V supply, it can drive all four MOSFETs of the H-bridge, simplifying the circuit and improving reliability. The gate resistors (10 Ω) limit the switching speed to reduce electromagnetic interference.

We also include a mechanical two-degree-of-freedom gimbal consisting of two MG995 metal-gear servo motors. One servo controls the horizontal (azimuth) rotation, and the other controls the vertical (elevation) rotation. The servos are driven by PWM signals from the MCU, with a pulse width range of 0.5 ms to 2.5 ms corresponding to 0° to 180°. The gimbal allows the solar panel to be oriented in any direction within a hemispherical range.

Control Strategy

SPWM Generation

The sinusoidal pulse width modulation (SPWM) scheme is implemented using the symmetric regular sampling method. A high-frequency triangular carrier wave (1 kHz) is compared with a sinusoidal reference wave. The pulse widths are calculated such that the average output voltage over each carrier period follows a sinusoidal envelope. The duty cycle for the k-th pulse is given by:

$$
t_{\text{on}} = \frac{T_c}{2} \left(1 + M \sin\left(\frac{2\pi k}{N}\right)\right)
$$

where \(T_c\) is the carrier period, \(M\) is the modulation index (ratio of reference amplitude to carrier amplitude), and \(N = f_s / f_c\) is the ratio of the signal frequency to the carrier frequency. By varying \(M\) and the signal frequency \(f_s\), we can adjust the output voltage amplitude and frequency. The calculated pulse widths are stored in a sine lookup table in the MCU’s memory. The timer generates interrupts at the carrier frequency to load the next pulse width and update the PWM outputs. This method ensures a high-quality sine wave with low harmonic distortion.

Light Tracking Algorithm

The light tracking algorithm is executed in the main loop. First, the MCU reads the four ADC values from the photoresistor voltage dividers. Since the LDR resistance decreases with increasing light, a lower ADC reading indicates stronger light in that quadrant. The algorithm then compares the readings from opposite quadrants (e.g., left vs. right for horizontal, top vs. bottom for vertical). If the absolute difference exceeds a predefined threshold (typically 0.1 V), the corresponding servo is commanded to rotate in the direction of the smaller ADC reading. This minimizes the difference until it falls below the threshold, at which point the servo stops. The entire process repeats continuously, ensuring that the solar panel remains perpendicular to the dominant light source. The threshold prevents continuous oscillation when the panel is already aligned.

Software Flow

Main Program

The main program initializes the system peripherals: GPIO, timers, ADC, PWM, OLED display, and keypad. After initialization, the user is prompted to set the desired output voltage amplitude (3–12 V) and frequency (50/60 Hz) via the keypad. The MCU then calculates the sine lookup table using the symmetric regular sampling formula. A timer is configured to generate interrupts at the carrier frequency (1 kHz) to update the PWM duty cycles. Meanwhile, a separate timer generates a 50 Hz periodic signal to control the servo positions for light tracking. The main loop continuously reads the ADC values from the light sensors, executes the tracking algorithm, and updates the servo PWM. If a keypad interrupt occurs (e.g., stop, change parameters), the SPWM generation is paused, and the user can modify settings. After parameter update, the sine table is recalculated and the output resumes.

Sine Table Generation

The sine table generation function implements the symmetric regular sampling algorithm. It first calculates the number of samples per sine wave cycle (N = 1000/50 = 20, or for 60 Hz, N ≈ 16.67, but we use 20 for simplicity). For each sample k (0 to N-1), the required on-time is computed as above. The resulting pulse width values are stored in an array. The timer compare registers are then updated in each interrupt according to this array. This table-based approach reduces computational overhead and ensures deterministic timing.

Experimental Results

A prototype of the proposed sinusoidal inverter with light tracking was fabricated on a custom PCB. The complete assembly is shown in the previous figure. We conducted a series of tests to evaluate the system performance under various conditions.

No-Load Test

Under no-load conditions, we set different target RMS voltages and measured the actual output. The results are tabulated below.

Target Amplitude (V) Target RMS (V) Measured RMS (V) Error (%)
3.00 2.12 2.06 -2.99
4.00 2.83 2.79 -1.39
5.00 3.54 3.47 -1.90
6.00 4.24 4.16 -2.00
7.00 4.95 4.94 -0.21
9.00 6.36 6.48 +1.78
10.00 7.07 7.05 -0.31
12.00 8.49 8.47 -0.20

The maximum error is less than ±3%, which satisfies our design specification. The deviation is attributed to tolerances in passive components and non-ideal switching behavior.

Load Test

We loaded the inverter with resistive loads of 10 Ω, 100 Ω, and 1 kΩ to assess voltage regulation. The results are summarized below.

Load Resistance (Ω) Load Voltage RMS (V) Voltage Drop (%)
10 7.93 -7.06
100 8.09 -4.94
1000 8.31 -2.17

The voltage drop increases with lower load resistance, indicating a non-zero output impedance. However, for typical loads above 100 Ω, the regulation remains acceptable. The drop is primarily due to the combined resistance of the MOSFETs, inductor, and PCB traces.

Efficiency Measurement

We measured the input power from the DC supply and the output power delivered to the load for the three load cases. The efficiency η is calculated as (P_out / P_in) × 100%.

Load (Ω) Input Current (mA) Input Power (W) Load RMS Voltage (V) Efficiency (%)
10 816.3 6.663 7.93 94.37
100 85.3 0.728 8.19 92.19
1000 8.72 0.076 8.31 90.82

The efficiency exceeds 90% even at low power levels. At higher power levels, the efficiency improves because the fixed overhead losses become less significant. These results demonstrate that the proposed inverter can compete with commercial types of solar inverter in terms of efficiency while adding the benefit of light tracking.

Harmonic Analysis

We used a spectrum analyzer to measure the total harmonic distortion (THD) of the output waveform at 10 V RMS / 50 Hz. The measured THD was 2.6%, well below the 5% target. The dominant harmonics were the third and fifth, but their amplitudes were small. The clean sine wave confirms the effectiveness of the SPWM modulation and LC filter design.

Light Tracking Performance

The tracking algorithm was tested by moving a bright LED light source in random directions. The servo gimbal consistently oriented the panel toward the light source within approximately 2 seconds. The angular precision was within ±2°, which is adequate for most applications. The system maintained alignment even when the light source moved slowly, demonstrating robust feedback control.

Conclusion

In this project, we have designed and validated a sinusoidal inverter integrated with a light source tracking mechanism. The system successfully combines two essential functions for modern solar energy systems: efficient DC-AC conversion and automatic solar panel orientation. By leveraging the symmetric regular sampling SPWM method, we achieved a high-quality sine wave with THD under 3%. The simple photoresistor-based tracking algorithm ensures that the solar panel always faces the light source, maximizing energy capture. The hardware design is low-cost and reliable, using commonly available components. The prototype achieves a conversion efficiency of over 90% across a range of loads, making it suitable for small-scale applications such as portable devices, lighting, and small appliances. The flexibility to adjust output voltage and frequency further enhances its utility. Future work could explore the integration of this design with grid-tied inverters or battery storage systems, expanding its applicability to residential and commercial settings. Our results confirm that this design is a promising candidate among the various types of solar inverter available today.

Scroll to Top