Eval » Historie » Version 20
Maximilian Seesslen, 20.07.2023 16:52
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 | 14 | Maximilian Seesslen | |
21 | 19 | Maximilian Seesslen | h1. Schema |
22 | |||
23 | 17 | Maximilian Seesslen | 3V |
24 | 19 | Maximilian Seesslen | | |
25 | 1 | Maximilian Seesslen | | | Cable |
26 | 17 | Maximilian Seesslen | |-------------->ADC |
27 | 1 | Maximilian Seesslen | | | 30Ohm |
28 | 19 | Maximilian Seesslen | | |
29 | 17 | Maximilian Seesslen | === |
30 | 19 | Maximilian Seesslen | |
31 | 17 | Maximilian Seesslen | |
32 | 1 | Maximilian Seesslen | h1. Theoretische Spannungen bei AWG28 |
33 | 13 | Maximilian Seesslen | |
34 | 17 | Maximilian Seesslen | theoretically an device that draws 0,1A, 5V and 5m AWG28 cable: |
35 | 13 | Maximilian Seesslen | U2=((5*50)/ (50+1,0645) ) = 4,8957691; that should work |
36 | 1 | Maximilian Seesslen | |
37 | 17 | Maximilian Seesslen | theoretically an device that draws 0,5A, 5V and 10m AWG28 cable: |
38 | 1 | Maximilian Seesslen | U2 = ( (5*10) / (10+2,129) ) = 4,1223514 V |
39 | 17 | Maximilian Seesslen | |
40 | theoretically an device that draws 0,1A, 3V and 5m AWG28 cable: |
||
41 | U2=((3*30)/ (30+1,0645) ) = 2,8971978; that should work |
||
42 | |||
43 | theoretically an device that draws 0,1A, 3V and 10m AWG28 cable: |
||
44 | U2=((3*30)/ (30+2,129) ) = 2,8012076 |
||
45 | |||
46 | theoretically an device that draws 0,25A, 3V and 10m AWG28 cable: |
||
47 | U2= (3 * 12) / (12 + 2,129) = approx. 2,547951 |
||
48 | |||
49 | theoretically an device that draws 0,5A, 3V and 10m AWG28 cable: |
||
50 | U2= (3 * 6) / (6 + 2,129) = approx. 2,2142945 |
||
51 | U2= (3 * 6,8) / (6,8 + 2,129) = approx. 2,2846903 |
||
52 | 13 | Maximilian Seesslen | |
53 | 12 | Maximilian Seesslen | h1. Calculations I |
54 | |||
55 | 4 | Maximilian Seesslen | U2=((U*R2)/R_GES) |
56 | |||
57 | 5 | Maximilian Seesslen | U |
58 | 4 | Maximilian Seesslen | R*I |
59 | |||
60 | 5V/0,1A= 50 Ohm |
||
61 | 5V*0,1A= 0,5 W |
||
62 | |||
63 | 7 | Maximilian Seesslen | 5V/0,5A= 10 Ohm |
64 | |||
65 | 5 | Maximilian Seesslen | RGes = R1+R2 = 50 |
66 | |||
67 | 7 | Maximilian Seesslen | 3V=(5*R2)/50 |
68 | *R2 = (3*50)/5 = 30 -> 27 |
||
69 | R1 = 22* |
||
70 | RGES = 49 |
||
71 | 1 | Maximilian Seesslen | |
72 | U2 = 5*27/49 = 2,755102 |
||
73 | |||
74 | h1. Calculations II |
||
75 | 12 | Maximilian Seesslen | |
76 | 1 | Maximilian Seesslen | * Ein Kabel >= 10m soll durchfallen. Koennen trotzdem groessere Wiederstaende verwendet werden? |
77 | |||
78 | 13 | Maximilian Seesslen | Ohne Widerstand: |
79 | 1 | Maximilian Seesslen | |
80 | 13 | Maximilian Seesslen | U2 = 2,755102 |
81 | 1 | Maximilian Seesslen | |
82 | 13 | Maximilian Seesslen | Obige werte 1fach, 10m Kabel: |
83 | |||
84 | R2 = 27 |
||
85 | R1 = 22 |
||
86 | mit 10m |
||
87 | U2 = (5*27)/(49+2,129) = 2,6403802 |
||
88 | 2,755102-2,6403802=0,1147218 |
||
89 | 0,1147218/0,00073242188 = 156,6335 |
||
90 | |||
91 | Obige werte 10fach, 10m Kabel: |
||
92 | |||
93 | R2 = 270 |
||
94 | R1 = 220 |
||
95 | mit 10m |
||
96 | U2 = (5*270)/(490+2,129) = 2,7431832 |
||
97 | |||
98 | Bei 12Bit ADC: 3 / 4096 = approx. 0,00073242188 V pro ADC-Wert. |
||
99 | 2,755102-2,7431832=0,0119188 |
||
100 | 0,0119188 / 0,00073242188 = approx. 16,273135. Thats not super much |
||
101 | |||
102 | 16 | Maximilian Seesslen | h1. Calculations III |
103 | |||
104 | 10 | Maximilian Seesslen | h1. Keyfeatures |
105 | |||
106 | * Cable checker |
||
107 | * Buzzer Durchgangspruefer |
||
108 | * PWM Output |
||
109 | 7 | Maximilian Seesslen | |
110 | 1 | Maximilian Seesslen | h1. MCU |
111 | 2 | Maximilian Seesslen | |
112 | 1 | Maximilian Seesslen | * "stm32f051c4":https://www.mouser.de/datasheet/2/389/stm32f051c4-1851079.pdf |
113 | ** I have 17; |
||
114 | 2 | Maximilian Seesslen | ** 16 ADC channels |
115 | * STM32G030C8T6 |
||
116 | 3 | Maximilian Seesslen | ** nearly same specs but smaller footprint; LQFP 48 |
117 | 1 | Maximilian Seesslen | ** 2,68€ inc. Mwst. |
118 | 13 | Maximilian Seesslen | ** ADC faster |
119 | ** 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. |