1. Introduction to the work
. For example, it can include but is not limited to the following: 1. Pictures of the appearance of the complete machine or pictures of the welded and assembled PCBA;
2. Research background, purpose, function, and market application prospects of the work; Power supply has always been our priority It is the first choice project for DIY, but it is difficult to make cool DIY ones. This meter was only designed for the DIY market at first. Later, I found many products, such as temperature controllers and charge and discharge controls. In other words, set an upper and lower threshold, and then Create an IO and achieve control purposes by shutting down, because most controllers use an AD conversion method, so we have the idea of header design; As a prototype that can be quickly controlled and developed, if it is just a fixed interface, It cannot be applied to products because the product interface requirements of different manufacturers vary greatly. This is the reason why similar products cannot be applied quickly. I think back then, a three-and-a-half-digit digital tube meter sold very well because it could It is very convenient to change it into a tachometer, a thermometer, etc., because the digital tube has no interface and can be applied to various fields. As the times have developed, our products require high-end display interfaces, but it is difficult to implement such ordinary products. To this end, we designed this header, which can write script statements to change all display interfaces according to the user's individual needs, and establish rapid prototype development of products; 3. The work is innovative, interesting, practical and even public welfare. What are the highlights? With standard AD conversion, upper and lower threshold control, and script-controllable interface changes, you can use your imagination to design many novel products based on this product;
2. System architecture diagram
uses flow charts or mind maps to describe your work. The composition structure is the plan diagram.
The circuit is very simple and practical. It uses 7660 to generate negative voltage, and the low-end R025 resistor is sampled. After amplification by OP07, it enters the AD of STM32 for sampling; in fact, the main difficulty lies in the software
. 3. Description of the hardware part
1. Attached is the schematic diagram & PCB Pictures or source files of physical drawings (the official recommendation is that you upload source files as much as possible). If it is a picture, please ensure that the picture is clear and legible;
2. Use words to briefly explain the implementation principle of the work and the working process of the system. This is basically a current and voltage measurement. After the measurement, the script is automatically gathered to control the display; the voltage measurement is basically a simple resistor voltage division. The voltage is 27K divided by 2.7K 1:11, so the voltage range is 3.3_11=36.3V. The 12-bit AD of the microcontroller is used, so the sampling resolution is 36.3V/4096=0.00886V. Since the accuracy of the AD is +-3LSB, oversampling and other means are used to ensure accuracy; therefore, the voltage range is 36V, which can of course be increased or reduced. The voltage dividing ratio can expand or reduce the range, and the software supports up to 65V; _ The current measurement uses DALE's R025 25 milliohm sampling resistor. The DALE brand is well aware of it. The temperature drift coefficient is small and the effect is good. Calculated based on 5A current , the voltage drop is 0.025_5=0.125V; the op amp amplifier resistor voltage division ratio is: 1.5K: 27K, that is, the amplification is 19 times, so the current is calculated to be about 6.9A. In order to ensure a certain margin, we define the full meter Mass production is 5A; the same current resolution is about 1.7mA, +-3LSB is +-5.4mA; the final voltage and current enter the AD sampling of the microcontroller, and the sampling adopts the AD DMA mode. Any set of algorithms is actually 50 in DMA On the other hand, the host computer stores the software's font library, image gallery, and displayed statements in the memory of the header. The header is performing AD conversion and statements every moment. The interpretation is executed, so the current display effect is achieved;
4. The material list (BOM list)
lists the main devices used in your work (key devices are enough), such as microcontroller & ARM chip, application specific integrated chip (ASIC) , sensors, functional modules, etc. If the chip listed is from our Lichuang Mall, it is best to write down the product number of the device or attach the corresponding purchase link. stm32f030c8t6 C40053 http://www.szlcsc.com/product/details_41034.html
AMS1117-3.3 C6186 http://www.szlcsc.com/so/catalog/387.html
MX25L6406 C60525 The package is different http://www. szlcsc.com/product/details_61577.html
OP07CP http://www.szlcsc.com/product/details_7910.html
DALE R025 sampling resistor, this directly determines the temperature drift of the current, by the way, go to IC sales to apply for this model , but it was not approved. Of course, you can’t buy it in the mall. See the welding motherboard diagram for the appearance.
5. Description of the software part (optional) How to make a header with user-customizable interface and operation logic for engineering display is something we have been thinking about for 2 years; after finishing Usart - After using the GPU serial screen product, I suddenly discovered that the header of the T50N and the code of the serial screen can be combined into one, so everything was solved; The following is the statement format (the final product may change) Script statement: DR2; CLS (0); PIC(180,125,1); DS24(40,14,'T50NPlus',2); DS32(140,10,'Dual voltage and ammeter',2); DS24(160,50,'--- -Made based on GPU technology',2); DS16(10,175,'Produced by: APACHECTL',3); DS16(10,195,'Website: http://www.A-DIY.cn',3 ); DS12(10,215, 'Based on Usart-GPU serial screen technology, the screen display can be modified to suit project needs.',8); SNF(10,228,8); SLP(3); GOP(0); CLS(0); SCC(60, 6405); SCC(59,44373); SBC(60); BOXF(0,0,399,40,60); DS32(50,4,'Single-channel voltage and current meter (IN1)',15); SBC(0); DS24(50,135,'Voltage (V)',15); DS24(250,135,'Current (A)',15); DS16(35,215,'Power (W)',8); DS16(128,215,'Internal resistance ( Ω)',8); DS16(230,215,'Cumulative (AH) (WH)',8); FI; DS64(20,68,'{0C,4} ',2); DS64(220,68,' {0A,4} ',2); DS24(35,190,'{0G,3}',59); DS24(128,190,'{0H,3}',59); DS24(230,190,'{0B,3} ',59); DS24(310,190,'{0D,3}',59); AN(1,3);
--- | --- | --- | --- |
Variable number | Corresponding function | unit | Remark |
A | current | mA | Maximum 65A |
B | An hour | 10mA.h | Maximum 65A.h |
C | Voltage | mV | Maximum 65V |
D | Watt hour | 10mW.h | Maximum 65w.h |
E | Current color | Divided into super high line, suitable, and super bottom line | |
F | voltage color | Divided into super high line, suitable, and super bottom line | |
G | power | 10mW | Maximum 65W |
H | internal resistance | milliohm | |
I | upper limit current | mA | |
J | Lower limit current | mA | |
K | upper limit voltage | mV | |
L | Offline voltage | mV |
The value after the comma represents the ratio, see the table below:
numerical value | describe | multiple | Remark |
0 | Integer display | 1 times | |
1 | Display 1 digit after the decimal point | Thousand times | The variables corresponding to mA and mV are |
2 | Display 2 digits after the decimal point | Thousand times | Same as above |
3 | Display 3 digits after the decimal point | Thousand times | Same as above |
4 | Length adaptation, 10, display 2 digits after the decimal point | Thousand times | Same as above |
6 | Display 1 digit after the decimal point | hundred times | Corresponds to 10mA.h |
7 | Display 2 digits after the decimal point | hundred times | Same as above |
8 | Length adaptation, 10, 1 digit displayed after decimal point | hundred times | Same as above |
Order | illustrate | Example |
AN(1,pgn) | If button 1 is pressed, jump to page pgn; pgn will be memorized and can be accessed directly after booting. | AN(1,10); |
SLP(n); | Delay n seconds | SLP(3); |
GOP(pgn); | Jump to the pgn page. When pgn=0, it means the last memorized page; | GOP(0); |
SAUP(rt,A,ctl,type)* | Set the current upper limit of rt channel, Rt=0, the first channel rn=1, the second channel A: current value, integer, unit mA, if set to 2A, then A=2000; Ctl controls the on and off circuit: here CTL=1 means the first channel =2 indicates the second channel =3 indicates the third channel (reserved) Type: Output level: 0-low level 1-high level 2-unchanged | SAUP(1,1200,2,2) |
SADN(rt,A,ctl,type)* | Set the current lower limit, the parameters are the same as above | SADN(1,200,2,2) |
SVUP(rt,A,ctl,type)* | Set the voltage upper limit, the parameters are the same as above | SVUP(1,4200,2,2) |
SVDN(rt,A,ctl,type)* | Set the voltage lower limit, the parameters are the same as above | SVDN(1,4200,2,2) |
CLA | Clear 2 channels AH and Wh | CLA; |
VAQX(rt,x,y,t,w,h,xn,yn,st(1-display ruler)); | T50 uses the voltage and current curve to display Rt=0, the first channel rn=1, the second channel; , 3-VA display W: width of each grid in the horizontal direction, unit pixel point H: width of each grid in the vertical direction, unit pixel point ;St:=0 does not display the ruler=1 displays the ruler | VAQX(0,40,0,3,18,20,18,10,1); |
FI | The statement following the calibration is displayed when refreshing | FI; |
TCLT | Forcibly set MOSTCL(1,1); the second output is high level TCL(1,0); the second output is low TCL(0,1); the first output is high |
Through the host computer software, you can upload statements, fonts, graphics and other information to the header to complete the display; host computer download: (There seems to be a problem with the server today, upload another day) Overall performance: 1. Using 2.6-inch 320X240 resolution high score screen display. 2. The voltage is 27K divided by 1:11 to 2.7K, so the voltage range is 3.3*11=36.3V. The 12-bit AD of the microcontroller is used, so the sampling resolution is 36.3V/4096=0.00886V. Since the accuracy of AD is +- 3LSB, although oversampling and other methods are used to ensure accuracy, the fluctuation within +-0.027V is normal accuracy; (this range refers to the measurement of the battery, in fact, the ripple of 27mV many power supplies cannot be guaranteed); 3. Current Using a 25 milliohm sampling resistor, the op amp amplifier resistor voltage division ratio is: 1.5K: 27K, which is an amplification of 19 times. Therefore, the calculated current is about 6.9A. In order to ensure a certain margin, we define the full amount of the meter. The output is 5A; the same current resolution is about 1.7mA, +-3LSB is +-5.4mA; 4. Dual-channel common ground design, the meter uses +5V power supply, which can be connected through the serial port, but the power ground must be connected through MainGND input, otherwise it will lead to inaccurate measurement; 5. The position of the A004 module is still reserved on the board, so that the power supply range of the meter can be extended to 28V (according to the data, it is actually recommended not to exceed 24V), so that the measured voltage can be " "Stealing electricity"; 6. Onboard dual-channel MOS, you can set upper and lower limits for voltage and current through GPU statements, and control the MOS tube, which is convenient for making temperature-controlled instruments; 7. Dual-channel with AH and WH measurement, cooperate with MOS No matter what, it is actually very easy to make a program similar to the lithium battery discharge capacity test;
1. Press and hold AN1 and AN2 at the same time, power on, and the screen will appear black. Release AN1 and AN2, and the system will enter the calibration interface: 2. At this time, the system will prompt "Please connect V1+(IN) and V2+(IN) together." +5V reference voltage, and then press the AN1 button;" and follow the prompts. This step is to calibrate the 2-channel voltage; 3. After that, the system displays: "Please connect GND1 to the negative pole of the load, and the auxiliary power supply + to the positive pole of the load, and adjust the load current to 200mA (you can connect the current level of the multimeter), and then press the AN1 button;", this step calibrates the low end of the first current; 4. After that, the system displays: "Please connect GND2 to the negative pole of the load, and the auxiliary power supply + to the positive pole of the load, adjust When the load current is 200mA (can be connected to the current range of the multimeter), then press the AN1 button;", this step calibrates the low end of the second current; 5. It displays "Please connect GND1 to the negative pole of the load, and the auxiliary power + to the positive pole of the load, adjust When the load current is 2A (can be connected to the current range of the multimeter), then press the AN1 button. This step is to calibrate the high end of the first current. 6. It displays "Please connect GND2 to the negative pole of the load, and the auxiliary power supply + to the positive pole of the load. Adjust the load current 2A (you can connect the current level of the multimeter), and then press the AN1 button;", this step is to calibrate the high-end of the second current. 7. The system displays "Please restart the device;" Power off and restart, the calibration is completed; 6. Please upload your work demonstration Demonstrate the function of the work to Tencent Video and edit it to this site (or attach a video link). Uploading videos as required will earn you 5 points. Please see the event rules for details. https://v.qq.com/x/page/h0538cfo5xp.html 7. Summary, such as some of your experiences in completing the work, technical problems or debugging experience, future plans for the work, and your opinions on our hosting Suggestions and opinions from other parties, etc.
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