Bus Pirate Demoboard v5 design overview

From DP

Revision as of 11:12, 24 November 2011 by Arakis (Talk | contribs)
Jump to: navigation , search

600px

Intro and goal

features

  • Features (list)
  • Features

You can get a [project for $20], including worldwide shipping.

Read about the design below.


Contents

Overview

We always wanted to make demo-boards that would help new users get familiar with the Bus Pirate and provide a safe enviorment for experimentation. Unfortunately the previous 4 designshad a major flaw in the fact that they actually cost more then the Bus Pirate it self. The older versions had many different chips on the board and header with which to connect the Bus Pirate.

For version 5 we decided to go in an entirely different direction. One cheap microcontroller is used to emulate 4 different devices, over 4 protocols. This brings the cost down, and provides more functionality then the previous versions, like the PWM generator, and is more open to future development.

Version 5 of the Bus Pirate Demoboard feature:

  • Analog-to-Digital converter with an external header providing the analog input, or the Bus Pirate power supply.
  • Digital-to-Analog converter with 32 different output levels, that can be programed and measured by the Bus Pirate.
  • EEPROM non-volotile memory IC emulation.
  • PWM generator that is programmable and measurable by the Bus Pirate.

Communication to all of these modules is provided through 4 common protocols.

  • I2C
  • SPI
  • UART

Hardware

600px

Click for a full size schematic image. Schematic and PCB were designed with the freeware version of Cadsoft Eagle, download the latest project files from our Google Code project page.

PIC16F1829

File:BP-demoboard-v5-section-diagram2-600.jpg

The PIC16F1829 (IC1) is a 20 pin 8bit uC with 16KB of program memory, 1KB of data memory, and 256 bytes of EEPROM. It is powered by the Bus Pirate over the PWR pin. The power supply is decoupled by a 0.1uF bypass capacitor (C1). By connecting the ~MCLR pin to the VDD pin, through one of the resistors in the resistor array RN2,the uC is kept in reset until the power supply is adequate. The rectifying diode (D1) acts as protection when high programing voltage is applied to the ~MCLR pin.

The PIC is programed through the ICSP programing header. Due to the fact that some programers use higher voltages then 9V needed to program this uC, we added a voltage protection circuit (DZ and R3) on the ~MCLR pin of the header. It is unpopulated in production, so if you want to use it you will have to solder the diode and resistor, and cut the trace running below the resistor.

LEDs

File:BP-demoboard-v5-LEDs-diagram2-600.jpg

There are two LEDs on board, one (LED1) is used to indicate communication with the Bus Pirate. The other (LED2) is user programmable.

DEVICE JUMPERS

File:BP-demoboard-v5-Device-diagram2-600.jpg

By adding and removing jumpers on the DEVICE header you can select between different device modules, as shown in the table below.

DEVICE jumpers
DeviceTop JumperBottom Jumper
ADCOFFOFF
DACOFFON
MEMONOFF
PWMONON
  • Top and bottom jumpers are defined when you are facing the component side, and the DEVICE text over the header is readable (not upside down)

PROTOCOL JUMPERS

File:BP-demoboard-v5-Protocol-diagram2-600.jpg

By adding and removing jumpers on the PROTOCOL header you can select between the protocols, as shown in the table below.

PROTOCOL jumpers
ProtocolTop JumperBottom Jumper
I2COFFOFF
SPIOFFON
UARTONOFF
ONON
  • Top and bottom jumpers are defined when you are facing the component side, and the PROTOCOL text over the header is readable (not upside down)

Bus Pirate Header

File:BP-demoboard-v5--BPheader-diagram2-600.jpg

This is the header to which you connect the Bus Pirate probes as shown in the table.

Bus Pirate Header
PINI2CSPIUART
MOSISDAMOSIRX
CLKSCKCLOCK
MISOMISOTX
CSCS
AUXDemoboard PWM output|
ADCDemoboard DAC output|
PWR3V3-5V3V3-5V3V3-5V
GNDGNDGNDGND
  • The AUX pin is used by the Bus Pirate Frequency measurement probe.
  • The ADC pin is used by the Bus Pirate Analog-to-digital converter.

AIN Header

This is the external header to which you connect the external analog signal you want to measure with the ADC module. Warning do not connect voltages higher then the PIC power supply .

File:BP-demoboard-v5-AINheader-600.jpg

AIN header
PINFunction
PWR3.3V-5V power supply
AINExternal analog input
GNDCommon ground
  • By placing a jumper over the PWR and AIN pins it is possible to use the power supply as the source for the ADC.

PCB

File:BP-demoboard-v5-render-600.jpg

We used the freeware version of Cadsoft Eagle to make the schematic and PCB. Download the latest designs and firmware from the project Google Code page.

  • PCB and placement notes
  • soldering advise

Partslist

600px

Click for a full size placement image.

partlist
heading heading
cell cell
cell cell

Firmware

The firmware is written in C and compiled with the free Microchip C18 compiler. You can download the latest files from our Google Code project page.

  • Operating modes
  • extra software required

We used the Microchip USB stack to run the 18F2550 as a virtual serial port. Microchip's code is open but not redistributable. If you want to compile the source, download the stack from Microchip, then drag the source code into the install directory. See the detailed instructions in the PIC compiler how-to.

.inf installation

The virtual serial port (CDC) is an open standard, it should work on any modern operating system.

You don't need a driver, but you will need a .inf file to tell Windows how to use the device. A suitable .inf is included in the project archive.

Commands

Bootloader

600px

Source and license


Taking it further

Here's some ideas for the future:

  • List

We'll post the most recent firmware updates on our blog. You can also join the discussion in the [forum].

Get one!

You can [get one for $00], including worldwide shipping.

Your purchases at Seeed Studio keep the open source project coming, we sincerely appreciate your support!