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