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