PROFIBUS on Raspberry Pi
Image preview of raspipb-details.jpg

The PROFIBUS-on-raspi project aims at building a PROFIBUS protocol stack with custom hardware and software on the Raspberry Pi.

Image preview of et200s-small.jpg

We are currently able to talk to a Siemens ET-200S slave, read its inputs and write to the outputs. So the basic hardware (OSI layer 1) is implemented and works as expected. Software (OSI layer 2 and 7) is work in progress. Most of the implemented features work correctly. So the Raspberry Pi acts as a DP-Master (class 1) with the current stack.

The hardware is based on:

In real applications, the PROFIBUS should be electrically isolated from the rest of the PHY by using an isolated RS-232-to-RS-485 converter. These converters are more expensive, though.

In total we need hardware at the price of about 55 Euro to get a working PROFIBUS DP-Master.

The software needs a few prerequisites before it can be run on the Raspberry Pi.

First of all, the py-spidev package is required for SPI access. You can get a working copy from a local git fork or a snapshot of the local git fork..
Please use the py3 branch of that repository or download the snapshot above.

In addition to that you need to disable Device Tree support on the Raspberry Pi. This is due to the missing Rpi-HAT-EEPROM on our board.
You can disable Device Tree support via raspi-config or by setting the following line in /boot/config.txt:


Alternatively you can keep Device Tree enabled and statically configure the AtMega88 slave in the Raspberry Pi's Device Tree. See the Raspberry Pi documentation for details.

The awlsim Soft-PLC software can be used to control hardware connected to PROFIBUS-DP via PROFIBUS-on-raspi.
See the awlsim page for details.

Latest bleeding edge raspi-profibus can be downloaded from the more-features branch using the Git version control system as follows:

git clone -b more-features git://

To browse the Git repository online, go to the gitweb interface.
A mirror of the repository is available on Github and on Bitbucket.
If you want to contribute to raspi-profibus, please read the contribution guidelines first.

Copyright (C) Michael Büsch
Licensed under the terms of the GNU General Public License version 2 . See the sourcecode for details.

Updated: Tuesday 27 October 2015 16:09 (UTC)
https (TLS/SSL)
xhtml / css