Easy Modbus Using A Raspberry Pi

preview_player
Показать описание
Today we're looking at Modbus using a Raspberry Pi, no node red or any of that nonsense! Just an RS-485 to USB converter and a bit of code.

The Code Itself

The Minimal Modbus Documentation
Рекомендации по теме
Комментарии
Автор

Hi! Thank you for a very instructional video! I looked over your "Finding and Listing Modbus Sensors Over RS-485" but wonder if there is any easier way to list the modbus address without having to use Siemens 1200 PLC. I am very new to this type of programming so any simplifications are greatly appreciated.

Cheers,

SimonAndren
Автор

For anyone else having this issue. I had to connect the serial converters A(+) to my sensor's B(+), and the converter's B(-) to A(-) on the sensor. A bit odd but just try swapping the wires if you have an issue.

markusmulholland
Автор

-bash: cd: code/mb: No such file or directory
What to do, if these error is coming?

TELESWITCHGEARS
Автор

You don't have to save devices lists and compare them, just run dmesg -w|grep tty, and plug your usb-rs485 device in, you will see tty number which system gave to your device.

alekseikolupaev
Автор

Fantastic Raspberry Pi Modbus information. Will this work on the New Orange Pi-5 SBC to run a PWM servo motor controller? Thank you.

qzorn
Автор

Hi men, I found your video very usefull, but I have a question for you, in this case I can see that you use a USB converter and you connect a a pair differencial cable to the instrument tha give you a temperature and the humiduty and the usb you conect to female cable and I supose taht you connect to the microUSB port of your raspberry, so my question is How may I read the modbus registers but I want to use the UART pin and read form the port ttyAMA0?, I hope your answer and excellent tutorial

juanpabloescobararenas
Автор

thanks for this video, can u make similar video but using IOTstack or node-red? its gonna be interesting

edinetgrunhed
Автор

Please create a video for the SPI interface or point us in the correct direction on setting it up. Maybe a full video using the Pico W, and a website build. Or better yet.. use the normal Pico for the code to get the data from the rs485 wind vane and the wind speed, and then use i2c to send the data to a non pi SBC (Le Potato) that can then add cameras of the clouds and send it all as a webpage out to the world on a usb cell modem... I have all the rest done but the Pico side... This (the Pico) is my 4 dollar workaround for the GPIO addressing issue that the Le Potato has currently.

Prt_D_RC
Автор

Great Video, does the USB port detection works similar as on an Raspberry Pi emulator on PC?

Slic-Rock
Автор

I did the same but i don't get any ttyUSB :( using a Raspbian Stretch version on a Raspberry pi 2B. Any idea why it might not be working?

nishantpn
Автор

Hi, awesome video by the way, helped us alot, but we are facing a problem with 2 of our sensor when we try to connect our sensors together. We connected 10 sensors by series, but 2 of the sensors when connected in series keep giving us invalid response error, check sum error. But when we connected it directly to the usb without connecting the sensor in series(individually ), it is able to work. We tried to change the wiring, but it keeps ended up getting that same error, so i am hoping that you can give us some thoughts on how we can debug it, or is there any setting that disable the sensor ability to connect in series(?). Hope to get a reply soon

vincentfoo
Автор

How do you do this with pymodbus TCP, do you just switch out the usb address with an IP address?

ronpearson
Автор

what if 3 or more sensor is coneected in modbus?

bernardumali
Автор

Nice video. Can you please tell me the specs for the temperature/humidity sensor that you're using here?

paulmcnamara
Автор

Is it possible to connect multiple devices using only one adapter?!

arapozor
Автор

Does anyone knows how to implement modus rtu communication btwn raspi and aurdino.

rishabhgawai
Автор

thks for this video. it's exactly what i'm looking for.
i'm very new to this field and i have one prject: i have a Camera connected with the RPi and with the help of OCR I extract the text from the picture and I have to transfer know this text throught CAN bus. i wanted to use RS485 CAN HAT but I find it as easy using usb to rs485. please can you help me?

wisdomrandom
Автор

mb_address = 9 # Modbus address of sensor /// How to know the mb_address of sensor

bernardumali