Jump to content

Interacting with RS485 into a USB adapter... am lost in space.


Externet

Recommended Posts

Hi.  Am the flag bearer of computer idiots.  Can hardly find how to explain what I want :

A device with a RS485 connection is plugged to an USB port on my Linux laptop using an adapter :

-------------------------------------------------------------------------------------------------------------------------------------

image.thumb.png.b793ce0c06d9e42a0ba8d8008448fb68.png

-----------------------------------------------------------------------------------------------------------------------------------------------

Is there a standard generic set of instructions for RS485 communication that I need to have/load in the laptop to ask/command/get/interact/obtain reports ?

I do not know how to interrogate the device to obtain its data.  Is a 'special' set of commands needed ? Typed on some sort of 'terminal mode' console at the laptop ?    The device is supposed to report Volts, Watts, Amperes, temperature, time,...

This has nothing to do with internet, WiFi, servers...  it is wired RS485 port to USB port, period.     

Yes, am that dumb, and need it guided/explained accordingly.

 

 

Link to comment
Share on other sites

3 hours ago, Externet said:

A device with a RS485 connection is plugged to an USB port on my Linux laptop using an adapter :

Is there a standard generic set of instructions for RS485 communication that I need to have/load in the laptop to ask/command/get/interact/obtain reports ?

Try this and tell us what the result is:

https://www.cyberciti.biz/hardware/5-linux-unix-commands-for-connecting-to-the-serial-console/

ps. It is from https://www.google.com/search?q=serial+communication+on+linux

 

https://unix.stackexchange.com/questions/42376/reading-from-serial-from-linux-command-line

They suggest:

cat /dev/ttyS0

or

cat < /dev/ttyS0

(if ttyS0 is your serial port, but that you should get from previous tutorials)

 

3 hours ago, Externet said:

I do not know how to interrogate the device to obtain its data.  Is a 'special' set of commands needed ? Typed on some sort of 'terminal mode' console at the laptop ?    The device is supposed to report Volts, Watts, Amperes, temperature, time,...

Shouldn't it be in the (online) manual of your device?

Using general serial communication, you will most likely get raw data.. Which are "good for the programmer"..

 

3 hours ago, Externet said:

Yes, am that dumb, and need it guided/explained accordingly.

Try google: "how to read voltage|amperage|temperature on [model name of your device] youtube video".. maybe someone (engineer) has already bought it and made a video of how to use it, which is very common these days.

 

This looks promising:

https://www.youtube.com/watch?v=L1dxwzC3lkg

 

3 hours ago, Externet said:

The device is supposed to report Volts, Watts, Amperes, temperature, time,...

How?

You'd have to build all the electronics to make it work (on the breadboard at least)..

 

 

Arduino would be a better choice. It comes with Arduino Studio and has lots of tutorials..

https://www.google.com/search?q=how+to+read+temperature+arduino+video

https://www.arduino.cc/

 

Arduino analog pins are built-in voltmeters.. As long as they are within the 0-5 volt range.. Otherwise, you will have to use a voltage divider and limit the input voltage to this range (otherwise the Arduino will be damaged)

 

Arduino-clone here is for $5 or so.

 

 

You connect some sensor, for example, temperature on a breadboard, with the necessary resistors and other things, GND of the breadboard to GND in Arduino, +5V of the breadboard to +5V in Arduino, sensor pin to analog or digital pin, depending on the tutorial of the sensor. And then run Arduino Studio and write (or copy from the tutorial) the source code that reads the data from the Arduino. A job for less than an hour for a temperature sensor.

Edited by Sensei
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.