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