当前位置:网站首页>Four-digit display header design
Four-digit display header design
2022-08-05 03:59:00 【Feixian CUG】

Last year, I helped others customize a four-digit display head, which can be used to measure various sensors with 4-20mA or 0-5V, 0-10V output.Set the display range, upper and lower limit alarm lights.Due to later changes to the plan, this plan is temporarily put on hold.Today, let's share the design process of software and hardware.
1. Hardware Design
1.1 Power
The power supply adopts a TL431+a triode to form a linear voltage regulator circuit.In this way, on the one hand, the cost is low, and on the other hand, the input range of the power supply can be enlarged (the input range of ordinary chips such as 1117-3.3 is only 16V).In addition, TL431 can also provide reference voltage for ADC.

1.2 Display Design
The single-chip microcomputer can be used to drive the digital tube directly, but it will occupy more IO ports, and the software design is slightly complicated. Here, a TM1650 is used to drive a 4-bit common cathode digital tube.

1.3 MCU and AD sampling
The microcontroller uses STM32G030F6, the built-in ADC supports hardware oversampling, and can achieve 16-bit resolution.Collect current or voltage by selecting an appropriate resistor.When collecting 4-20mA current, R12 is 0R and R4 is 150R.When sampling the voltage, R12 and R4 select the appropriate resistor divider to make the input range within 3.3V.If it is to directly collect the power supply voltage, short-circuit R13.
Another ADC channel collects the VREF pin of TL431 as a reference voltage.


1.4 Alarm Design
Two optocoupler isolation alarms (super-high alarm, ultra-low alarm) outputs, and external triodes are added to drive relays and other devices with larger currents.In addition, there is a buzzer (passive) on the board, and the buzzer interface is also led out, and the buzzer can also be externally connected.

1.5 keys
Two buttons are used to set display parameters, alarm parameters, calibration, etc.The two buttons can be led out to the terminal at the same time, and external buttons can also be connected.At the same time, the two buttons use the pins of the serial port function, and the program can be modified to realize the serial port output and setting.
The final PCB board is as follows, with the digital tube on the back.

2. Software design
In software, it is designed with STM32CubeMx and drives TM1650 with hardware I2C1 interface.Two ADC channels are used to collect the input current and the reference voltage of the TL431.Use TIM3CH1 to output PWM wave to drive the buzzer.The others are 2 alarm IOs and 2 key IOs.As follows:

The software implements the following functions:




Things are only made one version, the software and hardware design may not be perfect, for reference only.
There are more than a dozen left on hand, if anyone needs it, they can take pictures directly on Taobao (25 yuan for free shipping, schematic diagram and source code):
https://item.taobao.com/item.htm?spm=a1z10.1-c.w4004-8192824768.10.26ba1b9dUXLv4R&id=668157221254
If you only need the source code and schematic diagram, take the link below (2 yuan).The development is not easy, I hope everyone will bear with and support.
https://item.taobao.com/item.htm?spm=a21dvs.23580594.0.0.621e3d0dr3HE70&ft=t&id=679567748409
边栏推荐
- 银行数据采集,数据补录与指标管理3大问题如何解决?
- Android interview question - how to write with his hands a non-blocking thread safe queue ConcurrentLinkedQueue?
- Dameng 8 database export and import
- 【测量学】速成汇总——摘录高数帮
- Acid (ACID) Base (BASE) Principles for Database Design
- Queue Topic: Recent Requests
- iMedicalLIS监听程序(2)
- This year's Qixi Festival, "love vegetables" are more loving than gifts
- Initial solution of the structure
- Solana NFT开发指南
猜你喜欢

How do newcomers get started and learn software testing?

UE4 通过互动(键盘按键)开门

Defect detection (image processing part)

【8.4】代码源 - 【数学】【历法】【删库】【不朴素的数列(Bonus)】

Open-Falcon of operation and maintenance monitoring system

2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer appears after successful startup of presto

Based on holding YOLOv5 custom implementation of FacePose YOLO structure interpretation, YOLO data format conversion, YOLO process modification"

The most effective seven performance testing techniques of software testing techniques

今年七夕,「情蔬」比礼物更有爱

UE4 opens doors with overlapping events
随机推荐
Walter talked little knowledge | "remote passthrough" that something
【8.4】代码源 - 【数学】【历法】【删库】【不朴素的数列(Bonus)】
2022.8.4-----leetcode.1403
UE4 第一人称角色模板 添加冲刺(加速)功能
What is the difference between SAP ERP and ORACLE ERP?
How to solve the three major problems of bank data collection, data supplementary recording and index management?
Spark Basics [Introduction, Getting Started with WordCount Cases]
How do newcomers get started and learn software testing?
DEJA_VU3D - Cesium功能集 之 057-百度地图纠偏
Spark基础【介绍、入门WordCount案例】
This year's Qixi Festival, "love vegetables" are more loving than gifts
cross domain solution
UE4 在游戏运行时更改变量 (通过鼠标滑轮来更改第一人称角色的最大行走速度)
第一次性能测试实践,有“亿”点点紧张
Dameng 8 database export and import
Solana NFT开发指南
数组常用方法总结
token、jwt、oauth2、session解析
36-Jenkins-Job迁移
Mathematics - Properties of Summation Symbols