Buffer Board for the Raspberry Pi 400: A Sensible Resolution

When you've got a Raspberry Pi 400, you understand connecting further {hardware} brings dangers. The buffer board introduced right here is a great answer that gives ESD safety.

Launched in November 2020, the Raspberry Pi 400 is definitely a Raspberry 4, however constructed right into a keyboard, with the GPIO enlargement connector on the again of the enclosure. Connecting further {hardware} at all times brings dangers, particularly throughout prototyping. The buffer board we current right here is particularly designed for the Raspberry Pi 400. It permits interfacing with each 3.3 V and 5 V exterior logic for all of the 26 GPIOs, and the buffers/stage shifters used for this additionally present ESD safety.

The 400

Raspberry Pi boards will hardly want any introduction right here. For the reason that introduction of the primary model in 2012, they've been the topic (or a part of) many tasks in Elektor journal. Now we have introduced fairly a couple of totally different {hardware} tasks and extension PCBs for these processor boards. For this mission, let’s spoil the suspense straight away: the circuit I'll cowl just isn't new, as its first model was mentioned again in 2015 an Elektor Labs page. In 2018, the design was tailored to the expanded, 40-pin I/O connector that has been the usual for connecting further {hardware} to those processor boards because the introduction of the Raspberry Pi B+. And now, the latter model is tailored to one of many more moderen members of the Raspberry Pi product household — the Raspberry Pi 400.

Very merely put, the 400 is a Raspberry 4, constructed right into a keyboard. It resembles the once-famous computer systems of the Nineteen Eighties, just like the Commodore 64, Sinclair Spectrum, Acorn BBC and related. When it comes to specs, the Raspberry Pi is in fact many occasions extra highly effective than its now vintage predecessors, however there may be additionally a hanging similarity — the GPIO enlargement connector on the again of the enclosure, to which the consumer can join exterior (self-designed) {hardware}. Connecting further {hardware} at all times brings dangers, particularly throughout prototyping, and the buffer board introduced right here prevents the Raspberry Pi from being broken within the course of. As well as, the buffer board allows interfacing with each 3.3 V and 5 V exterior logic, and the buffers/stage shifters used for this additionally present ESD safety.

{Hardware}

The mission’s schematic (Determine 1 and hooked up as obtain) is strictly the identical because the one from our publication in 2018. The TXS0108E 8-bit buffers/voltage translators used on this mission are bidirectional, and every A-port and B-port pin has a pull-up resistor. The pull-down resistor of a GPIO of the Raspberry Pi is often within the order of 40 to 60 kΩ. This worth is simply too excessive to correctly pull-down the I/O when the buffer board is plugged in. So, please observe that with this enter configuration the logic stage is not going to be low; the pull-down is not going to work as meant.
 

Raspberry Pi 400 buffer board hardware
Determine 1: Déjà vu. The schematic diagram of the buffer board.

The I/Os have separate energy provide pins for the Raspberry Pi facet and the outside-world, VCCA and VCCB, respectively. Each A-port I/O of the TXS0108E has a pull-up resistor to VCCA, linked to the +3.3 V energy provide of the Raspberry Pi 400, and every B-port I/O has a pull-up resistor to VCCB. VCCB — for the extent of the I/Os on K2 — could be set to both +3.3 V or +5 V logic by jumper JP3. The pull-ups of the buffers have a price of 40 kΩ when the output is driving low and a price of 4 kΩ when the output is driving excessive. So the outputs of the buffers are in truth open drain. If, as an example, an LED is linked from the output of the buffer to floor, a voltage divider is created when an additional sequence resistor is used. A resistive load on the output will trigger the logic excessive stage to drop. One thing to bear in mind!

There are two 0.5 A PPTC resettable fuses (F1 and F2) within the energy connections between K1 to K2 on the buffer board to guard the +5 V and +3.3 V energy provides of the Raspberry Pi 400.

For the implementation of an I2C bus to speak with exterior {hardware}, GPIO2 is SDA and GPIO3 is SCL, further pull-up resistors R1 and R2 could be enabled by jumpers JP1 and JP2.

Throughout boot of the Raspberry Pi GPIO0 (ID_SD) and GPIO1 (ID_SC) are used to learn an EEPROM of an I2C HAT ({Hardware} Connected on High). After boot-up these GPIO’s can be utilized just like the 26 others, however care must be taken if an I2C HAT is mounted the system isn’t affected. To forestall the studying of GPIO0 and GPIO1 throughout boot add the next entry to /boot/config.txt:

force_eeprom_read=0

For extra info, take a look at the Raspberry Pi documentation concerning the config.txt file.

The Printed Circuit Board

The schematic could also be outdated information, however the PCB (Determine 2) is tailored particularly for the Raspberry Pi 400. It’s a bit smaller than the unique buffer board introduced in 2018. The Gerber information for this new board can be found for obtain, so you'll be able to order it on the PCB producer of your selection. However it's, in fact, much more handy to purchase the fully assembled buffer board within the Elektor Store.
Buffer PCB
Determine 2: The structure of the brand new buffer PCB.

A right-angled receptacle is used for the connector on the Raspberry Pi 400 facet of the buffer board (K1) so it may be inserted within the GPIO header at the back of the enclosure (Determine 3). The connector for the buffered I/Os is a regular 40-pin male vertical header (K2). The scale of the module is 55 x 44 mm, together with receptacle K1, which protrudes over the sting of the PCB. In comparison with the unique 150719-1 PCB, the 2 rows of pins of K1 are swapped, as a result of a receptacle is used right here. Putting a regular vertical male 40-way pin header for K1 to attach this buffer board to a Raspberry Pi 2, 3 or 4 by way of a flatcable — like with the older model of the buffer — is not going to work right here.
 

Raspberry Pi 400 Buffer plugged in
Determine 3: The buffer board plugged into the Raspberry Pi◦400.

Nonetheless, Determine 4 exhibits that this module can nonetheless be used with a Raspberry Pi 2, 3, or 4.
 

The board in use
Determine 4: The board can be used with ‘traditional’ Raspberry Pi boards.

The output connector K2 could be linked to exterior circuits utilizing a brief 40-way ribbon cable with two 2 x 20 receptacle connectors hooked up, or only a single receptacle with brief wires soldered to them or single sockets with wires. However watch out urgent a 40-way receptacle onto K2 or unplugging it from the board. Don’t do that whereas the buffer board continues to be inserted within the Raspberry Pi 400, as a result of fairly some pressure is required and the Raspberry Pi 400’s GPIO header may get broken.

Testing the Buffer Board

Two quite simple Python applications for testing the buffer board – borrowed from the older mission - can be found for obtain on the Elektor Labs page of this mission. One is to check all GPIOs as output, Check_all_GPIOs_as_output.py, and the opposite is to check all GPIOs as enter, Check_all_GPIOs_as_input.py (210320-11.zip). In Raspbian, simply double click on on one of many information and the default IDE for Python will open, then choose RUN to start out the check.

When testing the GPIOs as output, solely a single low-current LED linked between a pin and GND is required to see if an output is working or not. As a sequence resistor for the LED a 1.8 kΩ resistor can be utilized, however the worth just isn't actually crucial. It can restrict the present by the LED whether it is instantly linked to the optimistic provide voltage. Outputs are sequentially examined in 4 teams of most eight pins every, named IOA to IOD. Due to the open drain output the voltage throughout an LED (purple) plus resistor is about 2.6 V, when 5 V is chosen as an influence provide for the outputs (JP3). Join the resistor plus LED to one of many chosen outputs and it is going to be switched on for 0.2 seconds. The repetition fee of this pulse is determined by the dimensions of the group: 1.6 seconds for teams A to C (every with eight outputs) and solely 0.4 seconds for group D (two outputs). Change ‘IOA’ to 1 the opposite teams within the line

for i in IOA:            # leds blink 0.2 s in IOx group

to check the opposite teams of outputs. After all, GPIO0 and GPIO1 (ID_SD and ID_SC) could be added to one of many teams too.

This system to check the GPIOs as enter makes use of one I/O as output to point that the enter below check is working, GPIO3 by default. Join a 1.8 kΩ resistor and LED between pin 5 (IO3’) of K2 and GND. Just one enter at a time is examined within the supply code, to verify solely this one is working as enter. Change the quantity within the following line to check one other GPIO as enter:

IN1 = 2  #chosen GPIO to check as enter

This system additionally prints the chosen GPIO and its enter stage. The inputs have their pull-ups enabled. So to make the linked LED gentle the present enter pin should be linked to floor. When accomplished so the printout will change. Lastly, choose a distinct GPIO for the output so you too can verify GPIO3 as enter. After all, there are quite a few methods to check the GPIOs, if anybody has a extra environment friendly and/or sooner method: please share.

This buffer means that you can join new {hardware} to the Raspberry Pi 400 with peace of thoughts, enormously lowering the prospect of it getting broken throughout experiments. However nonetheless, lowering the danger through the use of this buffer board doesn’t imply that nothing can go mistaken. In lots of circumstances, I gained’t damage so as to add some frequent sense too.


Questions Concerning the Buffer Board?

When you've got technical questions or feedback concerning the buffer board or this text, be happy to e-mail the Elektor editorial crew at editor@elektor.com.

 

 

 

Part Listing

Resistors

R1,R2 = 10 kΩ, 100 mW, 1 %, SMD 0603

 

Capacitors

C1…C8 = 100 nF, 50 V, 10 %, X7R, SMD 0603

 

Semiconductors

IC1…IC4 = TXS0108EPWR, SMD TSSOP-20

 

Others

K1 = 2 x 20 receptacle, proper angle, pitch 2.54 mm

K2 = 2 x 20 pin header, vertical, pitch 2.54 mm

JP1,JP2 = 2-way pin header, vertical, pitch 2.54 mm

JP3 = 3-way pin header, vertical, pitch 2.54 mm

JP1,JP2,JP3 = shunt jumper, 2.54 mm spacing

F1,F2 = PPTC resettable fuse, SMD, polyfuse, 1210L050YR Littelfuse

PCB 210320-1 v1.0

   

 



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *