Wiki » History » Version 51
Frédéric Blanc, 2024-06-10 14:47
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 | 47 | Frédéric Blanc | /dev/ttyACM0 ou /dev/ttyUSB0 |
79 | 32 | Frédéric Blanc | baud rate *115200* |
80 | 31 | Frédéric Blanc | |
81 | 1 | Frédéric Blanc | Slave Address: 1..247 ( *0: broadcast* ) |
82 | 31 | Frédéric Blanc | Function code: see later |
83 | Data: 0..252 byte(s) |
||
84 | 33 | Frédéric Blanc | *CRC16-MODBUS* : see https://crccalc.com/ for code. |
85 | 48 | Frédéric Blanc | https://github.com/LacobusVentura/MODBUS-CRC16 |
86 | 31 | Frédéric Blanc | |
87 | 1 | Frédéric Blanc | Modbus registers: |
88 | U_SET = 0 |
||
89 | I_SET = 1 |
||
90 | UOUT = 2 |
||
91 | IOUT = 3 |
||
92 | POWER = 4 |
||
93 | UIN = 5 |
||
94 | Ah = 6 |
||
95 | PROTECT = 7 # not tested |
||
96 | Wh = 8 |
||
97 | Time = 11 |
||
98 | Temp = 13 |
||
99 | Lock = 15 |
||
100 | CV_CC = 17 |
||
101 | ONOFF = 18 |
||
102 | Celsius = 19 |
||
103 | MODEL = 22 # ? |
||
104 | 5 | Frédéric Blanc | VERSION = 23 # ? |
105 | 1 | Frédéric Blanc | |
106 | 34 | Frédéric Blanc | h3. test commande |
107 | |||
108 | 1 | Frédéric Blanc | |
109 | 46 | Frédéric Blanc | |
110 | 45 | Frédéric Blanc | sur /dev/ttyACM0 |
111 | 1 | Frédéric Blanc | |
112 | 46 | Frédéric Blanc | Broadcast Power ON |
113 | 1 | Frédéric Blanc | <pre><code class="shell"> |
114 | 35 | Frédéric Blanc | echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyACM0 |
115 | 34 | Frédéric Blanc | </code></pre> |
116 | |||
117 | 36 | Frédéric Blanc | Broadcast Power OFF |
118 | <pre><code class="shell"> |
||
119 | echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyACM0 |
||
120 | </code></pre> |
||
121 | 1 | Frédéric Blanc | |
122 | 45 | Frédéric Blanc | sur /dev/ttyUSB0 |
123 | 1 | Frédéric Blanc | |
124 | 46 | Frédéric Blanc | Broadcast Power ON |
125 | 45 | Frédéric Blanc | <pre><code class="shell"> |
126 | echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyUSB0 |
||
127 | </code></pre> |
||
128 | |||
129 | Broadcast Power OFF |
||
130 | <pre><code class="shell"> |
||
131 | echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyUSB0 |
||
132 | </code></pre> |
||
133 | 36 | Frédéric Blanc | |
134 | 30 | Frédéric Blanc | h3. notice |
135 | 15 | Frédéric Blanc | |
136 | presser [SW] pendant 2s pour accéder aux paramètres |
||
137 | !clipboard-202404041503-e5ifh.png! |
||
138 | |||
139 | 6 | Frédéric Blanc | h2. GUI Python |
140 | |||
141 | 9 | Frédéric Blanc | h3. venv — Création d'environnements virtuels |
142 | 6 | Frédéric Blanc | |
143 | <pre><code class="shell"> |
||
144 | 8 | Frédéric Blanc | $ python3 -m venv venv |
145 | 6 | Frédéric Blanc | </code></pre> |
146 | |||
147 | Pour activer l'environnement, exécutez |
||
148 | |||
149 | <pre><code class="shell"> |
||
150 | source venv/bin/activate |
||
151 | </code></pre> |
||
152 | |||
153 | 7 | Frédéric Blanc | <pre><code class="shell"> |
154 | . venv/bin/activate |
||
155 | </code></pre> |
||
156 | |||
157 | 51 | Frédéric Blanc | sous Windows |
158 | <pre><code class="shell"> |
||
159 | env\Scripts\activate.bat |
||
160 | </code></pre> |
||
161 | |||
162 | 9 | Frédéric Blanc | Vous devrez « quitter » ou « désactiver » votre environnement virtuel à l'aide de la commande |
163 | 6 | Frédéric Blanc | |
164 | <pre><code class="shell"> |
||
165 | deactivate |
||
166 | </code></pre> |
||
167 | |||
168 | |||
169 | |||
170 | 1 | Frédéric Blanc | https://docs.python.org/fr/3/library/venv.html |
171 | |||
172 | 16 | Frédéric Blanc | h3. pyqt5 |
173 | |||
174 | <pre><code class="shell"> |
||
175 | pip3 install pyqt5 --config-settings --confirm-license= --verbose |
||
176 | </code></pre> |
||
177 | |||
178 | 17 | Frédéric Blanc | https://stackoverflow.com/questions/73714829/pip-install-pyqt5-it-cannot-go-on |
179 | 16 | Frédéric Blanc | |
180 | 9 | Frédéric Blanc | h3. XY6015L_pyGUI |
181 | |||
182 | 44 | Frédéric Blanc | lancement de l'interface |
183 | |||
184 | <pre><code class="python"> |
||
185 | python dps_GUI_program.py |
||
186 | </code></pre> |
||
187 | |||
188 | 9 | Frédéric Blanc | !clipboard-202404041117-w53xm.png! |
189 | |||
190 | configuration du port com |
||
191 | |||
192 | le port série peut être corrigé en modifiant le paramètre "port_set" dans "dps5005_limits.ini". |
||
193 | |||
194 | |||
195 | <pre><code class="shell"> |
||
196 | [SectionZero] |
||
197 | The parameters below limit the code from incorrectly transmitting extreme values entered by the user: |
||
198 | if threshold exceeded value defaults to zero: |
||
199 | This file may be adapted for other versions of 'DPSxxxx' power supplies: |
||
200 | |||
201 | [SectionOne] |
||
202 | #leave empty "" for automatic port scanning or set serial port e.g. "/dev/cu.wchusbserial1410" or "/dev/ttyUSB0": |
||
203 | port_set: "/dev/ttyACM0" # |
||
204 | |||
205 | #The parameters below limit the code from incorrectly transmitting extreme values entered by the user: |
||
206 | 1 | Frédéric Blanc | #if threshold exceeded value defaults to zero: |
207 | 10 | Frédéric Blanc | ... |
208 | 9 | Frédéric Blanc | </code></pre> |
209 | |||
210 | h2. Sources |
||
211 | 5 | Frédéric Blanc | |
212 | 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/ |
213 | 29 | Frédéric Blanc | http://xj900diversion.free.fr/bus/I2C%20-%20RS-485%20adapter.htm |
214 | 5 | Frédéric Blanc | https://github.com/AntaresAdroit/RDTech_PS_Comm |
215 | https://github.com/lambcutlet/DPS5005_pyGUI |
||
216 | https://github.com/kbs3056/XY6015L_pyGUI |