back
Teensy Saber Electronics V3
Got Pike?
open-source lightsaber shield


Unlike all the V1 TeensySaber electronics, the V3 board is not something I recommend that most people build themselves. All the instructions for doing so are available here, but most people should just continue reading to find out how to use the board. What you will need: Putting it together

Important! Make sure you cut the lead between VIN and VUSB on the teensy before you solder it to the TeensySaber V2. Cutting it afterwards is not nearly as fun. (But possible with an exacto knife or similar.) Note that after you cut VIN/VUSB, you'll need to provide external powre to use or program the teensy. Once attached to to the TeensySaber, it will draw power from the battery to power the Teensy.

Once that's done you need to solder your TeensySaber to a Teensy. For a Teensy 3.2, here is where you place all the pins:

The easiest way to solder the teensy to the teensysaber board is to use header pins. However, once joined in this way, it's quite difficult to get them apart again, which means that if one of the boards develop a fault, you pretty much have to throw away both of them. What I recommend doing is to use header pins only in two corners, then use some regular wire for all the other connections, that way you can cut the wires and desolder everything fairly easily should you need to. (Full disclosure: I have not tried this yet, but I have ruined a few boards while trying to get the pins out...)

Anyways, put the teensy 3.2 on top and solder the pins/wires into place. (top and bottom) Later, we'll cut or bend the pins to make sure they aren't in the way. When you're done, it should look something like this:

Pinout

Note: Pins marked with * are ones that you probably want to hook up to something. The rest of the pins are usually ignored.
  • Battery+ - 2.6 to 4.5 volt input, drives everything except the LEDs
  • Battery- - negative pad for LEDs, needs to be at same level as GND when both are connected.
  • GND - ground for electronics except LEDs. Note that GND is also available on short edge of the teensy. (See the teensy pinout for details.)
  • Speaker +/- - hooks up to speaker
  • Power / AUX / AUX2 Button- Hook up to closing buttons, or potentially touch buttons.
  • Blade ID / neopixel data - Normally used to measure the blade ID restor, and if it's a neopixel blade, feed out neopixel data. For a fixed non-neopixel saber, it could be repurposed.
  • LED 1, 2, 3 - Hooks up to negative side of LED (positive side of LED hooks up directly to battery.) These pads can handle up to 30 volts.
  • LED 4, 5, 6 - Like LED1/2/3, but requires FETs to be placed on the bottom of the board to function. Voltage is limited by selection of FETs.
  • Power 1, Power 2, Power 3 - These control the FETs which drive LED 1, 2, 3.
  • AUX LED 1, 2, 3 - These are hooked up to pads on the bottom which can be populated with FETs and used to drive additional LEDs. If the bottom FETs are not populated, these pins are free and can be used for any purpose.
  • Free pins - these are not used for anyting and could be hooked up as additional inputs or outputs. Pins marked with "PWM" have hardware PWM support which can be used to control the brightness of LEDs or drive servos.
  • Data In, Data Out, SCK, SD card select - these pins are used to communicate with the SD card.
  • SDA, SCL, Motion Interrupt - these pins are used to communicate with the gyro and accelerometer chip.
  • Battery Volt Sense - used to read battery voltage.
  • Amplifier enable - Used to control the amplifier.
  • 5v - generated by the TeensySaber board.
  • 3.3v - generated by the Teensy

Wire gauges
Most pads on the teensy will not need to carry any significant amount of power and can use 30 awg (very thin) wire if you choose. However, Battery- will carry the combined power of all your LEDs, and LED 1,2,3 (and 4,5,6 on the bottom) will carry a fair amount of power as well. It is recommended to use thicker wires, for these wires. There is no absolute rules for what wire guages are required, but here is a helpful chart. (See the "chassis wiring" column.) Keeping the high-power wires short helps as well.

Configurator
Select your configuration below. Note that while this tool can show many different configurations for the TeensySaber V3 board, there are many many more possible configurations.

Blades / LEDs Buttons Other
OLED Display / PLI
Bluetooth
image/svg+xml + 3.7 volt li-ion -
Config file, cut-and-paste this into a new file called my_saber1.h, then follow the instructions on the software page.

Touch Buttons
Any of the buttons can replaced with a touch button. To wire a touch button, simply hook up the corresponding wire to a metal surface. Note that in spite of the name, you don't actually want anybody to actuall touch the touch buttons. The metal surface needs to be insulated, both from the rest of the hilt, and from the fingers that will be "touching" it. In my case, I used a circuit-board clamp card in a Graflex lightsaber, then I covered it up with tape to insulate it from everything else. More details here.

Choosing Resistors
Calculating resistor values is fairly easy. Just look up how many amps the LED can handle and at what voltage it expects to achive that current. Then the resitor value we want is (BatteryVoltage - LedVoltage) / LedAmps. And the resistor needs to handle (BatteryVoltage - LedVoltage) * LedAmps watts. Example, if the LED wants 1A @ 3.2 volts, the resistor would be (3.7 - 3.2)/1 = 0.5 ohms, (3.7 - 3.2) * 1 = 0.5 watts.

Note that I use 3.7 volts for the battery in these calculations, while li-ion batteries tends to top out at 4.2 volts. TeensySaber can compensate for this by using PWM to reduce the total amount of power and heat generated by the LED when the voltage is higher than what it is rated for. This mode is efficient and seems to work well, but it is possible that it will reduce the life of the LEDs. If you are not comfortable with this, you should use 4.1 or 4.2 volts in the calculations above.

AUX Leds and LED strings
The bottom of the TeensySaber board has room for three SOT-23 FETs, these are fairly easy to solder by hand, and can be used to control three more sets of LEDs. This can either be used to control auxiliary LEDs, or to control segments of a segmented LED string. Here is what I do to solder the FETs: Apply liquid flux to the pads, don't worry it it kind of goes everywhere. Put the FET in the correct place with tweezers or something. Apply a small amount of solder to the soldering iron tip. Use a non-conducting tool (or a sharpened chopstick) to hold the FET in place, then touch the soldering iron to one of the pins until the solder goes to the right place, which shouldn't take more than a few seconds. Repeat for the other legs.

Multi-battery setup
The FETs on the teensysaber can handle voltages up to 30v, so it's possible to do multi-cell setups. However, "Battery+" cannnot handle more than ~4.5 volts. So you would need a separate battery to power the teensy electronics. Another possibility would be to do two batteries in series, but only use one of them to power the teensy. Since the batteries would be discharged unevently, they would have to be charged separately. In the future, I hope to make "Battery+" handle a wider range of voltages, which would make multi-cell configurations a lot simpler.

Troubleshooting
If you're having problems, check out the troubleshooting page.

Problems? Questions? Suggestions? Check out The Crucible.
This page has been accessed 67,852 times since August 31st, 2017.
Last modified: March 29th, 2021 - Design by Monica & Fredrik Hübinette