Bus Pirate PIC programming adapter

From DP

(Difference between revisions)
Jump to: navigation , search
(Usage)
(Usage)
Line 146: Line 146:
====Success====
====Success====
-
<nowiki>--------------------- Starting a new Test-------------------------
+
<nowiki>--------------------- Starting a new Test-------------------------
  Sending Command to power on : 11000000....OK
  Sending Command to power on : 11000000....OK
  Voltage Probe measurement...,sending 00010100
  Voltage Probe measurement...,sending 00010100
Line 158: Line 158:
====Failure====
====Failure====
-
<nowiki>--------------------- Starting a new Test-------------------------
+
<nowiki>--------------------- Starting a new Test-------------------------
  Sending Command to power on : 11000000....OK
  Sending Command to power on : 11000000....OK
  Voltage Probe measurement...,sending 00010100
  Voltage Probe measurement...,sending 00010100

Revision as of 07:46, 15 October 2010

Bus Pirate PIC programming adapter
Codename None
Status Test production
Development development forum
ID # {{{id}}}

Contents

Prototype

Buspirate-hvp use.png

Bp-hvp front.jpg

Bp-hvp back.jpg

Will be available to developers shortly. Provides a 13volt supply and transistors to control it. Read more in the forum.

Schematic

Pic-adapter-cct.png

PCB

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 (0805)
R2 2K2 resistor (0805)
R3 4R7 resistor (0805)
R4 180R resistor (0805)
R5 39K resistor (0805)
R6 100K resistor (0805)
R7 100R resistor (0805)
R8-R12 10K resistor (0805)
T1, T2 NPN, 200mA+, 30+hfe transistor (SOT23-BEC)
T3,T4 PNP, 600mA+, 40+ hef transistor (SOT23-BEC)

Calculating VPP from feedback voltage

 The final version should measure MCLR after VPP for maximum flexibility!

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.

Manufacturing selftest

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.2 (CC-0)
http://www.dangerousprototypes.com
-------------------------------------------------------

Usage

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

This simple selftest utility sets the buspirate to enter the binary bitbang mode first, then configure the pins as output by sending '01000000' to it, and then send '1100000' to set the power on, and send '00010100' for the voltage probe measurement, and take a reading from the 2 bytes reply.

It then power off the unit for the next test. The code was created using Code::Base 10.05 in its default settings. Download from the svn here

Links