Projekt

Allgemein

Profil

Eval » Historie » Version 17

Maximilian Seesslen, 20.07.2023 16:44

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