Powered by Foswiki, The Free and Open Source Wiki
DCS  CAN (compare)

Difference: CAN (r7 vs. r6)

CAN Bus interface for PANDA

This is the wiki of the PANDA CAN bus interface for the Raspberry Pi Computer


Many devices used in the PANDA Detector Control are controlled via a CAN bus interface. Therefore we need also a CAN bus interface for the front-end computers which can be used with EPICS. This interface must fulfill the following requirements:

  • High data throughput
  • Availability of hardware
  • Easy maintainability of software
  • Reliability
  • Costs should be as low as possible
  • Little space required
  • Shielding
  • Galvanic insulation


A small PCB using the SJA1000 stand-alone CAN controller was developed. This chip has a parallel interface using eight multiplexed data-/address lines and five control lines. To safe space and keep the costs as low as possible this chip is directly connected to the general purpose I/O ports of an CPU.

The developed PCB has the same dimensions as the Raspberry Pi Computer and is designed as an extension board for this computer. It also provides a RS232 interface.

rasPi Can front small rasPi Can front 2 small rasPi Can back small

Schematics and Layout


The kernel module for the CAN bus interface is based on the open-source kernel module for the interfaces by PEAK Systems.

The interface supports all standard bit rates. For testing the performance frames with 8 byte length have been send over the CAN bus:

kbit/s frames/s
5 34 41
10 69 82
20 139 165
50 350 416
100 689 800
125 869 1052
250 1666 2000
500 3333 4000
1000 6666 6666

All currently supported devices use standard frames @ 125 kbit/s

EPICS support

EPICS support

EPICS device support for the CAN bus interface itself and several devices controlled via CAN bus is available:

  • ISEG EHS/EDS high voltage power supply
  • Wiener VME crate remote control
  • THMP
  • Light pulser
  • TMCM142 high-performance single axis stepper motor controller/driver

Please refer to DCS.SupportedHardware for further details on these devices

The source code for the EPICS support and Kernel module can be found on github

SD-Card Image for Raspberry Pi Computer

A SD-Card image for the Raspberry Pi computer with the kernel module for this interface and EPICS already installed is available under http://www.ep1.rub.de/~florian/epics/raspi_panda.img.tar.gz A 4 GB card is required.

Currently there are two users available:
pi (passwd: raspberry)
epics (passwd: pandadcs)

EPICS base, base, SNL Sequencer, Sequencer 2.1.11, AsynDriver and 4.21, StreamDevice 2.6, ProcServ 2.6.0, and device support for the CAN bus and Dallas-1-Wire are installed in the directory /usr/Epics/.
An EPICS IOC with all Also two IOCs, one for these modules included is installed in /home/epics/Panda_DCS CAN bus and one for Dallas-1-Wire are installed. Configuring both IOCs (loading of AsynDrivers and database files) can be done with the files in /home/epics/epics_config/.

After booting the Pi ProcServ will be started with the EPICS IOC for CAN bus as child process allowing access via telnet on port 20000. The child process is not started automatically.

Contact Person

For further questions and suggestions please contact FlorianFeldbauer

-- FlorianFeldbauer - 18 Dec 2012 -- PeterZumbruch - 26 Jun 2013
-- FlorianFeldbauer - 28 Jun 2013

IAttachmentActionSorted ascendingSizeDateWhoComment
PANDA-RPi_CAN.pdfpdfPANDA-RPi_CAN.pdfmanage 67.3 K 26 Jun 2013 - 10:38FlorianFeldbauer Schematic of the adapter PCB
rasPI_CAN_back.jpgPANDA-RPi_CAN_brd.pdfjpg pdf rasPI_CAN_back.jpg PANDA-RPi_CAN_brd.pdf manage1867.9 160.5 K 26 28 Jun 2013 - 12:57 07:28 PeterZumbruch FlorianFeldbauer rasPi Can Board Layout back
rasPI_CAN_back_small.pngrasPI_CAN_back.jpgpng jpg rasPI_CAN_back_small.png rasPI_CAN_back.jpg manage275.8 1867.9 K 26 Jun 2013 - 12:57PeterZumbruchrasPi Can back small
rasPI_CAN_front-2.jpgrasPI_CAN_back_small.pngjpg png rasPI_CAN_front-2.jpg rasPI_CAN_back_small.png manage1473.5 275.8 K 26 Jun 2013 - 12:58 12:57 PeterZumbruchrasPi Can front 2 back small
rasPI_CAN_front-2_small.jpgrasPI_CAN_front-2.jpgjpgrasPI_CAN_front-2_small.jpg rasPI_CAN_front-2.jpg manage98.8 1473.5 K 26 Jun 2013 - 12:58PeterZumbruchrasPi Can front 2 small
rasPI_CAN_front.jpgrasPI_CAN_front-2_small.jpgjpgrasPI_CAN_front.jpg rasPI_CAN_front-2_small.jpg manage1738.8 98.8 K 26 Jun 2013 - 12:59 12:58 PeterZumbruchrasPi Can front 2 small
rasPI_CAN_front_small.pngrasPI_CAN_front.jpgpng jpg rasPI_CAN_front_small.png rasPI_CAN_front.jpg manage275.6 1738.8 K 26 Jun 2013 - 12:58 12:59 PeterZumbruchrasPi Can front small
rasPI_CAN_front_small.pngpngrasPI_CAN_front_small.pngmanage 275.6 K 26 Jun 2013 - 12:58PeterZumbruch rasPi Can front small

Revision r7 - 28 Jun 2013 - 07:32 - FlorianFeldbauer
Revision r6 - 26 Jun 2013 - 12:18 - PeterZumbruch
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding PANDA Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)