Friday 19 December 2014

Custard Pi Combos for the Raspberry Pi



If a particular Custard Pi does not have all the right inputs and outputs, then it’s possible to combine more than one. This post looks at the various combinations that are possible. (It's a chapter extraction from the new book 'Raspberry Pi with Custard' which is available from Amazon.)


GPIO bus connection method

The various cards use different means of connecting to the Raspberry Pi GPIO and this summarised below.

SPI bus
I2C bus
8 digital I/O
Custard Pi 2
Custard Pi 6
Custard Pi 1
Custard Pi 3
Custard Pi 7
Custard Pi 2


Custard Pi 5

The card combinations are limited by the type of bus connection used. For example, the SPI bus can only address 2 devices. As the Custard Pi 2 has a Analogue to Digital Convertor (ADC) and a Digital to Analogue Convertor (DAC) and both of these use the SPI bus, you cannot have more than 1 Custard Pi 2 connected to the GPIO. Because the Custard Pi 3 also uses the SPI bus, you cannot have a Custard Pi 2 and a Custard Pi 3 connected to the Raspberry Pi at the same time.

The I2C bus is addressable and you can have as many I2C devices as there are addresses. This means that you can have up to 8 Custard Pi 6’s connected at the same time. You just have to make sure that the switches on each card are used to set a different I2C address.

Example 1 - 64 relays controlled from the Raspberry Pi

Eight Custard Pi 6 cards daisy chained to provide a total of 64 relays that can be controlled from the Raspberry Pi GPIO.
 





Example 2 - 8 relays and 8 analogue inputs

This is achieved by using a Custard Pi 6 and a Custard Pi 3. As one uses the I2C bus and the other uses the SPI bus, this is possible.


Example 3 - 8 relays, 8 analogue inputs and 8 digital I/O

This is achieved by using a Custard Pi 6, Custard Pi 3 and a Custard Pi 5 as shown below.






Example 4 - 8 relays, 2 analogue I/P, 2 analogue O/P, 4 open collector outputs and 4 digital inputs

This is easily achieved by combining the Custard Pi 6 and the Custard Pi 2.

Example 5 - 8 Analogue inputs and 8 digital I/O

Plugging in the Custard Pi 3 and Custard Pi 5 into the Raspberry Pi GPIO will provide these functions.
 

Example 6 - Custard Pi 7 with 12 bit analogue inputs

The Custard Pi 7 has 4 analogue inputs but these are only of 8 bit resolution. If a particular application requires a higher resolution, then the quickest way to achieve this is to plug in a Custard Pi 3 card into the Custard Pi 7.


Other Custard Pi 7 combinations

The photos below show the Custard Pi 7 with the Custard Pi 2, Custard Pi 5 and also with both the Custard Pi 3 and 5.
 




Physical connection method

The Custard Pi 3 and 5 have stacking connectors. This means that they can be both plugged into the Raspberry Pi GPIO at the same time. The Custard Pi 6 and 7 have two ribbon cable sockets - again these can be used for ‘daisy-chaining’. However the Custard Pi 1 and 2 cannot be extended upon if they are the first card to be plugged in. If you want to combine these cards with others they have to be the last in the chain.

In summary, the Custard Pi range provides a very flexible way of connecting the raspberry Pi to the outside worls.







1 comment:

  1. It’s an outstanding blog to help new comers I am also getting benefit from it, thanks best universal remote

    ReplyDelete