Difference between revisions of "Lo-tech GPIO Interface Board"

From Lo-tech Wiki
Jump to navigation Jump to search
Lo-tech>James
 
m (1 revision imported)
 
(No difference)

Latest revision as of 11:11, 21 April 2021

Lo-tech-gpio-interface-board-mounted-on-RaspberryPi-Bplus.JPG

The Lo-tech GPIO Interface Board enables the connection of the RaspberryPi Model B+ to the outside world, with 4 inputs and 8 outputs. The board has been designed to fit directly on top of the RaspberryPi Model B+ and features low power consumption, being powered directly from the RaspberryPi.

Specifications

  • Small form-factor:
    • Mounts directly to RaspberryPi device and fits within device footprint (65x56mm)
    • 2.8mm mounting holes aligned with RaspberryPi device mounting holes
    • 11mm spacing between boards (use 11mm standoff)
  • Powered entirely from GPIO header - no separate power connection required
  • Inputs:
    • Four independent opto-isolated inputs with screw terminals
    • Recommended input levels: 3.3V to 15V
  • Outputs:
    • Four 5V TTL outputs with screw terminals
    • Four on-board LEDs (2-pin headers can be mounted in place of LEDs, if required)
  • Single control GPIO control to enable/disable all outputs
  • Total assembled weight: 34g (about 85g including RaspberryPi B+ and screws)

Note: this board does not provide the auto-configuration capabilities defined in the RaspberryPi HAT specification; GPIOs must be manually configured during program initialisation. Pull-ups are provided where necessary to prevent spurious output values.

Inputs

Note: GPIO numbering follows the BCM numbering

The board provides four inputs (GPIOs 22, 23, 24, and 27), each interfaced through an H11L1M opto-isolator. The inputs require 2mA drive, which should be set via appropriate value of RN1. It is therefore possible to use inputs from almost any low-voltage source (note: never connect mains voltage to this board).

Input Logic Level RN1 Value
15V 6K8
12V 4K7
9V 3K3
6V 2K2
5V 1K5
3.3V 1K

RN1 is Bourns 4608X-102 type (isolated, 8-pin 4-element)

Outputs

Note: GPIO numbering follows the BCM numbering

The board outputs are driven by a 74ACT245N Octal Bus Transceiver. The transceiver gate is controlled by GPIO 21; initialisation process for outputs is:

  1. Set GPIOs 5, 6, 12, 13, 16, 19. 20, 21, 26 to output mode
  2. Output value 0 (or 1, as required) to the output channels 5, 6, 12, 13, 16, 19, 20, 26
  3. Output value 0 to GPIO 21 to enable the bus transceiver

The eight 5V TTL outputs divided into:

  • four outputs via screw terminals, for connection to external devices - GPIOs 5, 6, 12, 13
  • four outputs to on-board LEDs - GPIOs 16, 19, 20, 26

The total draw across all outputs should not exceed 180mA, and note that power for the outputs is sourced from the RaspberryPi 5V rail.

  • Choose RN3 value to match required output impedance (i.e. 100-Ohm)
  • Choose RN4 value to provide appropriate current through attached LEDs
  • Ensure total current draw will not exceed 180mA
  • RN3 and RN4 are Bourns 4608X-102 type (isolated, 8-pin 4-element)

Bill of Materials

Part Value Device Package Qty Farnell Mouser
C1..C5 0.1uF (100nF) Ceramic Capacitor THT 4 2112751 594-K104K15X7RF5UH5
C6, C7 10uF Electrolytic Capacitor E2-5 2 8767084 647-UVR1C100MDD
HD1, HD2, HD5 (Farnell parts) 1x2 Screw Terminal MULTICOMP MC000045 THT 3 2008016 -
HD3, HD4 (Farnell parts) 1x2 Screw Terminal MULTICOMP MC000044 THT 2 2008015 -
HD1, HD2, HD3 (Mouser parts) 8-way screw terminal (3.81mm) FCI 20020327-D081B01LF THT 1 - 649-220327-D081B01LF
HD4, HD5 (Mouser parts) 5-way screw terminal (3.81mm) 20020327-D051B01LF THT 1 - 649-220327-D051B01LF
IC1..IC4 - H11L1M Optocoupler, Schmitt Trigger DIP-6 4 1021127 512-H11L1M
IC5 - 74ACT245N Octal Bus Transceiver DIP-20 1 1739622 595-SN74ACT245N
LED1..LED5 - 3mm LED THT 5 1581112 645-521-9432F (red)
859-LTL-2231AT (green)
P1 - SOCKET, PCB, 0.1", 20+20WAY THT 1 7992033 855-M20-7832046
R1 270R 125mW Carbon Film Resistor THT 1 2329504 299-270-RC
R2 10k 125mW Carbon Film Resistor THT 1 9342419 299-10K-RC
RN1, RN3, RN4 See table* SIL-8 Resistor Network (Bournes 4608X-102 type) THT 3 See table* See table*
RN2 10k Bournes 4605X-101-103LF THT 1 9356061 652-4605X-1LF-10K
DIL Socket, 8-pin - SOCKET, VERTICAL, 1ROW, 8WAY THT 1* 3419101 571-215297-8
IC Socket (DIP20) - - DIL20 1 1101349 571-1-2199298-6
IC Socket (DIP6) - - DIL6 4 1077343 571-1-2199298-1

*For values of RN1, RN3 and RN4, see tables in Inputs and Outputs sections. Three components are needed for each board, with values chosen to match the desired input voltage levels and output drive current. These components can be changed after construction if SIL-8 sockets are mounted to the board (one socket is specified in the above component list for RN1, since this value is most likely to be changed to interface to different input voltage levels). Component options are:

Value Part Farnell Mouser
100R 4608X-102-101LF 9356509 652-4608X-2LF-100
270R 4608X-102-271LF 9356622 652-4608X-2LF-270
1k 4608X-102-102LF 9356517 652-4608X-2LF-1K
1k5 4608X-102-152LF 9356568 652-4608X-2LF-1.5K
2k2 4608X-102-222LF 9356592 652-4608X-2LF-2.2K
3k3 4608X-102-332LF 9356673 652-4608X-2LF-3.3K
4k7 4608X-102-472LF 9356703 652-4608X-2LF-4.7K
6k8 4608X-102-682LF 2321777 652-4608X-2LF-6.8K

Schematic

Use of this design is provided subject to the lo-tech.co.uk Terms and Conditions. Copyright (c) 2014 Peacon Ltd.

Programming

Any library suitable for use with the Raspberry Pi Model B+ can be used, for example WiringPi. The GPIO channels used are:

BCM GPIO Purpose Notes
5 Output (5V TTL) Screw terminal output
6 Output (5V TTL) Screw terminal output
12 Output (5V TTL) Screw terminal output
13 Output (5V TTL) Screw terminal output
16 Output Onboard LED
19 Output Onboard LED
20 Output Onboard LED
21 Output Control Output 0 to enable all other outputs; Output 1 to set high-Z state
22 Input See note
23 Input See note
24 Input See note
26 Output Onboard LED
27 Input See note

Note: The specified H11L1M opto-isolator has an LED forward voltage of 1.2V and requires 2mA drive.

See Also