Eval » Historie » Version 24
Maximilian Seesslen, 20.07.2023 18:02
1 | 1 | Maximilian Seesslen | h1. Eval |
---|---|---|---|
2 | |||
3 | h1. Overall design |
||
4 | |||
5 | * 4 x red+green LEDs for condition |
||
6 | * Restart button |
||
7 | 10 | Maximilian Seesslen | * Iterate over the ADC channels and get Voltage level |
8 | 13 | Maximilian Seesslen | * Self-Calibrating via MOSFET (shortcuit cable interface) |
9 | 18 | Maximilian Seesslen | * draw 100mA. Why? Sonst habe ich keinen Spannungsteiler. Je mehr Strom desto hoeher der Spannungsabfall; optional via mosfet.; 3/0,1= 30 Ohm |
10 | 17 | Maximilian Seesslen | * ADC loesst theoretisch auf "3 / 4096 = approx. 0,0007" Volt auf. |
11 | 4 | Maximilian Seesslen | * Die Kabel haben AWG28, 212.9 Ohm/km, 1.4 A nach erde, 0.23 A versorgung |
12 | 7 | Maximilian Seesslen | * 0,2129 Ohm/m; 1,0645 Ohm/5m; 2,129 Ohm/10m; |
13 | 4 | Maximilian Seesslen | * https://de.wikipedia.org/wiki/E-Reihe#/media/Datei:E12_values_graph.svg |
14 | 20 | Maximilian Seesslen | * Buzzer would be nice for indication; durchklingeln. Da werde ich lieber Multimeter nehmen. Ist aber kein Aufwand. |
15 | * PWM Output |
||
16 | 1 | Maximilian Seesslen | * Pinsocket connected to wires to measure resistance/Voltage directly |
17 | * https://www.aeq-web.com/spannungsteiler-microcontroller-berechnen-und-dimensionieren/ |
||
18 | * Spannungen einzeln schaltbar damit auch kurzschluesse detektiert werden koennen |
||
19 | 20 | Maximilian Seesslen | |
20 | 19 | Maximilian Seesslen | h1. Schema |
21 | 1 | Maximilian Seesslen | |
22 | 22 | Maximilian Seesslen | <pre> |
23 | 3V |
||
24 | | |
||
25 | | | Cable |
||
26 | |-------------->ADC |
||
27 | | | 30Ohm |
||
28 | | |
||
29 | === |
||
30 | 17 | Maximilian Seesslen | |
31 | 22 | Maximilian Seesslen | </pre> |
32 | 17 | Maximilian Seesslen | |
33 | 1 | Maximilian Seesslen | h1. Theoretische Spannungen bei AWG28 |
34 | 13 | Maximilian Seesslen | |
35 | 17 | Maximilian Seesslen | theoretically an device that draws 0,1A, 5V and 5m AWG28 cable: |
36 | 13 | Maximilian Seesslen | U2=((5*50)/ (50+1,0645) ) = 4,8957691; that should work |
37 | 1 | Maximilian Seesslen | |
38 | 17 | Maximilian Seesslen | theoretically an device that draws 0,5A, 5V and 10m AWG28 cable: |
39 | 1 | Maximilian Seesslen | U2 = ( (5*10) / (10+2,129) ) = 4,1223514 V |
40 | 17 | Maximilian Seesslen | |
41 | theoretically an device that draws 0,1A, 3V and 5m AWG28 cable: |
||
42 | U2=((3*30)/ (30+1,0645) ) = 2,8971978; that should work |
||
43 | |||
44 | theoretically an device that draws 0,1A, 3V and 10m AWG28 cable: |
||
45 | U2=((3*30)/ (30+2,129) ) = 2,8012076 |
||
46 | |||
47 | theoretically an device that draws 0,25A, 3V and 10m AWG28 cable: |
||
48 | U2= (3 * 12) / (12 + 2,129) = approx. 2,547951 |
||
49 | |||
50 | theoretically an device that draws 0,5A, 3V and 10m AWG28 cable: |
||
51 | U2= (3 * 6) / (6 + 2,129) = approx. 2,2142945 |
||
52 | U2= (3 * 6,8) / (6,8 + 2,129) = approx. 2,2846903 |
||
53 | 13 | Maximilian Seesslen | |
54 | 12 | Maximilian Seesslen | h1. Calculations I |
55 | |||
56 | 4 | Maximilian Seesslen | U2=((U*R2)/R_GES) |
57 | |||
58 | 5 | Maximilian Seesslen | U |
59 | 4 | Maximilian Seesslen | R*I |
60 | |||
61 | 5V/0,1A= 50 Ohm |
||
62 | 5V*0,1A= 0,5 W |
||
63 | |||
64 | 7 | Maximilian Seesslen | 5V/0,5A= 10 Ohm |
65 | |||
66 | 5 | Maximilian Seesslen | RGes = R1+R2 = 50 |
67 | |||
68 | 7 | Maximilian Seesslen | 3V=(5*R2)/50 |
69 | *R2 = (3*50)/5 = 30 -> 27 |
||
70 | R1 = 22* |
||
71 | RGES = 49 |
||
72 | 1 | Maximilian Seesslen | |
73 | U2 = 5*27/49 = 2,755102 |
||
74 | |||
75 | h1. Calculations II |
||
76 | 12 | Maximilian Seesslen | |
77 | 1 | Maximilian Seesslen | * Ein Kabel >= 10m soll durchfallen. Koennen trotzdem groessere Wiederstaende verwendet werden? |
78 | |||
79 | 13 | Maximilian Seesslen | Ohne Widerstand: |
80 | 1 | Maximilian Seesslen | |
81 | 13 | Maximilian Seesslen | U2 = 2,755102 |
82 | 1 | Maximilian Seesslen | |
83 | 13 | Maximilian Seesslen | Obige werte 1fach, 10m Kabel: |
84 | |||
85 | R2 = 27 |
||
86 | R1 = 22 |
||
87 | mit 10m |
||
88 | U2 = (5*27)/(49+2,129) = 2,6403802 |
||
89 | 2,755102-2,6403802=0,1147218 |
||
90 | 0,1147218/0,00073242188 = 156,6335 |
||
91 | |||
92 | Obige werte 10fach, 10m Kabel: |
||
93 | |||
94 | R2 = 270 |
||
95 | R1 = 220 |
||
96 | mit 10m |
||
97 | U2 = (5*270)/(490+2,129) = 2,7431832 |
||
98 | |||
99 | Bei 12Bit ADC: 3 / 4096 = approx. 0,00073242188 V pro ADC-Wert. |
||
100 | 2,755102-2,7431832=0,0119188 |
||
101 | 0,0119188 / 0,00073242188 = approx. 16,273135. Thats not super much |
||
102 | |||
103 | 16 | Maximilian Seesslen | h1. Calculations III |
104 | |||
105 | 10 | Maximilian Seesslen | h1. Keyfeatures |
106 | |||
107 | * Cable checker |
||
108 | * Buzzer Durchgangspruefer |
||
109 | * PWM Output |
||
110 | 7 | Maximilian Seesslen | |
111 | 1 | Maximilian Seesslen | h1. MCU |
112 | 2 | Maximilian Seesslen | |
113 | 1 | Maximilian Seesslen | * "stm32f051c4":https://www.mouser.de/datasheet/2/389/stm32f051c4-1851079.pdf |
114 | ** I have 17; |
||
115 | 2 | Maximilian Seesslen | ** 16 ADC channels |
116 | * STM32G030C8T6 |
||
117 | 3 | Maximilian Seesslen | ** nearly same specs but smaller footprint; LQFP 48 |
118 | 1 | Maximilian Seesslen | ** 2,68€ inc. Mwst. |
119 | 13 | Maximilian Seesslen | ** ADC faster |
120 | ** Mentions an 16Bit ADC value via oversampling, but thats complicated: adding white noise in order to calculate further 2 bits by software. Every MCU can do that. |
||
121 | 21 | Maximilian Seesslen | |
122 | * 4 ADC IN |
||
123 | * 4 Spannungs schalten |
||
124 | * 4 Kalibrierung schalten |
||
125 | * 2 LED Heartbeat/User |
||
126 | * 4 LED kabel ROT |
||
127 | * 4 LED kabel Gruen |
||
128 | * 4 LED kabel Orange |
||
129 | * 1 Input button |
||
130 | * 2 Output PWM |
||
131 | 23 | Maximilian Seesslen | |
132 | h1. Bauteile |
||
133 | |||
134 | 24 | Maximilian Seesslen | * Widerstaende: WF25P-6R8-5%; SP12-12R; |