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