130 Pi: Electronics for the Raspberry Pi Computer (130.html)

Keywords:Raspberry, Pi, I2C, Python, GPIO, PiR2, qwiic, NodeLynk, pHat

The photos below contrast the models 3B and 4B of the Raspberry Pi. There is no mention of the additional I2C channels (which make a total of 6 I2C channels on the Model 4B). This is probably because there are apparently some firmware gliches preventing these additional I2C channels from being fully operational at the time of rollout of the model 4B.

The J4 connecter on the later model of Pi model 3B+ and on Pi model 4B is described in Source 27. J4 can be used to take DC voltage from the Ethernet connector (when a live Ethernet cable is plugged into it). A photo of the PoE board is shown in below under the heading: "Some Electronic Components for the Pi (many are I2C)"

(To enlarge .....Click it)
thumb: Raspberry Pi 3B
Raspberry Pi 3B

(To enlarge .....Click it)
thumb: Raspberry Pi 4B
Raspberry Pi 4B



The Webmaster apologises for the low-resolution graphics of the Model 4B GPIO on the right (below). Note that line GPIO20 is inaccurately shown to be on Pi pin 37 on the left-hand photo. It actually is on pin 38. Another source (Element14) provided the following information (in the lower pair of photos) about the Pi Model 4B GPIO pins and their alternate assignments.

Each GPIO pin can normally sense or control one external device. Each I2C bus can be connected to multiple sensors or control points. When many pins communicate with many ioDevices, special care must be taken to not overload the 5v0 power supply. This is easily done by incorporating additional 5v power supplies into the design.


(To enlarge .....Click it)
thumb: Raspberry Pi GPIO (pre model 4B)
Raspberry Pi GPIO (pre model 4B)

[NOTE: GPIO20 is mislabelled in above photo as phys pin 37]
(To enlarge .....Click it)
thumb: pi4B GPIO
pi4B GPIO

(To enlarge .....Click it)
thumb: pi4B GPIO v2
pi4B GPIO v2

(To enlarge .....Click it)
thumb: GPIO_Pi4B_Alts.jpg
GPIO_Pi4B_Alts.jpg

Careful examination of the photo (above right), shows the 6 pairs of I2C pins to be:
(To enlarge .....Click it)
thumb: I2C_Pi4B_Pins.jpg
I2C_Pi4B_Pins.jpg


Some Electronic Components for the Pi (many are I2C) circa August 2019

An increasing number of I2C devices exist that can be successfully attached to the Raspberry Pi computer. But most (if not all that are directly to the GPIO ports of the Raspberry Pi) are shown as being limited to the first I2C channel on the Pi or their software drivers are limited to the Pi's first I2C channel. This is not a problem when using models of the Raspberry Pi designed before the Pi Model 4B. But the Pi Model 4B offers multiple (up to 6) I2C channels. Future owners of the Pi Model 4B will need to connect to the additional I2C channels. For the Raspberry Pi model 4B, an ideal future (not yet invented) pHat (using the SparkFun terminology) will:
The I2C - Raspberry Pi interface is certainly in a state of flux following the release of the Raspberry Pi Model 4B in June 2019.

A price list of many of the following components appears at the end of this article. Most of these items are of interest to those wishing to connect devices to the I2C bus on the Raspberry Pi:

Pi 4B J2: RUN and GLOBAL_EN Pins

(To enlarge .....Click it)
thumb: J2.jpg
J2.jpg

(The center pin in the above photo is Ground.) The expected purpose of these pins on the Raspberry Pi 4B might be as follows (from Source 33):
Wed Jul 10, 2019 5:02 pm

RUN is for resetting the SoC. GLOBAL_EN is for signalling the PMIC to leave the low power shutdown state. Neither should be used for powering a fan.
The following provides more information about the RUN pin:
Fri Oct 05, 2018 2:36 am

The Run pin (well its not really a pin as it isn't populated) is directly connected to the Broadcom SOC according to the reduced schematics (Source 34).
The following note (Source 35) explains how to use the RUN pin:
The RUN signal appears to be an active-high, pulled-high, open-collector configured signal on both, so you could probably just use a diode to interface to an external 5V/0V signal to pull it low as /RESET -

                        -.- 3V3
                        .|.
                        |_| 10K
External     Diode       |
 signal   >---|<|---(o---^---<> RUN

COM-10302 Tactile PushButton 12 for $5.85 From SparkFun

(To enlarge .....Click it)
thumb: Tactile_Button.jpg
Tactile_Button.jpg

This tactile button can be wired as an external Power Wake/Reset button for the Raspberry Pi 4B (see Source 52). It must be connected between pin Gnd and pin GLOBAL_EN on the Raspberry Pi 4B (see the previous note) on the Pi 4B connector J2. One writer says that the pin beside the GLOBAL_EN is not GND, so the other side of the PushButton must be connected to a GPIO GND. The GLOBAL_EN appears to have a pull-up to 5V. Do not connect the pushbutton between GLOBAL_EN and RUN because RUN is 3v3. The button has 4 pins but 2 of the pins are redundant and can be snapped off. This pushbutton is normally open (I believe). (It is suggested that it might be mountable directly on the Raspberry Pi 4B board, but this is not recommended. Solder two headers to GND and GLOBAL_EN instead. Then use a 2 pin jumper to the pushbutton.)

See3CAM_130 works on Pi 4B From e-consystems.com US$99

(To enlarge .....Click it)
thumb: Zoom-See3CAM_130.jpg
Zoom-See3CAM_130.jpg

See3CAM_130 – 4K Autofocus USB3.1 Gen1 Camera Board (Color)USB 4K Board Camera

(See Source 54) The See3CAM_130 is an UVC-compliant AR1335 sensor based 13MP autofocus USB camera with iHDR support. It supports 4K Ultra HD (3840x2160) at 30fps over USB3.1 Gen1 in compressed MJPEG format. This See3CAM_130 can also stream Full HD (1920x1080) at 60fps and HD (1280x720) at 60fps in both uncompressed and compressed MJPEG formats. This autofocus USB camera board is also backward compatible with USB 2.0, although in USB 2.0, this camera supports fewer resolutions at lower frame rates.The 13MP camera has a dedicated, high-performance Image Signal Processor chip (ISP) that performs all the Auto functions (Auto White Balance, Auto Exposure control) in addition to complete image signal processing pipeline that provides best-in-class images and video and the MJPEG compression.

Modern HC Logic Gates

This family of IC logic gates has part numbers of the form SN74HCxxxN. For example the SN74HC21N is a "Dual 4-input Pos." gate (shown below). Mouser is a supplier of these gates. A typical IC costs between US$.30 and US$4.00. Vcc should be between 2v and 6v. The inputs should be outside the range of 10% Vcc and 90% Vcc. The outputs will also be outside the range of 10% Vcc and 90% Vcc. The HC pinouts are usually identical to the old TTL logic gates. (Many publications show the TTL pinouts.) Source 53 is the complete spec. sheet for this IC.

This family of logic gates is compatible with the pins on the Raspberry Pi. The Raspberry Pi could be damaged if a HC logic gate operating between 0 and 5V were used to drive a GPIO pin. This is because the GPIO pins expect inputs to remain below 3v3. The gate propogation time will be about 50 nanoseconds. A gate's output pin can only sink about 3mamp. Therefore each gate should not drive a resistive load lower than 1 k ohms. Each input pin of the gate will typically draw around 1 micro amp. The capacitance of an input pin is 10 pf. The propogation time through a gate is higher if the total input pin capacitance is higher.

(To enlarge .....Click it)
thumb: SN74HC21N.jpg
SN74HC21N.jpg

Raspberry Pi Zero W Surveillance Camera Project

In the 18 minute YouTube video V06 (below), Christopher Barnatt of ec (Explaining Computers) describes the building of this small project. The cost of the components for this project is approximately US$40. Note that no soldering is required. But some software must be downloaded, installed and configured. This Pi Zero can run "headless" by using the Windows 10 RDC (Remote Desktop Connection) software. Headless means "without monitor, mouse nor keyboard". The component list for this project is:

The only software that is needed is the motionEye (meye) software (Source 55). This software includes a motion detection routine which can trigger a 30 second video recording. It also includes the ability to send an email when the video is recorded. Many weblinks are referenced in this YouTube video. They can be referenced at Source 56. Note that all the parts listed below are NOT needed for this project.

Part Number and Price List

PN    Desc              	Price
--    ----              	-----
RaspberryPiModel4B 1Gb		$35.00
RaspberryPiModel4B 2Gb		$35.00
RaspberryPiModel4B 4Gb		$55.00
PoE Rectifier			$ 8.00
CAB-10759			$ 5.50
REF5020 Volt. Ref
DAC8574 i2C 4xA.O.
DAC8571 i2C 1xA.O.
ADS1115 i2C 4xA.I.
ISO1541 i2C Isolation		$29.95
INA260	i2C Curr.Sens.
TL082 Op.Amp
SN74HC138 DeMux
MPL311582 Outdoor.Sens.
VEML7700 i2C Lux Sens.		$ 4.95
2159 i2C 4 Alpha		$10.95
PAM8610 Audio Amp.
TPA2016 i2C Aud.Amp.		$ 9.95
Arduino Eth.Shield		$24.95
T2301PB Triac
MOC3034M Opto.Iso
MOC3021 Opto.Iso
DS3502 i2C 10k Pot.          CAD$ 7.99 (from ADAFRUIT)
DS3502U i2C 10k Pot.            $ 6.50 (from MBM at AliExpress)
NCD i2C Ext.Board		$ 3.95
NCD OUTPI2 i2C port		$11.95
VL53LOX i2C Dist.Sens.
SOIC to DIP Adapt.		$ 2.95
pHat i2C for Pi			$ 5.95
Pi Plate			$15.95
MEMS micro. I2S (not I2C)	$ 6.95
MEMS Mike + Amp #BOB-9868	$10.95
3577 Hat Hacker			$ 2.50
3099 Pi Camera			$29.95
MCP4725 i2C DAC			$ 4.95
PriceList.txt

List of Suppliers of Electronics (current & former suppliers)

  • AB Electronics (UK)
  • AdaFruit Industries
  • Alibaba
  • Aliexpress
  • DigiKey Electronics
  • e-consystems.com
  • eBay Advanced Search:I2C Supplier:KingElectronics15
  • Element14
  • Gikfun Boards (Amazon)
  • Jameco Electronics US
  • Mouser Electronics Canada
  • NCD I2C Interface
  • PiHut (UK)
  • SparkFun Electronics
  • Universal Solder, Yorkton, SK (See catalog: Source 8)
  • Raspberry Pi 4B Support

    Source 49 is about a special version of Linux : Ubuntu Mate for the Raspberry Pi 3 .... and soon for the 4B.

    Source 50, from dr-n on 2019 I Sep 22, says "To run Ubuntu Mate on a Pi 4B, simply:
    if you want a stable and easy solution simply install mate in raspbian:
    
    apt-get update
    Install mate
    sudo apt-get install mate-core mate-desktop-environment
    Add mate as default environment for your user by adding this line
    sudo update-alternatives --config x-session-manager
    In the wizard, type the number corresponding to mate
    Reboot
    sudo reboot
    :grin:
    Cheers Uwe
    
    I have not yet started using Ubuntu-Mate. Ubuntu Mate needs to support Python3 for me to use it.

    Glossary of Electronic Acronyms

    1K0       1 K ohm resistor
    1-Wire    OWFS serial bus
    2GB       2 Gigabytes
    3V3       +3.3 Volt
    6K0       6,800 ohm resistor
    ada       AdaFruit
    ADC       Analog to Digital Converter
    ALT       Alert (usually an interrupt signal)
    BCM       BroadCom Inc.
    CDS       photo cell (CadmiumSulphide)
    CMOS      Complementary Metal Oxide Semiconductor
    DAC       Digital to Analog Converter
    DIP       Dual In-line Pins (a popular IC format)
    GND       Ground
    GPIO      General Purpose Input/Output Raspberry Pi pins
    Grove     I2C connector with 4 pins
    HC        logic gates using CMOS levels
    HDMI      High Definition Multimedia Interface
    HS        High Side (of the load)
    iButton   Dallas Key
    I2C       Inter-Integrated Circuit eg TMC102
    I2S       Inter-IC Sound (eg Adafruit MEMS microphone)
    IC        Integrated Circuit
    IIC       I2C
    LS        Low Side (of the load)
    MIC       Meh In Charge (www.MehInCharge.com)
    Mux       Multiplexer
    NCD       National Control Devices, LLC
    Op.Amp    Operational Amplifier
    OWFS      One Wire File System
    pcs       pieces
    Pi        Raspberry Pi Computer
    Pico      Pi Pico microcomputer on a board
    PiR2      PiR2 Area Controller by ICH180R2 Corp.
    PN        Part Number
    PoE       Power over Ethernet
    pot.      potentiometer (variable resistor)
    qwiic     Qwiic Connect System by SparkFun Electronics
    RTC       Real Time Clock
    SD        Secure Digital Card (memory card)
    SoC       System-On-Chip  eg Broadcom BCM2711
    SOIC      Small Outline Integrated Circuit (very small IC Package format)
    ti        Texas Instruments
    TTL       ICs using very old Transistor-Transistor Logic
    us        micro-seconds
    USB       Universal Serial Bus
    v/v       output voltage per volt of input
    

    References

    Books/Newspapers

    Books/Newspapers 1: none

    YouTube Videos

    Source V01: INA301 Volt & Current Sensor Date: 2019HAug21
    Source V02: ti TL082 Op Amp Date: 2019HAug21
    Source V03: Pi2 Fun with I2C DAC's and ADC's Date: 2019HAug21
    Source V04: Installing Arduino Libraries Date: 2019HAug21
    Source V05: T2301PB Triac Date: 2019HAug21
    Source V06: Raspberry Pi Zero W Surveillance Camera by Christopher Barnatt of ec (Explaining Computers) 2017 F Jun
    Source V07: Date: 2019HAug21

    Web Sites

    Web Source S130:01: theBreadBoard by Peter Date: 2019HAug21
    Web Source S130:02: w3 Schools IS reference Date: 2019HAug21
    Web Source S130:03: sn74hc138 Multiplexer (pdf) Date: 2019HAug21
    Web Source S130:04: INA301 current monitor Date: 2019HAug21
    Web Source S130:05: PAM8610 Audio Amp (pdf) Date: 2019HAug21
    Web Source S130:06: Arduino Data Logging Date: 2019HAug21
    Web Source S130:07: MehInCharge.com website Date: 2019HAug22
    Web Source S130:08: Universal Solder catalog (pdf) Date: 2019HAug22
    Web Source S130:09: MCP23017 Data Sheet (pdf) Date: 2019HAug22
    Web Source S130:10: TL082 Data Sheet (pdf) Date: 2019HAug22
    Web Source S130:11: RCA T2103PB Triac Data Sheet (PDF) Date: 2019HAug22
    Web Source S130:12: RCA T2103PB Triac Data Sheet (local PDF) Date: 2019HAug22
    Web Source S130:13: ADS1114 (local PDF) Date: 2019HAug22
    Web Source S130:14: MOC3021 driving a Triac that controls a 220V motor. Date: 2019HAug22
    Web Source S130:15: AdaFruit ADS1115 Date: 2019HAug22
    Web Source S130:16: DAC7571, DAC6571, DAC5571, DAC7574, DAC6574, DAC5574, and DAC8571 Evaluation Module by ti (pdf) Date: 2019HAug25
    Web Source S130:17: DAC8571 Spec Sheet (pdf) Date: 2019HAug25
    Web Source S130:18: Adafruit Forum Issue: 14segment alphameric featherwing - i2c problem Date: 2019HAug25
    Web Source S130:19: REF5020 Voltage Reference Spec Sheet (pdf) Date: 2019HAug25
    Web Source S130:20: ISO1541 Spec sheet (pdf) Date: 2019HAug25
    Web Source S130:21: ISO1541 on board Date: 2019HAug25
    Web Source S130:22: Adafruit - How to solder a SOIC chip. Date: 2019HAug25
    Web Source S130:23: Sparkfun - How to solder a SOIC chip. Date: 2019HAug25
    Web Source S130:24: Element14 Date: 2019HAug27
    Web Source S130:25: MEMS I2S Circuit for Raspberry Pi Use Date: 2019HAug27
    Web Source S130:26: MEMS I2S Fritzing file for Raspberry Pi Use Date: 2019HAug27
    Web Source S130:27: Raspberry Pi IEEE 802.3af addon Date: 2019HAug27
    Web Source S130:28: MehInCharge.com website Date: 2019HAug27
    Web Source S130:29: ti INA260 Current & Voltage & Power I2C sensor Date: 2019HAug27
    Web Source S130:30: Element14 Date: 2019HAug27
    Web Source S130:31: 10 best Raspberry Pi Sensor Kits Date: 2019HAug28
    Web Source S130:32: MCP4725 DAC Tutorial (pdf) Date: 2019HAug28
    Web Source S130:33: Raspberry Forum topic Date: 2019 F Jun 10
    Web Source S130:34: Pi Partial Schematic Date: 2018 J Oct 5
    Web Source S130:35: Run/global_en: Raspberry Forum topic Date: 2018 J Oct 4
    Web Source S130:36: 1 Wire Plus Date: 2019 J Oct 9
    Web Source S130:37: 1 Wire PiZero addon Date: 2019 J Oct 9
    Web Source S130:38: Pi and 1-Wire Tutorial by Jack Creasey Date: 2015 D Apr 28
    Web Source S130:39: The range of 1-Wire(R) devices Date: 2015 D Apr 28
    Web Source S130:40: MAXIM MAX31820 Temperature Sensor Date: 2019 J Oct 09
    Web Source S130:41: MAXIM 1-Wire(R) products eg Sensors Date: 2015 D Apr 28
    Web Source S130:42: MAXIM 1-Wire(R) products eg Sensors Date: 2015 D Apr 28
    Web Source S130:43: MAXIM DS28E17 1-Wire to I2C converter Date: 2015 D Apr 28
    Web Source S130:44: MAXIM DS2482-100 I2C to 1-Wire converter Date: 2019 J Oct 09
    Web Source S130:45: 1 Wire PIZero addon Schematic Date: 2019 J Oct 09
    Web Source S130:46: OWFS on GITHUB Date: 2019 J Oct 09
    Web Source S130:47: [Set up] OWFS with I2C support on Raspberry Pi Updated: 3/7/2019
    Web Source S130:48: [Set up] OWFS Man Page by paul.alfille@gmail.com Updated: 3/7/2019
    Web Source S130:49: Ubuntu Mate for the Raspberry Pi 3 (and soon for the Pi 4 B) by Jason Evangelho 2019
    Web Source S130:50: Ubuntu Mate for the Raspberry Pi 4B by dr-n on Sep 22, 2019
    Web Source S130:51: 50 Sensors Etc. for the Raspberry Pi in Raspberry Pi Tutorials 2020DApr21
    Web Source S130:52: Raspberry Pi 4 power button in Raspberry Pi forums 2019 G Jul 07
    Web Source S130:53: SN74HC21N Dual 4-Input Positive-AND Gate by TI 2003 H Aug
    Web Source S130:54: Ultra HD USB camera for Raspberry Pi 4 by e-consystems.com 2019 K Nov 19
    Web Source S130:55: motionEyeOS Software by ccrisan 2017 F Jun 01
    Web Source S130:56: Notes for motionEyeOS project (Source V06) by Christopher Barnatt of ec
    Web Source S130:57: MEMS Microphone Hookup Guide (for BOB-9868) by Sparkfun
    Web Source S130:58: MEMS Microphone for Arduino by Super seller For Arduino&3D
    Web Source S130:59: DS3502 I2C Digital Pot: Overview for Arduino by Bryan Siepert For Adafruit
    Web Source S130:60: DS3502U I2C Digital qwiic Pot by MBM-Chip Store at AliExpress on 2021GJul31

    /SourcesEnd


    There is a way to "google" any of the part-numbers, words or phrases in all my articles. This "google-like" search limits itself ONLY to my articles. Just go to the top of "Articles by Old King Cole" and look for the "search" input box named "freefind".

    WebMaster: Ye Old King Cole

    Click here to return to ePC Articles by Old King Cole

    Created 2019 H Aug 21
    Updated 2024 B Feb 26
    © ICH180RR Corp

    /130.html