First, let’s start with a video introduction:
This is a simple project. The reason was that a netizen at Station B suggested that he needed a coaster to remind him to drink water like classmate H did, so he made this thing:
This is the internal structure:

The PCB design this time still uses SMD originals as the main method. Considering the size, it is impossible to use off-the-shelf Arduino and other modules. It is better to just build one yourself. The f0 series was selected as the main control because this project does not require high performance, and due to cost considerations, the simpler, the better. All the pins of this f0 chip are used, and the memory is just right. It can be said that no performance is wasted.
The following is a detailed tutorial:
# Component purchase:
Serial voice module (if the link cannot be opened, please search: Shenzhen Baiwei Electronics BY8301-16P):
Speaker for the voice module (if the link cannot be opened, please search: Shenzhen Baiwei Electronics 8 Euro 1W):
Main control chip stm32f030f4p6 : ( Choose one of the following two!!! )
This store is relatively cheap, it is a domestically produced replacement product, and the price/performance ratio is super high!
Or you can also buy this genuine ST product (click on the text to open it):
You can order other originals directly from Lichuang Mall. They are not very expensive and the price difference is not big. I do not recommend TB to buy them.
# Program download
(The following part is for friends who are exposed to stm32 related knowledge for the first time. Veterans please avoid it automatically):
There are many ways to download stm32 series chips. It is recommended to use SWD method to download through ST-LINK:
First of all, you need to prepare a piece of st-link (just search it on Taobao and buy it for about 30 yuan):
ST-LINK link (click me)
Then install the development environment KEIL5MDK and STM32F0 chip package
Then open the code project in the attachment, as shown in the figure. Click the magic wand, debug, switch your downloader (st-link) and then click the compile and download (Build and Download) in the upper left corner of the keil5 interface, and wait for the progress bar to finish.
Summary of pitfalls (feedback from website B users, this list is updated in real time):
1: If you buy a cheap domestic chip, you may encounter an error message: Error: Not a genuine ST Device! You can refer to the following tutorial to change the chip package, or try a few more times, and you may suddenly succeed.
2: Do not short-circuit the speaker output interface on the PCB when the power is on ! Watch out for sparks and lightning along the way! ! !
(The power amplifier chip of this voice module does not have short-circuit protection! A short-circuit when powered on will most likely burn out!)
3: There is no pros and cons for crystal oscillator welding, just make sure the length and width correspond. (Pins 1 and 3 are crystal oscillators, and pins 2 and 4 have no electrical connection, so there is no problem in soldering when rotated 180° on the horizontal plane)
4: Real-time updating (feedback welcome)...
Finally, if you have any production-related questions, please come to Station B and send a private message to Pingyun's nest . We will reply within 24 hours!
Lichuang Open Source Community may not be able to reply to messages in time, sorry for that.