桂花蒸

[Course Design] Based on FPGA/CPLD digital clock

 
Overview

Introduction

Digital clock made with Altera-EPM570T100C5N as the main control chip

Course design requirements:
  1. Can display year, month, day, hour, minute and second;
  2. Have more than 2 sets of alarm clocks;
  3. Design circuits and PCBs by ourselves and outsource board manufacturing;
  4. Design and build enclosures from cardboard;
Overall functional framework:

frame.jpg

Schematic and PCB design

Let’s talk about the PCB design first. Obviously a 10cm*10cm board can hold the power supply and main control, so why do we need to divide it into two boards to make it?

At the beginning, I planned to use only one PCB. After drawing the schematic diagram, I sent it to the teacher for inspection. The teacher said: "There is no problem. The schematic diagram is OK. I suggest you make a power supply verification board first, or do it during soldering." Weld the power supply first before welding anything else. Once the power supply is verified, weld other things.”
So I divided the power supply and main control into two boards. If there is a problem with the board, it is easier to troubleshoot the problem. This is a good thing. The chip that the teacher sent out at first was EPM240. The classmate who was responsible for writing the code said that the logic gates of 240 were not enough. Later, it was replaced with 570, which saved the need to re-solder the power supply part (after all, tantalum capacitors are not cheap). Let’s officially start talking about this design.
Compared with the open source project I posted on 2021-04-15 , there are some changes.

1. Power board


power input

Use the DC interface for power supply, and then connect it to a 6V/1.5A self-restoring fuse to protect the charging circuit and 5V power supply circuit behind it.

Input and fuse.PNG

Lithium battery charging and discharging circuit

1. The charging circuit battery power management chip uses Fuman’s TC4056A, which has low cost and simple peripheral circuits. The charging current is set through R1, here it is set at 400mA (if a larger charging current is used, it is recommended to increase the copper foil area in the via hole on the back of the chip when designing the PCB to enhance heat dissipation).

charging.PNG

2. Lithium battery charge and discharge protection also uses Fuman’s chip - DW06D. Compared with his other chip DW01A-G, there is no need to use additional NMOS tubes.

Lithium battery protection.PNG

3. Lithium battery boost

This part was not included in the initial design. After sending it to the teacher to check the circuit, the teacher gave his opinion: a boost circuit for the lithium battery needs to be added. Check the data sheet of the lithium battery and the DC-DC chip used for voltage reduction later - TLV62568DBVR. The output voltage of the lithium battery is 3.6V~4.2V, and the input voltage to the DC-DC chip is indeed very reluctant, so a boost part was added. I chose SX1308 from Shuoxin Technology, or you can use MT3608 from Xi'an Aerospace Minxin. The packaging and peripheral circuits of the two chips are the same (the price of MT3608 is slightly lower). Even the data manuals have different brands and models. The content and layout are almost the same... The feedback resistors are R4=22K and R5=2.7K. The voltage of the power supply will be different between no-load and loaded. The voltage will drop after loading, and there are problems with the resistance accuracy and the power supply on the PCB. Regarding the voltage drop when changing layers, since I have never used this chip and do not know how big the actual voltage drop is, I increased the output voltage to a range that the chip used in the back-end buck circuit can withstand. Boost.PNG

Power selection

This part is based on the design of the Tuya training camp boss ( mimiww's [Tuya Smart] IoT temperature and humidity sensor ). I have to say that this part is really cleverly designed, with a pull-down resistor, a PMOS, and a Schottky Diodes can realize the function of power switching and can achieve:

① When there is only DC power supply, the PMOS is turned off, and DC_VCC supplies power to subsequent circuits through the Schottky diode. Since the voltage drop of the Schottky diode is low, the actual measured voltage is about 0.3V, so the voltage obtained by VCC is about 4.7V. ② When only using lithium battery for power supply, R3 (either 10k or 100k) pulls the gate voltage down to 0V, PMOS is turned on, and +5V supplies power to subsequent circuits through the MOS tube. The actual measured voltage drop is very small. ③When DC power supply and lithium battery are connected at the same time, DC_VCC flows through D2, VCC≈4.7V, and the gate voltage is DC_VCC = 5V, PMOS is cut off.

emm actually seems to be unable to lock. I guess the voltage boost is a bit high. You can try adjusting the voltage to about 4.4V (the boss’s design is for direct output from lithium batteries without boost!!! My design is different. )

Power selection.PNG

step down

Use the TLV62568DBVR provided by the teacher. The specific circuit data sheet is also written in it, and it is easy to use. Reduce the input 5V voltage to 3.3V and 2.5V. There is a circuit loss problem, which will pull the voltage slightly higher. The 2.5V output is 2.52V, and the 3.3V output is 3.333V.

This buck chip seems not very easy to buy at the moment. You can directly use LDO to buck. The circuit is simpler, but the efficiency is not as high as DC-DC.

3V3.PNG2V5.PNG

2. Main control board

Actually, there’s not much to say about this part. Some circuits refer to the FPGA development board of Zhengdian Atom. Just look at the schematic diagram

3. PCB display

Power Board

Front of power board.jpgThe back of the power board.jpg

A lot of tantalum capacitors are used in the design of the power board, some of which can be deleted (after all, tantalum capacitors are not cheap)

Main control board

Main control front.jpgBack of main control.jpg

Notice! The four capacitors on the back do not need to be soldered, I just leave a place there. It is to prevent the power supply from being dirty, and it can also be remedied!

Logo on the back of the main control.jpg

4. Finished product display

Actual object.jpgPhysical power on.jpg

The mosaics on the PCB are the names of our team members. I have removed this part in the open source version.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-13 07:44:01

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号