Wiki » History » Version 47
Frédéric Blanc, 2024-05-28 15:10
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 | h3. non isoler |
||
14 | 24 | Frédéric Blanc | |
15 | !clipboard-202404091414-fugem.png! |
||
16 | |||
17 | 21 | Frédéric Blanc | !clipboard-202404081517-wbjgq.png! |
18 | |||
19 | 27 | Frédéric Blanc | h4. Fusibles réarmables |
20 | |||
21 | !clipboard-202404091611-8b8z9.png! |
||
22 | |||
23 | 23 | Frédéric Blanc | h3. Texas Instruments ISOW14x2 Isolated RS-485 DC-DC Converter |
24 | 22 | Frédéric Blanc | |
25 | !clipboard-202404081533-dzk67.png! |
||
26 | |||
27 | 18 | Frédéric Blanc | h3. ANALOG DEVICES LTM2881CV-5#PBF |
28 | |||
29 | 19 | Frédéric Blanc | !clipboard-202404051942-kmfn5.jpg! |
30 | |||
31 | 18 | Frédéric Blanc | Transceiver, RS422, RS485, 20 Mbps, 1 Driver, 1 Récepteur, 4,5 à 5.5V, 0 à 70°C, LGA-32 |
32 | |||
33 | Code Farnell 4023829 |
||
34 | |||
35 | h3. ADM2865E Power Isolated, RS-485 Transceivers |
||
36 | 12 | Frédéric Blanc | |
37 | 1 | Frédéric Blanc | !clipboard-202404041435-zyzea.png! |
38 | 12 | Frédéric Blanc | |
39 | 13 | Frédéric Blanc | |Code Farnell|Référence Fabricant |Fabricant / Description| |
40 | 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| |
41 | |1456395 |SM712.TCT |SEMTECH Diode TVS, SM, Bidirectionelle, 12 V, 26 V, SOT-23, 3 Broche(s)| |
||
42 | |1515786 |BLM15HD182SN1D |MURATA Perle de ferrite, 0402 [1005 Metric], 1.8 kohm, 200 mA, BLM15H, 2.2 ohm, ± 25%| |
||
43 | |1867958 |08053D106KAT2A |KYOCERA AVX Condensateur céramique multicouche CMS, 10 µF, 25 V, 0805 [Métrique 2012], ± 10%, X5R| |
||
44 | |2443238 |BLM18HE601SN1D |MURATA Perle de ferrite, 0603 [1608 Metric], 600 ohm, 800 mA, BLM18H, 0.25 ohm, ± 25%| |
||
45 | 11 | Frédéric Blanc | |
46 | 37 | Frédéric Blanc | h3. Module de communication d'isolation, ADUM3201 + B0505XT TTL à RS485 |
47 | |||
48 | !clipboard-202404231543-s8vft.png! |
||
49 | |||
50 | *Attention RX sur TX* |
||
51 | |||
52 | 28 | Frédéric Blanc | h3. RS485 I2C |
53 | |||
54 | !clipboard-202404120929-wdgmq.png! |
||
55 | |||
56 | 20 | Frédéric Blanc | h2. XY5005E |
57 | |||
58 | 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 |
59 | 20 | Frédéric Blanc | |
60 | !clipboard-202404081443-iygma.png! |
||
61 | 39 | Frédéric Blanc | !clipboard-202404241236-ulutn.png! |
62 | 38 | Frédéric Blanc | !clipboard-202404241234-m5crk.png! |
63 | |||
64 | 14 | Frédéric Blanc | h2. XY6015L Step-Down Regulated Power Supply |
65 | 1 | Frédéric Blanc | |
66 | !clipboard-202403251011-lfrn1.png! |
||
67 | |||
68 | 4 | Frédéric Blanc | µC AT32F421 ARM® Cortex®-M4 core |
69 | Ctrl EG1163S BUCK DC-DC de Rectification synchrone 300kHz |
||
70 | MOS NCE82H140 |
||
71 | |||
72 | 31 | Frédéric Blanc | h3. Modbus |
73 | |||
74 | 1 | Frédéric Blanc | !clipboard-202404121322-qk0l1.png! |
75 | 32 | Frédéric Blanc | |
76 | 47 | Frédéric Blanc | /dev/ttyACM0 ou /dev/ttyUSB0 |
77 | 32 | Frédéric Blanc | baud rate *115200* |
78 | 31 | Frédéric Blanc | |
79 | 1 | Frédéric Blanc | Slave Address: 1..247 ( *0: broadcast* ) |
80 | 31 | Frédéric Blanc | Function code: see later |
81 | Data: 0..252 byte(s) |
||
82 | 33 | Frédéric Blanc | *CRC16-MODBUS* : see https://crccalc.com/ for code. |
83 | 31 | Frédéric Blanc | |
84 | 1 | Frédéric Blanc | Modbus registers: |
85 | U_SET = 0 |
||
86 | I_SET = 1 |
||
87 | UOUT = 2 |
||
88 | IOUT = 3 |
||
89 | POWER = 4 |
||
90 | UIN = 5 |
||
91 | Ah = 6 |
||
92 | PROTECT = 7 # not tested |
||
93 | Wh = 8 |
||
94 | Time = 11 |
||
95 | Temp = 13 |
||
96 | Lock = 15 |
||
97 | CV_CC = 17 |
||
98 | ONOFF = 18 |
||
99 | Celsius = 19 |
||
100 | MODEL = 22 # ? |
||
101 | 5 | Frédéric Blanc | VERSION = 23 # ? |
102 | 1 | Frédéric Blanc | |
103 | 34 | Frédéric Blanc | h3. test commande |
104 | |||
105 | 1 | Frédéric Blanc | |
106 | 46 | Frédéric Blanc | |
107 | 45 | Frédéric Blanc | sur /dev/ttyACM0 |
108 | 1 | Frédéric Blanc | |
109 | 46 | Frédéric Blanc | Broadcast Power ON |
110 | 1 | Frédéric Blanc | <pre><code class="shell"> |
111 | 35 | Frédéric Blanc | echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyACM0 |
112 | 34 | Frédéric Blanc | </code></pre> |
113 | |||
114 | 36 | Frédéric Blanc | Broadcast Power OFF |
115 | <pre><code class="shell"> |
||
116 | echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyACM0 |
||
117 | </code></pre> |
||
118 | 1 | Frédéric Blanc | |
119 | 45 | Frédéric Blanc | sur /dev/ttyUSB0 |
120 | 1 | Frédéric Blanc | |
121 | 46 | Frédéric Blanc | Broadcast Power ON |
122 | 45 | Frédéric Blanc | <pre><code class="shell"> |
123 | echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyUSB0 |
||
124 | </code></pre> |
||
125 | |||
126 | Broadcast Power OFF |
||
127 | <pre><code class="shell"> |
||
128 | echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyUSB0 |
||
129 | </code></pre> |
||
130 | 36 | Frédéric Blanc | |
131 | 30 | Frédéric Blanc | h3. notice |
132 | 15 | Frédéric Blanc | |
133 | presser [SW] pendant 2s pour accéder aux paramètres |
||
134 | !clipboard-202404041503-e5ifh.png! |
||
135 | |||
136 | 6 | Frédéric Blanc | h2. GUI Python |
137 | |||
138 | 9 | Frédéric Blanc | h3. venv — Création d'environnements virtuels |
139 | 6 | Frédéric Blanc | |
140 | <pre><code class="shell"> |
||
141 | 8 | Frédéric Blanc | $ python3 -m venv venv |
142 | 6 | Frédéric Blanc | </code></pre> |
143 | |||
144 | Pour activer l'environnement, exécutez |
||
145 | |||
146 | <pre><code class="shell"> |
||
147 | source venv/bin/activate |
||
148 | </code></pre> |
||
149 | |||
150 | 7 | Frédéric Blanc | <pre><code class="shell"> |
151 | . venv/bin/activate |
||
152 | </code></pre> |
||
153 | |||
154 | 9 | Frédéric Blanc | Vous devrez « quitter » ou « désactiver » votre environnement virtuel à l'aide de la commande |
155 | 6 | Frédéric Blanc | |
156 | <pre><code class="shell"> |
||
157 | deactivate |
||
158 | </code></pre> |
||
159 | |||
160 | |||
161 | |||
162 | 1 | Frédéric Blanc | https://docs.python.org/fr/3/library/venv.html |
163 | |||
164 | 16 | Frédéric Blanc | h3. pyqt5 |
165 | |||
166 | <pre><code class="shell"> |
||
167 | pip3 install pyqt5 --config-settings --confirm-license= --verbose |
||
168 | </code></pre> |
||
169 | |||
170 | 17 | Frédéric Blanc | https://stackoverflow.com/questions/73714829/pip-install-pyqt5-it-cannot-go-on |
171 | 16 | Frédéric Blanc | |
172 | 9 | Frédéric Blanc | h3. XY6015L_pyGUI |
173 | |||
174 | 44 | Frédéric Blanc | lancement de l'interface |
175 | |||
176 | <pre><code class="python"> |
||
177 | python dps_GUI_program.py |
||
178 | </code></pre> |
||
179 | |||
180 | 9 | Frédéric Blanc | !clipboard-202404041117-w53xm.png! |
181 | |||
182 | configuration du port com |
||
183 | |||
184 | le port série peut être corrigé en modifiant le paramètre "port_set" dans "dps5005_limits.ini". |
||
185 | |||
186 | |||
187 | <pre><code class="shell"> |
||
188 | [SectionZero] |
||
189 | The parameters below limit the code from incorrectly transmitting extreme values entered by the user: |
||
190 | if threshold exceeded value defaults to zero: |
||
191 | This file may be adapted for other versions of 'DPSxxxx' power supplies: |
||
192 | |||
193 | [SectionOne] |
||
194 | #leave empty "" for automatic port scanning or set serial port e.g. "/dev/cu.wchusbserial1410" or "/dev/ttyUSB0": |
||
195 | port_set: "/dev/ttyACM0" # |
||
196 | |||
197 | #The parameters below limit the code from incorrectly transmitting extreme values entered by the user: |
||
198 | 1 | Frédéric Blanc | #if threshold exceeded value defaults to zero: |
199 | 10 | Frédéric Blanc | ... |
200 | 9 | Frédéric Blanc | </code></pre> |
201 | |||
202 | h2. Sources |
||
203 | 5 | Frédéric Blanc | |
204 | 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/ |
205 | 29 | Frédéric Blanc | http://xj900diversion.free.fr/bus/I2C%20-%20RS-485%20adapter.htm |
206 | 5 | Frédéric Blanc | https://github.com/AntaresAdroit/RDTech_PS_Comm |
207 | https://github.com/lambcutlet/DPS5005_pyGUI |
||
208 | https://github.com/kbs3056/XY6015L_pyGUI |