## Shaoguang Time-Electronic Voice Time Clock
### Participate in the 2023 LiChuang EDA and Renesas summer training camp
to mainly produce desktop electronic clocks:
```
The desktop electronic clock design based on the R7FA2E1A72DFL chip uses a four-digit 0.56-inch common cathode digital tube to display time, temperature, etc., and uses a DHT11 temperature and humidity sensor to collect ambient temperature and humidity. The reset button, serial port circuit, and SWD download circuit are all brought out for easy download and debugging.
```
Onboard resources:
1. Main control chip: R7FA2E1A72DFL;
2. Power interface: TYPE-C, 2Pin plug-in;
3. LED: one power indicator light, one charging status indicator light;
4. Buttons: one reset button, one BOOT button, and four function buttons;
5. Debug interface: SWD download debug interface, serial port download debug interface, both use 2.54 pin header interface for lead-out;
6. Peripherals: one 0.56-inch common cathode digital tube, one DHT11 temperature and humidity sensor, and one passive buzzer;
### Schematic diagram 1-electronic clock
![833d381862945c4facc243c4668c4cec.png]

### PCB front-electronic clock
![2335b111f32134af01576526c9e4e762.png]

### PCB back - electronic clock
![bcba412ad611198fc9d170df4af6ce21.png]

### 3D rendering effect
with shell
![3ec9505e0cf489bde6617c1d7336ad10.png]

![e0d89b2311f4033d7157630423a09f3a.png]

Without shell
![8b3f0858c4cceec0b9ce79937be081cc.png]

![29e2d6ee63a66f17048caef8ec458337.png]

Color silk screen rendering status
![54e810a2bfcf084a4a37166c1eb94fe4.png]

![4da7d5d4008c68ef703b5eb5d1311b17.png]

### The actual welded image (limited level)
Front
![bef2e5928481da5155dc380a6aed1052.jpg]

Back
![1cb3a84e7f740baa84cd1acb284f86da.jpg]

### Concept design (dig a pit first)
Shaoguang timekeeping:
borrow the image of morning bells and evening drums, combined with voice functions, with beautiful voice timekeeping, presenting the passage of time in the rhythm of seconds.
Display mode: using OLED liquid crystal display, only displaying the seconds of the current time.
Time unit: The clock displays time in seconds to provide a more intuitive time measurement.
Time format: The clock presents time in years and displays the current seconds on the screen. For example, the screen displays "It is XX seconds now", where XX is the current seconds.
Voice function: The clock is equipped with voice function, 1) it will broadcast specific festivals and solar terms. When a specific festival or solar term arrives, the clock will automatically play the corresponding voice prompt. For example, at Christmas or Spring Festival, the clock will play greetings related to the festival. At specific solar terms such as the beginning of spring or winter solstice, the clock will play voice reminders related to the solar term. 2) By actively asking to know the time, the clock will reply to the specific time in a more inquiring way. For example, if you ask for the current time, the clock will reply to the 24-hour time ('13' or '13:01'); if you ask for the current year, the clock will reply to the current year; if you ask for the current date, the clock will play the current date (without replying to the year); if you ask for the current festival, the clock will determine the current nearest festival, for example, if it is the Dragon Boat Festival, reply to the Dragon Boat Festival, and if it is a few days before or after, reply to the Dragon Boat Festival on X days or the Dragon Boat Festival on X days before.
Background theme (original): Provide seasonal background themes, and the background will automatically switch according to the current season. The background image can match the current season to provide users with a richer visual experience.
### Knowledge points involved
| Knowledge points| Requirements|
| --- | --- | |
Screen| Display, touch, DMA2D |
| SRAM, memory management| Initialization, memory allocation|
| File system, SD card| Initialization, read and write|
| System (FREERTOS) | Porting, creating tasks, getting heartbeats|
| C language| Pointers, structures|
| Voice control| | |
Audio control| |
| LVGL porting| |
| ESP01S | |
![ff0723113642ae241d275075ce2f848c.png]

### Main control chip
Renesas ARM-M series 48MHz
Model: R7FA2E1A72DFL#AA0
Product number: C2932201
Price: 6.7 yuan
### Function introduction1
. Use OLED LCD display to display time, background, etc.2
. Use speaker as voice interaction3
. Charge the battery4
. Use Type-C and CH340C to convert serial port to realize serial port download, and simultaneously lead out serial port and SWD debugging5
. Use DHT11 temperature and humidity sensor for temperature collectionX
. Link WIFI-ESP01S (extended content, weather, B station fans display, etc.)
### Learning example link
> Renesas small clockhttps
://oshwhub.com/myself1820/ji-yu-rui-samcu-zhi-zuo-di-ran-qi-bao-jing-qi
> Renesas RA2L1 evaluation board first experience song switching
https://www.bilibili.com/video/BV1ag4y1b7Ra/?spm\_id\_from=333.337.search-card.all.click&vd\_source=5adc7924c8c459513dfb446a690cf8a7
> RT-Thread Summer Camp Renesas RA6M4 based on voice control of smart home appliance system works tutorial
https://www.bilibili.com/video/BV1fY4y1F76L/?spm\_id\_from=333.337.search-card.all.click&vd\_source=5adc7924c8c459513dfb446a690cf8a7
> 【Monica】DIY watch~
https://oshwhub.com/eedadada/monica#P3
> Renesas desktop station based on RT_Thread and lvglhttps
://club.rt-thread.org/ask/article/10890af77c602c29.html
> Steward game console, handheldhttps
://steward-fu.github.io/website/handheld.htm
> Based on Renesas perpetual
calendarhttps://oshwhub.com/legend-tech/super-clock
> Voice recognition smart homehttps
://oshwhub.com/45683968445xy/xy_ra
> [RA] Renesas - Smart watering/control systemhttps
://oshwhub.com/messi2/rui-sa-dan-pian-ji
> esp01s IoT desktop ornamentshttps
://oshwhub.com/ns123/ji-yuesp8266-di-wu-lian-wang-xiao-dian-shi
### Schematic diagram 2 - Shaoguang timekeeping (mainboard drawing in progress)
![19c6018d277bf6d269fb4b98ac1f09d1.png]

### Function demonstration (desktop electronic clock only)