Project

General

Profile

Wiki » History » Version 81

Frédéric Blanc, 2024-06-18 13:58

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 81 Frédéric Blanc
h2. DPS5005
75
76
!clipboard-202406181357-wvt60.png!
77
78
79
80
Module d'alimentation à afficheur LCD réglable en tension de 0 à 50 Vcc et en intensité de 0 à 5 A. L'écran couleur de 1,44'' offre un affichage particulièrement détaillé et complet des informations.
81
82
https://www.gotronic.fr/art-alimentation-programmable-dps5005-29294.htm
83
84
h2. DPH5005
85
86
!clipboard-202406181358-4or4r.png!
87
88
Module d'alimentation à afficheur LCD 1,44" réglable en tension de 0 à 50 Vcc et en intensité de 0 à 5 A. Ce module délivre un signal de sortie haute résolution réglable par paliers de 10 mV et de 1 mA.
89
90
https://www.gotronic.fr/art-alimentation-programmable-dph5005-31537.htm
91
92 31 Frédéric Blanc
h3. Modbus
93
94 1 Frédéric Blanc
!clipboard-202404121322-qk0l1.png!
95 32 Frédéric Blanc
96 53 Frédéric Blanc
voir documentation document:"protocol -english translation V1.2"
97
98 64 Frédéric Blanc
|_.function code|_.Definition|_.Operation (binary)|
99 52 Frédéric Blanc
|0x03|Read register data|Read data from one or more registers|
100
|0x06|Write a single register|Write a set of binary data to a single register|
101
|0x10|Write multiple registers|Write multiple sets of binary data to multiple registers|
102
103 61 Frédéric Blanc
|\5=. *0x03 Read the function of the host format* |
104 57 Frédéric Blanc
|address code|function code|Register start address |Number of register
105
 addresses n (1 ~ 32)|CRC Check code|
106 54 Frédéric Blanc
|1 byte|1 byte|2 byte|2 byte|2 byte|
107
108 62 Frédéric Blanc
|\5=. *0x03 Read function Slave returns format*|
109
|address code|function code|Returns the number of bytes 2 * n|Register data|CRC Check code|
110
|1 byte|1 byte|1 byte|2*n Bytes|2 byte|
111 52 Frédéric Blanc
112 63 Frédéric Blanc
|\5=. *0x06 Write a single register function in host format*|
113
|address code|function code|Register address|Register data|CRC Check code|
114 1 Frédéric Blanc
|1 byte|1 byte|2 byte|2 byte|2 byte|
115 64 Frédéric Blanc
116 65 Frédéric Blanc
|\5=. *0x06 Write a single register function from the machine to return the format*|
117 64 Frédéric Blanc
|address code|function code|Register address|Register data|CRC Check code|
118
|1 byte|1 byte|2 byte|2 byte|2 byte|
119
120 68 Frédéric Blanc
|\6=. *0x10 Write function host format*|
121 67 Frédéric Blanc
|address code|function code|Register start address|Number of register addresses
122
n (1 ~ 32)|Write the number of bytes 2 * n|Register data|CRC Check code|
123 66 Frédéric Blanc
|1 byte|1 byte|2 byte|2 byte|1 byte|2*n byte|2 byte|
124
125
|\5=. *0x10 Write function slave return format*|
126 67 Frédéric Blanc
|address code|function code|Register start address|Number of register addresses
127 66 Frédéric Blanc
n (1 ~ 32)|CRC Check code|
128
|1 byte|1 byte|2 byte|2 byte|2 byte|
129 63 Frédéric Blanc
130 69 Frédéric Blanc
Protocol register description (single register address data for double-byte data)
131 70 Frédéric Blanc
132 76 Frédéric Blanc
|name|Description|number of bytes|Decimal point|unit|Read and write|Register address|dps_modbus.py|
133
|U-SET|Voltage setting|2|2|V|R/W|0x0000|voltage_set|
134
|I-SET|Current setting|2|2|A|R/W|0x0001|current_set|
135
|UOUT|Output voltage display value|2|2|V|R|0x0002|voltage|
136
|IOUT|Output current display value|2|2|A|R|0x0003|current|
137
|POWER|Output power display value|2|2|W|R|0x0004|power|
138
|UIN|Input voltage display value|2|2|V|R|0x0005|voltage_in|
139
|LOCK|Key lock|2|0|-|R/W|0x0006|lock|
140
|PROTECT|Protection state|2|0|-|R|0x0007|protect|
141
|CVCC|Constant voltage constant current state|2|0|-|R|0x0008|cv_cc|
142
|ONOFF|Switch output|2|0|-|R/W|0x0009|onoff|
143
|B_LED|Backlight brightness level|2|0|-|R/W|0x000A|b_led|
144
|MODEL|Product number|2|0|-|R|0x000B|model|
145
|VERSON|Firmware version number|2|0|-|R|0x000C|version|
146
|EXTRACT_M|Quickly bring up data sets|2|0|-|W|0x0023|extract_m|
147
|U-SET|Voltage setting|2|2|V|R/W|0x0050|voltage_set2|
148
|I-SET|Current setting|2|3|A|R/W|0x0051|current_set2|
149
|S-OVP|Overvoltage protection|2|2|V|R/W|0x0052|s_ovp|
150
|S-OCP|Overcurrent protection value|2|3|A|R/W|0x0053|s_ocp|
151
|S-OPP|Over power protection value|2|1、2|W|R/W|0x0054|s_opp|
152
|B-LED|Backlight brightness level|2|0|-|R/W|0x0055|b_led2|
153
|M-PRE|The data is called to update the output|2|0|-|R/W|0x0056|m_pre|
154
|S-INI|Power on the output switch|2|2|-|R/W|0x0057|s_ini|
155 75 Frédéric Blanc
156 76 Frédéric Blanc
h3. dps_modbus.py
157 69 Frédéric Blanc
158 79 Frédéric Blanc
|commande|Description|
159 78 Frédéric Blanc
|voltage_set|Voltage setting|
160
|current_set|Current setting|
161
|voltage|Output voltage display value|
162
|current|Output current display value|
163
|power|Output power display value|
164
|voltage_in|Input voltage display value|
165
|lock|Key lock|
166
|protect|Protection state|
167
|cv_cc|Constant voltage constant current state|
168
|onoff|Switch output|
169
|b_led|Backlight brightness level|
170
|model|Product number|
171
|version|Firmware version number|
172
|extract_m|Quickly bring up data sets|
173
|voltage_set2|Voltage setting|
174
|current_set2|Current setting|
175
|s_ovp|Overvoltage protection|
176
|s_ocp|Overcurrent protection value|
177
|s_opp|Over power protection value|
178
|b_led2|Backlight brightness level|
179
|m_pre|The data is called to update the output|
180
|s_ini|Power on the output switch|
181 77 Frédéric Blanc
|read_all|Read data as a block, much faster than individual reads|
182
|write_voltage_current|write voltage & current as a block|
183
|write_all|write block|
184
185
186 47 Frédéric Blanc
/dev/ttyACM0 ou /dev/ttyUSB0
187 32 Frédéric Blanc
baud rate *115200*
188 31 Frédéric Blanc
189 1 Frédéric Blanc
Slave Address: 1..247 ( *0: broadcast* )
190 31 Frédéric Blanc
Function code: see later
191
Data: 0..252 byte(s)
192 33 Frédéric Blanc
*CRC16-MODBUS* : see https://crccalc.com/ for code.
193 48 Frédéric Blanc
https://github.com/LacobusVentura/MODBUS-CRC16
194 31 Frédéric Blanc
195 1 Frédéric Blanc
196 34 Frédéric Blanc
h3. test commande
197
198 1 Frédéric Blanc
199 46 Frédéric Blanc
200 45 Frédéric Blanc
sur /dev/ttyACM0
201 1 Frédéric Blanc
202 46 Frédéric Blanc
Broadcast Power ON
203 1 Frédéric Blanc
<pre><code class="shell">
204 35 Frédéric Blanc
echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyACM0
205 34 Frédéric Blanc
</code></pre>
206
207 36 Frédéric Blanc
Broadcast Power OFF
208
<pre><code class="shell">
209
echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyACM0
210
</code></pre>
211 1 Frédéric Blanc
212 45 Frédéric Blanc
sur /dev/ttyUSB0
213 1 Frédéric Blanc
214 46 Frédéric Blanc
Broadcast Power ON
215 45 Frédéric Blanc
<pre><code class="shell">
216
echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyUSB0
217
</code></pre>
218
219
Broadcast Power OFF
220
<pre><code class="shell">
221
echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyUSB0
222
</code></pre>
223 36 Frédéric Blanc
224 30 Frédéric Blanc
h3. notice
225 15 Frédéric Blanc
226
presser [SW] pendant 2s pour accéder aux paramètres 
227
!clipboard-202404041503-e5ifh.png!
228
229 6 Frédéric Blanc
h2. GUI Python
230
231 9 Frédéric Blanc
h3. venv — Création d'environnements virtuels
232 6 Frédéric Blanc
233
<pre><code class="shell">
234 8 Frédéric Blanc
$ python3 -m venv venv
235 6 Frédéric Blanc
</code></pre>
236
237
Pour activer l'environnement, exécutez
238
239
<pre><code class="shell">
240
source venv/bin/activate
241
</code></pre>
242
243 7 Frédéric Blanc
<pre><code class="shell">
244
. venv/bin/activate
245
</code></pre>
246
247 51 Frédéric Blanc
sous Windows
248
<pre><code class="shell">
249
env\Scripts\activate.bat
250
</code></pre>
251
252 9 Frédéric Blanc
Vous devrez « quitter » ou « désactiver » votre environnement virtuel à l'aide de la commande 
253 6 Frédéric Blanc
254
<pre><code class="shell">
255
deactivate
256
</code></pre>
257
258
259
260 1 Frédéric Blanc
https://docs.python.org/fr/3/library/venv.html
261
262 16 Frédéric Blanc
h3. pyqt5
263
264
<pre><code class="shell">
265
pip3 install pyqt5 --config-settings --confirm-license= --verbose
266
</code></pre>
267
268 17 Frédéric Blanc
https://stackoverflow.com/questions/73714829/pip-install-pyqt5-it-cannot-go-on
269 16 Frédéric Blanc
270 9 Frédéric Blanc
h3. XY6015L_pyGUI
271
272 44 Frédéric Blanc
lancement de l'interface
273
274
<pre><code class="python">
275
python dps_GUI_program.py
276
</code></pre>
277
278 9 Frédéric Blanc
!clipboard-202404041117-w53xm.png!
279
280
configuration du port com
281
282
le port série peut être corrigé en modifiant le paramètre "port_set" dans "dps5005_limits.ini".
283
284
285
<pre><code class="shell">
286
[SectionZero]
287
The parameters below limit the code from incorrectly transmitting extreme values entered by the user:
288
if threshold exceeded value defaults to zero:
289
This file may be adapted for other versions of 'DPSxxxx' power supplies:
290
291
[SectionOne]
292
#leave empty "" for automatic port scanning or set serial port e.g. "/dev/cu.wchusbserial1410" or "/dev/ttyUSB0":
293
port_set: "/dev/ttyACM0"	#
294
295
#The parameters below limit the code from incorrectly transmitting extreme values entered by the user:
296 1 Frédéric Blanc
#if threshold exceeded value defaults to zero:
297 10 Frédéric Blanc
...
298 9 Frédéric Blanc
</code></pre>
299
300
h2. Sources
301 5 Frédéric Blanc
302 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/
303 29 Frédéric Blanc
http://xj900diversion.free.fr/bus/I2C%20-%20RS-485%20adapter.htm
304 5 Frédéric Blanc
https://github.com/AntaresAdroit/RDTech_PS_Comm
305
https://github.com/lambcutlet/DPS5005_pyGUI
306
https://github.com/kbs3056/XY6015L_pyGUI