Project

General

Profile

Actions

Wiki

Modbus / RS485 isolated

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

non isoler

Fusibles réarmables

Texas Instruments ISOW14x2 Isolated RS-485 DC-DC Converter

ANALOG DEVICES LTM2881CV-5#PBF

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

Code Farnell 4023829

ADM2865E Power Isolated, RS-485 Transceivers

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%

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

Attention RX sur TX

DFR0845



Ce module de transfert de signal RS485 vers UART actif et isolé est livré avec des circuits de protection tels que l'isolation de puissance et le TVS. Compatible avec la plupart des contrôleurs principaux, il présente les caractéristiques d'une vitesse de communication rapide, de performances stables et fiables, d'une sécurité élevée, etc., et peut être appliqué à divers capteurs industriels, équipements de contrôle industriel ou applications nécessitant une conversion de signal RS485.
https://wiki.dfrobot.com/Gravity_Active_Isolated_RS485_to_UART_Signal_Converter_SKU_DFR0845

N° Mouser :
426-DFR0845
www.gotronic.fr
Code: 37411
https://fr.farnell.com
Code Commande :
3974134

RS485 I2C

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



XY6015L Step-Down Regulated Power Supply

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

DPS5005

Module d'alimentation à afficheur LCD réglable en tension de 0 à 50 Vcc et en intensité de 0 à 5 A. L'écran couleur de 1,44'' offre un affichage particulièrement détaillé et complet des informations.

https://www.gotronic.fr/art-alimentation-programmable-dps5005-29294.htm

modification port com

La vitesse de communication par défaut du port série DPS5005 est de 9 600 bauds, mais vous pouvez la modifier en alimentant l'alimentation tout en maintenant le bouton V/M1 enfoncé. Lorsque la modification est effectuée, appuyez deux fois sur le bouton « set » pour enregistrer la nouvelle configuration.

Firmware alternatif

https://github.com/kanflo/opendps
https://redmine.laas.fr/attachments/4885

Brochage port com

DPH5005

Module d'alimentation à afficheur LCD 1,44" réglable en tension de 0 à 50 Vcc et en intensité de 0 à 5 A. Ce module délivre un signal de sortie haute résolution réglable par paliers de 10 mV et de 1 mA.

https://www.gotronic.fr/art-alimentation-programmable-dph5005-31537.htm

Modbus

voir documentation 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
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
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
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
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
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
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 dps_modbus.py
U-SET Voltage setting 2 2 V R/W 0x0000 voltage_set
I-SET Current setting 2 2 A R/W 0x0001 current_set
UOUT Output voltage display value 2 2 V R 0x0002 voltage
IOUT Output current display value 2 2 A R 0x0003 current
POWER Output power display value 2 2 W R 0x0004 power
UIN Input voltage display value 2 2 V R 0x0005 voltage_in
LOCK Key lock 2 0 - R/W 0x0006 lock
PROTECT Protection state 2 0 - R 0x0007 protect
CVCC Constant voltage constant current state 2 0 - R 0x0008 cv_cc
ONOFF Switch output 2 0 - R/W 0x0009 onoff
B_LED Backlight brightness level 2 0 - R/W 0x000A b_led
MODEL Product number 2 0 - R 0x000B model
VERSON Firmware version number 2 0 - R 0x000C version
EXTRACT_M Quickly bring up data sets 2 0 - W 0x0023 extract_m
U-SET Voltage setting 2 2 V R/W 0x0050 voltage_set2
I-SET Current setting 2 3 A R/W 0x0051 current_set2
S-OVP Overvoltage protection 2 2 V R/W 0x0052 s_ovp
S-OCP Overcurrent protection value 2 3 A R/W 0x0053 s_ocp
S-OPP Over power protection value 2 1、2 W R/W 0x0054 s_opp
B-LED Backlight brightness level 2 0 - R/W 0x0055 b_led2
M-PRE The data is called to update the output 2 0 - R/W 0x0056 m_pre
S-INI Power on the output switch 2 2 - R/W 0x0057 s_ini

dps_modbus.py

commande Description
voltage_set Voltage setting
current_set Current setting
voltage Output voltage display value
current Output current display value
power Output power display value
voltage_in Input voltage display value
lock Key lock
protect Protection state
cv_cc Constant voltage constant current state
onoff Switch output
b_led Backlight brightness level
model Product number
version Firmware version number
extract_m Quickly bring up data sets
voltage_set2 Voltage setting
current_set2 Current setting
s_ovp Overvoltage protection
s_ocp Overcurrent protection value
s_opp Over power protection value
b_led2 Backlight brightness level
m_pre The data is called to update the output
s_ini Power on the output switch
read_all Read data as a block, much faster than individual reads
write_voltage_current write voltage & current as a block
write_all write block

/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

test commande

sur /dev/ttyACM0

Broadcast Power ON

echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyACM0

Broadcast Power OFF

echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyACM0

sur /dev/ttyUSB0

Broadcast Power ON

echo -ne "\x00\x06\x00\x12\x00\x01\xE9\xDE" > /dev/ttyUSB0

Broadcast Power OFF

echo -ne "\x00\x06\x00\x12\x00\x00\x28\x1E" > /dev/ttyUSB0

notice

presser [SW] pendant 2s pour accéder aux paramètres

GUI Python

venv — Création d'environnements virtuels

$ python3 -m venv venv

Pour activer l'environnement, exécutez

source venv/bin/activate
. venv/bin/activate

sous Windows

env\Scripts\activate.bat

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

deactivate

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

pyqt5

pip3 install pyqt5 --config-settings --confirm-license= --verbose

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

XY6015L_pyGUI

lancement de l'interface

python dps_GUI_program.py

configuration du port com

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

[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:
...

SCPI

SCPI parser

À propos de l'analyseur SCPI

La bibliothèque SCPI Parser vise à fournir une capacité d'analyse des commandes SCPI côté instrument. Toutes les commandes sont définies par leurs modèles, par exemple : "STATus:QUEStionable:EVENt?".

Les codes sources sont publiés avec une licence BSD simplifiée open source.

La bibliothèque d'analyseurs SCPI est basée sur ces normes:
SCPI-99
IEEE 488.2-2004

https://github.com/j123b567/scpi-parser

Sources

https://profimaxblog.ru/dps_update/
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

Updated by Frédéric Blanc about 2 months ago · 95 revisions