Project

General

Profile

Wiki » History » Revision 75

Revision 74 (Frédéric Blanc, 2024-06-11 09:01) → Revision 75/123 (Frédéric Blanc, 2024-06-11 09:05)

h1. Wiki 

 !{width: 30%}https://redmine.laas.fr/attachments/download/4815/Face%20AV%20PS.jpg! 

 !{width: 30%}https://redmine.laas.fr/attachments/download/4814/Face%20AR%20PS.jpg! 

 {{toc}} 

 h2. Modbus / RS485 isolated 

 !clipboard-202404091540-4btca.png! 

 https://arduino103.blogspot.com/2021/10/decoder-une-trame-rs485-loscilloscope.html 

 h3. non isoler 

 !clipboard-202404091414-fugem.png! 

 !clipboard-202404081517-wbjgq.png! 

 h4. Fusibles réarmables 

 !clipboard-202404091611-8b8z9.png! 

 h3. Texas Instruments ISOW14x2 Isolated RS-485 DC-DC Converter 

 !clipboard-202404081533-dzk67.png! 

 h3.    ANALOG DEVICES LTM2881CV-5#PBF 

 !clipboard-202404051942-kmfn5.jpg! 

 Transceiver, RS422, RS485, 20 Mbps, 1 Driver, 1 Récepteur, 4,5 à 5.5V, 0 à 70°C, LGA-32 

 Code Farnell 4023829 

 h3. ADM2865E Power Isolated, RS-485 Transceivers 

 !clipboard-202404041435-zyzea.png! 

 |Code Farnell|Référence Fabricant 	 |Fabricant / Description| 
 |4023816 	 |ADM2865EBRNZ 	 |ANALOG DEVICES    Transceiver, RS422, RS485, 25 Mbps, 1 Driver, 1 Récepteur, 3 à 5.5V, -40 à 105°C, WSOIC-28| 
 |1456395 	 |SM712.TCT 	 |SEMTECH    Diode TVS, SM, Bidirectionelle, 12 V, 26 V, SOT-23, 3 Broche(s)| 
 |1515786 	 |BLM15HD182SN1D 	 |MURATA    Perle de ferrite, 0402 [1005 Metric], 1.8 kohm, 200 mA, BLM15H, 2.2 ohm, ± 25%| 
 |1867958 	 |08053D106KAT2A 	 |KYOCERA AVX    Condensateur céramique multicouche CMS, 10 µF, 25 V, 0805 [Métrique 2012], ± 10%, X5R| 
 |2443238 	 |BLM18HE601SN1D 	 |MURATA    Perle de ferrite, 0603 [1608 Metric], 600 ohm, 800 mA, BLM18H, 0.25 ohm, ± 25%| 

 h3. Module de communication d'isolation, ADUM3201 + B0505XT TTL à RS485 

 !clipboard-202404231543-s8vft.png! 

 *Attention RX sur TX* 

 h3. RS485 I2C 

 !clipboard-202404120929-wdgmq.png! 

 h2. XY5005E 

 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 

 !clipboard-202404081443-iygma.png! 
 !clipboard-202404241236-ulutn.png! 
 !clipboard-202404241234-m5crk.png! 

 h2. XY6015L Step-Down Regulated Power Supply 

 !clipboard-202403251011-lfrn1.png! 

 µC AT32F421    ARM® Cortex®-M4 core 
 Ctrl EG1163S BUCK DC-DC de Rectification synchrone 300kHz 
 MOS NCE82H140 

 h3. Modbus 

 !clipboard-202404121322-qk0l1.png! 

 voir documentation document:"protocol -english translation V1.2" 

 |_.function code|_.Definition|_.Operation (binary)| 
 |0x03|Read register data|Read data from one or more registers| 
 |0x06|Write a single register|Write a set of binary data to a single register| 
 |0x10|Write multiple registers|Write multiple sets of binary data to multiple registers| 

 |\5=. *0x03 Read the function of the host format* | 
 |address code|function code|Register start address |Number of register 
  addresses n (1 ~ 32)|CRC Check code| 
 |1 byte|1 byte|2 byte|2 byte|2 byte| 

 |\5=. *0x03 Read function Slave returns format*| 
 |address code|function code|Returns the number of bytes 2 * n|Register data|CRC Check code| 
 |1 byte|1 byte|1 byte|2*n Bytes|2 byte| 

 |\5=. *0x06 Write a single register function in host format*| 
 |address code|function code|Register address|Register data|CRC Check code| 
 |1 byte|1 byte|2 byte|2 byte|2 byte| 

 |\5=. *0x06 Write a single register function from the machine to return the format*| 
 |address code|function code|Register address|Register data|CRC Check code| 
 |1 byte|1 byte|2 byte|2 byte|2 byte| 

 |\6=. *0x10 Write function host format*| 
 |address code|function code|Register start address|Number of register addresses 
 n (1 ~ 32)|Write the number of bytes 2 * n|Register data|CRC Check code| 
 |1 byte|1 byte|2 byte|2 byte|1 byte|2*n byte|2 byte| 

 |\5=. *0x10 Write function slave return format*| 
 |address code|function code|Register start address|Number of register addresses 
 n (1 ~ 32)|CRC Check code| 
 |1 byte|1 byte|2 byte|2 byte|2 byte| 

 Protocol register description (single register address data for double-byte data) 

 |name|Description|number of bytes|Decimal point|unit|Read and write|Register address| 
 |U-SET|Voltage setting|2|2|V|R/W|0x0000| setting|2|2|V|R/W|0000H| 
 |I-SET|Current setting|2|2|A|R/W|0x0001| setting|2|2|A|R/W|0001H| 
 |UOUT|Output voltage display value|2|2|V|R|0x0002| value|2|2|V|R|0002H| 
 |IOUT|Output current display value|2|2|A|R|0x0003| value|2|2|A|R|0003H| 
 |POWER|Output power display value|2|2|W|R|0x0004| value|2|2|W|R|0004H| 
 |UIN|Input voltage display value|2|2|V|R|0x0005| value|2|2|V|R|0005H| 
 |LOCK|Key lock|2|0|-|R/W|0x0006| lock|2|0|-|R/W|0006H| 
 |PROTECT|Protection state|2|0|-|R|0x0007| state|2|0|-|R|0007H| 
 |CVCC|Constant voltage constant current state|2|0|-|R|0x0008| state|2|0|-|R|0008H| 
 |ONOFF|Switch output|2|0|-|R/W|0x0009| output|2|0|-|R/W|0009H| 
 |B_LED|Backlight brightness level|2|0|-|R/W|0x000A| level|2|0|-|R/W|000AH| 
 |MODEL|Product number|2|0|-|R|0x000B| number|2|0|-|R|000BH| 
 |VERSON|Firmware version number|2|0|-|R|0x000C| number|2|0|-|R|000CH| 
 |EXTRACT_M|Quickly bring up data sets|2|0|-|W|0x0023| sets|2|0|-|W|0023H| 
 |U-SET|Voltage setting|2|2|V|R/W|0x0050| setting|2|2|V|R/W|0050H| 
 |I-SET|Current setting|2|3|A|R/W|0x0051| setting|2|3|A|R/W|0051H| 
 |S-OVP|Overvoltage protection|2|2|V|R/W|0x0052| protection|2|2|V|R/W|0052H| 
 |S-OCP|Overcurrent protection value|2|3|A|R/W|0x0053| value|2|3|A|R/W|0053H| 
 |S-OPP|Over power protection value|2|1、2|W|R/W|0x0054| value|2|1、2|W|R/W|0054H| 
 |B-LED|Backlight brightness level|2|0|-|R/W|0x0055| level|2|0|-|R/W|0055H| 
 |M-PRE|The data is called to update the output|2|0|-|R/W|0x0056| output|2|0|-|R/W|0056H| 
 |S-INI|Power on the output switch|2|2|-|R/W|0x0057| switch|2|2|-|R/W|0057H| 


 /dev/ttyACM0 ou /dev/ttyUSB0 
 baud rate *115200* 

 Slave Address: 1..247 ( *0: broadcast* ) 
 Function code: see later 
 Data: 0..252 byte(s) 
 *CRC16-MODBUS* : see https://crccalc.com/ for code. 
 https://github.com/LacobusVentura/MODBUS-CRC16 

 Modbus registers: 
 U_SET = 0 
 I_SET = 1 
 UOUT = 2 
 IOUT = 3 
 POWER = 4 
 UIN = 5 
 Ah = 6 
 PROTECT = 7 # not tested 
 Wh = 8 
 Time = 11 
 Temp = 13 
 Lock = 15 
 CV_CC = 17 
 ONOFF = 18 
 Celsius = 19 
 MODEL = 22 # ? 
 VERSION = 23 # ? 

 h3. test commande 



 sur /dev/ttyACM0 

 Broadcast Power ON 
 <pre><code class="shell"> 
 echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyACM0 
 </code></pre> 

 Broadcast Power OFF 
 <pre><code class="shell"> 
 echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyACM0 
 </code></pre> 

 sur /dev/ttyUSB0 

 Broadcast Power ON 
 <pre><code class="shell"> 
 echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyUSB0 
 </code></pre> 

 Broadcast Power OFF 
 <pre><code class="shell"> 
 echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyUSB0 
 </code></pre> 

 h3. notice 

 presser [SW] pendant 2s pour accéder aux paramètres  
 !clipboard-202404041503-e5ifh.png! 

 h2. GUI Python 

 h3. venv — Création d'environnements virtuels 

 <pre><code class="shell"> 
 $ python3 -m venv venv 
 </code></pre> 

 Pour activer l'environnement, exécutez 

 <pre><code class="shell"> 
 source venv/bin/activate 
 </code></pre> 

 <pre><code class="shell"> 
 . venv/bin/activate 
 </code></pre> 

 sous Windows 
 <pre><code class="shell"> 
 env\Scripts\activate.bat 
 </code></pre> 

 Vous devrez « quitter » ou « désactiver » votre environnement virtuel à l'aide de la commande  

 <pre><code class="shell"> 
 deactivate 
 </code></pre> 



 https://docs.python.org/fr/3/library/venv.html 

 h3. pyqt5 

 <pre><code class="shell"> 
 pip3 install pyqt5 --config-settings --confirm-license= --verbose 
 </code></pre> 

 https://stackoverflow.com/questions/73714829/pip-install-pyqt5-it-cannot-go-on 

 h3. XY6015L_pyGUI 

 lancement de l'interface 

 <pre><code class="python"> 
 python dps_GUI_program.py 
 </code></pre> 

 !clipboard-202404041117-w53xm.png! 

 configuration du port com 

 le port série peut être corrigé en modifiant le paramètre "port_set" dans "dps5005_limits.ini". 


 <pre><code class="shell"> 
 [SectionZero] 
 The parameters below limit the code from incorrectly transmitting extreme values entered by the user: 
 if threshold exceeded value defaults to zero: 
 This file may be adapted for other versions of 'DPSxxxx' power supplies: 

 [SectionOne] 
 #leave empty "" for automatic port scanning or set serial port e.g. "/dev/cu.wchusbserial1410" or "/dev/ttyUSB0": 
 port_set: "/dev/ttyACM0" 	 # 

 #The parameters below limit the code from incorrectly transmitting extreme values entered by the user: 
 #if threshold exceeded value defaults to zero: 
 ... 
 </code></pre> 

 h2. Sources 

 https://www.circuitstate.com/tutorials/what-is-rs-485-how-to-use-max485-with-arduino-for-reliable-long-distance-serial-communication/ 
 http://xj900diversion.free.fr/bus/I2C%20-%20RS-485%20adapter.htm 
 https://github.com/AntaresAdroit/RDTech_PS_Comm 
 https://github.com/lambcutlet/DPS5005_pyGUI 
 https://github.com/kbs3056/XY6015L_pyGUI