Eval » Historie » Version 83
Maximilian Seesslen, 17.12.2024 13:57
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 | 30 | 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; 0,3W |
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 | 39 | Maximilian Seesslen | * Spannungen einzeln schaltbar damit auch kurzschluesse detektiert werden koennen und Kabel-Art. "1:1"; "M" mirrored; "" |
19 | 20 | Maximilian Seesslen | |
20 | 71 | Maximilian Seesslen | h1. Cables |
21 | |||
22 | 81 | Maximilian Seesslen | "Telefon Kabel":https://www.tme.eu/de/details/cm04w/telefonleitungen/logilink/ |
23 | 82 | Maximilian Seesslen | Telefonkabel: 2.6 Ohm/m ( 4CX6X0.10mm ) "Link":https://www.tme.eu/Document/cfb9fe443334372d3e6660ac7ce1b239/TC1000S-100M.pdf |
24 | 81 | Maximilian Seesslen | |
25 | 83 | Maximilian Seesslen | Nach 10m 26Ohm. Elko hat bestenfalls 1M; U2=(U/(R1+R2))*R2; (3/1000250)*1000000; 2,999V |
26 | Ein 1mF hat schon 3K Ohm. (3/3250)*3000; 2,769V |
||
27 | |||
28 | 73 | Maximilian Seesslen | 4x6x0,12mm; "( PI*((0,12/2)^2) ) * 6" = 0,07mm² |
29 | 74 | Maximilian Seesslen | AWG28 = 0,0804mm² |
30 | Trace: 0,15 * 0,035 = 0,00525 |
||
31 | 1 | Maximilian Seesslen | |
32 | 77 | Maximilian Seesslen | 4x0,14mm² ; 2x18x0,10mm; "( PI*((0,10/2)^2) ) * 18" = 0,14mm²; outer 1,3x5,3; ca. AWG26 |
33 | 78 | Maximilian Seesslen | SZH-002T-P0.5 is AWG28...26 |
34 | 75 | Maximilian Seesslen | |
35 | 80 | Maximilian Seesslen | LIYY-A-4X26AWG |
36 | |||
37 | 79 | Maximilian Seesslen | CANBus-Cable: 4x1x0,25mm2 |
38 | |||
39 | 74 | Maximilian Seesslen | | 4x0,14mm² | 148 Ohm/km (Manufacturer) | "Link":https://www.tme.eu/de/details/d-418-5/flachbandleitungen-mehrfarbig/donau-elektronik/418-5/ | |
40 | 1 | Maximilian Seesslen | | AWG28 | 212.9 Ohm/km (Norm) | | |
41 | 78 | Maximilian Seesslen | | 4CX6X0.10mm| 2.6 Ohm/m (Manufacturer) | | |
42 | 83 | Maximilian Seesslen | |
43 | A = π • r^2 |
||
44 | |||
45 | 77 | Maximilian Seesslen | |
46 | h1. Involved PCBs |
||
47 | |||
48 | Feed: power 0,5mm |
||
49 | 76 | Maximilian Seesslen | |
50 | 19 | Maximilian Seesslen | |
51 | 1 | Maximilian Seesslen | h1. Schema |
52 | 22 | Maximilian Seesslen | |
53 | <pre> |
||
54 | 3V |
||
55 | | |
||
56 | | | Cable |
||
57 | |-------------->ADC |
||
58 | | | 30Ohm |
||
59 | | |
||
60 | 17 | Maximilian Seesslen | === |
61 | 22 | Maximilian Seesslen | |
62 | 17 | Maximilian Seesslen | </pre> |
63 | 50 | Maximilian Seesslen | |
64 | Der Widerstand sollte so groß sein wie der Widerstand des Sensors in der Mitte des Messbereichs. |
||
65 | |||
66 | 1 | Maximilian Seesslen | |
67 | 13 | Maximilian Seesslen | h1. Theoretische Spannungen bei AWG28 |
68 | 31 | Maximilian Seesslen | |
69 | "E-Reihe":https://de.wikipedia.org/wiki/E-Reihe#/media/Datei:E12_values_graph.svg |
||
70 | 17 | Maximilian Seesslen | |
71 | 13 | Maximilian Seesslen | theoretically an device that draws 0,1A, 5V and 5m AWG28 cable: |
72 | 1 | Maximilian Seesslen | U2=((5*50)/ (50+1,0645) ) = 4,8957691; that should work |
73 | 17 | Maximilian Seesslen | |
74 | 1 | Maximilian Seesslen | theoretically an device that draws 0,5A, 5V and 10m AWG28 cable: |
75 | 17 | Maximilian Seesslen | U2 = ( (5*10) / (10+2,129) ) = 4,1223514 V |
76 | |||
77 | 27 | Maximilian Seesslen | theoretically an device that draws 0,1A, 3V and 5m AWG28 cable: |
78 | 17 | Maximilian Seesslen | U2=((3*30)/ (30+1,0645) ) = 2,8971978; that should work; 3 - 2,8971978 = 0,1028022 V = 146 ADC steps |
79 | |||
80 | theoretically an device that draws 0,1A, 3V and 10m AWG28 cable: |
||
81 | U2=((3*30)/ (30+2,129) ) = 2,8012076 |
||
82 | |||
83 | theoretically an device that draws 0,25A, 3V and 10m AWG28 cable: |
||
84 | U2= (3 * 12) / (12 + 2,129) = approx. 2,547951 |
||
85 | |||
86 | theoretically an device that draws 0,5A, 3V and 10m AWG28 cable: |
||
87 | U2= (3 * 6) / (6 + 2,129) = approx. 2,2142945 |
||
88 | 13 | Maximilian Seesslen | U2= (3 * 6,8) / (6,8 + 2,129) = approx. 2,2846903 |
89 | 12 | Maximilian Seesslen | |
90 | h1. Calculations I |
||
91 | 4 | Maximilian Seesslen | |
92 | U2=((U*R2)/R_GES) |
||
93 | 5 | Maximilian Seesslen | |
94 | 4 | Maximilian Seesslen | U |
95 | R*I |
||
96 | |||
97 | 5V/0,1A= 50 Ohm |
||
98 | 5V*0,1A= 0,5 W |
||
99 | 7 | Maximilian Seesslen | |
100 | 5V/0,5A= 10 Ohm |
||
101 | 5 | Maximilian Seesslen | |
102 | RGes = R1+R2 = 50 |
||
103 | 7 | Maximilian Seesslen | |
104 | 3V=(5*R2)/50 |
||
105 | *R2 = (3*50)/5 = 30 -> 27 |
||
106 | R1 = 22* |
||
107 | 1 | Maximilian Seesslen | RGES = 49 |
108 | |||
109 | U2 = 5*27/49 = 2,755102 |
||
110 | |||
111 | 12 | Maximilian Seesslen | h1. Calculations II |
112 | 1 | Maximilian Seesslen | |
113 | * Ein Kabel >= 10m soll durchfallen. Koennen trotzdem groessere Wiederstaende verwendet werden? |
||
114 | 13 | Maximilian Seesslen | |
115 | 1 | Maximilian Seesslen | Ohne Widerstand: |
116 | 13 | Maximilian Seesslen | |
117 | 1 | Maximilian Seesslen | U2 = 2,755102 |
118 | 13 | Maximilian Seesslen | |
119 | Obige werte 1fach, 10m Kabel: |
||
120 | |||
121 | R2 = 27 |
||
122 | R1 = 22 |
||
123 | mit 10m |
||
124 | U2 = (5*27)/(49+2,129) = 2,6403802 |
||
125 | 2,755102-2,6403802=0,1147218 |
||
126 | 0,1147218/0,00073242188 = 156,6335 |
||
127 | |||
128 | Obige werte 10fach, 10m Kabel: |
||
129 | |||
130 | R2 = 270 |
||
131 | R1 = 220 |
||
132 | mit 10m |
||
133 | U2 = (5*270)/(490+2,129) = 2,7431832 |
||
134 | |||
135 | Bei 12Bit ADC: 3 / 4096 = approx. 0,00073242188 V pro ADC-Wert. |
||
136 | 2,755102-2,7431832=0,0119188 |
||
137 | 0,0119188 / 0,00073242188 = approx. 16,273135. Thats not super much |
||
138 | 16 | Maximilian Seesslen | |
139 | h1. Calculations III |
||
140 | 64 | Maximilian Seesslen | |
141 | 0,2129 Ohm/m; |
||
142 | 65 | Maximilian Seesslen | |
143 | U2=(U*r2)/(r1+r2) |
||
144 | =3*1000/(1000+2,129) |
||
145 | |||
146 | U1=(R1*U2)/R2 |
||
147 | R1=(r2*u1)/u2 |
||
148 | |||
149 | u2*(r1+r2)=r2*u |
||
150 | r1+r2=r2*u/u2 |
||
151 | r1=(r2*u)/u2-r2 |
||
152 | 67 | Maximilian Seesslen | |
153 | 3*12 / (12+0,2129) |
||
154 | (3-2,9477028) / (3/4096) = 71 |
||
155 | Theoretisch sind es bei 12 Ohm als R2 und einem 1m Kabel noch 71 ADC-Steps |
||
156 | 65 | Maximilian Seesslen | |
157 | 64 | Maximilian Seesslen | |
158 | 10 | Maximilian Seesslen | |
159 | h1. Keyfeatures |
||
160 | |||
161 | * Cable checker |
||
162 | * Buzzer Durchgangspruefer |
||
163 | 7 | Maximilian Seesslen | * PWM Output |
164 | 1 | Maximilian Seesslen | |
165 | 2 | Maximilian Seesslen | h1. MCU |
166 | 1 | Maximilian Seesslen | |
167 | * "stm32f051c4":https://www.mouser.de/datasheet/2/389/stm32f051c4-1851079.pdf |
||
168 | 2 | Maximilian Seesslen | ** I have 17; |
169 | 25 | Maximilian Seesslen | ** 16 ADC channels |
170 | 28 | Maximilian Seesslen | ** 3.06 ab 10 Stueck |
171 | 34 | Maximilian Seesslen | ** habe 17 |
172 | ** No USB |
||
173 | 3 | Maximilian Seesslen | * "STM32G030C8T6":https://www.st.com/resource/en/datasheet/stm32g030c8.pdf |
174 | 1 | Maximilian Seesslen | ** nearly same specs but smaller footprint; LQFP 48 |
175 | 13 | Maximilian Seesslen | ** 2,68€ inc. Mwst. |
176 | 29 | Maximilian Seesslen | ** ADC faster |
177 | 28 | Maximilian Seesslen | ** Mentions an 16Bit ADC value via oversampling, but thats complicated: adding white noise in order to calculate further 2 bits by software. |
178 | 35 | Maximilian Seesslen | ** Habe 10 |
179 | 21 | Maximilian Seesslen | ** No USB |
180 | |||
181 | * 4 ADC IN |
||
182 | * 4 Spannungs schalten |
||
183 | * 4 Kalibrierung schalten |
||
184 | * 2 LED Heartbeat/User |
||
185 | * 4 LED kabel ROT |
||
186 | * 4 LED kabel Gruen |
||
187 | * 4 LED kabel Orange |
||
188 | * 1 Input button |
||
189 | 23 | Maximilian Seesslen | * 2 Output PWM |
190 | |||
191 | 1 | Maximilian Seesslen | h1. Bauteile |
192 | 25 | Maximilian Seesslen | |
193 | 32 | Maximilian Seesslen | * Widerstaende: WF25P-6R8-5%; SP12-12R; |
194 | 33 | Maximilian Seesslen | ** SMD2512-12R-1% |
195 | |||
196 | h1. Display |
||
197 | |||
198 | 40 | Maximilian Seesslen | LED-Bar? Display? |
199 | Ohne Display ists bloed. |
||
200 | Via CAN/CANDis auch bloed wegen verkabelung. |
||
201 | Kleines OLED Display waer schon nice. |
||
202 | |||
203 | 41 | Maximilian Seesslen | "DEP096064B1-Y" |
204 | "Datasheet":https://www.tme.eu/Document/7d80b9024b2a78272b470cfa0544c783/DEP096064B1-Y.pdf |
||
205 | 9.11 Euro; grafisch, brauch ich Schriftart; nicht monierbar |
||
206 | |||
207 | "REX128128HWAP3N0" |
||
208 | 42 | Maximilian Seesslen | |
209 | 41 | Maximilian Seesslen | I2C Text displays; |
210 | 42 | Maximilian Seesslen | |
211 | 60 | Maximilian Seesslen | Ein kleines TFT-RGB Display schon fast billiger; 6,77€ |
212 | 43 | Maximilian Seesslen | |
213 | "DEM096160ATMH-PWN":https://www.tme.eu/Document/938d60856f558016147975bdab4acc3c/DEM096160ATMH-PWN.pdf |
||
214 | 96x160 (RGB); da brauch ich mit LCD nicht anfangen |
||
215 | Dann passt der STM32G030C8 auch perfeckt. 64KB Flash |
||
216 | 44 | Maximilian Seesslen | |
217 | * 12pin, 3V, Backlight 2,8V; 20mA |
||
218 | * "GC9107":https://cdn.hackaday.io/files/1881838051221472/GC9107%20DataSheet%20V1.2.pdf |
||
219 | 45 | Maximilian Seesslen | * FH12-12S-0.5SH-55 |
220 | * 12x20 Chars; |
||
221 | ** "1: 72987 Ohm" |
||
222 | ** "2: 72987 Ohm" |
||
223 | ** "3: 72987 Ohm" |
||
224 | ** "4: 72987 Ohm" |
||
225 | ** "------------" |
||
226 | ** "Type: 1:1 " |
||
227 | ** "Status: " |
||
228 | 60 | Maximilian Seesslen | ** " Good " |
229 | |||
230 | 61 | Maximilian Seesslen | "DEM080160BVMH-PWN":https://www.tme.eu/Document/6a8f456ac28caf9a0c7ea4be0ef0b282/DEM080160BVMH-PWN.pdf |
231 | 62 | Maximilian Seesslen | 80x160; IPS; 7.83€ |
232 | 44 | Maximilian Seesslen | 3,1V fuers Backlight sind halt doof. |
233 | 36 | Maximilian Seesslen | |
234 | h1. USB |
||
235 | |||
236 | Ohne Display und USB ist es irgendwie doof. Eine schoene Gui haette schon was. |
||
237 | STM32F042C6U6 mit CAN: CANDis kann das anzeigen. |
||
238 | Wie wird dsa normal gepowert? Ohnehin USB. |
||
239 | |||
240 | STM32F042C6U6 haett ich noch |
||
241 | * UFQFPN48 |
||
242 | 38 | Maximilian Seesslen | * Reicht 32K fuer USB? |
243 | 1 | Maximilian Seesslen | * STM32F042C6U6 is already one of the cheapest USB; 3,15€ |
244 | 46 | Maximilian Seesslen | * STM32L151C6U6: 3,33€ |
245 | |||
246 | h1. Schalten |
||
247 | |||
248 | R_DS ist ca. 50 milli Ohm bei 2V |
||
249 | 47 | Maximilian Seesslen | Mit Kalibrier-Kanal i.O. |
250 | 48 | Maximilian Seesslen | -> Nur mit P-MOSFET schalten, on per default ist ok. |
251 | -> 10K PD; 0,3mA * 5 -> 15mA |
||
252 | 49 | Maximilian Seesslen | -> internal pulldowns of STM32 are 40K, so 47K should also be fine |
253 | -> Theoretically resistors are not decessary during runtime at all. |
||
254 | 52 | Maximilian Seesslen | |
255 | h1. Consumtion |
||
256 | |||
257 | Accidantly all 5 channels could be active; |
||
258 | 53 | Maximilian Seesslen | |
259 | 52 | Maximilian Seesslen | 250mA * 5; 1,25 ampere would flow. The LDO has to be powerfull. |
260 | 54 | Maximilian Seesslen | |
261 | 55 | Maximilian Seesslen | Is there any use to power it via USB? Directly 3V? |
262 | 54 | Maximilian Seesslen | I have this small 3V JST-USB adapters. |
263 | 56 | Maximilian Seesslen | |
264 | 1mm trace width in power supply should be ok, around 15°C temperature rise with all 2,5A. |
||
265 | 49 | Maximilian Seesslen | |
266 | h1. Vorwiederstand ADC |
||
267 | |||
268 | 1 | Maximilian Seesslen | Ist der ADC aus versehen als ausgang und LOW geschaltet, liegen an diesem direkt 3V an, zumindest wenn das zu messende Kabel perfekt bzw. gebrueckt ist. |
269 | 63 | Maximilian Seesslen | The maximum current for any one pin is 25 mA sink or source. |
270 | An resistor of min 120Ohm (25mA) is needed. 240Ohm @ 3,6V: 15mA |
||
271 | 51 | Maximilian Seesslen | |
272 | 1 | Maximilian Seesslen | h1. Schematics |
273 | 66 | Maximilian Seesslen | |
274 | 70 | Maximilian Seesslen | V_REF+ is connected via 33uH to VDD; 100nF |
275 | BOOT0-Pin is not used as default. No interest in serial bootloader at the moment. |
||
276 | |||
277 | 66 | Maximilian Seesslen | |
278 | 57 | Maximilian Seesslen | |
279 | 1 | Maximilian Seesslen | h1. Order |
280 | 69 | Maximilian Seesslen | |
281 | 68 | Maximilian Seesslen | * Display; DEM096160ATMH-PWN |
282 | * LEDs; LTST-C155KGJRKT |
||
283 | 57 | Maximilian Seesslen | * Surpressor Diode 3,5PTV; UCLAMP3301D.TCT |
284 | 58 | Maximilian Seesslen | * SMD2512-12R-1% |
285 | 68 | Maximilian Seesslen | * FPC connector |
286 | 1 | Maximilian Seesslen | * Spule 33µH; NLV10KTC330 |