Skip to the content
PCBKitNew board
2 layers65 × 30 mmFLASH Pi, the printed circuit board in 3D

Raspberry Pi based SPI&I2C programmer

Size
65 × 30 mm
Copper layers
2
Thickness
1.6 mm
Parts
51
Nets
26
Pads
175
Tracks, vias
506, 26
Pours
3
Routed
Yes
KiCad
KiCad 4
Created
11 Nov 2017
Updated
12 Nov 2017

Overview

FLASH Pi is an open-source printed circuit board by hexeguitar, from the hexeguitar/FLASH-Pi repository on GitHub. It is a 2-layer board of 65 × 30 mm with 51 parts on 26 nets, routed with 506 tracks and 26 vias.

It is built around the MCP1700T-1802E/TT(MS), PCA9617ADP and SS14. Its parts include 14 capacitors, 8 resistors, 8 ICs, 2 connectors and 2 switches. It belongs with the interfaces and adapters boards of this library.

Main components

3

README

README.md

FLASH-Pi

SPI & I2C level converter and bus driver for RaspberryPi Zero

The main goal of this project was to create a versatile programmer for various EEPROM and FLASH memory chips using flashrom and wiringPi packages.

alt text

Background & origins

In order fo fix an HDMI controller board I had to reprogram the onboard 25-series SPI FLASH memory containing a corrupted firmware image. None of my standalone programmers could erase the chip, so i tried to use the RasPi Zero + Flashrom as a programmer. Flashrom 0.9.9 did detect the chip, but still couldn't erase it. As it turned out, this memory had a non volatile protection bit set, clearing it was not implemented in the software. Using the wiringPi i was able to clear the bit, reprogram the chip and finally set the protection bit back. This gave me an idea that a RasPi Zero W + Flashrom + WiringPi, Python + an addon board with level converters/buffers could serve as a quite powerful, versatile and yet very compact SPI FLASH programmer. Ontop of that i decided to add a similar level converter for the I2C bus using the PCA9617A chip.
The main function of the FLASH-Pi is to convert the voltage levels and isolate the SPI and I2C buses on the RaspberryPi Zero.

alt text

Features:
  • SPI0 bus: level translation between the RPi's native 3.3V and one of the listed below:
    • 5V
    • 3.3V
    • 1.8V
    • externally supplied voltage in range from 1.6V to 5.5V
  • I2C1 bus: level translation between the RPi's native 3.3V and one of the listed below:
    • 5V
    • 3.3V
    • 1.8V
    • externally supplied voltage in range from 0.8V to 5.5V
  • Overcurrent protection (polyfuses) on the 5V and 3.3V rails supplied by the RPi
  • Labelled RaspberryPi GPIO pins for easy wiring and experiments.

alt text

Circuit design:

Initially i used the TXS0104 chip to level shift SPI bus, which turned out to be a trap (always read the datasheet carefully!). The condition of VCCA (3.3V Raspi side) > VCCB (Target) could not be met for 1.8V output level. Since the SPI lines does not have to be bidirectional i ended up using four SN74LV1T125 buffers specifically designed to up/down translate the levels in wide ranges.
RaspberryPi provides 5V and 3.3V power rails. Both rails are protected with polyfuses, 100mA for the 5V line and 50mA for the 3.3V one. The 1.8V rail is generated with the MCP1700T-1802 voltage regulator. Target voltage level is set with a 4 way slider switch.
The 4th option uses an externally supplied target voltage and is intended to use with in-circuit operation.
I2C section is actually a stock application of the PCA9617A chip. 1k5 pull-ups are provided on both sides.

alt text

Software

After doing the usual startup houskeeping (changing the password, setting locales, enabling SPI, I2C, serial port, VNC, Wifi config, etc...) on a fresh Raspbian image i usually remove a few packages that will not be much of use in this application. This will free up some space on the SD card.

text
sudo apt-get remove --purge wolfram-engine scratch minecraft-pi sonic-pi claws-mail bluej python-pygame greenfoot
sudo apt-get clean
sudo apt-get autoremove

The next step is to install the wiringPi library. The instruction on how to do that is provided on the authors site: http://wiringpi.com/download-and-install/

Installing flashrom is as easy as:

text
sudo apt-get install flashrom

It is probalby worth to install and setup a shared folder with samba for easy file exchange over the network.

Usage

In most cases the RasPi will be run headless and accessed via:

  • SSH for command line operation
  • VNC viewer using a remote desktop

alt text

I opted to use the RasPi Zero W for it's compact size and built in WiFi, accessing it remotely from my main PC or laptop. Of course, a regular model Zero will work, too. Especially using an Ethernet over USB-OTG option seems to be quite useful idea - making the device an USB programmer.

PCBs

PCBs are available from OSH Park:

Order from OSH Park

alt text


(c) 11.2017 by Piotr Zapart
www.hexeguitar.com

License: Creative Commons - Attribution - ShareAlike 3.0
http://creativecommons.org/licenses/by-sa/3.0/

Parts

51
QtyValueFootprintReferences
13VAL**H_vias:Via0703_GNDVia0703_GND, Via0703_GND, Via0703_GND, Via0703_GND, Via0703_GND, Via0703_GND, Via0703_GND, Via0703_GND, Via0703_GND, Via0703_GND, Via0703_GND, Via0703_GND, Via0703_GND
8100nH_smd_passives:CAPC_0603_1608X86NC2, C3, C4, C5, C7, C10, C11, C13
61uH_smd_passives:CAPC_0603_1608X86NC1, C6, C8, C9, C12, C14
41k5H_smd_passives:RESC_0603_1508X63NR1, R2, R7, R8
433RH_smd_passives:RESC_0603_1508X63NR3, R4, R5, R6
4SN74LV1T125_SOT23_5H_SOT:SOT23-5IC2, IC3, IC4, IC5
21P4T_generic_switchH_switches:SLB1470_1P4T_slideSWSW1, SW2
2CONN_01X06conn-100mil:CONN-100MIL-F-1x6P1, P2
1100mAH_Fuses:Fuse_SMD1206_ReflowF2
125LC_EEPROMH_PDIP:DIP-8IC7
150mAH_Fuses:Fuse_SMD1206_ReflowF1
1KiCad LogoH_logos:KiCad-Logo_Copper_11mmx5mmG***
1MCP1700T-1802E/TTH_SOT:SOT-23IC8
1PCA9617AIPC7351-Nominal:SOP65P490X110-8ANIC6
1RPi_A+_B+_2B_HatH_dev_kits:z_RPiZero_Hat_NPTHIC1
1SS14H_diodes:DO-214-AC_SMAD1

Questions

How big is the FLASH Pi PCB?

It measures 65 × 30 mm and has 2 copper layers, 1.6 mm thick.

What parts does the FLASH Pi use?

51 parts, built around the MCP1700T-1802E/TT(MS), PCA9617ADP and SS14. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the FLASH Pi KiCad files?

From the hexeguitar/FLASH-Pi repository on GitHub, at the commit this page was made from: the board is design_files/FlashPi_KiCad/FlashPi.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the FLASH Pi design in my own project?

Its repository states no licence, so its author keeps all rights: ask hexeguitar before reusing the design.

Similar boards

  • 2 layers30 × 15 mmTFASPDIMU02, the printed circuit board in 3D

    TFASPDIMU02

    ThunderFly-aerospace/TFASPDIMU02

    I²C bus differential pressure sensor with IMU and Magnetometer.

    43 parts3GPL-3.0
  • 2 layers18.4 × 10.7 mmGrove PCA9617A, the printed circuit board in 3D

    Grove PCA9617A

    asukiaaa/grove-PCA9617A

    A PCB which transports I2C signal on grove cable through PCA9617A I2C releater.

    13 parts
  • 2 layers87.6 × 43.2 mmLedstrip, the printed circuit board in 3D

    Ledstrip

    paulscherrerinstitute/LedStripI2c

    LED Bar-Graph for Displaying PulseID to a Camera

    41 parts
  • 2 layers98.7 × 41.9 mmLedDriver, the printed circuit board in 3D

    LedDriver

    roman-dvorak/ESP32-C6-12-MOSFETPWM

    117 parts
  • 4 layers55.8 × 58.4 mmEDP Converter, the printed circuit board in 3D

    EDP Converter

    brendena/SN65DSI86_hat

    V1.1 - added a external clock, routed test to ground

    67 parts9
  • 2 layers127.9 × 25 mmNape, the printed circuit board in 3D

    Nape

    menbou0202/Nape

    Open-source hardware files for the Nape trackball device

    21 parts3
  • 2 layers87.2 × 69 mmOhareV1, the printed circuit board in 3D

    OhareV1

    Will946/O-hareAir

    An ESP32-based flower that measures air quality with real sensors and physically points a needle at how badly you need to open a window.

    39 parts1MIT
  • 4 layers256.1 × 170.6 mmPSEC5 Board, the printed circuit board in 3D

    PSEC5 Board

    AhanDatta/PSEC5-Board

    992 parts