当前位置:网站首页>Design and manufacture of 51 single chip microcomputer solar charging treasure with low voltage alarm (complete code data)
Design and manufacture of 51 single chip microcomputer solar charging treasure with low voltage alarm (complete code data)
2022-04-23 13:00:00 【Outside Jinguan City】
The device uses solar panels to automatically supply power to lithium batteries from time to time , Simultaneous addition 51 Single chip computer through adc0809 Chip analysis of lithium battery power supply , And can carry out low-voltage alarm , Support two ways 5V1A Simultaneous discharge , Add three buttons , Support menu switching display and other functions . And the module data used in relevant design .
The module used :
STC89C51 Minimum system of single chip microcomputer
1602LCD
ADC0809 Analog to digital conversion chip
DC-DC Boost chip
Solar panels
Lithium battery charge and discharge management module
3.7V The lithium battery (1S)
A physical picture :
Solar charging module :


Boost module :

void Hardware_Init(void)
{
TMOD=0x02; // Set timer T0 Operation mode
TH0=216; // utilize T0 Interrupt generation CLK The signal
TL0=216;
TR0=1; // Start timer T0
ET0=1; // To configure adc0809
STR=0;
OE=0;
EA=1; // General interruption
delayms(50);
LcdInit(); //lcd initialization
for(i=0;i<14;i++)LcdWriteData(welcome[i]);
led_warn(); // Small light alarm
delayms(100);
LcdWriteCom(0x01); // Clear the screen
for(i=0;i<12;i++)LcdWriteData(instruction1[i]);
LcdWriteCom(0x40+0x80);
for(i=0;i<9;i++)LcdWriteData(instruction2[i]);
LED=1;
delayms(100);
}
/******************************************************************************* Function name : key_scan() work can : Key scan function *******************************************************************************/
uint update=0;
void key_scan(void)
{
if(KEY1==0)
{
delayms(5);
if(KEY1==0)
{
while(KEY1==0);
LcdWriteCom(0x01);
for(i=0;i<15;i++)LcdWriteData(I_Disp[i]);
update=1; // Turn on real-time update flag bit , Update in the main function
}
}
if(KEY2==0)
{
delayms(5);
if(KEY2==0)
{
while(KEY2==0);
LcdWriteCom(0x01);
update=0; // Turn off real-time update flag bit
LcdWriteCom(0x80);
for(i=0;i<12;i++)LcdWriteData(instruction1[i]);
LcdWriteCom(0x40+0x80);
for(i=0;i<9;i++)LcdWriteData(instruction2[i]);
}
}
if(KEY3==0)
{
delayms(5);
if(KEY3==0)
{
while(KEY3==0); // Additional tasks can be added
LED=!LED;
}
}
}
/******************************************************************************* Function name : battery_check() work can : Battery detection and alarm function *******************************************************************************/
void battery_check(void)
{
AD(); //adc Data analysis
if(update)
{
LcdDisplay();
delayms(4); // It is suggested to add delay , Otherwise, the two digits after the decimal point change too fast to see clearly
}
if(KEY1&&KEY2&&KEY3) // Due to the key pin and adc Pin time-sharing multiplexing , So when keys use pins , stop it adc Use
{
// otherwise adc The data is not accurate , Will affect the accuracy of the alarm
if(disbuff[0]<=3&&disbuff[1]<=2)led_warn();// Alarm function , Preset 3.2V
}
}
/******************************************************************************* Function name : main() work can : The main function notes It means : In the main function, due to the addition delay , Therefore, the key scanning needs to be pressed for a long time to respond ( Non interrupting key trigger ) *******************************************************************************/
void main(void)
{
Hardware_Init(); // System initialization
while(1)
{
key_scan(); // Key scan
battery_check(); // Voltage detection display 、 Call the police
}
}
This post is original !
Time :2021/01/
I wish good !
版权声明
本文为[Outside Jinguan City]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230613382926.html
边栏推荐
- Go iris framework implements multi service Demo: start (listen to port 8084) service 2 through the interface in service 1 (listen to port 8083)
- There is no need to crack the markdown editing tool typora
- Recovering data with MySQL binlog
- CGC: contractual graph clustering for community detection and tracking
- 7_Addmodule和基因加和法add 得到的细胞类型打分在空间上空转对比
- 4.DRF 权限&访问频率&过滤&排序
- 有趣的IDEA插件推荐,给你的开发工作增添色彩
- leetcode:437. 路径总和 III【dfs 选还是不选?】
- Fashion cloud learning - input attribute summary
- SSL certificate refund instructions
猜你喜欢

Free and open source agricultural Internet of things cloud platform (version: 3.0.1)

STM32 control stepper motor (ULN2003 + 28byj)

Fashion cloud learning - input attribute summary

拥抱机器视觉新蓝海,冀为好望开启数字经济发展新“冀”遇

云原生KubeSphere部署Mysql

31. Next arrangement

Use compressorjs to compress pictures, optimize functions, and compress pictures in all formats

如何实现点击一下物体播放一次动画

Free and open source intelligent charging pile SaaS cloud platform of Internet of things

XinChaCha Trust SSL Organization Validated
随机推荐
R语言中dcast 和 melt的使用 简单易懂
NPDP | how can product managers not be excluded by programmers?
Wonderful review | the sixth issue of "source" - open source economy and industrial investment
Fashion cloud learning - input attribute summary
Object.keys后key值数组乱序的问题
Buuctf Web [gxyctf2019] no dolls
数据库中的日期时间类型
Keyword interpretation and some APIs in RT thread
ZigBee CC2530 minimum system and register configuration (1)
pyqt5 将opencv图片存入内置SQLlite数据库,并查询
Custom nail robot alarm
Start mqbroker CMD failure resolution
JDBC connection pool
BUUCTF WEB [BUUCTF 2018]Online Tool
Jupiter notebook installation
Jiachen chapter Genesis "inner universe" joint Edition
BaseRecyclerViewAdapterHelper 实现下拉刷新和上拉加载
4.DRF 权限&访问频率&过滤&排序
Byte jump 2020 autumn recruitment programming question: quickly find your own ranking according to the job number
4.22学习记录(你一天只做了水题是吗)