Control a solenoid valve with a 4-20mA analog signal using ROS

asked 2021-08-09 10:57:53 -0500

Hello everybody,

I'm working on a personnal project where I need to control a solenoid valve from my computer. The valve can be operated with a 4-20mA signal.

I want to implement a PID in a ROS node, and then find a way to communicate with the valve. There are two points I am struggling with :

  1. Connecting the valve to the computer : I read some articles where they mentioned CAN bus, or I2C, etc... but I have no idea which device to use to link the hardware to my computer : an arduino for example ? A module for CANopen that has a 4-20mA output ?

  2. Once the device chosen, how can I link that device to my computer and then to ROS ? I mean, according to certain value error, how can I send a command to the device to target for example 7mA to the valve ?

Thank you so muh for your help !

edit retag flag offensive close merge delete