1. Cause of the incident
I have always wanted to make a desktop clock. Most current designs display the time on a very small display screen, which is very difficult to watch when placed on the desktop.
The open source project provided by Lichuang ( pseudo-glow lamp desktop clock design) is a good choice. At the same time, we have a ready-made microcontroller and clock chip (DS1302), so we modified the original project and achieved the expected results.
Statement: The basis of this project comes from the pseudo-glow lamp desktop clock design of the Lichuang open source project . All design work is based on the original project. Thank you to the original project members for all their work.
Original project link: https://oshwhub.com/OSHWHubkai-yuan-ying-jian/stc15w204s-ni-hui-guang-guan-zhu-kong-v1-0
2. Main control design
The original project used STC15W204S as the control chip, and I used STC15W408AS microcontroller as the main control. The performance and capacity are more than double that of the former. The only reason for choosing this is because I have one in my hand, and there is no other reason. The chip capacity in the original project is almost exhausted, so it is convenient to use STC15W408AS to modify the program.
The original project uses PCF8563T as the clock chip, but most beginners will use DS1302 as the clock chip. The only reason I picked this one up was because I had one, nothing else. The quota is not enough to buy a new chip. It’s not like it can’t be used.
I didn't lay out the PCB for the main control board. I had a universal board in hand, and the components were all plug-in and not very complicated, so I soldered them directly. The effect is as follows:
Forgive me for the damn wiring and fly-wire techniques.
I have a USB to TTL downloader, so I didn’t add a download chip, which saved a lot of money.
I directly soldered the pins for the power supply and serial port, and just connected them to the USB power supply cable during installation.
As for the light panel, we directly copy the original project.
As for the lights, it was too expensive to buy them in a mall, and the quota was indeed a bit insufficient. I searched on a certain website and found one that offered free shipping in small batches. 138 placed
Sure enough, after I came back and finished welding, I found that the store had sold out less. I argued with the customer service and had to file a complaint. I was still reluctant to have it replenished. When I looked at the link, I saw that the product no longer included free shipping.
I am seriously complaining about some junk solder wires that do not melt when applied, and the solder pads fall off when placed too often.
Soldering can indeed cure myopia. After soldering, he was already Emperor Wu of the Han Dynasty. The capacitor package in his hand was wrong. I soldered 0603 on it, but it didn't mean it couldn't be used.
I don’t have an air gun at hand, so it’s really troublesome when I solder the wrong parts. I removed the solder pads, but luckily I can fly the wires.
After welding, it is recommended to find a program to test. These things are strung together and cannot be used until each one is welded properly. I have included the test program in the attachment. The test program comes from the 51hei forum, but the link cannot be found. Thanks to the author of the source program.
As for the button board, I have a board with game console buttons. It’s not that it can’t be used. When I installed it in the end, I didn’t install the buttons. I only used them when adjusting the time or changing the color. Only the button interface was left.
3. Software design
The program was modified based on the original project program, and the source program was written in a very standardized manner. I didn’t understand it at first, so I needed to use Baidu if nothing else happened.
The first is to test whether the clock chip can be used. Use the serial port to read the value. Fortunately, it can be used. It has been dismantled and not damaged. The serial port program at the beginning has not been usable. All the data returned are 0. Directly open the "Step-by-step tutorial 51" Microcontroller", just don't use the value of BUSY.
I am a novice at writing code. I created variables like crazy before porting the code. In order to be able to adjust the time, I wrote all the years, months and days as 0. I will change it later. By the way, the year, month and day can also be displayed.
4. Acrylic production
In order to save money, I used the recommended 5mm base plate and used 2mm. I concentrated everything on one picture and made up the A3 format. I don’t know if I can save more than before. The final quote was 45. How much can I eat? Steamed buns.
5. Progress
You must make sure that there is no problem with the lamp welding, otherwise you will be like me like me who found a weak solder after installation and had to dismantle it two or three times.
The finished product is ready. The next step is to change the main control to WIFI and make another one. There is no need to manually adjust the time. The attachment contains the source program and lantern test program. ,
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet