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..

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:

device_tree=

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 using the Git version control system as follows:

git clone git://git.bues.ch/raspi-profibus.git

or by downloading the raspi-profibus snapshot archive.
To browse the Git repository online, go to the gitweb interface.
A mirror of the repository is available on Github.

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

Updated: Monday 16 February 2015 11:15 (UTC)
https (SSL) encrypted
xhtml / css