TAP-28 - A “throw away” PIC board

TAP-28 PCB

TAP-28 Introduction

Microprocessor applications often require only a simple microprocessor circuit to control an external board, read a few sensors, control a motor or LED using PWM or even run a servo. Implementation of such a circuit is a hassle: dedicating a complex dev board to the task, maybe using a solderless breadboard or hand-assembling the circuit on perf board. None of these is an ideal solution, costing more than needed, having a less-than-robust solution or taking more time than should be needed.



An extremely low-cost circuit that can accomplish simple tasks without any extra hardware or features, yet can serve as a building block to more complex projects would be an ideal solution. The “Throw-Away PIC” (TAP-28) circuit board is so cheap that it can be dedicated to a project without worrying about getting it back.

TAP-28_PCB

The TAP-28 supports many of the popular PIC 18F-series 28 pin parts. It includes 2 general-purpose pushbutton switches and 4 LEDs, connectors for ICSP, UART and I2C/SPI and includes 2 analog input/general purpose and 2 PWM/general purpose I/O connectors on a 2" x 3.25" 2-sided printed circuit board. The board uses through-hole parts for easy assembly. A daughter board may be connected to use additional components with this board.

The TAP-28 is designed to support growth in the PIC development community, and as such, the design is licensed to the community under a Creative Commons License detailed elsewhere in this document.

No claims are made as to the performance or reliability of this board, nor to its suitability for any particular application. No safeguards to protect an inexperienced user from causing damage to the microcontroller have been included on this board – this board is intended as an alternative to a hand-assembled perf board, so some level of knowledge is assumed.

To determine if a particular PIC microprocessor is suitable for use on this board, compare its pinouts to the examples shown. For technical support, please consult your favorite PIC forum.

 

Various Information (Click to view)

Licensed under Creative CommonsAttribution-Noncommercial-Share Alike 3.0Unported. (Click to view)

TAP-28 "Throw Away PIC" Printed Circuit Board by Jon Chandler is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


Permissions beyond the scope of this license may be available from the creator.Waiver is hereby granted for commecial use of the TAP-28 "Throw Away PIC"Printed Circuit Board as a component of systems for commercial use. ShareAlike applies specifically to modifications of the TAP-28 Printed Circuit Board,not to systems using the TAP-28 Printed Circuit Board.

Attribution of the use of the TAP-28 "Throw Away PIC" Printed circuit board may be made by posting a description of the application to the Digital-DIY forum (www.digital-diy.com) and via email to Jon Chandler ( This email address is being protected from spambots. You need JavaScript enabled to view it. )

Version 1.0 Errata (Click to view)

1. Ground plane is discontinuous on bottom side of board. See illustration on following page.Workaround: jumper across break.

  • Workaround priority: Mandatory
  • Fix: Revise Gerber files


2. Positive power plane is discontinuous on bottom side of board, leaving an unconnected area on the top left side of the board. See illustration on following page.Workaround: jumper unconnected area.

  • Workaround priority: Mandatory
  • Fix: Revise Gerber files


3. Ground terminal of J10 terminal block connection is not connected.Workaround: If the J10 terminal block position is used with either a terminal block or wire leads for a power connection, jumper to J11 shell terminal for ground connection.

  • Workaround priority: Mandatory if J10 position is used
  • Fix: Revise Gerber files for future board runs.


4. Upper right mounting hole is out of position (near USB connector).

  • Workaround: be aware of non-symmetric mounting holes.
  • Fix: Revise Gerber files for future board runs.

Rework

The image above displays where and what to do.

 

 


TAP-28 Features

TAP-28_Features

 

Microprocessor
18F242, 18F252, 18F2420, 18F2520 or similar 28 pin microprocessors in a narrow DIP package are suitable for use with the TAP-28The 18F2550 and other USB variants are not recommended as some of the functions are mapped to different port pins.

 

Power
Regulated power should be supplied to the board – no voltage regulator is included on the board. A full size USB-B jack is provided for power only (no USB support) or a terminal block or soldered leads may be used for connection of a regulated power supply. A 5 volt charger salvaged from a cell phone works well.

Caution: There is no voltage regulator or reverse polarity protection on the board. Incorrect voltage or reversed polarity will damage the microcontroller.

 

LEDs and Switches
LED1 - A5
General purpose LEDs connected to the port pins shown. Setting the pin LOW will illuminate the LED. Each LED is connected via a solder jumper and may be isolated from the microprocessor.
LED2 – B3
LED3 – C0
LED4 – B2
RST SW
Microcontroller reset. May be required if a boot loader is being used.
S1 – B5
General purpose switches tied to the port pins shown. Pressing the switch pulls the pin to ground. Each switch is connected via a solder jumper and may be isolated from the microprocessor.
S2 – B4

 

3 Pin Connectors
TAP-28-3-pin
Port A0
ADC input, servo control or general purpose I/O.

Power and ground are also supplied on this connector.
Port A1
Port C1/CCP2
PWM output, servo control or general purpose I/O.

Power and ground are also supplied on this connector.
Port C2/CCP1

ICSP Connector
TAP-28-ICSP
ICSP (in-circuit, serial programming) for programming the PIC microprocessor using a PICKIT 2 or other programmer. Wired in accordance with the PICKIT2 standard (which is the standard for 6 pin in-line connectors. PORTB.6 and PORTB.7 are not used elsewhere on the board to prevent problems with ICSP (but they are available on the daughter board connectors).

May also be used as 2 general purpose I/O ports with power and ground available.

UART Connector
TAP-28-UART
UART: Connector for UART applications, including I/O using the PICKIT 2 UART tool. Includes TX(PORTC.6) and RX(PORTC.7). Requires level shifting (i.e., a MAX 232 chip) for direct connection to a PC serial port. For serial I/O requiring handshake lines, also includes INT1(PORTB.1) and INT2(PORTB.2).

May also be used for general purpose applications with 4 port pins, power and ground available.

I2C/SPI Connector
TAP-28-I2C
I2C/SPI: Connector for I2C and SPI applications, connected as per the PICKIT Serial Analyzer. For I2C, includes SDA and SCL with the addition of a port pin for interrupts. For SPI, includes SDI, SDO, SCK and /CS.

May also be used for general purpose applications with 4 port pins, power and ground available.


TAP-28 Jumper LocationsTAP-28_Jumpers


TAP-28 Board Dimensions

Tap-28_Dimensions


TAP-28 Component Locations

TAP-28_Component_Locations

 

 


TAP-28 Building

For a given application, some components on the TAP-28 board may not be needed. For a board dedicated to a particular project, this will further reduce its cost. The blocks below indicate the function of various components.

 

The Microprocessor
U1
C1, C2
C3
R1
Y1
28 pin microprocessors with a pinout similar to the PIC18F242 may be used on this board. A socket may be used if desired.

A 20 MHz crystal is the usual choice, with C1 and C2 being 22 pF. C3 is a bypass capacitor of 0.1 µF. R1 pulls /MCLR high.

This is the minimum compliment of parts to use the TAP-28.

Power
J10
J11
The TAP-28 board requires a regulated 5V (or possibly lower) power supply. J10 may be installed to use a USB cable for power. Note: If the underside of J10 is conductive, insulate the area above J11 with electrical tape to prevent shorts. Alternatively, a terminal block may be soldered in the J11 position or leads from a power supply connected to the J11 position.

ICSP
J3
S3 (optional)
ICSP is the simplest way to program the TAP-28. J3 is pinned out for use with the PICkit and many other ICSP programmers.

S3 is optional to reset the microprocessor by pulling /MCLR low.

The LEDs
LED1, LED2
LED3, LED4
R3, R4, R5, R6
LEDs 1 -4 are T1 3mm LEDs. The anode(+) side should be installed toward the edge of the board. The resistors are current limiting resistors for the LEDs.

Shorting JMP1, JMP2, JMP3 and JMP4 with solder connects the LEDs to the circuit.

The Switches
S1, S2
R7, R8
S1 and S2 may be used as desired for program control and input. R7 and R8 are pullup resistors for these switches.

Shorting JMP5 and JMP6 with solder connects the switches to the circuit.

UART Connector
J9
R12
The UART connector may be used for TTL-level serial communications or for general purpose use and it connected to the PIC’s hardware USART. The pinout matches the PICkit 2 UART tool.

R12 is a pullup resistor connected to Port B1 and pin 1 which may be useful for handshaking. Short JMP10 to connect it to the circuit.

J1 & J2
J1
J2
J1 and J2 are normally female headers used to connect a daughter board to the TAP-28. They are also useful to make jumper connections to a solderless breadboard from the TAP-28. All port pins are available on J1 & J2.

3 Pin Jacks
J4, J5, J6, J7
C4
These jacks may be used for analog input (J4, J5), PWM output (J6, J7), servos or general I/O.

C4 is recommended if servos are connected to prevent voltage transients.

I2C/SPI
J9
R9
R10
R11
J9 is connected to the PIC’s Master Synchronous Serial Port (MSSP) module for I2C and SPI communications. R9 and R10 for pullup resistors for the I2C SCL and SDA lines. R11 is a pullup resistor which may be used for an interrupt line. This connector may also be used as 4 general purpose I/O pins.

The pullup resistors are connected to the circuit by the adjacent solder jumpers.

 

Parts List

The following typical values are suggested but personal preferences and the application may dictate other values.
Part
Value
Comments
C1, C2
22 pF, 5%, 50V
Ceramic disk, 0.1" lead spacing
C3
0.1 uF, 20%, 50V
Ceramic disk, 0.1" lead spacing
C4
10 uF, 20V
Tantalum or electrolytic, 0.2" lead spacing
R1, R7, R8, R11, R12
10k, 5%, 1/8w
R3, R4, R5, R6
301, 5%, 1/8 w
depends on LED parameters
R9, R10
4k7, 5%, 1/8w
I2C pullup
J1, J2
15 pin female header
0.1" lead spacing
J3, J8, J9
Molex 22-23-61 6 pin hdr
0.1" lead spacing.  Standard header pins may be used.
J4, J5, J6
3 pin header
0.1" lead spacing
J10
USB B, full size
pinout appears to be universal
J11
Terminal block
0.2" spacing, optional if J10 not used
LED1, LED2, LED3, LED4
LED, T1 3mm
Color as desired.  Max current is 20 mA
S1, S2, S3
Tactile switch
6 mm SPST mom, Omron B3F-10XX series or similar
U1
PIC 18F2420 or similar
28 pin PIC 18F series, 18F242, 18F252, 18F2420 or similar (0.3" wide DIP)
Y1
20 MHz
20.000 MHz HC49/US (low profile)


TAP-28 Daughter Board

Tap-28_Daughter_Board

Notes:

  • Daughter board has male header pins, 0.1" center-to-center, 1.5" apart.
  • All port pins are brought out to the daughter board. They may be used by the switches, LEDs or brought out to other connectors as well.
  • Verify clearance outside the header outline.




TAP-28 Schematic

TAP-28 SchematicClick to enlarge


TAP-28 PCB Layout

TAP-28 PCBClick to enlarge


TAP-28 ICSP Connection

By far, the easiest way to load program code into the TAP-28 board is via ICSP programming. There is no need to remove the microcontroller for programming or to install a bootloader.

The PICkit 2 from Microchip offers exceptional value for its price. A six-conductor jumper cable is the best way to connect the PICkit to the TAP-28, although it may be directly connected if a simple 6 pin header is installed instead of the suggested keyed connector. The PICkit can also power the board during development so that a power supply need not be connected.

TAP-28_PK2



TAP-28 PICkit 2 UART Connection

During program development, it can be handy to use the serial port to monitor various parameters on the PIC. Output to the UART can be made to check operation of a subroutine or to check variable values.

The PICkit 2 is an ideal way to connect to the PIC UART. It can be plugged directly into the UART connector on the TAP-28 board. A more convenient method is to use a short 6 conductor cable. These are supplied with many programmers and are available from SparkFun.

Be sure to set the baud rate in the PIC program and select the corresponding speed in the PICkit 2 UART tool software on the PC.

TAP-28_UART


TAP-28 Servo Connection

Servos contain internal electronics to convert a pulse train into a position. The PIC need only supply the pulse train to make the servo rotate; no switching of high currents is necessary.

Servos typically have a pigtail with a 3 pin female connector. The color code is usually one of two patterns:


Signal Power Ground
white red black
yellow orange brown






Any of the 3 pin connectors may be used to control a servo.

TAP-28_Servo_Connection


TAP-28 Analog Input - Pot

The TAP-28 board has 2 analog inputs brought out to connectors. These inputs can read a 0 – 5 volt DC level using the PIC’s power supply as the reference level.

The above illustration shows a potentiometer (variable resistor) connected to one of the inputs. Turning the shaft will vary the voltage at the input from 0 – 5 volts.

Some sensors have internal signal conditioning and provide a 0 – 5 volt output which can be connected directly to the PIC. Pressure sensors are one example. Sensors that do not contain built-in signal conditioning may only have an output voltage of a volt or less. Such sensors will probably need additional signal conditioning to provide good resolution.

Ports A0 and A1 may be used for analog input.

TAP-28_ADC



TAP-28 Dallas 1-wire Devices

Dallas 1-wire devices actually communicate over 2 wires: I/O and ground. The devices are powered by voltage on the I/O line when it’s idle. A large number of devices may be connected on the same bus, limited by cable length and the capacitance of the cable and attached devices. Consult www.maxim-ic.com for more information.

For a simple bit-bang interface, any of the 3-pin connectors will work with the addition of a single pull-up resistor (determine the value from the data sheet). An even easier solution is to use one of the lines on the I2C/SPI or UART connector that has a pull-up resistor on the board. Enable the pull-up resistor with a solder jumper and connect ground and I/O.

Requirements for the various 1-wire devices vary, and some of them may work better with or even require a power connection. The data sheet is the most reliable place to find exact requirements.

TAP-28_Dallas_1-Wire

Share this article

Tags: Project, Swordfish, TAP-28