The design of solar, wind and wind energy complementary street lamp controller based on 51 single chip microcomputer

The design consists of STC89C52 single-chip circuit + solar panel circuit + fan power generation circuit + lithium battery charging protection circuit + boost circuit + voltage regulator circuit + photoresistor circuit + 4 bright LED light circuit + 2 gear toggle switch circuit + power supply The circuit is designed.

1. Hardware solution

The design consists of STC89C52 single-chip circuit + solar panel circuit + fan power generation circuit + lithium battery charging protection circuit + boost circuit + voltage regulator circuit + photoresistor circuit + 4 bright LED light circuit + 2 gear toggle switch circuit + power supply The circuit is designed.

The design of solar, wind and wind energy complementary street lamp controller based on 51 single chip microcomputer

2. Design function

(1) Use fan and solar panel to charge lithium battery, with charging protection circuit and voltage stabilizing circuit.
(2) The lithium battery is boosted to 5V to supply power to the microcontroller and auxiliary circuits.
(3) The street lamp is simulated with 4 bright LED lights.
(4) Use a photosensitive sensor to measure the brightness of the light, and automatically turn on the light when it is lower than the set value.
(5) Street lamp control is divided into manual mode and automatic mode. In manual mode, the lamp can be turned on or off freely. In the automatic mode, the light is automatically controlled by a photoresistor according to the light intensity.

3. Design schematic

(1) The schematic diagram is mainly designed with AD software, as shown in the figure:

The design of solar, wind and wind energy complementary street lamp controller based on 51 single chip microcomputer

(2) The PCB diagram is as follows:

The design of solar, wind and wind energy complementary street lamp controller based on 51 single chip microcomputer

4. Software design

(1) Program flow chart

The design of solar, wind and wind energy complementary street lamp controller based on 51 single chip microcomputer

(2) Main program source code

unsigned long sysslot=0; //Timer count
void Init_Timer0(void); //function declaration
void main (void)
{
Init_Timer0(); //Timer 0 initialization
while (1) //Main loop
{
if(swMode==0) //manual
{
if(ligh==1) //Dark light
{
led=0; //Turn on the light
}
else
{
led=1; //Turn off the light
}
}
else // automatic
{
if(swOnOff==0) //broadcast below
{
led=0; //Turn on the light
}
else
{
led=1; //Turn off the light
}
}
DelayMs(100); //Prevent jitter
}
}

The Links:   LM7310FWLU G121SN01-V001

Related Posts