Wiki » History » Version 70
Frédéric Blanc, 2024-06-10 16:52
1 | 1 | Frédéric Blanc | h1. Wiki |
---|---|---|---|
2 | |||
3 | 42 | Frédéric Blanc | !{width: 30%}https://redmine.laas.fr/attachments/download/4815/Face%20AV%20PS.jpg! |
4 | 43 | Frédéric Blanc | |
5 | 42 | Frédéric Blanc | !{width: 30%}https://redmine.laas.fr/attachments/download/4814/Face%20AR%20PS.jpg! |
6 | |||
7 | 41 | Frédéric Blanc | {{toc}} |
8 | |||
9 | 11 | Frédéric Blanc | h2. Modbus / RS485 isolated |
10 | |||
11 | 25 | Frédéric Blanc | !clipboard-202404091540-4btca.png! |
12 | |||
13 | 50 | Frédéric Blanc | https://arduino103.blogspot.com/2021/10/decoder-une-trame-rs485-loscilloscope.html |
14 | |||
15 | 25 | Frédéric Blanc | h3. non isoler |
16 | 24 | Frédéric Blanc | |
17 | !clipboard-202404091414-fugem.png! |
||
18 | |||
19 | 21 | Frédéric Blanc | !clipboard-202404081517-wbjgq.png! |
20 | |||
21 | 27 | Frédéric Blanc | h4. Fusibles réarmables |
22 | |||
23 | !clipboard-202404091611-8b8z9.png! |
||
24 | |||
25 | 23 | Frédéric Blanc | h3. Texas Instruments ISOW14x2 Isolated RS-485 DC-DC Converter |
26 | 22 | Frédéric Blanc | |
27 | !clipboard-202404081533-dzk67.png! |
||
28 | |||
29 | 18 | Frédéric Blanc | h3. ANALOG DEVICES LTM2881CV-5#PBF |
30 | |||
31 | 19 | Frédéric Blanc | !clipboard-202404051942-kmfn5.jpg! |
32 | |||
33 | 18 | Frédéric Blanc | Transceiver, RS422, RS485, 20 Mbps, 1 Driver, 1 Récepteur, 4,5 à 5.5V, 0 à 70°C, LGA-32 |
34 | |||
35 | Code Farnell 4023829 |
||
36 | |||
37 | h3. ADM2865E Power Isolated, RS-485 Transceivers |
||
38 | 12 | Frédéric Blanc | |
39 | 1 | Frédéric Blanc | !clipboard-202404041435-zyzea.png! |
40 | 12 | Frédéric Blanc | |
41 | 13 | Frédéric Blanc | |Code Farnell|Référence Fabricant |Fabricant / Description| |
42 | 12 | Frédéric Blanc | |4023816 |ADM2865EBRNZ |ANALOG DEVICES Transceiver, RS422, RS485, 25 Mbps, 1 Driver, 1 Récepteur, 3 à 5.5V, -40 à 105°C, WSOIC-28| |
43 | |1456395 |SM712.TCT |SEMTECH Diode TVS, SM, Bidirectionelle, 12 V, 26 V, SOT-23, 3 Broche(s)| |
||
44 | |1515786 |BLM15HD182SN1D |MURATA Perle de ferrite, 0402 [1005 Metric], 1.8 kohm, 200 mA, BLM15H, 2.2 ohm, ± 25%| |
||
45 | |1867958 |08053D106KAT2A |KYOCERA AVX Condensateur céramique multicouche CMS, 10 µF, 25 V, 0805 [Métrique 2012], ± 10%, X5R| |
||
46 | |2443238 |BLM18HE601SN1D |MURATA Perle de ferrite, 0603 [1608 Metric], 600 ohm, 800 mA, BLM18H, 0.25 ohm, ± 25%| |
||
47 | 11 | Frédéric Blanc | |
48 | 37 | Frédéric Blanc | h3. Module de communication d'isolation, ADUM3201 + B0505XT TTL à RS485 |
49 | |||
50 | !clipboard-202404231543-s8vft.png! |
||
51 | |||
52 | *Attention RX sur TX* |
||
53 | |||
54 | 28 | Frédéric Blanc | h3. RS485 I2C |
55 | |||
56 | !clipboard-202404120929-wdgmq.png! |
||
57 | |||
58 | 20 | Frédéric Blanc | h2. XY5005E |
59 | |||
60 | 40 | Frédéric Blanc | com le port 4 broches JST 1.25 ne semble pas avoir de TX, ni de RX. Il n'y a pas non plus de menu pour le chois de l'adressage |
61 | 20 | Frédéric Blanc | |
62 | !clipboard-202404081443-iygma.png! |
||
63 | 39 | Frédéric Blanc | !clipboard-202404241236-ulutn.png! |
64 | 38 | Frédéric Blanc | !clipboard-202404241234-m5crk.png! |
65 | |||
66 | 14 | Frédéric Blanc | h2. XY6015L Step-Down Regulated Power Supply |
67 | 1 | Frédéric Blanc | |
68 | !clipboard-202403251011-lfrn1.png! |
||
69 | |||
70 | 4 | Frédéric Blanc | µC AT32F421 ARM® Cortex®-M4 core |
71 | Ctrl EG1163S BUCK DC-DC de Rectification synchrone 300kHz |
||
72 | MOS NCE82H140 |
||
73 | |||
74 | 31 | Frédéric Blanc | h3. Modbus |
75 | |||
76 | 1 | Frédéric Blanc | !clipboard-202404121322-qk0l1.png! |
77 | 32 | Frédéric Blanc | |
78 | 53 | Frédéric Blanc | voir documentation document:"protocol -english translation V1.2" |
79 | |||
80 | 64 | Frédéric Blanc | |_.function code|_.Definition|_.Operation (binary)| |
81 | 52 | Frédéric Blanc | |0x03|Read register data|Read data from one or more registers| |
82 | |0x06|Write a single register|Write a set of binary data to a single register| |
||
83 | |0x10|Write multiple registers|Write multiple sets of binary data to multiple registers| |
||
84 | |||
85 | 61 | Frédéric Blanc | |\5=. *0x03 Read the function of the host format* | |
86 | 57 | Frédéric Blanc | |address code|function code|Register start address |Number of register |
87 | addresses n (1 ~ 32)|CRC Check code| |
||
88 | 54 | Frédéric Blanc | |1 byte|1 byte|2 byte|2 byte|2 byte| |
89 | |||
90 | 62 | Frédéric Blanc | |\5=. *0x03 Read function Slave returns format*| |
91 | |address code|function code|Returns the number of bytes 2 * n|Register data|CRC Check code| |
||
92 | |1 byte|1 byte|1 byte|2*n Bytes|2 byte| |
||
93 | 52 | Frédéric Blanc | |
94 | 63 | Frédéric Blanc | |\5=. *0x06 Write a single register function in host format*| |
95 | |address code|function code|Register address|Register data|CRC Check code| |
||
96 | 1 | Frédéric Blanc | |1 byte|1 byte|2 byte|2 byte|2 byte| |
97 | 64 | Frédéric Blanc | |
98 | 65 | Frédéric Blanc | |\5=. *0x06 Write a single register function from the machine to return the format*| |
99 | 64 | Frédéric Blanc | |address code|function code|Register address|Register data|CRC Check code| |
100 | |1 byte|1 byte|2 byte|2 byte|2 byte| |
||
101 | |||
102 | 68 | Frédéric Blanc | |\6=. *0x10 Write function host format*| |
103 | 67 | Frédéric Blanc | |address code|function code|Register start address|Number of register addresses |
104 | n (1 ~ 32)|Write the number of bytes 2 * n|Register data|CRC Check code| |
||
105 | 66 | Frédéric Blanc | |1 byte|1 byte|2 byte|2 byte|1 byte|2*n byte|2 byte| |
106 | |||
107 | |\5=. *0x10 Write function slave return format*| |
||
108 | 67 | Frédéric Blanc | |address code|function code|Register start address|Number of register addresses |
109 | 66 | Frédéric Blanc | n (1 ~ 32)|CRC Check code| |
110 | |1 byte|1 byte|2 byte|2 byte|2 byte| |
||
111 | 63 | Frédéric Blanc | |
112 | 69 | Frédéric Blanc | Protocol register description (single register address data for double-byte data) |
113 | 70 | Frédéric Blanc | |
114 | 69 | Frédéric Blanc | |name|Description|number of bytes|Decimal point|unit|Read and write|Register address| |
115 | |U-SET|Voltage setting|2|2|V|R/W|0000H| |
||
116 | |I-SET|Current setting|2 |
||
117 | |2|A|R/W|0001H| |
||
118 | |UOUT|Output voltage display value|2|2|V|R|0002H| |
||
119 | |IOUT|Output current display value|2|2|A|R|0003H| |
||
120 | |POWER|Output power display value|2|2|W|R|0004H| |
||
121 | |UIN|Input voltage display value|2|2|V|R|0005H| |
||
122 | |LOCK|Key lock|2|0|-|R/W|0006H| |
||
123 | |PROTECT|Protection state|2|0|-|R|0007H| |
||
124 | |CVCC|Constant voltage constant current state|2|0|-|R|0008H| |
||
125 | |ONOFF|Switch output|2|0|-|R/W|0009H| |
||
126 | |B_LED|Backlight brightness level|2|0|-|R/W|000AH| |
||
127 | |MODEL|Product number|2|0|-|R|000BH| |
||
128 | VERSON |
||
129 | Firmware version number |
||
130 | 2 |
||
131 | 0 |
||
132 | - |
||
133 | R |
||
134 | 000CH |
||
135 | EXTRACT_M |
||
136 | Quickly bring up data sets |
||
137 | 2 |
||
138 | 0 |
||
139 | - |
||
140 | W |
||
141 | 0023H |
||
142 | U-SET |
||
143 | Voltage setting |
||
144 | 2 |
||
145 | 2 |
||
146 | V |
||
147 | R/W |
||
148 | 0050H |
||
149 | I-SET |
||
150 | Current setting |
||
151 | 2 |
||
152 | 3 |
||
153 | A |
||
154 | R/W |
||
155 | 0051H |
||
156 | S-OVP |
||
157 | Overvoltage protection |
||
158 | 2 |
||
159 | 2 |
||
160 | V |
||
161 | R/W |
||
162 | 0052H |
||
163 | S-OCP |
||
164 | Overcurrent protection value |
||
165 | 2 |
||
166 | 3 |
||
167 | A |
||
168 | R/W |
||
169 | 0053H |
||
170 | S-OPP |
||
171 | Over power protection value |
||
172 | 2 |
||
173 | 1、2 |
||
174 | W |
||
175 | R/W |
||
176 | 0054H |
||
177 | B-LED |
||
178 | Backlight brightness level |
||
179 | 2 |
||
180 | 0 |
||
181 | - |
||
182 | R/W |
||
183 | 0055H |
||
184 | M-PRE |
||
185 | The data is called to update the output |
||
186 | 2 |
||
187 | 0 |
||
188 | - |
||
189 | R/W |
||
190 | 0056H |
||
191 | S-INI |
||
192 | Power on the output switch |
||
193 | 2 |
||
194 | 2 |
||
195 | - |
||
196 | R/W |
||
197 | 0057H |
||
198 | |||
199 | |||
200 | 47 | Frédéric Blanc | /dev/ttyACM0 ou /dev/ttyUSB0 |
201 | 32 | Frédéric Blanc | baud rate *115200* |
202 | 31 | Frédéric Blanc | |
203 | 1 | Frédéric Blanc | Slave Address: 1..247 ( *0: broadcast* ) |
204 | 31 | Frédéric Blanc | Function code: see later |
205 | Data: 0..252 byte(s) |
||
206 | 33 | Frédéric Blanc | *CRC16-MODBUS* : see https://crccalc.com/ for code. |
207 | 48 | Frédéric Blanc | https://github.com/LacobusVentura/MODBUS-CRC16 |
208 | 31 | Frédéric Blanc | |
209 | 1 | Frédéric Blanc | Modbus registers: |
210 | U_SET = 0 |
||
211 | I_SET = 1 |
||
212 | UOUT = 2 |
||
213 | IOUT = 3 |
||
214 | POWER = 4 |
||
215 | UIN = 5 |
||
216 | Ah = 6 |
||
217 | PROTECT = 7 # not tested |
||
218 | Wh = 8 |
||
219 | Time = 11 |
||
220 | Temp = 13 |
||
221 | Lock = 15 |
||
222 | CV_CC = 17 |
||
223 | ONOFF = 18 |
||
224 | Celsius = 19 |
||
225 | MODEL = 22 # ? |
||
226 | 5 | Frédéric Blanc | VERSION = 23 # ? |
227 | 1 | Frédéric Blanc | |
228 | 34 | Frédéric Blanc | h3. test commande |
229 | |||
230 | 1 | Frédéric Blanc | |
231 | 46 | Frédéric Blanc | |
232 | 45 | Frédéric Blanc | sur /dev/ttyACM0 |
233 | 1 | Frédéric Blanc | |
234 | 46 | Frédéric Blanc | Broadcast Power ON |
235 | 1 | Frédéric Blanc | <pre><code class="shell"> |
236 | 35 | Frédéric Blanc | echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyACM0 |
237 | 34 | Frédéric Blanc | </code></pre> |
238 | |||
239 | 36 | Frédéric Blanc | Broadcast Power OFF |
240 | <pre><code class="shell"> |
||
241 | echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyACM0 |
||
242 | </code></pre> |
||
243 | 1 | Frédéric Blanc | |
244 | 45 | Frédéric Blanc | sur /dev/ttyUSB0 |
245 | 1 | Frédéric Blanc | |
246 | 46 | Frédéric Blanc | Broadcast Power ON |
247 | 45 | Frédéric Blanc | <pre><code class="shell"> |
248 | echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyUSB0 |
||
249 | </code></pre> |
||
250 | |||
251 | Broadcast Power OFF |
||
252 | <pre><code class="shell"> |
||
253 | echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyUSB0 |
||
254 | </code></pre> |
||
255 | 36 | Frédéric Blanc | |
256 | 30 | Frédéric Blanc | h3. notice |
257 | 15 | Frédéric Blanc | |
258 | presser [SW] pendant 2s pour accéder aux paramètres |
||
259 | !clipboard-202404041503-e5ifh.png! |
||
260 | |||
261 | 6 | Frédéric Blanc | h2. GUI Python |
262 | |||
263 | 9 | Frédéric Blanc | h3. venv — Création d'environnements virtuels |
264 | 6 | Frédéric Blanc | |
265 | <pre><code class="shell"> |
||
266 | 8 | Frédéric Blanc | $ python3 -m venv venv |
267 | 6 | Frédéric Blanc | </code></pre> |
268 | |||
269 | Pour activer l'environnement, exécutez |
||
270 | |||
271 | <pre><code class="shell"> |
||
272 | source venv/bin/activate |
||
273 | </code></pre> |
||
274 | |||
275 | 7 | Frédéric Blanc | <pre><code class="shell"> |
276 | . venv/bin/activate |
||
277 | </code></pre> |
||
278 | |||
279 | 51 | Frédéric Blanc | sous Windows |
280 | <pre><code class="shell"> |
||
281 | env\Scripts\activate.bat |
||
282 | </code></pre> |
||
283 | |||
284 | 9 | Frédéric Blanc | Vous devrez « quitter » ou « désactiver » votre environnement virtuel à l'aide de la commande |
285 | 6 | Frédéric Blanc | |
286 | <pre><code class="shell"> |
||
287 | deactivate |
||
288 | </code></pre> |
||
289 | |||
290 | |||
291 | |||
292 | 1 | Frédéric Blanc | https://docs.python.org/fr/3/library/venv.html |
293 | |||
294 | 16 | Frédéric Blanc | h3. pyqt5 |
295 | |||
296 | <pre><code class="shell"> |
||
297 | pip3 install pyqt5 --config-settings --confirm-license= --verbose |
||
298 | </code></pre> |
||
299 | |||
300 | 17 | Frédéric Blanc | https://stackoverflow.com/questions/73714829/pip-install-pyqt5-it-cannot-go-on |
301 | 16 | Frédéric Blanc | |
302 | 9 | Frédéric Blanc | h3. XY6015L_pyGUI |
303 | |||
304 | 44 | Frédéric Blanc | lancement de l'interface |
305 | |||
306 | <pre><code class="python"> |
||
307 | python dps_GUI_program.py |
||
308 | </code></pre> |
||
309 | |||
310 | 9 | Frédéric Blanc | !clipboard-202404041117-w53xm.png! |
311 | |||
312 | configuration du port com |
||
313 | |||
314 | le port série peut être corrigé en modifiant le paramètre "port_set" dans "dps5005_limits.ini". |
||
315 | |||
316 | |||
317 | <pre><code class="shell"> |
||
318 | [SectionZero] |
||
319 | The parameters below limit the code from incorrectly transmitting extreme values entered by the user: |
||
320 | if threshold exceeded value defaults to zero: |
||
321 | This file may be adapted for other versions of 'DPSxxxx' power supplies: |
||
322 | |||
323 | [SectionOne] |
||
324 | #leave empty "" for automatic port scanning or set serial port e.g. "/dev/cu.wchusbserial1410" or "/dev/ttyUSB0": |
||
325 | port_set: "/dev/ttyACM0" # |
||
326 | |||
327 | #The parameters below limit the code from incorrectly transmitting extreme values entered by the user: |
||
328 | 1 | Frédéric Blanc | #if threshold exceeded value defaults to zero: |
329 | 10 | Frédéric Blanc | ... |
330 | 9 | Frédéric Blanc | </code></pre> |
331 | |||
332 | h2. Sources |
||
333 | 5 | Frédéric Blanc | |
334 | 26 | Frédéric Blanc | https://www.circuitstate.com/tutorials/what-is-rs-485-how-to-use-max485-with-arduino-for-reliable-long-distance-serial-communication/ |
335 | 29 | Frédéric Blanc | http://xj900diversion.free.fr/bus/I2C%20-%20RS-485%20adapter.htm |
336 | 5 | Frédéric Blanc | https://github.com/AntaresAdroit/RDTech_PS_Comm |
337 | https://github.com/lambcutlet/DPS5005_pyGUI |
||
338 | https://github.com/kbs3056/XY6015L_pyGUI |