Bus Pirate PIC programming adapter

From DP

Jump to: navigation , search
Bus Pirate PIC programming adapter
Codename None
Status Test production (now discontinued)
Development development forum
ID # None

Provides a 13volt supply and transistors to control it.

Contents

Overview

Dia Bp-hvp front.png

Prototype

Buspirate-hvp-use.jpg

Bp-hvp front.jpg Bp-hvp back.jpg

Downloads

Schematic

Bp-hvp-adapter-v1b-cct.png

Bp-hvp-v1b-cct.png Pic-adapter-cct.png

PCB

Bp-hvp-v1c.png

Bp-hvp-v1b.jpg Hvp.png

Partlist

PartValue
C1 470pF capacitor (0805)
C2, C3, C6 0.1uF/50V capacitor (0805)
C4 10uF/10V capacitor (SMC_A)
C5 4.7uF/35V (SMD_A5)
D1, D2 1N5819, 20V, 1A+ diode (SOD123)
IC1 MC34063AD (SO08)
JP1 female 02x5 plug
L1 680uH/0.12A inductor (L4532P)
PIC-ICSP 1X05 0.1” pin header
POWER 1X03 0.1” pin header
R1 20K resistor (M0805)
R2 2K2 resistor (M0805)
R3 4R7 resistor (M0805)
R4 180R resistor (M0805)
R5 39K resistor (M0805)
R6 100K resistor (M0805)
R7 100R resistor (0805)
R8-R12 10K resistor (M0805)
T1, T2 NPN, 200mA+, 30+hfe transistor (SOT23-BEC)
SJ1,SJ2 (SJ_2)
T3 PNP, 600mA+, 40+ hef transistor (SOT23-BEC)
T4 PNP, 1A+, 40+ hef transistor (SOT23-BEC)

The latest sources and distributors are in the master partlist. See something missing? Please let us know.

Calculating VPP from feedback voltage

The programming adapter outputs 13volts, which is more than the Bus Pirate can safely measure. The voltage probe measures the output through a 39K resistor, which combines with the two 10K resistors already on the Bus Pirate to divide the voltage to a safe level. The cumulative R1 value is 49K, R2 is 10K.

  • Raw reading: 0x2A6 (678)
  • Actual voltage: (678/1024)*3.3volts=2.18volts
  • Scale for resistor divider: Vin = (Vout*(R1+R2))/R2 = (2.18volts*(49K+10K))/10K = 12.86volts (ideal is 13volts)

Example solution.

Developer hardware tests the 13volt supply directly at the SMPS.
The final version should measures the MCLR for maximum flexibility!

Manufacturing selftest

Buspirate-hvp use.png

HVP selftest utility is intended for manufacturers to test and verify the voltage output level at the assembly line.

Tests the high voltage programmer boost converter output using the Bus Pirate. If the board generates 12.5volts+, it passes. The final version will use a hardware update to test the high voltage switching circuit as well.

Current Version

-------------------------------------------------------
Bus Pirate HVP Adapter SELF TEST utility v0.3 (CC-0)
http://www.dangerousprototypes.com
-------------------------------------------------------

Usage

Setup

  1. Connect a Bus Pirate to USB
  2. Edit run.bat to match the current Bus Pirate COM port
  3. Start run.bat, The Bus Pirate enters binary mode

Testing

  1. Attach a programming adapter to the Bus Pirate as shown above
  2. Press space to start the test
  3. Read the test results (see examples of success and [[Bus_Pirate_PIC_programming_adapter#Failure|failure] below)
  4. Remove the programming adapter
  5. Attach another programming adapter and press space to test (or escape to exit)

Help options

Help Menu
-------------------------------------------------------------------------
 Usage:
   hvpselftest  -p device -s speed

   Example Usage:   hvpselftest -p COM1 -s 115200

           Where: -p device is port e.g.  COM1
                  -s Speed is port Speed  default is 115200
-------------------------------------------------------------------------

Startup

E:\HVPselftest>HVPselftest -p com6 -s 115200
-------------------------------------------------------

 Bus Pirate HVP Adapter SELF TEST utility v0.2 (CC-0)
 http://www.dangerousprototypes.com

-------------------------------------------------------

 Parameters used: Device = com6,  Speed = 115200

 Opening Bus Pirate on com6 at 115200bps...
 Going into Binary Bitbang mode.. Entering binary mode...ok
 Press Esc to exit, any other key to start the self-test

Success

--------------------- Starting a new Test-------------------------
 Sending Command to power on : 11000000....OK
 Voltage Probe measurement...,sending 00010100
 ADC Reading: 13.1 Volts (02, AF)
 Voltage Measurement: ****PASS****
 powering off.....

 Connect another HVP adapter and press any key to test again
 Or hit ESC key to stop and end the test.

Failure

--------------------- Starting a new Test-------------------------
 Sending Command to power on : 11000000....OK
 Voltage Probe measurement...,sending 00010100
 ADC Reading: 12.1 Volts (02, 7B)
 Voltage Measurement: !!!!FAIL!!!!
 powering off.....

 Connect another HVP adapter and press any key to test again
 Or hit ESC key to stop and end the test.

Failed test, voltage too low (12.5volt minimum).

  • First try test again
  • Check soldering
  • Replace IC1

Note about this Utility

Program flow:

  1. sets the buspirate to enter the binary bitbang mode
  2. configure the pins as output by sending '01000000'
  3. send '1100000' to set the power on
  4. send '00010100' for the voltage probe measurement
  5. calculate a reading from the 2 bytes reply
  6. power off the unit and prompt for a new test

The code was created using Code::Base 10.05 in its default settings. Download from the svn here

Links