Download Majenko Technologies

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Mains electricity wikipedia , lookup

Alternating current wikipedia , lookup

Buck converter wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Solar micro-inverter wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Opto-isolator wikipedia , lookup

Chirp compression wikipedia , lookup

Two-port network wikipedia , lookup

Metadyne wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Time-to-digital converter wikipedia , lookup

Radar signal characteristics wikipedia , lookup

Transcript
Majenko Technologies
Micro Pulse Rifle Counter Module
DS3824 Revision 1
Miniature programmable 7 segment display with counter
functionality
Information contained in this publication regarding device applications and the like is provided only for your convenience and may be
superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MAJENKO TECHNOLOGIES MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR
ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Majenko Technologies disclaims all liability
arising from this information and its use. Use of Majenko Technologies devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Majenko Technologies from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Majenko Technologies intellectual
property rights.
Majenko Technologies
Micro Pulse Rifle Counter Module
Contents
1 Overview
2
2 Board Layout
2.1 Rear (components) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Pulse Rifle IO Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
3
3
A Electrical Characteristics
A.1 Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2 DC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.3 AC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
5
5
5
B Interfacing a high power LED
6
C Serial Parameters Menu
7
D Programming
8
E Schematic
9
F Mechanical Specifications
10
G Document Revisions
11
DS3824.pdf
1
Revision 1
Majenko Technologies
Micro Pulse Rifle Counter Module
1
Miniature programmable 7 segment display with counter functionality
The Majenko Technologies Micro Pulse Rifle Counter
Module is an incredibly small embedded development
board aimed at individuals wishing to add a basic counter
display to replica film props and similar projects. The
module is designed to be powered from batteries and be
simple to wire to external peripherals, such as buttons,
switches, LEDs and other suitable devices.
High-Performance RISC CPU:
• PIC18F25K20
• Internal RC Oscillator at 16MHz
• 32KB Flash
• 1.5KB SRAM
• 256 Bytes EEPROM
The module is completely programmable using XC8 and
MPLAB-X from Microchip, and the open source UECIDE development environment from Majenko Technologies (downloadable from www.uecide.org) and comes preloaded with an example firmware for the popular M41A
Pulse Rifle from the Alien series of films.
• UART Interface
Integrated dual 7-segment LED display
• Hyper RedTM Technology
• 44mcd luminous intensity
External connections to the board are made through wires
soldered to through-hole solder points around the edge of
the board. A number of useful signals are brought directly
to these solder points from the main PIC18F25K20 microcontroller, including general purpose IO lines, TTL UART
and analog inputs.
• 630nm wavelength
• Non-multiplexed operation
6 dedicated universal IO connections
• 6 General Purpose IO Ports Multiplexed
With:
–
–
–
–
DS3824.pdf
Overview
The microcontroller is also directly driving a dual digit
7-segment display in a common-cathode arrangement.
2 Analog inputs
UART
2 Interrupt inputs
ICSP Programming Port
The TTL UART connection also provides a simple serial
interface menu for adjusting various parameters for the
operation of the board.
2
Revision 1
Majenko Technologies
2
Micro Pulse Rifle Counter Module
Board Layout
2.1
Communications / GPIO
The communication port provides a TTL UART connection for configuring some aspects of the board’s operation.
Two additional GPIO ports, either of which can also be an
analog input or interrupt input, are also available. From
top to bottom the connections in this port are as follows:
Rear (components)
• UART RX
• UART TX
• Ground
• RB1 - Analog or interrupt input
• RB0 - Analog or interrupt input
2.2
Pulse Rifle IO Functions
Figure 1: Layout
The default firmware for the board assigns specific functions to the GPIO ports for operating as a Pulse Rifle
counter.
Connections
There are three main connectors on the Micro Pulse Rifle Board. The bottom row consists of two connectors: Wiring
The ICSP / GPIO header aimed at connecting to trigger
and magazine buttons, and the incoming power connection. The right hand side has a further general purpose For basic operation just two buttons (normally open) or
similar components are required:
communications connector.
ICSP / GPIO
This connector follows the standard ICSP layout used in
the PICkitTM 2 and PICkitTM 3 hardware PIC programmers.
From left-to-right the connections are:
• MCLR (Reset)
• +3.3V
Figure 2: Pulse Rifle Wiring
• Ground
• PGD (RB7, Trigger)
TRIG
• PGC (RB6, Magazine)
The Trigger (TRIG) connection, port RB7, is an activelow 3.3V input which causes the counter to count down
from 95 to 00.
Power
While the board itself runs internally from 3.3V, a linear
voltage regulator (LM1117-3.3 compatible) is provided to
allow the board to be powered by any voltage between
4.5V and 12V. The power connector allows direct connection (through a power switch) to power sources such as
3xAA, 9V PP3, or multi-cell Lithium-Ion batteries.
DS3824.pdf
The Magazine (MAG) connection, port RB6, is an activelow 3.3V input which, when active, signals the presence
of a magazine. While this input is not active the display
will be locked on 00 and no counting can occur. Upon
activating this input (connectingto ground) the counter
resets to 99 then counts down to 95.
3
Revision 1
Majenko Technologies
Micro Pulse Rifle Counter Module
Receive / Transmit
An interactive menu, accessible through the UART interface, is provided for making adjustments and personalizations to the operation of the board. See Appendix C on
page 7 for more information about the parameters menu.
Status
Port RB1 is used to indicate the current status of the
counter. A HIGH output (3.3V) from this pin indicates
that the magazine is inserted, the loading sequence (counting from 99 to 95) has completed, and there is ammunition
available (a value of 01 or more on the display). Upon removal of the magazine, or the ammunition counter running
out, this output will go to a low state.
Fire pulse
Port RB0 emits a short pulse of 3.3V every time the
counter decrements. The length of this pulse is 50ms by
default, but the length can be adjusted in the parameters
menu.
DS3824.pdf
4
Revision 1
Majenko Technologies
A
Micro Pulse Rifle Counter Module
Electrical Characteristics
This section provides an overview of the Micro Pulse Rifle Counter Module electrical characteristics. Additional
information will be provided in future revisions of this document as it becomes available.
Absolute maximum ratings for the Micro Pulse Rifle Counter Module are listed below. Exposure to these maximum
rating conditions for extended periods may affect device reliability. Functional operation of the device at these or any
other conditions, above the parameters indicated in the operation listings of this specification, is not implied.
A.1
Absolute Maximum Ratings
Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a
stress rating only and functional operation of the device at those or any other conditions, above those indicated in the
operation listings of this specification, is not implied. Exposure to maximum rating conditions for extended periods
may affect device reliability.
Ambient temperature under bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -40o C to +125o C
Storage temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -65o C to +150o C
Voltage on BATTERY with respect to GND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .-0.3V to +15.0V
Voltage on any pin IO, with respect to GND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -0.3V to +3.6V
Maximum output current sunk by any I/O pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 mA
Maximum output current sourced by any I/O pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 mA
Maximum current sunk by all ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 mA
Maximum current sourced by all ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 mA
A.2
DC Characteristics
Operating voltage (battery) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +4.5V to +12V
Idle current consumption (displaying 95) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108mA
Active current (audio and active display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115mA
A.3
AC Characteristics
Nominal core frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16MHz
DS3824.pdf
5
Revision 1
Majenko Technologies
B
Micro Pulse Rifle Counter Module
Interfacing a high power LED
The firing pulse output (RB0) can be used to drive a high
power LED to create a visual firing effect. A low powered
LED can be directly driven (with a suitable current limiting resistor) from the pulse output at up to 20mA, but for
higher currents a constant current LED driver is required.
A suitable device is the CAT4101TV available as a small
breakout board from Majenko Technologies.
Wiring the CAT4101TV to the Micro Pulse Rifle Counter
Board is a very simple operation:
Figure 3: Interfacing a CAT4101TV
In this example a separate power source (Lithium Ion battery) is shown for the high current portion of the circuit.
This power source, if the voltage is within the right range,
can also be shared with powering the counter board.
DS3824.pdf
6
Revision 1
Majenko Technologies
C
Micro Pulse Rifle Counter Module
Serial Parameters Menu
Load speed
This is the delay between subsequent numbers during the
The serial parameters menu can be accessed through the
"loading sequence" when the display is performing the iniR and T pins as a TTL UART interface. The interface is
tial count-down of ammunition as you insert a magazine.
configured to run at 115200 baud, with 8 bits, one stop
bit, and no parity (8N1).
To connect to the interface a TTL UART adapter is re- Fire speed
quired. Suitable adapters generally operate on chips such
as the FT232R from Future Technologies, the PL2303 This is the delay between subsequent digits during the norfrom Prolific, or the MCP2200 from Microchip.
mal firing count-down. 66ms is approximately 15 rounds
per second.
Note that the UART connections are 3.3V, not 5V. If your
UART adapter isn’t 3.3V it is recommended to connect
the adapter’s TX to the board’s RX pins through a small Initial ammo
resistor of approximately 220Ω to avoid damage to the
board.
This is the value the counter starts at immediately you
insert a magaine. Normally this is 99.
Countdown ammo
The loading sequence will count down to this value. This
is usually 95.
Figure 4: Connecting a Serial Interface
Any ANSI compatible serial terminal software can be used
to communicate with the menu.
Output pulse
The structure of the menu is as below:
The length, in milliseconds, of the output pulse signal from
port RB0. 50ms is a reasonable length for driving an LED
for a visual firing effect.
uPR Settings
============
Once values have been changed, after a short pause (about
5 seconds) the changed values will be automatically written to EEPROM.
[B/b]
[L/l]
[F/f]
[I/i]
[C/c]
[P/p]
Brightness: 10
Load speed: 250ms
Fire speed: 66ms
Initial ammo: 99
Countdown ammo: 95
Output pulse: 50ms
Pressing a letter associated with an entry either increases
or decreases the value of that entry by one. Using a capital
letter increases the value, and a lower-case letter decreases
the value.
Brightness
It is possible to change the brightness of the display
through software driven PWM. This can be used if the
display is too bright. The range is 0 (off) through 10
(fully on).
DS3824.pdf
7
Revision 1
Majenko Technologies
D
Micro Pulse Rifle Counter Module
Programming
To update or replace the firmware, or to develop your own
firmware, the recommended IDE is currently MPLAB-X
from Microchip. The compiler needed is Microchip’s XC8
compiler. Both are available as a free download from
www.microchip.com. XC8 is also available for purchase
as a Professional version which produces more highly optimized code.
To install firmware on the board a hardware programmer is required. Recommended is the PICkitTM 2 or
PICkitTM 3 from Microchip. Connecting the programmer
is a simple 1:1 connection between the programmer and
the board’s ICSP port:
Figure 5: Connecting a PICkitTM 2
DS3824.pdf
8
Revision 1
Majenko Technologies
E
Micro Pulse Rifle Counter Module
Schematic
POWER
VIN
2
GND
AP1117E33G−13
3 Vin Vout 2
Vout 4
1 GND
1
C1
C2
C3
10uF
100nF
U1
10uF
ICSP
R1
1
MCLR
2
VCC
3
GND
4
PGD/RB7
5
PGC/RB6
10K
2
7
3
6
4
68R
5
1 RA2
2 RA3
RB5 23
RB4 22
3 RA4
4 RA5/SS
5 VSS
6 OSC1
8 RC0
9 RC1
1
8
2
7
3
6
5
4
68R
RP4
1
PIC18F25K20−I/ML VDD 17
VSS 16
7 OSC2
RP2
RB3 21
RB2/INT2 20
RB1/INT1 19
RB0/INT0 18
12 RC4/SDI
13 RC5/SDO
8
10 RC2
11 RC3/SCK
1
RC7/RX 15
14 RC6/TX
RP1
MCLR 26
RB7/PGD 25
RB6/PGC 24
RA1 28
RA0 27
RP3
U2
8
2
7
3
6
4
68R
5
RX
1
8
2
7
3
6
GND
4
68R
5
RB1
TX
RB0
5
4
3
2
1
COMM
D1DP
D1G
D1F
D1E
D1D
D1C
D1B
D1A
D2DP
D2G
D2F
D2E
D2D
D2C
D2B
D2A
Figure 6: Schematic
DS3824.pdf
9
Revision 1
Majenko Technologies
F
Micro Pulse Rifle Counter Module
Mechanical Specifications
Figure 7: Mounting Dimensions
DS3824.pdf
10
Revision 1
Majenko Technologies
G
Micro Pulse Rifle Counter Module
Document Revisions
1. MJ . . . 16/11/2014 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Initial draft
DS3824.pdf
11
Revision 1