当前位置:网站首页>Dayu200 experience officer MPPT photovoltaic power generation project dayu200, hi3861, Huawei cloud iotda
Dayu200 experience officer MPPT photovoltaic power generation project dayu200, hi3861, Huawei cloud iotda
2022-07-07 22:06:00 【51CTO】
One 、 Project introduction
The energy crisis is becoming more and more serious , It is imperative to develop new energy . Photovoltaic power generation is a good choice , However, photoelectric conversion efficiency has always been a major problem perplexing the development of the industry . The project passed MPPT Full name “ Maximum power point tracking ”(Maximum Power Point Tracking) Real time detection of the generation voltage of the solar panel , And track the maximum voltage and current value (VI), Make the system output power at maximum power . Use 300W The photovoltaic solar panel is 4 strand 12V Lithium iron phosphate battery for charging . The basic functions have been realized , Equipment code in the project 、 Application side code 、 Schematic diagrams, etc. will be all open source ,PCB The circuit is still under debugging .
The system is divided into three parts :
Video presentation address : https://ost.51cto.com/show/14366
Application end :
OpenHarmony Application end : Use moisturizing DAYU200 Development board , be based on ArkUI/eTS Development framework , Realize the application end of photovoltaic power generation controller , It can monitor the status of photovoltaic controller equipment in real time . And synchronize the device data to Huawei cloud IotDA, It can realize the state detection and control of Wan equipment .

HarmonyOS Application end : Use HarmonyOS Atomized service capability , Application installation free . Support NFC Touch the distribution network (NAN+SoftAP), The distribution network successfully pulls up the device control page . The equipment control module is the same as OpenHarmony Application end . At the same time, provide service cards , Important device information can be added to the desktop , Easy to view anytime, anywhere .
Device end :
The equipment end is a solar charging and discharging controller , The input terminal is connected to the solar photovoltaic panel , The output terminal is connected to energy storage equipment such as lithium battery . The main control chip adopts Hi3861, The core algorithm adopts MPPT“ Maximum power point tracking ”(Maximum Power Point Tracking), It can significantly improve the power generation efficiency of solar photovoltaic panels . Schematic diagram is as follows :

Cloud :
Cloud access Hua Wei Yun IotDA, Responsible for equipment data collection , Issue commands to the device .

Two 、 Project directory
project gitee Address : https://gitee.com/liangzili/oh-solar-control
3、 ... and 、 Device code
Functions realized by the device :
1.NFC One key distribution network
Obtain the input and output current and voltage of the device .



In the schematic diagram , At the solar input , The lithium battery is terminated with a voltage dividing resistor . Separate access to ADS1115 Of AIN0 and AIN3 Interface .
1.OpenHarmony_Firmware\OH_SolarControl\ADS1X15Migrated under the folder ADS1X15 Arduino End drive code to OpenHarmony. Current detection uses ACS712 modular , Access ADS1115 Of AIN1 and AIN2 Interface ,ADS1115 adopt I2C Module and Hi3861 Communications . The main access codes are as follows :Temperature control
When the system temperature is too high , Automatically shut down the system . Use NTC100K The temperature sensor , because Hi3861 System resources are relatively limited , Therefore, the temperature value is calculated by using the binary look-up table method , The key codes are as follows :
OLED Show
Display the real-time operation status of the system , The relevant code is contained in
1.OpenHarmony_Firmware\OH_SolarControl\ssd1306Under the foldermqtt Access to Huawei cloud
Four 、OpenHarmony Application side code
Interface implementation
Page using ets Compiling , The main codes are as follows :
Http visit
Connecting Huawei cloud IotDA Need to use get、post Request cloud data , Send request configuration code :
Hua Wei Yun API Interface
obtain IAM user Token Interface , This interface can be used through user name and password ma To obtain IAM user Token.
Query device shadow data interface , Query the device shadow information of the specified device by calling this interface , The relevant code is as follows
5、 ... and 、HarmonyOS Application side code
HarmonyOS The application side can be used directly DevEco Studio Self contained OneHop Templates , Need to install DevEco Studio 3.0.0.800 Beta2 for HarmonyOS

I have written this part in my previous article , I won't go into that here , Original link Touch to achieve - Open source basic software community -51CTO.COM
The application side code is divided into two modules ,entry and control,entry The module is responsible for the equipment distribution network ,control The module is responsible for equipment data acquisition and equipment control .
entry Distribution network module
By default, the distribution network in the template uses NAN Distribution network mode , The success rate of distribution network is relatively poor , Can increase SoftAP Distribution network mode , Two modes of distribution network , Increase the success rate of equipment distribution . The first change getWifiInfo() function .
discoverDevice() The function is decomposed into NAN、SoftAP Two ways
There are also two ways to connect devices :
The distribution network function needs to be modified in the same way , Other distribution modes are basically unchanged .
Distribution network in two ways , The success rate of distribution network will increase a lot , This method refers to OpenHarmony-SIG/knowledge Examples of smart home development . This warehouse provides many OpenHarmony Examples of IOT devices , Interested partners , You can study it carefully .
control Control module
New equipment is defined in 3.HarmonyOS_APP/SolarControl/entry/src/main/java/com/zml/solarcontrol/MainAbility.java. When entry When the module is successfully distributed , Will pull up control Module interface and will productName Pass the parameters together .
Add a new device under the control module SOLAR, Resources are contained in 3.HarmonyOS_APP/SolarControl/control/src/main/js/default/common/SOLAR Under the folder , The configuration file is contained in 3.HarmonyOS_APP/SolarControl/control/src/main/resources/rawfile/SOLAR Under the folder .

The configuration process is as follows :
At present, the basic framework of the project has been realized , Some functions are still being improved , We will continue to update the document in the near future .
Want to know more about open source , Please visit :
边栏推荐
- Qt编写物联网管理平台39-报警联动
- How to turn on win11 game mode? How to turn on game mode in win11
- 大数据开源项目,一站式全自动化全生命周期运维管家ChengYing(承影)走向何方?
- 你可曾迷茫?曾经的测试/开发程序员,懵懂的小菜C鸟升级......
- How polardb-x does distributed database hotspot analysis
- Demon daddy B3 read extensively in a small amount, and completed 20000 vocabulary+
- Win11时间怎么显示星期几?Win11怎么显示今天周几?
- operator
- Display optimization when the resolution of easycvr configuration center video recording plan page is adjusted
- The new version of onespin 360 DV has been released, refreshing the experience of FPGA formal verification function
猜你喜欢

It's worth seeing. Interview sites and interview skills

Demon daddy B3 read extensively in a small amount, and completed 20000 vocabulary+
![Jerry's initiation of ear pairing, reconnection, and opening of discoverable and connectable cyclic functions [chapter]](/img/14/1c8a70102c106f4631853ed73c4d82.png)
Jerry's initiation of ear pairing, reconnection, and opening of discoverable and connectable cyclic functions [chapter]

Embedded development: how to choose the right RTOS for the project?

为什么Win11不能显示秒数?Win11时间不显示秒怎么解决?

Ad domain group policy management

Paint basic graphics with custompaint

Ten thousand word summary data storage, three knowledge points

Display optimization when the resolution of easycvr configuration center video recording plan page is adjusted

South China x99 platform chicken blood tutorial
随机推荐
Tcp/ip protocol stack
Demon daddy A1 speech listening initial challenge
NVR hard disk video recorder is connected to easycvr through the national standard gb28181 protocol. What is the reason why the device channel information is not displayed?
DBSync新增对MongoDB、ES的支持
What stocks can a new account holder buy? Is the stock trading account safe
Typescript TS basic knowledge type declaration
NVR硬盘录像机通过国标GB28181协议接入EasyCVR,设备通道信息不显示是什么原因?
Awk processing JSON processing
EasyCVR配置中心录像计划页面调整分辨率时的显示优化
L2:ZK-Rollup的现状,前景和痛点
The new version of onespin 360 DV has been released, refreshing the experience of FPGA formal verification function
Matplotlib drawing interface settings
DNS series (I): why does the updated DNS record not take effect?
Win11时间怎么显示星期几?Win11怎么显示今天周几?
PDF文档签名指南
L2: current situation, prospects and pain points of ZK Rollup
23. Merge K ascending linked lists -c language
Use br to back up tidb cluster data to azure blob storage
Preparing for the interview and sharing experience
How does win11 unblock the keyboard? Method of unlocking keyboard in win11