brokenby2703
Posts: 2
Joined: Thu Oct 19, 2017 1:38 pm

Raspberry + Analog I/O to reverse/read industrial PID device

Thu Oct 19, 2017 2:02 pm

Hi,
My name is David.
This is my 1st post here.
I apologize for my English, hope you can understand me.

I have been using Raspberry PI 2 & 3 as VPN server, OSMC Media Center, Recalbox device, etc. in short words....ready made systems.

Now I have a challenge.
I have a device which is a PID controller.
It read via its own 2 analog input (4~20mA) 2 values from 2 pressure transducers
Then it control an inverter giving out (analog output (4~20mA))

The manufacture closed down and there is no alternative on the market.
Inside this box there is an algorithm which, based on the result of the 2 INPUT, it gives out 1 OUTPUT (based on 2 pressures, it control 1 frequency inverter (electrical motor).

The range of pressure is 0 to 1013 mbar.
The 2 input I will call them INP1 and INP2

The range of frequency inverter that control the motor is 0~50hz
The 1 output I will call it OUT1

What they recommend me is to connected these analog ports to a PLC or a DEVICE with ANALOG INPUT/OUTPUT and read what is the OUT2 for each combination of INP1 with INP2.

By the way INP1 cannot be > than INP2

Example:
with INP1 = 1013
with INP2 = 1013
then OUT1 = ???

with INP1 = 1012
with INP2 = 1013
then OUT1 = ???

......

with INP1 = 0
with INP2 = 1013
then OUT1 = ????

with INP1 = 1012 (remember that INP1 is always < or = of INP2)
with INP2 = 1012
then OUT1 = ???

and have these results in a writable file.
From there I would like to create a formula (algorithm) and make my own device using RASPBERRY or ARDUINIO.

My questions are :

(1) Do you think is possible using RASPBERRY PI ?
(2) If yes, any link to any special version (unipi.technology or similar product) with already Analog INPUT/OUTPUT ?
(3) What software / coding you would recommend to read (and make a file) with the results ?

Thanks in advance
David

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: Raspberry + Analog I/O to reverse/read industrial PID device

Thu Oct 19, 2017 8:59 pm

yes it is quite possible to use a RPi to replace the old board.

You will need an ADC (analog digital converter) to convert the analog values into a digtal numbers then you will read these digital numbers and run it though your PID controller then out put the needed FREQ. The ADC that I use is usually the ADS1115.

brokenby2703
Posts: 2
Joined: Thu Oct 19, 2017 1:38 pm

Re: Raspberry + Analog I/O to reverse/read industrial PID device

Fri Oct 20, 2017 9:36 am

OutoftheBOTS wrote:
Thu Oct 19, 2017 8:59 pm
yes it is quite possible to use a RPi to replace the old board.

You will need an ADC (analog digital converter) to convert the analog values into a digtal numbers then you will read these digital numbers and run it though your PID controller then out put the needed FREQ. The ADC that I use is usually the ADS1115.
First of all many thanks for the time you spent answering my post.
Second thanks for the indication. I will look at this during lunch break and weekend too.

It's a tough challenge because I don't know programming.
It will be like climbing Himalayas but I will try.

Do I need 3 ADS1115 (1 for each INPUT/OUTPUT) or just one will support all 3 from the device ?
What programming language do you think I should follow ? Phyton ?
I'm embracing coding with my 9 years old son (he is great in Scratch) and it will be a great opportunity to do it together.

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: Raspberry + Analog I/O to reverse/read industrial PID device

Fri Oct 20, 2017 11:48 am

The ADS1115 has 4 channels so you will only need 1 unit.

If you don't know programming then yes this will be a steep learning curve for you.

Return to “General discussion”