This repository contains the circuit diagram, PCB schematics, prototype board layout, parts list, & setup guide for the RaveSaber electronics.
There is no blade or hilt at the moment, but you can swing the LEDs around using the PCB or prototype board & a piece of wood.
The Rave Saber board includes voltage regulation, utility headers, input buttons, and an Atmel ATmega168a microchip.
J1
is where power enters the board from the battery. We use JST connectors
for our battery wiring. The battery power is fed through the power sub-circuit
to get a regulated voltage of 5V.
J2
is where the Dotstar strips connect to the board. The data & clock signals
come from the microchip while the power connections come from the power
circuit.
J3
& J4
are optional connectors that ease programming & development. J3
is a FTDI Serial connection that can be used to preview/sample different colors
with our color testing firmware. J4
is an ISP connector that
allows you to re-program the microchip without having to pull it out of it's
socket.
The power circuit uses a LM2576TV-5G switching voltage regulator to step down the battery voltage to 5V. It can pump out a maximum of 3 Amps, which is used to power the microcontroller & the LEDs.
The circuit design is derived from the voltage regulator's datasheet. C1
&
C2
should be low-ESR capacitors rated for at least 16V(with a minimum ESR of
50 milliOhms for C2
). C2
can be anywhere from 1000 to 2000 uF. L1
must be
an inductor rated for at least 3 amps, going slightly over that is encouraged.
D1
should be rated for 20V.
The microcontroller circuit is mostly just connections to the other circuits.
Bypass capacitors are used on the connection to the power circuit. C3
& C4
are optional but C5
, the 100nF capacitor, should always be included. The
analog reference & power pins are connected to the power supply even though
they are not used - this is recommended in the ATmega datasheet.
The oscillator circuit is pretty fluid. You can use a different frequency
crystal(with a maximum of 20Mhz), or leave out the entire circuit and use the
ATmega's 8Mhz internal oscillator instead. If you do modify the circuit, make
sure your microcontroller's fuses are correctly programmed for your desired
clock source and change the definition of the F_CPU
macro in the firmware's
Makefile
to your new frequency.
The main button is SW1
. It is used to ignite/extinguish the saber & cycle
through the programmed patterns. We've included both a tactile switch for
development and an external connection so you can put your board in a hilt.
The reset button, SW2
, is optional but ocassionally useful for testing &
development.
You'll want to have the following equipment/supplies:
- 22AWG Solid Hookup Wire
- AVR Programmer(like the USBtinyISP)
- Wire Strippers
- Flush Cutters
- Soldering Iron & Solder
- PCB Holder(optional)
- Anti-static Bracelet or ESD-safe Tweezers(optional)
If you're only testing this out on a breadboard you can get away with just:
- Breadboard
- Wire & Strippers
- AVR Programmer
- 5V Power Supply
For the breadboard, you just need a Dotstar strip, an ATmega168a microcontroller & a tactile button.
For the prototyping board, you will need the following:
Part | Description | Link |
---|---|---|
22x27 through-hole prototyping board | Amazon | |
BAT | 7.4v Li-Ion battery | TCSS |
LED | DotStar Strip, 144/m | Mouser |
J1 | 2-pin JST connector | TCSS |
J2 | 4-pin, 2.54mm pitch male header | Amazon |
J3 | 6-pin, 2.54mm pitch male header | Amazon |
J4 | 2x3-pin, 2.54mm pitch male header | Amazon |
C1 | 100uF low-ESR electrolytic capacitor | Mouser |
C2 | 1000-2000uF low-ESR electrolytic capacitor | Mouser |
C3 | 10uF capacitor | Amazon(assorted) |
C4 | 1uF capacitor | Amazon(assorted) |
C5 | 100nF capacitor | Amazon(assorted) |
C6, C7 | 20pF capacitor | Mouser |
D1 | 3A, 20V Schottky Diode | Mouser |
L1 | 47uH, 3A Fixed Inductor | Mouser |
Y1 | 16Mhz Crystal | Mouser |
SW1, SW2 | 6mm SPST OFF-(ON) tactile switch | Mouser |
U1 | LM2576TV-5G - 5V, 3A switching voltage regulator | Mouser |
U2 | 28-pin DIP IC socket | Amazon |
U2 | Atmel ATmega168A-PU - AVR microcontroller | Mouser |
For the circuit board, you will need SMD components instead:
Part | Description | Link |
---|---|---|
RaveSaber v3.0.0 PCB | OSHPark | |
BAT | 7.4v Li-Ion battery | TCSS |
LED | DotStar Strip, 144/m | Mouser |
J1 | 2-pin JST connector | TCSS |
J2 | 4-pin, 2.54mm pitch male header | Mouser |
J3 | 6-pin, 2.54mm pitch male header | Mouser |
J4 | 2x3-pin, 2.54mm pitch male header | Mouser |
J5 | 2-pin JST connector | TCSS |
C1 | 100uF low-ESR electrolytic capacitor | Mouser |
C2 | 1500uF low-ESR electrolytic capacitor | Mouser |
C3 | 10uF capacitor | Mouser |
C4 | 1uF capacitor | Mouser |
C5 | 100nF capacitor | Mouser |
C6, C7 | 20pF capacitor | Mouser |
D1 | 3A, 20V Schottky Diode | Mouser |
L1 | 47uH, 3A Fixed Inductor | Mouser |
Y1 | 20Mhz Crystal | Mouser |
SW1, SW2 | 4.5mm SPST OFF-(ON) tactile switch | Mouser |
U1 | LM2576TV-5G - 5V, 3A switching voltage regulator | Mouser |
U2 | 28-pin DIP IC Socket | Mouser |
U2 | Atmel ATmega168A-PU - AVR microcontroller | Mouser |
NOTE: The 4- & 6-pin headers link to a 20-pin header. We simply break this into the sizes necessary with some pliers.
NOTE: The DIP socket for U2
is machine-holed. You may prefer a leaf-spring
socket instead.
A breadboard can be used for simple testing of colors/patterns as well as flashing the microchip with new firmware. You could use a smaller breadboard for the saber instead of a prototyping board, but it's not nearly as durable. Be wary of drawing too much current through your breadboard - you might melt it! Initial attempts used batteries and voltage regulation with the breadboard, but these instructions will assume you are running everything off a 5V bench power supply.
- Place the ATmega168a chip in the center of the breadboard.
- Connect the switch to ground and pin 4(PD2/INT0) of the microchip.
- Connect pin 19(SCK) to the Dotstar strip's clock pin & pin 17(MOSI) to the strip's data pin.
- Connect your power supply's 5V & ground leads to the microchip & Dotstar strip.
You should now be able to connect the GND, SCK, MOSI, MISO, & RESET pins of your programmer and flash your chip with the RaveSaber Firmware. Leave the VCC pin on your programmer unconnected since power is coming from your bench supply.
A prototyping board is the recommended way to setup v2.0.0 of the RaveSaber hardware.
The prototyping board is assembled by placing components and bridging pads with
component leads, solder bridges, & wire. We've ommited C4
, the 1uF decoupling
capacitor but feel free to add it in.
First we place the components and make what connections we can with the component leads:
- Start by placing the capacitors on the board and bending the leads so they stay on the board when you flip it over. You can also tack them into place with a small amount of solder.
- Place the switches and voltage regulator. These should fit tight enough that they don't fall out when you flip the board over. If they do, tack them into place with some solder on the pins.
- Place the DIP socket for
U2
and tack it into place by soldering some of the unused pins. - Connect
C1
andU1
by bending the leads ofC1
and soldering them together. - Bridge
GND
&ON/OFF
ofU1
together. This keeps the regulator always running. - Place and solder
L1
. Bend & solder the positive lead ofC2
to connect the two. - Since the leads of
D1
are too thick for the board's holes, bend them down the board and solder each one over multiple pads. - Connect and solder the negative leads of
C2
,C3
,C5
, &SW2
. Do the same with the positive leads ofC3
&C5
. - Use spare lead cuttings to bridge all the ground pins of
SW1
&SW2
together. Bridge the top pins of each switch together as well, keeping the tops ofSW1
&SW2
unconnected. - Place & solder
Y1
. Use the right leads ofC6
&C7
to connect & solder them to the crystal and then to the proper DIP-socket pins. - Place and solder the
J2
,J3
, &J4
headers. Use just enough solder to get them to hold into place - it'll make their wire connections easier to solder. - Bridge the ground pins of the serial & LED headers together. Leave space for
the ground wire between
C2
and the LED header.
Everything should now be on the board & the remaining connections can be made with your 22-gauge wire. We did this in the following order:
U1
toL1
,D1
, &C2
.C3
positive lead toC2
.C5
to VCC & GND ofU2
.U2
second GND(pin 22) toSW1
.RESET
fromU2
toSW2
.BTN
fromU2
toSW1
.TXD
fromU2
toRXD
of the serial header, followed byRXD
toTXD
.RESET
fromU2
to the ISP header.C2
to VCC & GND of the LED header.GND
fromC2
toC6
,C7
, & the ISP header.MOSI
&SCK
fromU2
to the LED header.MOSI
,MISO
,SCK
fromU2
to the LED header.- Connect two wires to
C1
and terminate them with the JST connector.
Everything should be connected, your circuit should resemble the schematics, & your prototyping board should resemble the above layout.
Place the ATmega168a into the DIP socket at U2
& connect your Programmer's
ISP cable and the battery. Flash the RaveSaber Firmware &
disconnect the programmer & battery.
You should be decent at soldering SMD components before attempting this.
We recommend soldering C3
through C7
first, followed by U2
, SW1
, Y1
,
SW2
, J2
through J4
, D1
, C1
, L1
, C2
, & finally U2
. Use female
JST cables for J1
& J5
. Scrub with isopropyl alcohol to clean off any flux.
You can now insert & flash the microchip, plug in the battery, connect the
lights, and long-press SW1
to extend the blade.
The saber blade & hilt construction is very simple - we haven't put together a blade or hilt yet so we just attach our LEDs & protoboard to a piece of wood. We used a long 1x2 that we cut down after assembly. It's heavy, but you can actually swing it around.
- Lay your DotStar strip at the end of your board & secure it with 4-5 zipties. Start at the far end, keeping the strip flat as you work towards the center of your wood.
- Place the prototyping board below the strip, secure it with zipties at both ends and one in the center.
- Flip the board over and place your battery near the board & strip, secure it with 3 zipties.
- Connect the LED strip to the 4-pin header on the board and connect your battery to the board's JST connector.
You should now be able to long-press the button to illumunate the blade then short-press to switch patterns or long-press again to power down the blade.
- Auto-generate BOM(using KiBoM?)
- Make sure to add DIP socket, LED strips, etc. to BoM
- Blade construction guide, using TCSS blade parts
- PVC Hilt construction guide
- Eventually use MHS hilts as well, but that's not open hardware
- See how much it'd cost to get someone to design an open/free metal hilt that machinists could reproduce.
- Chassis disk design, for use w/ acrylic laser cutting service or online machine shop.
- Contact Saber design
- For doing moves like this
- Needs to be well balanced - some kind of chassis weighting?
- Research best balance point for contact sabering
- Recharge port? Recharging blade stub?
Rough drafts of future plans
- v3.1.0 - 90deg ISP pins? Source single component for all 1-row pins & have assembler break apart. blade build + guide
- v4.0.0 - pcb & chassis that fits in MHS hilts
CERN OHL v1.2