Bus Pirate: Reclaiming the Vpullup pin

The Bus Pirate Vpullup pin supplies a voltage to the on-board pull-up resistors. In the “Ultra” hardware it also powers the external half of the bi-directional IO buffer.

  1. MOSI
  2. CLOCK
  3. MISO
  4. CS
  5. AUX
  6. AUX2 (formerly ADC)
  7. Vpullup
  8. AUX4 (formerly 3.3Volts)
  9. 0.8-5.0Vout (formerly 5.0Volts)
  10. GND

So far we’ve added voltage measurement to every IO pin and removed the dedicated ADC pin. We also replaced the fixed 3.3volt and 5volt power supplies with a single programmable output power supply (Vout) capable of 0.8-5.0volts output at 300mA. Today we’re going to reclaim the Vpullup pin and dig into the on-board pull-up resistor system.

On-board pull-up resistors

Many common buses like I2C and 1-Wire won’t work at all without pull-up resistors. Pull-up resistors are also commonly used in voltage level translation. The Bus Pirate can only directly interface at 3.3volts, but using open drain outputs with pull-up resistors it can interface with devices running at 2-5.5volts.

The Bus Pirate has on-board pull-up resistors on the four main bus pins (MOSI, CLOCK, MISO, CS) of the IO header. The pull-ups are toggled in the terminal with the P/p commands.

MOSI is used in the 1-Wire protocol. Several 1-Wire devices are parasitically powered from the pull-up resistor and require no additional power supply. These devices typically require a lower value pull-up resistor than other buses. The Bus Pirate has a 2K pull-up resistor on MOSI to properly power 1-Wire devices, while the other pins have 10K pull-up resistors.

74HCT4066 analog switch applies Vpullup voltage to a resistor attached to MISO pin.

The Vpullup voltage is switched onto the pull-up resistors through a 74HCT4066 analog switch. This is an effective solution, but there’s an annoying waste of pins when the 4066 is used this way.

Merge the Vpullup functions into the Vout pin

Pull-up source select on v5 prototype.

In the past it made sense to have a dedicated Vpullup pin so the user can connect it to one of the two on-board power supplies (3.3volts, 5volts), or the supply of an external circuit. We tried to automate this from the terminal in various prototypes using FETs, analog switches and other methods.

Since we’ve combined the on-board supplies into a single Vout pin, let’s also power the pull-up resistors and bi-directional IO buffer the Vout pin. The Vout/Vref pin now has two uses:

  1. Programmable power supply output from 0.8-5.0volts that powers the IO buffers and pull-up resistors (when enabled)
  2. Voltage reference input that powers the IO buffers and pull-up resistors (when enabled) from an external supply (e.g. self-powered breakout board)

We lose the ability to run the pull-up resistors and the programmable output power supply at different voltages. This could matter when Vout is used as the external supply for a board with its own voltage regulator.

Adjustable pull-up/down resistors?

MCP44X2 I2C digital quad rheostat. Source: MCP44X2 datasheet page 1.

This is definitely overkill, but let’s go “Ultra” for a moment. MCP4442-10K is an I2C controlled digital rheostat with 4 10K resistors. Each resistor can be disabled or connected to 127 taps between 10K and 0R.

Unfortunately we run into pesky bandwidth issues again, the same reason we couldn’t use this chip in the programmable output power supply. The 10K version of the MCP4442 only has 1MHz of bandwidth, which means the maximum speed the internal circuit can adjust to changes in signals. A lot of common buses support speeds above 1MHz. Linear Devices has several precision digital pots with much higher bandwidth, but they’re far too expensive to justify replacing the current cheap and dirty setup.

Updated pinout

  1. MOSI
  2. CLOCK
  3. MISO
  4. CS
  5. AUX
  6. AUX2 (formerly ADC)
  7. AUX3 (formerly Vpullup)
  8. AUX4 (formerly 3.3Volts)
  9. 0.8-5.0Vout/Vref (formerly 5.0Volts)
  10. GND

With the Vpullup pin features safely tucked into the Vout pin, we can add an eighth general purpose IO pin to the header (AUX3). Vout is renamed Vout/Vref to identify its dual power output and reference input functions.

The final thing to do is add a second 4066 so all 8 IO pins have a pull-up resistor.

Next time we’ll try to find a better way to label the IO header pinout. If you want to skip the wait, our latest work is in the forum.

Leave a comment

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

Notify me of followup comments via e-mail. You can also subscribe without commenting.