With the development of the society, solar this energy will be hopeful to replace part of conventional energy, supply the use of people. Small granary of solar power, solar energy as energy, clean and safe, not only can save resources, through the role of the controller, to achieve the purpose of control indoor temperature. The solar energy application prospect of this new energy is very considerable. And solar battery life is long, as long as the existence of the sunlight, the solar cell can use for a long time, compared with the traditional energy, solar energy does not pollute the environment, so the solar energy power supply has a broad prospect. Is some of the features of solar energy, which is a lot of traditional energy sources can't compare with, if people are able to widely use of solar energy, has the vital significance for the development of the country. In order to achieve this goal, small granary solar power supply system design of this topic will be the widely application of solar power, have the function of the ground, for energy and the sustainable development of the country is also very important. In the power supply system components, mainly composed of solar panels, battery and inverter and the load. The system block diagram as shown in figure 2 - 1. Solar arrays to receive the sun's light energy into electrical energy, part of the supply load is used, a portion of the storage battery, when indoor temperature higher than the set temperature, the controller will control the inverter's open, the low voltage dc into 220 v alternating current (ac), for the use of the motor, in order to achieve the purpose of reduce indoor temperature. Overall structure, solar energy power supply system, the controller is the core of the whole design, the controller for solar power generation system in the operation and environmental conditions for testing. Including the solar energy battery components voltage temperature, charge and discharge current and battery voltage, etc. , and finally completed controller with control and protection functions. The structure of the controller as shown in figure 3 - 1. Single chip microcomputer minimum system of single chip microcomputer minimum system includes a crystal vibration circuit and a reset circuit, as shown in figure 3 - 2. AT89C51( $3. 7500). Microcontroller chips include: 1. An 8-bit 80 c51 microprocessor; 2. Used to store can read and write data memory RAM/SFR, 256 bytes in size. 3. 4 KB FlashROM programming some initial data storage; 4. Four 8-bit parallel I/O port P0 ~ P3, these ports can be used to input already, also can be used to output; 5. Two 16 bit timer/counter, each timer/counter of external events can be set up to calculate by the method of counting, can also set up the regular way to realize computer control; 6. By the five interrupt source, interrupt control system consisting of two interrupt priority; 7. Micro controller or single chip microcomputer and PC serial connectivity role; 8. Oscillator and the clock generating circuit; 9. 89 c51 has power-saving mode, namely, leisure and electric model. In the design of the temperature sensor module DS18B20 ( $2. 0074). The temperature sensor. DS18B20( $2. 0074). The SCM receives an I/O port, because single bus is drain open, so I need an external 4. 7 k pull-up resistance, the use of parasitic way of working, VDD parallel with single power supply pin. Sensors as shown in figure 3 - 3. DS18B20( $2. 0074). The internal structure of: a 64 - bit ROM temperature sensor alarm trigger TH and TL configuration register. DS18B20( $2. 0074). Pin: VDD external input parasitic grounded power supply, power supply wiring; DQ for digital signal input and output; GND for power supply. The temperature sensor DS18B20 ( $2. 0074). P1 with MCU. 5 connection, is mainly used for indoor temperature measurement.