这个番茄钟,续航长达13天!开源了,新手也能做!The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!


AI free token/AI免费积分

工程名称:FocusTimer低功耗专注时钟

工程作者:vrxiaojie

这,是一个“纯粹”的低功耗专注时钟!

 

它最大的亮点是——低功耗做得非常扎实!是真正能用,且能用很久的时钟。

那,作者是怎么设计的?用了什么方案?

我们一起研究研究!

这个番茄钟,续航长达13天!开源了,新手也能做!

*在那之前,我会先简单介绍一下这个项目的具体功能,文末还会附上开源网址方便大家自行深度学习了解!

功能亮点

支持番茄钟功能,科学学习~

这个番茄钟,续航长达13天!开源了,新手也能做!

支持翻转灭屏、翻转开始计时。当你下定决心学习,只需要翻转一下,即刻开始,节约精力做更重要的事!

能监测环境空气质量:二氧化碳浓度过高,会提醒你该去开窗透气,别焊接了(这个提醒仅是举例,方便理解,不一定真有提醒功能,但各位大佬可以自行加上嘿嘿)

极低功耗:充一次电,连续用番茄钟功能,能续航13天+;仅当时钟用,每分钟刷新一次,续航最高56天。

这个番茄钟,续航长达13天!开源了,新手也能做!

支持音频提示与SD卡音乐播放

关机后,也能保持时间设置

触控交互:AW96103电容触摸实现 3 个触摸按键。

这个番茄钟,续航长达13天!开源了,新手也能做!

蓝牙通信&手机APP数据同步/记录:能查看历史专注记录,能发朋友圈打卡,更能留下你努力过的痕迹!

手机 APP 界面↓

配套 APP 可在下方 GitHub 仓库中下载

这个番茄钟,续航长达13天!开源了,新手也能做!

硬件设计方案

点击图片可放大查看

PCB图

这个番茄钟,续航长达13天!开源了,新手也能做!

硬件参数

主控:ESP32-H2 (96MHz 支持BLE)

采用 2.9 英寸单色全反射屏作为显示媒介,配合 LVGL 9.4.0 UI 框架实现多页面交互。

这个番茄钟,续航长达13天!开源了,新手也能做!

触摸输入:AW96103 电容触摸,3 触摸按键

I2S音频输出:MAX98357,PCM 16-bit 22050 Hz,单声道

RTC:PCF85263A,关机时间保持

这个番茄钟,续航长达13天!开源了,新手也能做!

翻转检测:ICM-42670-P

环境感知:STCC4(CO2)SHT40(温湿度)

电源管理使用:AW32001,控制电池充放电、旁路供电、开关机功能

这个番茄钟,续航长达13天!开源了,新手也能做!

锂电池供电:1200mAh锂电池,电量采集使用ADC,借助1.5M 及 499K 电阻串联分压

充电:USB 5V→AW32001→锂电池

放电:锂电池3.7V→AW32001→3.3V降压→主控及外设

这个番茄钟,续航长达13天!开源了,新手也能做!

内置存储:4MB内置Flash,其中factory 分区 3 MB,audio SPIFFS 256 KB

Micro SD卡:可外接Micro SD卡,用于存储音乐,设备可从SD卡播放音频

一句话总结硬件部分的工作原理就是:

这个番茄钟,续航长达13天!开源了,新手也能做!

该设备以 ESP32-H2 为核心主控,配合 AW32001 电源管理芯片实现极低功耗运行,通过采集 AW96103 电容触摸、IMU 翻转检测及 CO2/温湿度传感器的数据,利用 LVGL 框架驱动 2.9 英寸全反射屏显示与 I2S 音频提示,从而实现科学的专注时间管理。

软件设计方案

很多人基于ESP32做项目,如果不做深度优化,待机或休眠状态下往往还有几毫安的‘暗电流’,几天就把电跑光了。

这个番茄钟,续航长达13天!开源了,新手也能做!

但作者,做到了关机电流最低0.6μA,在不联网状态下工作电流低至<3.3mA,休眠最低<0.8mA……

放在实际体验上就是——1200mAh的电池,充一次电,能撑几十天。

完全没有续航焦虑啊!

这个番茄钟,续航长达13天!开源了,新手也能做!

咳咳,再回归本章主题

而能做到0.6μA,说明AW32001电源管理芯片的power path设计和ESP32-H2的deep sleep配置都到位了。

这需要在软件架构设计上做大量调度优化。

这个番茄钟,续航长达13天!开源了,新手也能做!

下面就进入软件架构部分,看看它如何用 FreeRTOS 把多任务跑起来,同时还能在空闲时自动进入休眠,实现续航与流畅度的平衡。

软件架构

(1)UI框架

这个番茄钟,续航长达13天!开源了,新手也能做!

使用 LVGL + EEZ Studio 绘制 UI,生成代码位于 main/ui/。

(2)RTOS任务

系统基于 FreeRTOS 组织多任务协同,主要包括:

这个番茄钟,续航长达13天!开源了,新手也能做!

刷新屏幕任务:驱动 LVGL 刷新/渲染,完成界面更新

传感器读取任务:周期读取温湿度/CO2、IMU 等外设数据

SD卡读写任务:文件系统挂载、音乐文件读取与资源管理

这个番茄钟,续航长达13天!开源了,新手也能做!

音频播放任务:从存储读取音频并通过 I2S 输出到功放

(3)BLE传输 与手机APP通信

通过 nimBLE 和手机 APP 进行数据交互(配置同步、上报数据)。

这个番茄钟,续航长达13天!开源了,新手也能做!

如果你想复刻这个项目,作者分享了固件烧录教程,跟着烧录即可获得专属于你的时钟↓

固件烧录

(1)第一次烧录

这个番茄钟,续航长达13天!开源了,新手也能做!

在 Releases 页面下载最新版带有full 字样的固件

打开烧录工具,选择芯片型号 ESP32-H2

先选择串口和波特率 1152000,然后选择 focustimer_full_{version}.bin 文件,地址设为 0x0,在该行前面打勾,最后点击 START 按钮开始烧录。

这个番茄钟,续航长达13天!开源了,新手也能做!

插拔一次 USB 数据线以重启设备,烧录完成。

参考图↓

(2)固件更新

这个番茄钟,续航长达13天!开源了,新手也能做!

目前固件更新仅支持 USB 升级。更新步骤与第一次烧录类似,主要区别如下:

在 Releases 页面下载 不带 full 字样 的固件。例如focustimer_{version}.bin

配置烧录地址时,需要改为 0x10000

这个番茄钟,续航长达13天!开源了,新手也能做!

(3)烧录注意事项

请确保设备关闭低功耗模式和自动休眠,使用 USB-A to C 数据线连接 PC 与设备。

烧录full固件会清除nvs中的所有数据,后续烧录请参考"固件更新"小节。

这个番茄钟,续航长达13天!开源了,新手也能做!

这个低功耗专注时钟的DIY成本为105元。

你喜欢这个时钟吗?如果是你,你会怎么设计它?欢迎在评论区唠唠!

如果你想复刻or给作者点赞(非常欢迎大家动动发财小手去原文给作者点个赞支持一下优质开源~~~),就下滑前往开源网址瞅瞅吧!

这个番茄钟,续航长达13天!开源了,新手也能做!

开源网址

https://oshwhub.com/vrxiaojie/project_ziomcvky

如果你也想DIY,不妨去领一下~

这个番茄钟,续航长达13天!开源了,新手也能做!

PCB打板免单券:https://www.jlc.com/newOrder/#/collectCoupons?spm=JLC.MEMBER

3D打样免单券:https://www.jlc-3dp.cn/freePrint

面板打样免单券:https://activity.szlcsc.com/panel_free_sample.html

Project Name: FocusTimer Low-Power Concentration Clock

Author: vrxiaojie

This is a "pure" low-power concentration clock!

Its biggest highlight is the very solid low-power performance! It is a clock that can be used and used for a long time.

So, how did the author design it? What scheme was used?

Let's take a look!

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

*Before that, I will briefly introduce the specific functions of this project, and the open-source URL will be attached at the end of the article for everyone to learn more about it!

Feature Highlights

Supports Pomodoro timer function for scientific learning~

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Supports screen-off by flipping and starts timing by flipping. When you decide to study, just flip it over to start immediately, saving effort for more important things!

Can monitor environmental air quality: when carbon dioxide concentration is too high, it will remind you to open the window to ventilate (this reminder is just an example to help understanding, it doesn't necessarily have a reminder function, but experts can add it hehe).

Extremely low power consumption: A single charge can support the Pomodoro timer function for over 13 days; when used only as a clock with updates every minute, the battery life is up to 56 days.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Supports audio prompts and SD card music playback.

Time settings are retained even after shutdown.

Touch interaction: AW96103 capacitive touch implements 3 touch buttons.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Bluetooth communication & phone APP data synchronization/recording: You can view historical concentration records, post to social media, and leave traces of your efforts!

Phone APP interface ↓

The companion APP can be downloaded from the GitHub repository below.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Hardware Design Scheme

Click on the picture to enlarge and view.

PCB Diagram

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Hardware Parameters

Main chip: ESP32-H2 (96MHz, BLE supported)

Uses a 2.9-inch monochrome full-reflection screen as the display medium, combined with the LVGL 9.4.0 UI framework for multi-page interaction.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Touch input: AW96103 capacitive touch, 3 touch buttons

I2S audio output: MAX98357, PCM 16-bit 22050 Hz, mono

RTC: PCF85263A, retains time after shutdown

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Flip detection: ICM-42670-P

Environmental sensing: STCC4 (CO2), SHT40 (temperature and humidity)

Uses AW32001 for power management, controlling battery charge/discharge, bypass supply, and on/off functions.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Lithium battery power supply: 1200mAh lithium battery, voltage collected via ADC through a 1.5M and 499K resistor divider.

Charging: USB 5V → AW32001 → lithium battery

Discharging: Lithium battery 3.7V → AW32001 → 3.3V step-down → main chip and peripherals

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Built-in storage: 4MB internal Flash, with 3 MB for factory partition and 256 KB for audio SPIFFS.

Micro SD card: Supports external Micro SD card for storing music, allowing the device to play audio from the card.

In short, the hardware works like this:

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

The device is centered around the ESP32-H2 main chip, using the AW32001 power management chip to achieve extremely low power consumption. It collects data from the AW96103 capacitive touch sensor, IMU flip detector, and CO2/temperature-humidity sensors, then uses the LVGL framework to display the results on a 2.9-inch full-reflection screen and provide I2S audio prompts. This creates a system for scientific management of concentration time.

Software Design Scheme

Many ESP32 projects, without deep optimization, tend to have a "dark current" of several milliamps in standby or sleep mode, draining the battery in a few days.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

However, the author achieved a minimum shutdown current of 0.6μA, a working current below 3.3mA when not connected to the network, and a minimum sleep current below 0.8mA...

Practically speaking, a 1200mAh battery lasts for several tens of days on a single charge.

No battery anxiety at all!

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Ahem, back to the topic.

Achieving 0.6μA suggests the AW32001 power path design and the ESP32-H2 deep sleep configuration are well-executed.

This requires significant scheduling optimization in the software architecture.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Let's look at the software architecture and see how FreeRTOS is used to run multiple tasks while automatically entering sleep mode during idle time to balance battery life with performance.

Software Architecture

(1) UI Framework

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Uses LVGL + EEZ Studio to draw the UI, with generated code located in main/ui/.

(2) RTOS Tasks

The system is organized using FreeRTOS to coordinate multiple tasks, including:

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Screen refresh task: Drives LVGL to refresh/render the interface for visual updates.

Sensor reading task: Periodically reads data from temperature/humidity/CO2 sensors and the IMU.

SD card read/write task: Manages file system mounting, music file reading, and resource management.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Audio playback task: Reads audio from storage and outputs it via I2S to the amplifier.

(3) BLE Transmission and Phone APP Communication

Uses nimBLE to interact with the phone APP (for configuration synchronization and data reporting).

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

If you want to replicate this project, the author has shared a firmware flashing tutorial. Follow it to get your own clock ↓

Firmware Flashing

(1) First-time Flashing

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

In the Releases page, download the latest version of the firmware with "full" in the name.

Open the flashing tool and select the chip model ESP32-H2.

Choose the serial port and set the baud rate to 1152000.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Unplug and reconnect the USB cable to restart the device, completing the flashing process.

See the reference image ↓

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Currently, firmware updates only support USB upgrades. The steps are similar to the first-time flashing, with the following differences:

Download the firmware without the "full" label from the Releases page, e.g., focustimer_{version}.bin.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

(3) Flashing Notes

Ensure the device is not in low-power mode or auto-sleep. Use a USB-A to C cable to connect the PC and the device.

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

The DIY cost for this low-power concentration clock is 105 yuan.

Do you like this clock? If it were you, how would you design it? Feel free to share your thoughts in the comments!

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

Open-source URL

https://oshwhub.com/vrxiaojie/project_ziomcvky

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

The tomato clock has a battery life of up to 13 days! It's open-source, so even beginners can make it!

PCB Free Manufacturing Coupon: https://www.jlc.com/newOrder/#/collectCoupons?spm=JLC.MEMBER

3D Prototype Free Coupon: https://www.jlc-3dp.cn/freePrint

暂无评论,快来发表第一条评论吧!No comments yet. Be the first!

📮 需求咨询📮 Inquiry