当前位置:网站首页>四位数显表头设计
四位数显表头设计
2022-08-05 03:52:00 【天外飞仙CUG】
去年帮别人定制了一个四位数显小表头,可以用于测量4-20mA或者0-5V、0-10V输出的的各种传感器,可设置显示范围、上下限报警灯。由于后面更改方案,此方案暂时搁置不用。今天来分享一下软硬件的设计过程。
1.硬件设计
1.1电源
电源采用一个TL431+一个三极管构成线性稳压电路。采用这种方式,一方面是因为成本较低,另一方面,可以做大较大的电源输入范围(普通的1117-3.3等芯片输入范围也就到16V)。另外,TL431还可以为ADC提供参考电压。
1.2显示设计
可以使用单片机直接驱动数码管,但是会占用较多的IO口,且软件设计上稍复杂,这里采用一个TM1650驱动一个4位共阴极数码管。
1.3单片机及AD采样
单片机使用STM32G030F6,内置ADC支持硬件过采样,可以达到16位分辨率。采集电流或电压,通过选择合适的电阻即可。采集4-20mA电流时,R12为0R,R4为150R。采样电压时,R12和R4选择合适的电阻分压,使输入范围在3.3V以内。如果是直接采集电源电压,短接R13即可。
另外一路ADC通道采集TL431的VREF引脚,作为参考电压。
1.4报警设计
两个光耦隔离报警(超高报警、超低报警)输出,外部增加了三极管,用于驱动继电器等较大电流的设备。另外板载一个蜂鸣器(无源),同时引出蜂鸣器接口,也可外接蜂鸣器。
1.5按键
两个按键用于设置显示参数、报警参数、校准等。两个按键同时引出到端子上,也可外接按键。同时2个按键使用的是串口功能的引脚,可修改程序实现串口输出及设置。
最终的PCB板如下,背面为数码管。
2.软件设计
软件上,使用STM32CubeMx设计,使用硬件I2C1接口驱动TM1650。使用了2个ADC通道采集输入电流和TL431的参考电压。使用TIM3CH1输出PWM波驱动蜂鸣器。其它就是2个报警IO和2个按键IO。如下:
软件实现功能如下:
东西只做了一版,软硬件设计上可能还不太完善,仅供参考。
手上还剩了十几个,有人需要的话可以直接在淘宝拍(25元包邮,送原理图和源代码):
https://item.taobao.com/item.htm?spm=a1z10.1-c.w4004-8192824768.10.26ba1b9dUXLv4R&id=668157221254
如果只需要源码和原理图的话,拍下面的链接(2元)。开发不易,希望大家多包涵和支持。
https://item.taobao.com/item.htm?spm=a21dvs.23580594.0.0.621e3d0dr3HE70&ft=t&id=679567748409
边栏推荐
- 35岁的软件测试工程师,月薪不足2W,辞职又怕找不到工作,该何去何从?
- Developing Hololens encountered The type or namespace name 'HandMeshVertex' could not be found..
- Package zip is not available, but is referred to by another package.
- Burp installation and proxy settings
- Web3.0 Dapps - the road to the future financial world
- MySql index learning and use; (I think it is detailed enough)
- The most effective seven performance testing techniques of software testing techniques
- There are several common event handling methods in Swing?How to listen for events?
- The sword refers to Offer--find the repeated numbers in the array (three solutions)
- public static <T> List<T> asList(T... a) 原型是怎么回事?
猜你喜欢
Web3.0 Dapps - the road to the future financial world
2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer appears after successful startup of presto
How do newcomers get started and learn software testing?
今年七夕,「情蔬」比礼物更有爱
Android 面试题——如何徒手写一个非阻塞线程安全队列 ConcurrentLinkedQueue?
Swing有几种常用的事件处理方式?如何监听事件?
How to Add Category-Specific Widgets in WordPress
The test salary is so high?20K just graduated
mutillidae下载及安装
Why is the pca component not associated
随机推荐
iMedicalLIS监听程序(2)
Initial solution of the structure
905. Interval selection
测试薪资这么高?刚毕业就20K
日志导致线程Block的这些坑,你不得不防
如何解决复杂的分销分账问题?
银行数据采集,数据补录与指标管理3大问题如何解决?
Never put off till tomorrow what you can put - house lease management system based on the SSM
Web3.0 Dapps - the road to the future financial world
Android Practical Development - Kotlin Tutorial (Introduction - Login Function Implementation 3.3)
Android interview question - how to write with his hands a non-blocking thread safe queue ConcurrentLinkedQueue?
国学*周易*梅花易数 代码实现效果展示 - 梅花心易
[论文笔记] MapReduce: Simplified Data Processing on Large Clusters
多御安全浏览器新版下载 | 功能优秀性能出众
ffmpeg 像素格式基础知识
事件解析树Drain3使用方法和解释
High Item 02 Information System Project Management Fundamentals
DNS被劫持如何处理?
How to solve the three major problems of bank data collection, data supplementary recording and index management?
基于生长的棋盘格角点检测方法