Go Down

Topic: interfacing with a Profibus-Master  (Read 5232 times) previous topic - next topic

Phin

Hello there,

I'm stuck guys, I need to get data of a pH-probe, temp-sensor and redox-probe out of a Profibus-Master. So far I know the probes are connected digitally, so I assume they work as slaves, but I'm still investigating that.

The Master has a Profibus-interface that isn't used yet, as far as I know. I'm expecting I can connect to the Master and send a command over the bus to trigger the sending of the sensor-data. BUT: I never worked with Profibus, only with I2C and SPI and plain seriell connections.

So far I only found the PROFIBUS Slave Controller VPC3+S, though no source to order it. The evaluation-kit is way over the top what I can actually afford.

Is there something prebuild that makes it somewhat easy to communicate with an Profibus-Master that won't cost a small fortune? :) Since it is based on RS-485, exist any libraries to connect an Arduino directly (with a level-converter of course) to the Profibus?

Btw. I need to connect the Arduino and the Master galvanically isolated. Can I use opto-couplers for that task? Which are fast enough? I did read that the communication over Fastbus also happens over the power (mA) and not only over the voltage? Is that true? Do the opto-couplers still transmit that?

regards :)

pylon

Quote
I did read that the communication over Fastbus also happens over the power (mA) and not only over the voltage?
Do you want to communicate over Fastbus or Profibus? They are definitely not the same.

Quote
Since it is based on RS-485, exist any libraries to connect an Arduino directly (with a level-converter of course) to the Profibus?
You don't need a level-converter but you need a driver chip fo the RS-485 (p.e. MAX485).

Quote
I need to connect the Arduino and the Master galvanically isolated. Can I use opto-couplers for that task? Which are fast enough?
Yes you can use opto-couplers, just insert them after the driver chip.
As you didn't specify at which speed your profibus communicates (they exist from 9600 to 12000000 baud) it's difficult to give you a suggestion for the type.

Phin

Do you want to communicate over Fastbus or Profibus? They are definitely not the same.
Sorry, Profibus ofcourse. I mixed it up after reading tons of interface-descreptions. :)

Quote
You don't need a level-converter but you need a driver chip fo the RS-485 (p.e. MAX485).

Yes you can use opto-couplers, just insert them after the driver chip.
As you didn't specify at which speed your profibus communicates (they exist from 9600 to 12000000 baud) it's difficult to give you a suggestion for the type.
I have no idea, the manual of the transducer states it can work from 1.2 to 12Mbit depending on cable-length. The Cable won't be longer than 30m, so it even should do the 12MBit, though that is not really needed, it's nothign time-critical... just asking for sensor-values every minute or so.

Correct me if I'm wrong: but don't I need a library for Profibus? I couldn't find any interface-documentation that states communication-details (eg. impuls-length, bit-adresses and stuff...). Beside that, I really suck at programming interface stuff myself.. ;)

pylon

Quote
Correct me if I'm wrong: but don't I need a library for Profibus? I couldn't find any interface-documentation that states communication-details (eg. impuls-length, bit-adresses and stuff...).
Correct, and that may be the biggest problem as Profibus is definitely not an open standard although the people behind it call it so. It's nailed with patents (although most of them aren't valid anymore) and the organisation behind it has no interest in a broader usage. It's an IEC standard, so you can buy the complete specification from the IEC. If the evaluation kit for VPC3+S the is over your budget I guess the price of the document will also be.

Does your device have other interfaces than the Profibus?

Phin

Yeah, seen that and yup it is really way over my budget sadly :/

The manual at https://portal.endress.com/wa001/dla/5000566/4065/000/01/BA00194CEN_1515.pdf says at page 111:

Code: [Select]

HART
Signal encoding Frequency Shift Keying (FSK) + 0.5 mA via current output signal
Data transmission rate 1200 baud
Galvanic isolation Yes
PROFIBUS PA
Signal encoding Manchester Bus Powered (MBP)
Data transmission rate 31.25 kBit/s, voltage mode
Galvanic isolation Yes (IO modules)
PROFIBUS DP
Signal encoding RS485
Data transmission rate 9.6 kBd, 19.2 kBd, 93.75 kBd, 187.5 kBd, 500 kBd, 1.5 MBd
Galvanic isolation Yes (IO modules)


Anything that is "easier"?

pylon

The link points to the hardware manual. On page 76 of the manual they refer to a communications manual. They have one for the HART protocol and one for the Profibus. From a hardware point of view the Profibus is the easier to implement but the software side is the other way around, the HART protocol is easier to reverse engineer and you find more information about it. I can't find any library already written for both protocols, so it's a lot of work for you if you really want to interface with this device.

Given the above manual this device seems to be from the rather expensive range of measurement devices. Just out of curiosity: if you can afford to buy such a device, why are the costs of the Profibus chip over your budget?

I guess you cannot change the device and take one that has an open communication protocol?

Phin

Just out of curiosity: if you can afford to buy such a device, why are the costs of the Profibus chip over your budget?

I guess you cannot change the device and take one that has an open communication protocol?
The hardware is installed, I just need to find a way to get the data out of it.. Imagine your new workplace is a mess but they tell you to work with it, without funding you the right stuff. ;) Sadly, this job is rather underpaid, so I'm just trying my best to get it done. Thought it would be easier.

vati_

Looks like you're working with somekind of industrial automation system. So most probably sensors are connected to main system (Profibus Master) and most probably 4..20 mA measurements are used. So just put signal multipliers to multiply signal to your new system and to main system and then build electronics to measure 4..20 mA to Arduino.

Temperature measurement can be also RTD instead of 4..20mA, it can't be multiplied, but you can buy RTD/mA transmitter and multiply mA measurement then.

I'm also interested about profibus interfaces. That developing kit from Profichip is unbelivibly expensive, but pure chip is pretty cheap. In devkit there's lots of unuseful stuff, if you already know scope of your project. And about programming your own Profibus communication library for arduino would be massive project, but that's only my feeling.

JOHI

Hello,

I did a basic proof of concept thanks to reactions to this forum and info i found on the internet: See youtube: Arduino Mega as Profibus-DP slave connected to a Siemens CPU315-2 DP.

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


Best regards,
Johi.

valdecirgrv


Congratulations for the work I'm trying to do the same, could make more information available on your project. How did you implement it?

Tady

I shared a working example with a GSD file here...

https://forum.arduino.cc/index.php?topic=632405.0

Go Up