The Bus Pirate is an open-source hardware debugging tool that converts simple commands into common bus protocols such as 1-Wire, I2C, SPI, UART, several LEDs and more. Send commands to a chip or sensor and get the response, without writing a line of code.

🛒

Get Bus Pirate & Accessories

Commands are entered into a serial terminal. A new VT100 mode supports color text and a status toolbar that displays the function and voltage of each pin.

Specs

The Bus Pirate is designed to eliminate the frustrating parts of hacking and hardware tinkering. We tried to tackle all the pain points, from bizarre and uncomfortable acrobatics with multimeter probes to the hassle of connecting multiple test hooks to a single pin. With Bus Pirate 6, information you need is right where you need it.

  • Follow Along Logic Analyzer - Captures logic when you send commands, instantly see what actually happened on the bus
  • Bulldozer buffered IO - 1.2 to 5volt direct interfacing with 8 bidirectional buffered IOs
  • Voltage measurement extravaganza - The Bus Pirate displays voltage readings for every pin, right on its vibrant LCD screen and in the terminal statusbar
  • Current measurement - Get a reality check by monitoring current use in real time
  • Programmable power supply - 1 to 5volt output, 400mA max, for powering all kinds of devices
  • Programmable current limit - A 0 to 500mA programmable hardware fuse sets current limits that keep your projects safe and sane
  • A big colorful display - Keep track of pin assignments, voltages and current
  • Color terminal and statusbar - VT100 terminal emulation for that modern 1970s feel
  • Just One Button - A dedicated button for automating repetitive debug commands while you’re wrist deep in circuits
  • Auxiliary Header - A second header to easily connect logic analyzers and other tools. Stop struggling to fit multiple probe hooks on tiny chip leads

Bus Pirate 5 vs Bus Pirate v6

Bus Pirate 6Bus Pirate 5
CoresRP2350B ARM M33 x 2RP2040 ARM M0 x 2
Speed133MHz125MHz
RAM512Kbytes264Kbytes
Flash128Mbits128Mbits
PIO state machines128
Follow along logic analyzer8 pins
LEDs18 RGB LEDs18 RGB LEDs
IO pins8 @ 1.2-5.0volts8 @ 1.2-5.0volts
Pull-up resistorsAll pinsAll pins
Voltage measurementAll pinsAll pins
Power supply1-5volts1-5volts
Current sense0-500mA0-500mA
Programmable fuse0-500mA0-500mA
Display320x240 IPS all-angle320x240 IPS all-angle
Flash storage1Gbit NAND (100MB usable)1Gbit NAND (100MB usable)

RP2350 **New in 6**

It’s like the RP2350 was designed for a Bus Pirate. Two ARM cores, cheap external flash storage - and the PIO state machines are a true hardware interface to just about any esoteric protocol. No more bit-banged software libraries!

The RP2040 (U103) has a built-in bootloader that appears as a USB disk drive - just drag a firmware file into the drive to update the Bus Pirate. The bootloader is locked in ROM, there’s no chance of accidentally erasing or corrupting it. What a happy little chip!

We paired the RP2350 with a 128Mbit flash chip (U102), the maximum supported. There should be plenty of room to add features for years to come. All that space has already paid off with features like multi-language support in a single firmware release and integrated device demos.

More Pins!

RP2350B has 18 more IO pins than the RP2040. The extra pins allow us to remove the 74HC595 shift registers used on Bus Pirate 5, making room for some features on the PCB.

ADC Expander

Live voltage measurement on every pin was an absolute feature requirement for Bus Pirate 5+. We want to to see whats happening at a glance, not perform bizarre and uncomfortable acrobatics with multimeter probes.

RP2350 doesn’t have enough analog to digital converter inputs for all the measurement points we need, so we added a 16 channel CD4067 analog mux (U402). The mux connects the IO pins, the programmable power supply and various test points to a single RP2040/RP2350 ADC pin. All those 510R series input resistors are intended to limit back powering to tolerable levels (10mA).

An op-amp (U404) buffers the mux output and feeds a divide by two 10K resistor (R406/R407) pair. This allows the 3.3volt ADC to measure signals up to 6.6volts, however in practice the maximum voltage can not exceed the USB power supply (~5volts) without damaging other components.

A user reported a periodic glitch on the REV8 preview board IO pins. It is especially noticeable on open collector bus types with pull-up resistors when the adjacent pin is grounded. The analog mux has some capacitance that causes the pin voltage to sag after switching channels. The final hardware adds quad op-amps (U504, U505) as a buffer between the IO pins and mux, which solves the glitch issue.

Op-amps are pretty delicate, and tend to die if a voltage is connected while they’re not powered. Fortunately, most op-amp inputs are rated for +/-0.3volts-0.5volts from the power supply rails. We take advantage of this to limit the maximum powered-down voltage using a Schottky diode (D500, D501, D502, D503, D504) with a very low forward voltage (0.2volts @ 0.05mA) and a high value (100K) current limiting resistor (RN317, RN318). Care must be taken to choose a Shottky with low reverse current, many cheap diodes are leakier than you expect and will cause a voltage offset on floating pins.

8 IO Units

1.2-5volt Buffers

IO pins are fitted with 74LVC1T45 bidirectional buffers, we call this chip ’the bulldozer’. Half of the buffer is powered at 3.3volts to interface the RP2350. The other half is powered from the VREF/VOUT pin at 1.2-5volts to interface with the outside world. 74LVC1T45 has great specs for hacking, like 5.5volt tolerant pins and a feature that disables everything when either half of the buffer is unpowered.

Two RP2350 pins control each buffer: one sets the direction (input/output), and one does the actual IO (high/low/read). In the past this setup forced us towards a CPLD or FPGA to deal with bidirectional protocols like I2C, but the PIO peripheral does a great job of managing the buffer.

Part NumberManufacturerVoltage Range
SN74LVC1T45Texas Instruments1.65-5.5volts
74LVC1T45Diodes INC1.65-5.5volts
74LVC1T45Nexperia1.2-5.5volts
AiP74LVC1T45WuXi I-Core1.2-5.5volts

At least four manufacturers make a 74LVC1T45 with slightly different specifications. They perform similarly, but the Nexperia and I-Core parts have a wider operating range.

Hardware RevisionBuffer Chip
5 REV8Texas Instruments
5 REV10WuXi I-Core
6WuXi I-Core

Production Bus Pirates are fitted with buffers made by WuXi I-Core, a Chinese domestically manufactured part that operates at 1.2-5volts.

Toggleable Pull-up Resistors

Each IO pin has a toggleable 10K pull-up resistor. Onboard pull-ups are controlled by eight SI2301 PFETs with a very low (<1volt) gate threshold voltage. Pull-ups are powered through the VOUT/VREF pin.

Main IO Connector

The main IO header uses a 2.54mm 10 pin TJC8A/HX25418 connector (J301). This is a keyed locking connector that works just as well with common jumper wires and 2.54mm ‘DuPont’ style connectors.

PinLabelDescription
1VOUT/VREFPin supplies 1-5volts up to 400mA with current limit and resetable fuse (VOUT) OR connects an external voltage source to the Bus Pirate IO interface (VREF)
2-9IO0 - IO7Buffered 1.2-5volt IO pins with voltage measurement and optional 10K pull-up resistors
10GNDGround pin

Auxiliary IO Connector

A secondary 1mm 9 pin connector (J302) under the main IO header is a tap point for a logic analyzer or other external equipment. No need to balance two or three probes on a single tiny chip lead, access the bus activity from this secondary header.

PinLabelDescription
1-8IO0 - IO7Buffered IO pins with voltage measurement and optional 10K pull-up resistors
9GNDGround pin

Look Behind Buffer **New in 6**

The RP2350B has 18 additional IO pins. We used 8 IOs to add a second connection point to the main buffer pins. Now we can “look behind” the main buffer to see whats actually happening on the pins, an always running logic analyzer.

A 74LVC8T245 buffer chip shifts the input to 3.3volts for the RP2350B. The capture side of the buffer is powered from the VREF/VOUT pin, and works from 1.2volts to 5volts. The 74LVC8T245 is specified for partial power-down applications, and is disabled when either power supply is off.

Programmable Power Supply Unit

The bulldozer IO buffers run from 1.2 to 5volts, they need a power supply to match. The programmable power supply unit is another killer feature of the Bus Pirate.

  • 1-5volts adjustable output, 400mA max
  • 0-500mA current sense
  • 0-500mA current limit with digital fuse
  • Backflow prevention to protect the PPSU when an external voltage is applied to the VREF/VOUT pin

Adjustable Output 1 to 5volts

The heart of the programmable power supply is a 0.8 to 5volt adjustable output voltage regulator (U403). Normally fixed resistor values set the output voltage of an adjustable regulator, but we’ve given it programmable output by margining the feedback pin with a pulse width modulator. The PWM output of the RP2350 is filtered through a 10K resistor (R414) and 100nF capacitor (C415), then buffered with an op-amp (U603).

Older adjustable voltage regulators typically have a range from 1.25 to 5volts or more. A newer class of regulators go a bit lower - down to 0.8volts.

We worked with two regulators during development: MCP1824 from Microchip, and AP2127 from Diodes INC. They have the same pinout and similar specs, but the MCP1824 has a 0.41volt reference while the AP2127 has a 0.8volt reference. We prefer the MCP1824 because the reference value makes it easier to select common resistors for the margining circuit, but it has become expensive and at times hard to find.

PartIdeal ValueClosest Value
R403R404R405R403R404R405
MCP182477.96K99.22K10K78K100K10K
AP2127103.13K131.25K33K102K133K33K

MCP1824 and AP2127 are similar, but each has a different reference voltage. R403/R404/R405 need to match the regulator as shown in the table.

Current Sense

Current consumption can be used as a proxy to debug a circuit. Is there a short? Is this chip even running? This is certainly evident in the Shenzhen mobile phone repair markets where current meters taped into cardboard boxes are the go-to tool for diagnosing iPhone motherboard failures.

A 200m resistor (R601) causes a slight voltage drop in proportion to the current passing through it. An op-amp (U601) amplifies the difference approximately 32 times, scaling 0-500mA current use to 0-3.3volt output that we can measure with the RP2350 ADC.

Programmable 0-500mA Current Limit

Since we’ve already got current consumption scaled to a 0-3.3volt output signal, wouldn’t it be cheeky to pop a comparator behind it to make a programmable fuse?

The scaled current sense output hits the comparator (U602) on the - pin. The limit is set with another filtered (R415/C416) pulse width modulator output to the comparator + pin. When the current sense voltage on the - pin exceeds the limit set by the PWM on the + pin, the output (VREG_EN) inverts which disables the voltage regulator.

This doesn’t quite get us there. When the voltage regulator disables current use drops, causing the comparator to flip back on. This creates a loop where the VREG oscillates on and off. That’s definitely not what we want.

A PNP transistor pair (Q601A/B) and a few passive parts capture the inversion and hold the comparator in the off state. The PNP pair sustains a current path through the two transistors until it is forcibly changed by an outside voltage (CURRENT_RESET).

A PFET (Q602) connected to a 74HC595 pin (CURRENT_EN) enables/disables comparator control of the voltage regulator. Two diodes (D602/D603) create a logical OR with another 74HC595 pin (CURRENT_EN_OVERRIDE) so the current limit can be overridden completely.

There you have it, a programmable fuse with just a couple extra parts.

Backflow Prevention

A backflow prevention switch helps protect all the little analog bits when an external voltage is applied to the VOUT/VREF pin. A closely matched PNP pair (Q401A/B) creates a current mirror that controls a P-channel MOSFET (Q402) high-side switch. When the voltage on VREF/VOUT is greater than the voltage in the PPSU, the PFET turns off.

The Bus Pirate monitors the voltage on both sides of the PFET, and displays a warning when VREF_VOUT is greater than VREG_OUT.

SymbolParameterConditionsMinTypMaxUnit
hFE1/hFE2hFE matchingVCE=-5V; IC=-2mA0.91--
VBE1-VBE2VBE matchingVCE=-5V; IC=-2mA--2mV

Q401 requires a closely matched PNP transistor pair. The hFE of the transistor pair should differ by no more than 10%, and the VBE should differ no more than 2mV.

1Gbit NAND Flash

A 1 Gbit NAND flash chip is connected to the RP2350 via an SPI bus shared with the LCD and 74HC595 IO expanders. NAND flash is cheap and commonly used in removable storage, but it’s also messy and prone to error. Bad block detection/marking and wear leveling all need to be managed in the RP2350 or the chip will die an untimely death.

NAND flash is used to save global and mode configuration in simple JSON files. It can also be used for all kinds of interesting things, like firmware storage for production programming, saving dumps from flash chips and EEPROMs or logging bus communications.

LCD

A beautiful 240x320 pixel color IPS (all angle viewing) LCD acts as a pin label, displays the voltage on each pin and shows the current consumption of the programmable power supply unit. The LCD shares an SPI bus with the NAND flash and 74HC595 IO expanders. The display is already FCC certified, which doesn’t exempt us from certification, but a bad LCD can spray radiation all over the spectrum causing us to fail.

18 RGB LEDs

It’s customary to have an indicator LED, so to check that box we added 18 SK6812 RGB LEDs. SK6812s are controlled by a time-based protocol that can be a real pain to work with, but the RP2350 PIO module makes it a breeze. The LEDs are powered directly from USB voltage (~5volts), and require a 5volt input signal. The RP2350 3.3volt output is converted to 5volts using one pin of the 74HCT245 level shifter.

SK6812s are found in cheap LED strips. They’re common, inexpensive and come in a variety of interesting form factors. 10 MINI-E packaged LEDs shine up through holes in the PCB to illuminate the case around the LCD. 8 SIDE-A LEDs along the edge of the board have an under lighting effect.

You might be thinking: 18 LEDs x 3 colors x 20mA is too much current for USB! You’d be totally right! Great care is taken in the firmware to ensure that the maximum current stays within the allowable limits for USB.

Just One Button

18 party LEDs, but just one button! The button is scriptable and automates repetitive tasks such as production firmware programming. It’s also used to escape from modes where the Bus Pirate would otherwise need to be reset, such as a transparent UART bridge.

Interactive BOM

Get a Bus Pirate

🛒

Get Bus Pirate & Accessories

More Documentation

Here’s some other fun stuff you might enjoy.

Files

Community