The Swiss Pi is a versatile I/O card for use with Raspberry Pi model A+ and B+, Raspberry Pi 2 model B, and Raspberry Pi 3 model B.
- 16 general-purpose I/O lines with individually configurable direction and pull-up resistor.
- 16 output channels providing 12-bit pulse-width modulation (PWM) output channels at about 40 to 1000 Hz with LED drive and servo motor capability, 10 mA source, 25 mA sink, 5 V levels.
- Low-power, 12-bit, 8-channel analog-to-digital converter chip featuring internal track/hold, voltage reference, and clock.
- Battery backed up real-time clock and calendar with integrated temperature compensated crystal oscillator and a 32.768 kHz quartz crystal.
- RS-485 interface with direct UART access from host system.
- Dedicated software-accessible controller for supporting RS-485 interface.
- Connector for extending I2C bus operating at 5 V.
- Polyfuse on 5V line for preventing damage to the computer.
- Incorporates EEPROM as defined by the HAT specification.
- Slot for camera cable is provided.
- Cutout for display cable is provided.
- Can be used with AxiCat adapter.
- Open source firmware and software.
- Swiss Pi User Manual (pdf, 2.8 MB, 2016-06-23)
- Swiss Server Client Command Protocol (pdf, 125 KB, 2016-10-26)
- RS-485 Controller Solution (pdf, 78 KB, 2016-10-08)
- Circuit Diagram (pdf, 89 KB, 2016-03-29)
- PCA9685 PWM Frequency Calculator (ods, 31 KB, 2017-03-18)
- PCA9685 PWM Frequency Calculator (xls, 46 KB, 2017-03-18)
You can find additional documentation in directory /public/swiss/doc and other directories called "doc" in the source code.
Software - Swiss
Swiss Server is the main application for working with the Swiss Pi. This program offers the full set of features of the Swiss Pi and runs as a network server. It accepts text commands over network ports. Multiple users and programs can concurrently access the Swiss Pi both locally and remotely. I/O Card Explorer can also connect to Swiss Server and is often deployed as a complementary monitoring tool.
Programming languages that support network sockets can easily connect to Swiss Server and work with the Swiss Pi. You can find useful resources in the source code:
- Directory swissclient-php contains a client for Swiss Server written in PHP and examples including a website. You can browse the PHP source code as a reference for using other programming languages with the Swiss Pi.
- Directory swiss-python contains various example programs written in Python 3.
Swiss RS-485 Control provides direct access to the RS-485 controller on the Swiss Pi. You won't normally need to run this program as the Swiss Server can handle most RS-485 features. Nonetheless, if you intend to learn more about the RS-485 function or you want to run the detection procedure for calibrating the baud information file, this program is your best friend.
Software - Real-time Clock
The Swiss Pi relies on the AbioCard software package for supporting the real-time clock.
Execute the script called install_abiortc_rpi.sh to install program abiocardtime. The script will add abiocardtime to the root's cron table in order to update the system time during boot-up and once a day.
Software - I/O Card Explorer
You can run this tool locally on your Raspberry Pi or remotely on a Linux or Windows computer to control your Swiss Pi. I/O Card Explorer supports direct I/O with Swiss Pi, use of AxiCat adapter, and tunneling over Swiss Server.
When connected to Swiss Server, I/O Card Explorer is a very handy tool for inspecting the state of the Swiss Pi in a non-intrusive way while other programs are working with the Swiss Pi.
Demo - Controlling RGB LEDs using a Tablet
This is a video of the Big Demo that's part of the examples of the PHP client for Swiss Server (see swissclient-php in the source code).
The configuration in the video was set up as follows:
- The Swiss Server is running on the Raspberry Pi allowing clients to access the Swiss Pi through network port 5003. We've put two RGB LED lights on the PWM connectors.
- A Linux PC (not visible in the video) is running an Apache webserver that's hosting the Big Demo example website. The example produces RGB color pickers that control the RGB LED lights on the Swiss Pi.
- The tablet is an Android-based system with its web browser surfing the Big Demo example website.
Demo - Dance of the Servo Motors
- motor_demo_dance.tar.gz (1 KB, 2016-07-02) - Shell script and Swiss Server commands
Demo - Various Servo Motors
- motor_demo_various.tar.gz (1 KB, 2016-07-02) - Shell script and Swiss Server commands
Demo - DC Motor and Linear Actuator
- motor_demo_dc.tar.gz (1 KB, 2016-07-02) - Shell script and Swiss Server commands
Raspberry Pi is a trademark of the Raspberry Pi Foundation