Category Archives: extension board

RasPiComm+

Here is a quick update on the RasPiComm+ status. We are currently working hard on the Raspberry Pi drivers and hope to get the RasPiComm+ out there in Q3.

RasPiComm Plus

RasPiComm Plus mounted on Raspberry Pi with GSM and 16 isolated I/O extensions

The board itself is a 56x74mm 4-layer board, most components are mounted on the bottom. The top-side only features 4 edge-board connectors for the modules, power LEDs and two JTAG debugging/programming headers for the Cortex M3/M4F and the Altera MAX V CLPD.

We currently have 6 RasPiComm+ modules which we are testing:

RasPiComm+Extensions

CAN bus, RS-485, 8 inputs and 8 outputs RasPiComm+ extension boards

  • 8 Input (with adjustable reference voltage, can be jumpered to 5V or 24V or fed from outside)
  • 8 Outputs (5V or 24V or fed from outside)
  • GSM module
  • RS-485 (two RS-485 on one board)
  • CAN (two CAN bus ports on one board, you’ll need the ARM Cortex-M4 option to use both simultaneously)
  • 16 isolated I/O (using th iC Haus iC-JX)

The firmware of the Cortex M3/M4F (both can be populated) will provide a bridge from the extension boards to the Raspberry Pi and interface with the drivers. The ARM microcontroller can be programmed from the Raspberry Pi for power users. It will come with a fully functional firmware and does not need to be changed though. If you want do do realtime or high relieability stuff you can do this by programming the ARM microcontroller.

The CPLD is also programmable via the Raspberry Pi, so changing configurations for different extension modules is easy.

RasPiComm+ bottom side

RasPiComm+ bottom side

The big metal box on the bottom side is an isolated DC/DC converter. This will be optional and powers both the RasPiComm+ and the Raspberry Pi from a 24V power supply. The battery holder is for the real-time clock backup battery for which we will also add driver support, so that the Raspberry Pi can get the current date and time.

The driver is very elegant I think. You can dynamically load and unload driver modules and they create an interface (for example /dev/ttyRPC0) to the specified module in case the module is a serial module (this applies to the GSM, RS-485 and the CAN module). This is already working quite well, we successfully sent SMS messages from the Raspberry Pi.

For the I/O modules we are looking into a driver interface similar to the Raspberry Pi GPIOs, but this is still work in progress, if you have suggestions what the best way is to implement I/Os leave a message 🙂

I will post separate articles about the RPCP extension boards to explain them in detail.

And if you have any other ideas how to make the RasPiComm+ even better let me know!

Advertisements

RasPiComm API

The RasPiComm API is here!

Martin did all the hard work and now it’s online: https://github.com/amescon/raspicomm

Check out the readme.md for instructions on how to install and use it. There is also a Demo-Tool where you can test the basic functions of the board.

We also added a deamon which you can use to forward RS485 communication via TCP/IP. We used it to make an Andoid App to control a stepper motor. Videos will follow soon!

RasPiComm Update

RasPiComm v3

I want to give you a short update about the status of the RasPiComm project.

We already have ordered parts for the first production batch of 1.000 RasPiComms. We expect all parts to arrive in 4 weeks, so the RasPiComm will be available in approximately 6 weeks.

RS-Components!
We are also had a conversation with RS-Components. We are very confident that they will add the RasPiComm to their product lineup! So if everything works out the RasPiComm will be available worldwide!

Raspberry Pi with RasPiComm

Raspberry Pi with RasPiComm

The RasPiComm will most probably get a distinctive subsite on Designspark.

I made some changes to the final board, most of them are minor layout changes.

I2C
The pull-ups for the I2C were removed since they are already present on the Raspberry Pi. I still have to check how the I2C pull-ups are with the RasPi rev2.

ESD Protection
I also made an important change to the RS-232 and RS-485 ports. I added TVS-diodes for protection which is a massive improvement in terms of stability.

Here are the specs of the ESD-protection:

RS-232 port:

  • 300 watts peak pulse power (tp = 8/20µs)
  • ‹40 watts peak pulse power (tp = 10/1000µs)
  • ‹Transient protection for data and power lines to
    • IEC 61000-4-2 (ESD) ±15kV (air), ±8kV (contact)
    • IEC 61000-4-4 (EFT) 40A (5/50ns)
    • IEC 61000-4-5 (Lightning) 12A (1.2/50µs)

RS-485 port:

  • 400 watts peak pulse power (tp = 8/20µs)
  • ‹Transient protection for asymmetrical data lines to
    • IEC 61000-4-2 (ESD) ±15kV (air), ±8kV (contact)
    • IEC 61000-4-4 (EFT) 40A (5/50ns)
    • IEC 61000-4-5 (Lightning) 12A (8/20µs)

Raspberry Pi and RasPiComm Enclosure

RasPiComm Case

RasPiComm Enclosure

So now here it is: The RasPiComm enclosure. You can download the STL for printing from thingiverse.com:

http://www.thingiverse.com/thing:29521

The case features a slot for the RasPiComm pluggable headers. It also provides a mounting hole for the RasPiComm board where it can be screwed to the case. The hole for the screw has a 2.5mm diameter. I used a thread cutter to cut a 3mm thead into the plastic, this worked very well.

I also added a little nose above the ethernet jack which holds the Raspberry Pi down, see the pictures below.

The cover has a Raspberry Pi Logo cutout for ventilation.

Below you see some photos of a print using the Makerbot Replicator. You will find infos about how I printed the case on thingiverse.

RasPiComm v3 almost ready

RasPiComm v3 missing headers

RasPiComm v3 missing headers

I assembled RasPiComm v3 and it all works. This should be the design for production. Sadly the new connectors for the RS-485 and RS-232 ports still need 2 (!) more weeks to deliver, I ordered them 2 weeks ago. I only have the 2-pin pluggable power header yet, and only one half (the pluggable screw-terminal also takes another 2 weeks). So the picture to the right is still missing the pluggable headers, but you get the idea of the new design.

I had to make room for the new (big) pluggable headers, so the outputs are now on 2mm pitch headers (not polulated). SPI and input are also 2mm pitch headers and also not polulated. If you need the inputs, outputs or SPI you just need to solder the headers. I think most useres wont need them, and if you do it is easy to retrofit.

I2C Header

RasPiComm OLED

Raspberry Pi with RasPiComm OLED

I changed the I2C header from through-hole to SMD, simply because the battery holder is now below this header to avoid collision with the S2 header of the Raspberry Pi. This will probably be a male connector on the production board.

Production
I know, what you are really interested in is the availability. Well, I already got the quote for the first batch, way off my initial calculation, but they screwed up the material costs. They now have my BOM and I’m waiting for another quote. So I’m still on it and hoping that I can place the order in one or two weeks.

RasPiComm vs Gertboard

After the availability announcement of the Gertboard, a couple of days after my first post about the RasPiComm, questions arose on some blogs whether the RasPiComm is an alternative to the Gertboard or not.

So here is the answer: It is not!

The gertboard, especially the first YouTube video about it, has been around for a while. Gert van Loo is the father of this platform. These two boards have very few in common. The Gertboard is an easy-to-assemble board with a lot of features. It comes as a self-assembly kit, it is perfect for educational purposes. All you need is a soldering iron and a little bit of time and you can learn a lot and have fun!

The RasPiComm, as its name indicates, is specialized more on serial communication. It comes fully assembled, and it’s optimized for minimum space requirement. The highlight of the RasPiComm is its RS485 connector.  There are already lots of boards with relays, (stepper-)motor control and all the stuff you can imagine which can be connected via RS485. The advantage is that you can use long cables (only 2 wires needed) to control these boards (4000ft or 1200m are allowed with RS485!) and that you can connect up to 256 boards to the RasPiComm.

Here is a feature comparison chart:

Gertboard RasPiComm
Self-assembly kit assembled
Connected to RPi with flat-cable Piggyback board (no cable needed)
12x buffered I/O 5x unbuffered Inputs
3x push buttons 5x pushbuttons (4-way joystick with center-push)
6x open collector drivers (50V, 0.5A) 2x open collector drivers (5V, 0.2A)
48V, 4A motor controller
28-pin dual in line ATmega microcontroller
2-channel 8/10/12 bit Digital to Analogue converter
2-channel 10 bit Analogue to Digital converter
2-channel 8/10/12 bit Digital to Analogue converter
SPI connector to ATMega SPI connector to Raspberry Pi
I2C connector
Real-time clock (RTC)
RS-232
RS-485

I think the comparison chart shows pretty well that these two boards have totally different foci. So go ahead and buy both 🙂

RasPiComm v3

I want to give you a short update about the RasPiComm progress. You’ll find the schematics of v3 below.

I reworked the whole board and rerouted it all. I tried to implement as much feature requests as I could while preserving the footprint.

I also decided to start working on a RasPiComm Plus board. It will be bigger and better! But it will not play in the same league pricewise.

But first things first, here are the changes I made:

  • Moved the backup battery out of the way. Now it does not collide with the DSI (S2) plug on the Raspberry Pi.
  • 5V tolerant inputs
  • pluggable terminals for power, RS232 and RS485
  • supressor diodes for the outputs. You can now directly connect relays to the outputs
  • output is now a pinheader. The RasPiComm focus is on serial communication. Sacrifice I had to made to get the pluggable terminal headers in.
  • Extra 2 pin header for 5V fan. In case you want active cooling on the Raspberry Pi
  • Changed the through-hole joystick to a SMD variant. That resolves a little issue with the aluminum capacitor of the Raspberry Pi. No need for a tape or PCB support below to prevent accidental joystick activation
  • Extra tantal capacitor for external 5V power supply through the power header
  • SPI header

Shipment: Since my first post about the RasPiComm about 1 week ago I got a lot of positive feedback, so I really want to push v3 to production soon. Please give me a little time for finding the right partner for that. Eben Upton (Director of the Raspberry Pi foundation) is helping me to get this to Element14 (Farnell), this would be my preferred partner. Thanks Eben for your support! But as they are very busy with the Gertboard right now I don’t know about the timeframe yet. So I am working on it!

And thank you all for all the nice comments on my first blogpost about this! You all keep this going!

Downloads (Creative Commons Attribution-ShareAlike License)

RaspiComm_v3_schematics

 

RasPiComm – Hardware

Thank you for all the views and responses on my original RasPiComm blogpost!

Here I want to explain the RasPiComm hardware. The software part will follow next week.
At the end of the post you will find the schematics of the RasPiComm version 1 and version 2.

If you are not interested in the RasPiComm hardware, take a look at the original RasPiComm blogpost!

Now, let’s start!

Version 1 vs. Version 2

RasPiComm version 1

RasPiComm version 1 with populated RS-485 driver

As I mentioned in the first blogpost about the RasPiComm, I did two versions of the board. The first version had either one serial port OR an RS-232 port. I used the /dev/ttyAMA0 (TX on GPIO header pin 8 and RX on pin 10. You could either solder the MAX3232 for RS-232 or the MAX3483 for the RS-485 port. But there was another disadvantage: I used the GPIO1 (pin 12 on the GPIO header) for switching between receive and send mode.
Just a short explanation why you need to switch between send and receive mode: Unlike RS-422, RS-485 is an unidirectional bus system. That means that you use the same wires for sending and receiving data, so you cannot send and receive at the same time. Usually you always stay in ‘receive’ mode. If you want to send data you switch to the send mode and return to receive mode immediately after sending your data. The timing is critical here, I will explain that later. There are chips out there which support “auto-direction” from Maxim. I have not yet worked with them, I’ll probably will have a look at them in the future.
Another thing that changed is that version 1 had a SPI header. I removed them simply because the wiring of the SPI tracks would not have been optimal (they are not optimal yet but way better this way).

Changing to RS-485 via SPI

RasPiComm to Rasberry Pi Connector

So the disadvantage of version 1 is obvious: You could either have RS-232 or RS-485, not both. There was another problem. Switching the GPIO line for changing between receive and transmit was suprisingly slow. Not exactly because the GPIO switching is too slow but because it is not so easy to find out when the last byte was transmitted completely to switch back from send mode to receive mode. You can check if the /dev/ttyAMA0 send-buffer is empty using tcdrain(). Sadly this function blocks too long, we lose valuable miliseconds after sending until we can switch to receive mode and receive data. That means that all data that is sent by a RS-485 client before switching back is lost.
To overcome this limitation, and the problem that I can only use either RS-232 or RS-485 I dropped the MAX3483 and used the MAX3140 in version 2. This chip has an SPI-UART and RS-485 controller in one chip.
The interrupt line of the MAX3140 is connected to GPIO0 (pin 11).

RS-232
The RS-232 connector is driven by a MAX3232, I will probably replace it with another, cheaper version for the production board. Only TX and RX are connected, sadly the Raspberry Pi does not bring both CTS and RTS to the GPIO header, so hardware handshake is not supported. But this is not used often anyways.

I2C Connector
If you look closely at the I2C connector in the schematics you will see that this are actually two I2C connectors. It is a 2×4 header, and unlike all other headers row 1 and row 2 are not identical. I did that for a simple practical reason. I use this header mainly to connect I2C displays. There are two common pin layouts:

  • 5V, GND, SDA and SCL
  • 5V, GND, SCL and SDA

So I did both of them. With that little trick you can connect both types directly to the board using either row 1 or row 2.

Inputs
All 5 inputs are pulled-down to GND. They are all 3.3V inputs with an 1k resistor to the Raspberry Pi.

Outputs
Both outputs are open-collector outputs and switched with a BC847 transistor.

Power connector (3.3V, GND, 5V)
The 5V line can be used to supply 5V if you do not use the USB plug or use it as 5V ouput if the Raspberry Pi is connected via USB.
The RasPiComm generates its own 3.3V from 5V, the 3.3V line is connected to this output (200mA combined maximum rating).

RTC with backup battery

RasPiComm bottom

RasPiComm bottom

The backup battery on the bottom side of the PCB is a CR2032 cell. It should power the DS1307 for approximately 10 years. Currently there is a small problem with the battery holder on the bottom – it collides with the S2 socket (DSI). The RasPiComm v2 still can be connected to the Pi, but you cannot push it all the way down (it’s only 1mm). For testing I removed the S2-connector from my Raspberry Pi board. For the production version the PCB will get 5mm wider (did it without changing PCB size!) the battery socket is moved out of the way. It won’t change the footprint of the Raspberry Pi, the 5mm go torwards the video connector. That also means that the battery is slightly moved over the processor. This should not raise any temperature problems, neither for heat dissipation nor for the battery since the operational temperature range for the CR2032 cell is -20 to + 70 degrees Celsius (-4°F to +158°F).

Downloads (Creative Commons Attribution-ShareAlike License)

RasPiComm v1 schematics

RasPiComm v1 schematics

RasPiComm v2 schematics

RasPiComm v2 schematics

%d bloggers like this: