在好例子网,分享、交流、成长!
您当前所在位置:首页C/C++ 开发实例嵌入式开发 → 自制环境监测手表——”E-watch“

自制环境监测手表——”E-watch“

嵌入式开发

下载此实例
  • 开发语言:C/C++
  • 实例大小:25.39M
  • 下载次数:12
  • 浏览次数:130
  • 发布时间:2022-04-09
  • 实例类别:嵌入式开发
  • 发 布 人:NaturalNC
  • 文件格式:.rar
  • 所需积分:6

实例介绍

【实例简介】自制环境监测手表——”E-watch“

# Nwatch-Stm32f103

本文参考:

[WatchX-Nwatch-stm32](https://github.com/Soysauce007/WatchX-Nwatch-stm32)

[自制环境监测手表——”E-watch“,亲身开发才知道一个产品要做好有多难,怪不得科技产品卖那么贵](https:www.bilibili.com/video/BV1XJ411M7yT/?spm_id_from=333.788.videocard.0)

[自制基于stc8单片机的oled屏手表](https:www.bilibili.com/video/BV1eE411j76K/?spm_id_from=333.788.videocard.0)

# 硬件介绍

主控:stm32f103c8t6

屏幕:1.3寸oled屏 ssd1306

实时时钟:PCF8563 

锂电池充电芯片:XT4054 



# 设计缺陷

- 由于当时想将蓝牙与这个结合在一起,所以预留usart1给蓝牙模块了,所以没有设计TTL转串口芯片,需要st-link或者j-link下载程序(但是!我的蓝牙芯片烧了,肉痛!)

- 没设计电源按键和硬件复位,如果程序死机,要么选择程序刷固件,要么等待电池狗带,或者取下电源线。

- 程序下载时,保证单片机正常供电,我使用的st-link不供电。

- 板子设计的时候没有考虑外接的mpu6050和pw02的高度,所以存在结构缺陷。

- 时钟芯片的封装大了一号,但是也能焊上去。(懒得换了)

- 为了考虑手工焊接,大部分元器件使用的都是0805封装,所以相对紧凑一点。(其中包含了两个0603的贴片led)

- 在未焊接好按键的时候测试程序的时候,建议注释掉以下两句:(不然就只能用按键在亮屏时刻烧写固件,因为停机模式所以时钟停止工作!)

  ```
       WWDG_Init(0x7F,0X5F,WWDG_Prescaler_8);//窗口卡门狗,  算是弥补上文未设置硬件复位和电源键的缺陷吧     
       pwrmgr_update();  //  内部开启了停机模式
  ```

  

- 蜂鸣器带有一丝杂音,硬件缺陷啊。抄的板子,不会改,但是在开启停机模式后可弥补。

- usb插入无法检测

- 音量调节无法实现 本以为pwm可以实现该功能,但是还是太年轻,预留的PA1死活开启不了,只能折中开启一个定时器模拟pwm,但是问题是很占用资源。

- 时钟不太准,建议自己调节PCF8563 的旁路电容,我设计的不是很合理。

- 电量检测不准确

- 蜂鸣器的焊盘有点小了,但是能怼上去

# 源码及其PCB展示

![原理图](https://upload-images.jianshu.io/upload_images/7994561-1402356f23bdb024.png?imageMogr2/auto-orient/strip|imageView2/2/w/1194/format/webp)



![主控PCB](https://upload-images.jianshu.io/upload_images/7994561-955556b7e0086f82.png?imageMogr2/auto-orient/strip|imageView2/2/w/989/format/webp)

![源码](https://upload-images.jianshu.io/upload_images/7994561-cccff528bd0663fc.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp)

![焊接好的硬件](https://upload-images.jianshu.io/upload_images/7994561-2ca558370dc05215.jpg?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp)

![测试效果](https://upload-images.jianshu.io/upload_images/7994561-c03f7c26aca4a77d.jpg?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp)



# 购买记录

![元器件购买记录](https://upload-images.jianshu.io/upload_images/7994561-7daabe04a1ad2dca.jpg?imageMogr2/auto-orient/strip|imageView2/2/w/1080)

以上是购买元器件记录,我本身自己有两块stm32f103c8t6,所以并未记录于其内部。

另外请忽略我购买的几个络铁头!



因为还有很多设计缺陷,感觉入不了大佬们的法眼。也没啥意思去得瑟,既然你看到了这里,那么我就将它赠与有缘人,喜欢玩的就拿去玩吧。当然如果你们有其它更好的想法,请务必在下方留言,让我瞻仰一波。



能力实在有限,希望各位大佬批评指正!!!



下载链接:

github:   https://github.com/Soysauce007/Nwatch-Stm32f103.git

百度云:链接:https://pan.baidu.com/s/1QRo6dB6eNtfuYiOQnF_FOA 
               提取码:y2z9





【实例截图】

from clipboard

【核心代码】
.
├── LICENSE
├── PCB
│   ├── Mid.PcbDoc
│   ├── Mid.SchDoc
│   ├── Nwatch.PcbDoc
│   ├── Nwatch.SchDoc
│   ├── Top.PcbDoc
│   ├── __Previews
│   │   ├── Mid.SchDocPreview
│   │   └── Nwatch.SchDocPreview
│   └── 打样
│       ├── STM32_Nwatch.zip
│       ├── test.zip
│       └── 直接上传嘉立创打样,test需要自己切割一下.txt
├── README.md
├── WatchX-Nwatch stm32f1
│   ├── CORE
│   │   ├── core_cm3.c
│   │   ├── core_cm3.h
│   │   ├── startup_stm32f10x_hd.s
│   │   └── startup_stm32f10x_md.s
│   ├── HARDWARE
│   │   ├── ADC
│   │   │   ├── ADC.c
│   │   │   └── ADC.h
│   │   ├── BEEP
│   │   │   ├── beep.c
│   │   │   └── beep.h
│   │   ├── IIC
│   │   │   ├── iic.c
│   │   │   ├── iic.h
│   │   │   ├── pcf8563_cfg.c
│   │   │   └── pcf8563_cfg.h
│   │   ├── KEY
│   │   │   ├── key.c
│   │   │   └── key.h
│   │   ├── LED
│   │   │   ├── led.c
│   │   │   └── led.h
│   │   ├── OLED
│   │   │   ├── bmp.h
│   │   │   ├── oled.c
│   │   │   ├── oled.h
│   │   │   └── oledfont.h
│   │   ├── RTC
│   │   │   ├── rtc.c
│   │   │   └── rtc.h
│   │   ├── STMFLASH
│   │   │   ├── stmflash.c
│   │   │   └── stmflash.h
│   │   └── WWDG
│   │       ├── wwdg.c
│   │       └── wwdg.h
│   ├── OBJ
│   │   ├── Nwatch.axf
│   │   ├── Nwatch.build_log.htm
│   │   ├── Nwatch.hex
│   │   ├── Nwatch.htm
│   │   ├── Nwatch.lnp
│   │   ├── Nwatch.sct
│   │   ├── Nwatch_Nwatch.dep
│   │   ├── adc.crf
│   │   ├── adc.d
│   │   ├── adc.o
│   │   ├── alarm.crf
│   │   ├── alarm.d
│   │   ├── alarm.o
│   │   ├── alarms.crf
│   │   ├── alarms.d
│   │   ├── alarms.o
│   │   ├── animation.crf
│   │   ├── animation.d
│   │   ├── animation.o
│   │   ├── appconfig.crf
│   │   ├── appconfig.d
│   │   ├── appconfig.o
│   │   ├── battery.crf
│   │   ├── battery.d
│   │   ├── battery.o
│   │   ├── beep.crf
│   │   ├── beep.d
│   │   ├── beep.o
│   │   ├── buttons.crf
│   │   ├── buttons.d
│   │   ├── buttons.o
│   │   ├── core_cm3.crf
│   │   ├── core_cm3.d
│   │   ├── core_cm3.o
│   │   ├── delay.crf
│   │   ├── delay.d
│   │   ├── delay.o
│   │   ├── diag.crf
│   │   ├── diag.d
│   │   ├── diag.o
│   │   ├── display.crf
│   │   ├── display.d
│   │   ├── display.o
│   │   ├── draw.crf
│   │   ├── draw.d
│   │   ├── draw.o
│   │   ├── game1.crf
│   │   ├── game1.d
│   │   ├── game1.o
│   │   ├── game2.crf
│   │   ├── game2.d
│   │   ├── game2.o
│   │   ├── game3.crf
│   │   ├── game3.d
│   │   ├── game3.o
│   │   ├── games.crf
│   │   ├── games.d
│   │   ├── games.o
│   │   ├── global.crf
│   │   ├── global.d
│   │   ├── global.o
│   │   ├── iic.crf
│   │   ├── iic.d
│   │   ├── iic.o
│   │   ├── key.crf
│   │   ├── key.d
│   │   ├── key.o
│   │   ├── led.crf
│   │   ├── led.d
│   │   ├── led.o
│   │   ├── m_display.crf
│   │   ├── m_display.d
│   │   ├── m_display.o
│   │   ├── m_main.crf
│   │   ├── m_main.d
│   │   ├── m_main.o
│   │   ├── m_rtc.crf
│   │   ├── m_rtc.d
│   │   ├── m_rtc.o
│   │   ├── main.crf
│   │   ├── main.d
│   │   ├── main.o
│   │   ├── menu.crf
│   │   ├── menu.d
│   │   ├── menu.o
│   │   ├── millis.crf
│   │   ├── millis.d
│   │   ├── millis.o
│   │   ├── misc.crf
│   │   ├── misc.d
│   │   ├── misc.o
│   │   ├── normal.crf
│   │   ├── normal.d
│   │   ├── normal.o
│   │   ├── oled.crf
│   │   ├── oled.d
│   │   ├── oled.o
│   │   ├── pcf8563_cfg.crf
│   │   ├── pcf8563_cfg.d
│   │   ├── pcf8563_cfg.o
│   │   ├── pwrmgr.crf
│   │   ├── pwrmgr.d
│   │   ├── pwrmgr.o
│   │   ├── resources.crf
│   │   ├── resources.d
│   │   ├── resources.o
│   │   ├── rtc.crf
│   │   ├── rtc.d
│   │   ├── rtc.o
│   │   ├── settings.crf
│   │   ├── settings.d
│   │   ├── settings.o
│   │   ├── sleep.crf
│   │   ├── sleep.d
│   │   ├── sleep.o
│   │   ├── sound.crf
│   │   ├── sound.d
│   │   ├── sound.o
│   │   ├── startup_stm32f10x_hd.d
│   │   ├── startup_stm32f10x_hd.o
│   │   ├── startup_stm32f10x_md.d
│   │   ├── startup_stm32f10x_md.o
│   │   ├── stm32f10x_adc.crf
│   │   ├── stm32f10x_adc.d
│   │   ├── stm32f10x_adc.o
│   │   ├── stm32f10x_bkp.crf
│   │   ├── stm32f10x_bkp.d
│   │   ├── stm32f10x_bkp.o
│   │   ├── stm32f10x_can.crf
│   │   ├── stm32f10x_can.d
│   │   ├── stm32f10x_can.o
│   │   ├── stm32f10x_cec.crf
│   │   ├── stm32f10x_cec.d
│   │   ├── stm32f10x_cec.o
│   │   ├── stm32f10x_crc.crf
│   │   ├── stm32f10x_crc.d
│   │   ├── stm32f10x_crc.o
│   │   ├── stm32f10x_dac.crf
│   │   ├── stm32f10x_dac.d
│   │   ├── stm32f10x_dac.o
│   │   ├── stm32f10x_dbgmcu.crf
│   │   ├── stm32f10x_dbgmcu.d
│   │   ├── stm32f10x_dbgmcu.o
│   │   ├── stm32f10x_dma.crf
│   │   ├── stm32f10x_dma.d
│   │   ├── stm32f10x_dma.o
│   │   ├── stm32f10x_exti.crf
│   │   ├── stm32f10x_exti.d
│   │   ├── stm32f10x_exti.o
│   │   ├── stm32f10x_flash.crf
│   │   ├── stm32f10x_flash.d
│   │   ├── stm32f10x_flash.o
│   │   ├── stm32f10x_fsmc.crf
│   │   ├── stm32f10x_fsmc.d
│   │   ├── stm32f10x_fsmc.o
│   │   ├── stm32f10x_gpio.crf
│   │   ├── stm32f10x_gpio.d
│   │   ├── stm32f10x_gpio.o
│   │   ├── stm32f10x_i2c.crf
│   │   ├── stm32f10x_i2c.d
│   │   ├── stm32f10x_i2c.o
│   │   ├── stm32f10x_it.crf
│   │   ├── stm32f10x_it.d
│   │   ├── stm32f10x_it.o
│   │   ├── stm32f10x_iwdg.crf
│   │   ├── stm32f10x_iwdg.d
│   │   ├── stm32f10x_iwdg.o
│   │   ├── stm32f10x_pwr.crf
│   │   ├── stm32f10x_pwr.d
│   │   ├── stm32f10x_pwr.o
│   │   ├── stm32f10x_rcc.crf
│   │   ├── stm32f10x_rcc.d
│   │   ├── stm32f10x_rcc.o
│   │   ├── stm32f10x_rtc.crf
│   │   ├── stm32f10x_rtc.d
│   │   ├── stm32f10x_rtc.o
│   │   ├── stm32f10x_sdio.crf
│   │   ├── stm32f10x_sdio.d
│   │   ├── stm32f10x_sdio.o
│   │   ├── stm32f10x_spi.crf
│   │   ├── stm32f10x_spi.d
│   │   ├── stm32f10x_spi.o
│   │   ├── stm32f10x_tim.crf
│   │   ├── stm32f10x_tim.d
│   │   ├── stm32f10x_tim.o
│   │   ├── stm32f10x_usart.crf
│   │   ├── stm32f10x_usart.d
│   │   ├── stm32f10x_usart.o
│   │   ├── stm32f10x_wwdg.crf
│   │   ├── stm32f10x_wwdg.d
│   │   ├── stm32f10x_wwdg.o
│   │   ├── stmflash.crf
│   │   ├── stmflash.d
│   │   ├── stmflash.o
│   │   ├── stopwatch.crf
│   │   ├── stopwatch.d
│   │   ├── stopwatch.o
│   │   ├── sys.crf
│   │   ├── sys.d
│   │   ├── sys.o
│   │   ├── system_stm32f10x.crf
│   │   ├── system_stm32f10x.d
│   │   ├── system_stm32f10x.o
│   │   ├── time.crf
│   │   ├── time.d
│   │   ├── time.o
│   │   ├── timedate.crf
│   │   ├── timedate.d
│   │   ├── timedate.o
│   │   ├── torch.crf
│   │   ├── torch.d
│   │   ├── torch.o
│   │   ├── tune.crf
│   │   ├── tune.d
│   │   ├── tune.o
│   │   ├── tunemaker.crf
│   │   ├── tunemaker.d
│   │   ├── tunemaker.o
│   │   ├── tunes.crf
│   │   ├── tunes.d
│   │   ├── tunes.o
│   │   ├── ui.crf
│   │   ├── ui.d
│   │   ├── ui.o
│   │   ├── usart.crf
│   │   ├── usart.d
│   │   ├── usart.o
│   │   ├── watchface.crf
│   │   ├── watchface.d
│   │   ├── watchface.o
│   │   ├── wwdg.crf
│   │   ├── wwdg.d
│   │   └── wwdg.o
│   ├── STM32F10x_FWLib
│   │   ├── inc
│   │   │   ├── misc.h
│   │   │   ├── stm32f10x_adc.h
│   │   │   ├── stm32f10x_bkp.h
│   │   │   ├── stm32f10x_can.h
│   │   │   ├── stm32f10x_cec.h
│   │   │   ├── stm32f10x_crc.h
│   │   │   ├── stm32f10x_dac.h
│   │   │   ├── stm32f10x_dbgmcu.h
│   │   │   ├── stm32f10x_dma.h
│   │   │   ├── stm32f10x_exti.h
│   │   │   ├── stm32f10x_flash.h
│   │   │   ├── stm32f10x_fsmc.h
│   │   │   ├── stm32f10x_gpio.h
│   │   │   ├── stm32f10x_i2c.h
│   │   │   ├── stm32f10x_iwdg.h
│   │   │   ├── stm32f10x_pwr.h
│   │   │   ├── stm32f10x_rcc.h
│   │   │   ├── stm32f10x_rtc.h
│   │   │   ├── stm32f10x_sdio.h
│   │   │   ├── stm32f10x_spi.h
│   │   │   ├── stm32f10x_tim.h
│   │   │   ├── stm32f10x_usart.h
│   │   │   └── stm32f10x_wwdg.h
│   │   └── src
│   │       ├── misc.c
│   │       ├── stm32f10x_adc.c
│   │       ├── stm32f10x_bkp.c
│   │       ├── stm32f10x_can.c
│   │       ├── stm32f10x_cec.c
│   │       ├── stm32f10x_crc.c
│   │       ├── stm32f10x_dac.c
│   │       ├── stm32f10x_dbgmcu.c
│   │       ├── stm32f10x_dma.c
│   │       ├── stm32f10x_exti.c
│   │       ├── stm32f10x_flash.c
│   │       ├── stm32f10x_fsmc.c
│   │       ├── stm32f10x_gpio.c
│   │       ├── stm32f10x_i2c.c
│   │       ├── stm32f10x_iwdg.c
│   │       ├── stm32f10x_pwr.c
│   │       ├── stm32f10x_rcc.c
│   │       ├── stm32f10x_rtc.c
│   │       ├── stm32f10x_sdio.c
│   │       ├── stm32f10x_spi.c
│   │       ├── stm32f10x_tim.c
│   │       ├── stm32f10x_usart.c
│   │       └── stm32f10x_wwdg.c
│   ├── SYSTEM
│   │   ├── delay
│   │   │   ├── delay.c
│   │   │   └── delay.h
│   │   ├── sys
│   │   │   ├── sys.c
│   │   │   └── sys.h
│   │   └── usart
│   │       ├── usart.c
│   │       └── usart.h
│   ├── USER
│   │   ├── DebugConfig
│   │   │   ├── NWatch_STM32F103C8.dbgconf
│   │   │   └── Nwatch_STM32F103C8_1.0.0.dbgconf
│   │   ├── EventRecorderStub.scvd
│   │   ├── JLinkSettings.ini
│   │   ├── Listings
│   │   │   ├── Nwatch.map
│   │   │   ├── startup_stm32f10x_hd.lst
│   │   │   └── startup_stm32f10x_md.lst
│   │   ├── Nwatch.BAT
│   │   ├── Nwatch.uvguix.Administrator
│   │   ├── Nwatch.uvguix.M6800
│   │   ├── Nwatch.uvguix.Yummy
│   │   ├── Nwatch.uvoptx
│   │   ├── Nwatch.uvprojx
│   │   ├── main.c
│   │   ├── stm32f10x.h
│   │   ├── stm32f10x_conf.h
│   │   ├── stm32f10x_it.c
│   │   ├── stm32f10x_it.h
│   │   ├── system_stm32f10x.c
│   │   └── system_stm32f10x.h
│   ├── Watch
│   │   ├── alarm.c
│   │   ├── alarm.h
│   │   ├── alarms.c
│   │   ├── alarms.h
│   │   ├── animation.c
│   │   ├── animation.h
│   │   ├── appconfig.c
│   │   ├── appconfig.h
│   │   ├── battery.c
│   │   ├── battery.h
│   │   ├── buttons.c
│   │   ├── buttons.h
│   │   ├── common.h
│   │   ├── config.h
│   │   ├── debug.h
│   │   ├── diag.c
│   │   ├── diag.h
│   │   ├── display.c
│   │   ├── display.h
│   │   ├── draw.c
│   │   ├── draw.h
│   │   ├── english.h
│   │   ├── functions.h
│   │   ├── game1.c
│   │   ├── game1.h
│   │   ├── game2.c
│   │   ├── game2.h
│   │   ├── game3.c
│   │   ├── game3.h
│   │   ├── games.c
│   │   ├── games.h
│   │   ├── global.c
│   │   ├── global.h
│   │   ├── lang.h
│   │   ├── m_display.c
│   │   ├── m_display.h
│   │   ├── m_main.c
│   │   ├── m_main.h
│   │   ├── m_rtc.c
│   │   ├── m_rtc.h
│   │   ├── m_rtc_funcs.h
│   │   ├── menu.c
│   │   ├── menu.h
│   │   ├── millis.c
│   │   ├── millis.h
│   │   ├── normal.c
│   │   ├── normal.h
│   │   ├── pwrmgr.c
│   │   ├── pwrmgr.h
│   │   ├── resources.c
│   │   ├── resources.h
│   │   ├── settings.c
│   │   ├── settings.h
│   │   ├── sleep.c
│   │   ├── sleep.h
│   │   ├── sound.c
│   │   ├── sound.h
│   │   ├── stopwatch.c
│   │   ├── stopwatch.h
│   │   ├── time.c
│   │   ├── time.h
│   │   ├── timedate.c
│   │   ├── timedate.h
│   │   ├── torch.c
│   │   ├── torch.h
│   │   ├── tune.c
│   │   ├── tune.h
│   │   ├── tunemaker.c
│   │   ├── tunemaker.h
│   │   ├── tunes.c
│   │   ├── tunes.h
│   │   ├── typedefs.h
│   │   ├── ui.c
│   │   ├── ui.h
│   │   ├── util.h
│   │   ├── watchface.c
│   │   └── watchface.h
│   └── keilkilll.bat
├── debug.log
└── 自制环境监测手表——”E-watch“.rar

27 directories, 423 files


实例下载地址

自制环境监测手表——”E-watch“

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警