Designing An Electronic Trigger Mechanism For A Paintball Marker To
Allow User Selectable Firing Rates
ECE 4884/4007
Fall 2007
Nathan Densmore
Matthew Roese
Andrew Adams
Chris Britton (Team Leader)
Georgia Institute of Technology ECE 4007 Fall 2007
Overview
• Design and implement an electronic trigger
• Upgrading is more practical compared to other high end electronic markers
• Target customers will be scenario paintball enthusiasts
• Principal expense is development cost
Georgia Institute of Technology ECE 4007 Fall 2007
Design Objectives
• Electronic trigger upgrade for the 98 Custom paintball marker
• Two firing modes: semi-automatic and fully automatic
• LCD screen will display the mode and selected rate of fire
• LED indicator for low ammunition and selected firing mode
• User friendly up/down buttons to select the rate of fire
Georgia Institute of Technology ECE 4007 Fall 2007
Design Approach
• Key component is PIC Microcontroller (16F690)
• Powered by 9V battery
• Trigger pressed will activate the micro switch allowing 9V signal to energize the solenoid
• PIC will output to an LED indicating firing mode
• PIC will output to LCD module indicating firing mode and rate
Georgia Institute of Technology ECE 4007 Fall 2007
Top Level Design of Circuit Components
PICMicrocontroller
Supply
Push Button
Push Button
Trigger
LED
LCDModule
Solenoid
I/O
I/O
I/O
I/O
2
8 or 4
3
Data Path
Control Inputs
I/O
I/O
I/O
I/O
3
VSS
VDD +5V
VDD +5VVSS 2
2
2
VDD +9VVSS
VSSVDD +5V
2
VDD +5VVSS
Georgia Institute of Technology ECE 4007 Fall 2007
PIC Controller
• 20 pins – 1 VDD, 1 VSS, up to 18 I/O pins
• Operates on 2.0-5.5V
• Up to 20MHz oscillator/clock
• Up to 200ns instruction cycle
• 8-bit and 16-bit timer/counters
• FLASH/EEPROM – up to 100,000 writes
Georgia Institute of Technology ECE 4007 Fall 2007
1
11
12
13
14
15
16
17
18
19
20
10
9
8
7
6
5
4
3
2
PIC
16F6
90
VDD - Supply
RB6 – Pushbutton Up Input
RB5 – LED Red Output
RB4 – LED Green Output
RC2 – LCD Data Bit 2 Output
RC1 – LCD Data Bit 1 Output
RC0 – LCD Data Bit 0 Output
RA2 – LCD Register Select Output
RA1 – Trigger Input
RA0 – Supply (Firing Mode) Input
VSS - Supply
RB7 – Pushbutton Down Input
RC7 – LCD Data Bit 7 Output
RC6 – LCD Data Bit 6 Output
RC3 – LCD Data Bit 3 Output
RC4 – LCD Data Bit 4 Output
RC5 – LCD Data Bit 5 Output
RA3 – LCD Read/Write Output
RA4/CLKOUT – Solenoid Output
RA5 – LCD Enable Output
PIC Microcontroller
Georgia Institute of Technology ECE 4007 Fall 2007
PIC Programming Environment
• MPLAB Integrated Development Environment (IDE) included as tool to program PIC
• MPLAB is programmed in assembly language
• PIC Kit 2 software responsible for debugging code and loading chip
Georgia Institute of Technology ECE 4007 Fall 2007
Pseudo-code ExampleSet BPS default; Set Ball Count;
When ROF switch Semi or FullLED
if Semi ROF GREEN Solidif Semi ROF RED Solid
LCDif Semi ROF Display “Semi”if Full ROF Diplay “Full” and BPS
PUSHBTNif Full ROF
when UP PUSHBTN BPS + = 1when DOWN PUSHBTN BPS - = 1when UP & DOWN BPS = 0, Go to LED, LCD
Georgia Institute of Technology ECE 4007 Fall 2007
Power Supply Schematic
Georgia Institute of Technology ECE 4007 Fall 2007
Debounced Trigger Circuit
• “Beginning” of circuit, and activated when trigger is pulled
• Switch will send a high input to the PIC controller
Georgia Institute of Technology ECE 4007 Fall 2007
Push Buttons (Up/Down)
• UP and DOWN pushbuttons are inputs to the PIC; used only when in Full Auto Mode
• UP pushbutton will increase firing rate; DOWN will decrease firing rate
• Both UP and DOWN selected simultaneously will RESET ball count
Georgia Institute of Technology ECE 4007 Fall 2007
LED Mode Indicator
• Semi Mode:
Green LED• Full Mode:
Red LED• Low Ammo Status:
LED alternates red and green
Georgia Institute of Technology ECE 4007 Fall 2007
LCD Module
• Display numbers and words
• More versatile than 7- segment LED
• Line length 8 characters
• 14 pins in order to interface PIC controller
• 8 data lines, 3 control lines, & 2 power lines
• Time delay between LCD and PIC interface
PIC LCD Module
4
7
8
9
14
13
10
11
12
5
6
1- Ground2 - VDD
17
16
15
14
9
8
7
6
5
4
2
Data bit 7
Register Select
Data bit 0
Data bit 1
Enable
Read/Write
Data bit 5
Data bit 4
Data bit 3
Data bit 2
Data bit 6
Georgia Institute of Technology ECE 4007 Fall 2007
Solenoid
• Powered by +9V
• PIC outputs +5V and closes transistor circuit
• Current freely flows and fires the solenoid
• PIC outputs 0V and opens transistor circuit
• Current stops flowing and solenoid returns to initial state
• Diode prevents residual current from damaging transistor
Georgia Institute of Technology ECE 4007 Fall 2007
Mechanical Operation
• Operator pulls trigger• Trigger throws trigger switch• Solenoid fires and forces rod
upward• Rod rotates sear rocker pin and
releases bolt• Bolt spring sends bolt forward
inducing firing operation• Blowback resets bolt, locking
sear into initial position• Solenoid magnet resets
solenoid to initial position
Georgia Institute of Technology ECE 4007 Fall 2007
Component Enclosure
• Plastic enclosure will
mount on marker’s magazine
• Enclosure will house all of the electronic trigger assembly
Georgia Institute of Technology ECE 4007 Fall 2007
Technical Advantages and Disadvantages
• LCD module is more flexible than 7-segment LED display
• Relatively inexpensive production cost
• Circuit components are easily replaceable98
• Circuit design larger than existing products
• LCD module is bulky
Georgia Institute of Technology ECE 4007 Fall 2007
Marketing Advantages
• Ability to change firing modes quickly• Able to change rate of fire efficiently• Easy operator interface allows for quick selection of
system configurations• LCD data display• No special tool or manual to switch modes or firing rates
Georgia Institute of Technology ECE 4007 Fall 2007
Cost AnalysisDesign Cost
Purchased Item Description Quanity Unit Price Amount
Digi-Key Corporation Resistor 4.7K Ω 6 0.15 0.90
Digi-Key Corporation Resistor 1K Ω 1 0.15 0.15
Digi-Key Corporation Resistor 150 Ω 2 0.15 0.30
Digi-Key Corporation NPN Transistor 1 0.11 0.11
Digi-Key Corporation 2-In Nand Gate 2 0.56 1.12
Digi-Key Corporation Rectifier GPP 50V 1 0.26 0.26
Digi-Key Corporation Lever Switch 1 1.10 1.10
Digi-Key Corporation Pushbutton Switch 2 3.04 6.08
Digi-Key Corporation Rocker Switch 1 1.80 1.80
Digi-Key Corporation Regulator 1 0.72 0.72
Digi-Key Corporation Capacitor .1µF 1 0.11 0.11
Digi-Key Corporation Capacitor .33µF 1 0.15 0.15
Digi-Key Corporation 9V Battery Lead 1 0.33 0.33
Digi-Key Corporation LED Light 1 0.75 0.75
Digi-Key Corporation 8x1 LCD Module 1 24.24 24.24
Digi-Key Corporation PIC16F57 28-DIP 1 1.55 1.55
Digi-Key Corporation PIC16F628A 18-DIP 1 3.35 3.35
Digi-Key Corporation PICKIT 2 Starter Kit 1 49.99 49.99
Adv. Paintball Electronics Solenoid 1 19.95 19.95
Tippmann Parts Bag of Parts for Trigger 1 16 16.00
Shipping Cost 16.96
Total Design Cost 145.92
Georgia Institute of Technology ECE 4007 Fall 2007
Future Work
• Program the PIC microcontroller to fire paintball marker (2 weeks)
• Design an etched circuit board for more efficient production (1 week)
• Program PIC microcontroller to work with LCD module (4 days)
• Assemble product and test on marker
(3 days)