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