当前位置:网站首页>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
边栏推荐
- DEJA_VU3D - Cesium功能集 之 059-腾讯地图纠偏
- 阿里本地生活单季营收106亿,大文娱营收72亿,菜鸟营收121亿
- bytebuffer internal structure
- Call Alibaba Cloud oss and sms services
- 包拉链不可用,但是是被另一个包。
- Shell script: for loop and the while loop
- [Software testing] unittest framework for automated testing
- Dameng 8 database export and import
- 905. Interval selection
- 从企业的视角来看,数据中台到底意味着什么?
猜你喜欢

leetcode-每日一题1403. 非递增顺序的最小子序列(贪心)

What is the function of industrial-grade remote wireless transmission device?

Industry Status?Why do Internet companies prefer to spend 20k to recruit people rather than raise their salary to retain old employees~

Android 面试题——如何徒手写一个非阻塞线程安全队列 ConcurrentLinkedQueue?

Spark基础【介绍、入门WordCount案例】

shell脚本:for循环与while循环

flink读取mongodb数据源
![[CISCN2019 华东南赛区]Web11](/img/15/843334fec0a5cc8cfaba92aab938db.png)
[CISCN2019 华东南赛区]Web11

UE4 第一人称角色模板 添加冲刺(加速)功能

Ali's local life's single-quarter revenue is 10.6 billion, Da Wenyu's revenue is 7.2 billion, and Cainiao's revenue is 12.1 billion
随机推荐
工业级远距离无线传输装置的功能有哪些?
Mysql的undo log详解
cross domain solution
Some conventional routines of program development (1)
Burp installation and proxy settings
多御安全浏览器新版下载 | 功能优秀性能出众
In the WebView page of the UI automation test App, the processing method when the search bar has no search button
【树莓派】树莓派调光
UE4 在游戏运行时更改变量 (通过鼠标滑轮来更改第一人称角色的最大行走速度)
UE4 opens door via interaction (keyboard key)
如何解决复杂的分销分账问题?
1007 Climb Stairs (贪心 | C思维)
Defect detection (image processing part)
四位数显表头设计
不看后悔,appium自动化环境完美搭建
How to discover a valuable GameFi?
You may use special comments to disable some warnings. Three ways to report errors
You may use special comments to disable some warnings. 报错解决的三种方式
测试薪资这么高?刚毕业就20K
2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer appears after successful startup of presto