Raspberry PI – FieldBus CAN/RS485/RS232 add-on board

November 22, 2016

Despite USB being everywhere, I still use a lot of industrial and embedded interfaces, such as RS232 and RS485 interfaces, in my projects. Legacy equipment especially and even new industrial equipment still use RS232 for programming and monitoring. While RS485 interfaces can still be found a lot in industrial communications such as factory automation.

So with this in mind I felt I needed an Raspberry Pi add-on board to simplify a lot of these connections. So here is the Raspberry PIIO FieldBus add-on board. It is a multi-communications board RS232 or RS485 and CAN Bus interfaces.

rpi_piio_fieldbus1_small
The board uses 3.3V components and is completely voltage compatible with the Raspberry Pi.

The board connects directly to the Raspberry Pi’s SPI to provide CAN Bus communications and also to the UART Rx and Tx to provide RS232 or RS485 communications.

CAN Bus interface uses MCP2515 CAN controller and MCP2551 CAN transceiver IC provides CAN Bus v2.0 A/B at 1 Mb/s. It is connected the Pi’s SPI Interface. Connection is provided via a 3-Way screw terminals.

RS232 interface uses a 3.3V MAX3232 (or Equivalent IC) chip and CTS (GPIO16) & RTS (GPIO17) signals are provided. Connection is provided via an industry standard 9-Way D Connector (Male).

RS485 interface uses 3.3V MAX3485 (or Equivalent IC) chip with DE (GPIO27) & !RE (GPIO22) used to control the RS485 transceiver control signals. Connection is provided via a 3-Way screw terminals to the outside world.

The Raspberry Pi expansion port has only on UART interface available for serial communications. So where both circuits are fitted, only one RS232 or one RS485 interface may be connected to the UART, therefore only one interface can be used at any time.

You can find them on our Tindie store

Advertisements

MiniPIiio RS232 set-up

November 26, 2013

By default the Raspbian uses the serial UART to access the shell console. To change this we need to make a few small changes to the cmdline.txt and inittab files

Make a backup of the two files we’ll be changing.

sudo cp /boot/cmdline.txt /boot/cmdline.bak
sudo cp /etc/inittab /etc/inittab.bak

In the LXterminal shell type the command:

sudo leafpad /boot/cmdline.txt

Find and remove “console=ttyAMA0,115200” and “kgdboc=ttyAMA0,115200” parameters.

The cmdline.txt will probably contain the default configuration line:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

Find and remove “console=ttyAMA0,115200” and “kgdboc=ttyAMA0,115200” configuration parameters so it looks something like this:

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

Make sure to save the file and quit the editor.

Finally edit the “/etc/inittab” file to disable the use of the “ttyAMA0” serial port. In LXterminal type this command:

sudo leafpad /etc/inittab

Near the bottom of the file, look for a configuration line that includes the “ttyAMA0” port address.

Type a hash (or pound) sign (“#”) in front of the line “ttyAMA0“.

Save the file and exit the editor. Once done to reboot your Pi.

Once the Pi is rebooted, you can use “ttyAMA0” to access the serial port.


MiniPiio RS232 v0.10

June 24, 2012

** UPDATE: You can get these boards at tindie.com in the DTronixs store

As promised we spent our weekend building the other MiniPiio designs. So without any further ado, here’s the MiniPiio_RS232.

This is for anyone who wants a RS232 port on the Raspberry Pi but doesn’t want to give up one of the two precious USB ports or clutter their desk with a USB hub to use a USB to RS232 adapter.

Unfortunately, there’s a mistake in the dimensions of the PCB. Instead of being 50 x 40mm like the other MiniPiio’s, the MiniPiio_RS232 is 45 x 42mm so its wider and shorter than the others. Being shorter is not a problem just ask Napoleon, but being wider does mean it interferes with the RCA Composite Video connector. 30-seconds with a file cuts it down to size but it does mean back to the drawing board or rather Design Spark PCB.

It was easy to fix, but just means another trip to the PCB manufacturer for another batch of boards. A PDF for the schematics is here.


RS232 Breakout Board (v0.20) for Raspberry-Pi

February 7, 2012

I found some time to finish of the design for the Raspbery Pi RS232 brakout board. I followed Frank Buss’s advice on the RPi forum and added a 3.3V regulator to give more current to the 3.3V for the prototyping area.

Schematics are here.

I’ve a couple more breakout boards in the works:

RPi_ProtoBoard – A basic prototyping board with a 3.3V regulator. The 3.3V regulator can be powered from an internal (i.e RPi 5V) or external (9V-12V PSU wall adapter) power source.

RPi_XBee – A XBee breakout board with on board power regulator and small prototyping area.

** UPDATE: The first PCB’s have arrived see here and heres the first built board **


RS232 Breakout Board for Raspberry-Pi

January 25, 2012

The Raspberry-Pi  will be with us soon. In the mean time I would like to share a little RS232 breakout PCB I”ve designed for use with the RPi.

It”s a simple RS232 circuit using a MAX3232 chip connected to the UART Rx and Tx of the RPi.

I”ve not included any mounting holes as I don”t know if the final RPi will have any, although I hope to add some for the next version. It was pointed out on the RPi forums that the RPi’s 3.3v supply is limited to 50mA so I may add a 3.3V regulator to the circuit. A MCP1703 from Microchip was recommended, The addition current from an additional  3.3V regulator will useful if you want to use the prototyping area on the breakout board. That said the RPi’s 3.3V at 50mA is enough for the MAX3232 by itself.

The design was done in DesignSpark PCB and I”ll post the design files and gerbers in due course and I expect to get some finished PCB”s after the Chinese New Year

Initial schematic for v0.10 is here