当前位置:网站首页>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\ADS1X15
Migrated 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\ssd1306
Under 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 :
边栏推荐
- [open source] Net ORM accessing Firebird database
- Meta force force meta universe system development fossage model
- Use camunda to do workflow design and reject operations
- How to make agile digital transformation strategy for manufacturing enterprises
- Dry goods sharing | devaxpress v22.1 original help document download collection
- Use json Stringify() to realize deep copy, be careful, there may be a huge hole
- Goal: do not exclude yaml syntax. Try to get started quickly
- Redis - basic use (key, string, list, set, Zset, hash, geo, bitmap, hyperloglog, transaction)
- [200 opencv routines] 223 Polygon fitting for feature extraction (cv.approxpolydp)
- Reptile combat (VII): pictures of the king of reptiles' heroes
猜你喜欢
Crawler (17) - Interview (2) | crawler interview question bank
Use blocconsumer to build responsive components and monitor status at the same time
双塔模型的最强出装,谷歌又开始玩起“老古董”了?
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?
Reptile combat (VII): pictures of the king of reptiles' heroes
解决uni-app中uni.request发送POST请求没有反应。
Google SEO external chain backlinks research tool recommendation
强化学习-学习笔记9 | Multi-Step-TD-Target
PKPM 2020软件安装包下载及安装教程
ByteDance senior engineer interview, easy to get started, fluent
随机推荐
MIT6.S081-Lab9 FS [2021Fall]
The maximum number of meetings you can attend [greedy + priority queue]
npm uninstall和rm直接删除的区别
Oracle advanced (VI) Oracle expdp/impdp details
Why can't win11 display seconds? How to solve the problem that win11 time does not display seconds?
Jerry's power on automatic pairing [chapter]
PKPM 2020软件安装包下载及安装教程
Tcp/ip protocol stack
Reinforcement learning - learning notes 8 | Q-learning
ISO 26262 - considerations other than requirements based testing
Devil daddy B1 hearing the last barrier, break through with all his strength
Tupu digital twin coal mining system to create "hard power" of coal mining
How polardb-x does distributed database hotspot analysis
Jerry's fast pairing does not support canceling pairing [article]
Talk about relational database and serverless
The new version of onespin 360 DV has been released, refreshing the experience of FPGA formal verification function
Ternary expressions, generative expressions, anonymous functions
What is the difference between the three values of null Nan undefined in JS
PDF文档签名指南
Reptile combat (VII): pictures of the king of reptiles' heroes