英飞凌psoc62是一款cortex-m0+与cortex-m4的双内核mcu,其有着非常优秀的超低功耗性能。
温度计的器材英飞凌psoc62开发板 这是一款英飞凌与rt-thread联合制作的一款开发板。瑞萨的hs3003温湿度传感器电子墨水屏选型原因以上三款都具休有超过功耗性能
程序代码本次的代码是基于rt-thread studio创建的。电子墨水屏是移植微雪的标准例程。这里不过多介绍。hs3003是利用rtt软件包的模块创建。低耗实现的代码,mcu利用cortex-m0+的标准进入深度睡眠模式。然后用rtc的alarm中断来唤醒。设置的唤醒程序如下:void set_rtc_alarm_date_time(void){ cy_rslt_t result; /* print the rtc alarm time by uart */ //log_d(rtc alarm will be generated after 10 seconds); /* set the rtc alarm for the specified number of seconds in the future by editing the macro(use_seconds_for_alarm) */ result = cyhal_rtc_set_alarm_by_seconds(&rtc_obj, use_seconds_for_alarm); if (result != cy_rslt_success) { rt_kprintf(rtc alarm err ); }}5、主程序代码:
int main(void){ cy_rslt_t result; float temp, humi; uint8_t show_str[20] = {0}; epd_gpio_init(); //epd gpio initialization //cy_sysdisablecm4(); __enable_irq(); rt_pin_mode(led_pin, pin_mode_output); // rt_thread_mdelay(500); paint_newimage(blackimage, 128, 296, 270, white); //set screen size and display orientation paint_selectimage(blackimage);//set the virtual canvas data storage location paint_newimage(blackimage, epd_width, epd_height, 270, white); //set screen size and display orientation paint_selectimage(blackimage);//set the virtual canvas data storage location epd_deepsleep(); /* initialize rtc */ cyhal_rtc_enable_event(&rtc_obj, cyhal_rtc_alarm, rtc_interrupt_priority, true); set_rtc_alarm_date_time(); for (;;) { // cyhal_system_delay_ms(long_glitch_delay_ms); /* set mypin_0_num to analog hi-z for low power using hal apis. */// /* go to deep sleep */ cyhal_syspm_deepsleep(); set_rtc_alarm_date_time(); // rt_kprintf(wack from sleep!); hs300x_read_data(&temp_humi_dev, &humi, &temp); epd_hw_init(); //electronic paper initialization epd_hw_init_gui(); //epd init gui paint_clear(white); sprintf(show_str,温度%02d.%02d℃,(int)temp, (int)(temp*100)%100); paint_drawstring_cn(40,0,show_str, &font24cn, white, black); sprintf(show_str,湿度%02d.%02d%%,(int)humi, (int)(humi*100)%100); paint_drawstring_cn(40,40,show_str, &font24cn, white, black); epd_display(blackimage); //display image epd_deepsleep();//epd_deepsleep,sleep instruction is necessary, please do not delete!!! }}实验的效果
经调试休眠模式下,整体的待机电流低到450ua:
工作电流为19ma:
总结目前待机电流基本上达到电池供电的效果,后期再加上nb-iot的数据传输模式。
央视财经CCTV2报道:普渡机器人在呷哺呷哺!
AM57XX IPC DEMO编译及使用
半导体电子产业 经济学思维连载之九:权利是人赋而非天赋
使用逻辑分析仪调试时序问题
三大运营商将于今年11月30日之前在全国范围内提供携号转网服务
英飞凌PSoC62 实现超低功耗温湿度计
在争夺人工智能时代制高点,谁能成为AI芯片赢家
光缆是什么?光缆有哪些常用类型?光缆型号是什么意思?
浅谈风光储风能并网
常见电光源分类
MAX7401, MAX7405 八阶、低通、贝塞尔、开关电
光伏发电系统简介—MPPT技术
咖啡机上的显示问题
IR推出IR3846 SupIRBuck 35A集成式稳压器
计算机辅助频域仿真分析
奥拓电子XR虚拟影棚在北美启动
如何用Python搭建区块链
氢原子存储技术:实现了0与1的数据存储,存储密度提升超过700倍
SPI通讯过程
郭台铭:“不会是卢松青,也不是戴正吴”