Open Source Digital Katana with Real-Time Tracking and SDK
Open Source Digital Katana with Real-Time Tracking and SDK
A digital training Katana (Bokken) that is able to track motion in real time on a wirelessly connected PC. Zombie Apocalypse Certified!
A digital training Katana (Bokken) that is able to track motion in real time on a wirelessly connected PC. Zombie Apocalypse Certified! Read more
Designed to be both fast and accurate, the Wireless Digital Katana is intended for both serious Martial Arts training and hacking away at Zombies or Fruit in your games room.
Think you've got what it takes to land a critical blow with a Katana? You'll know in real-time with the Wireless Digital Katana. Within 140ms your computer can tell if you've got what it takes to survive the Zombie Apocalypse!
The Open Source Wireless Digital Katana is not a toy, it has been designed to provide you with both accurate and fast motion tracking.
I designed the Digital Katana to fill the void that exists between my Iaido training and the gimmicky sword-like input devices that I have experienced over the years.
The Digital Katana is built with a genuine bokken (wooden training katana) and as such retains the genuine weight, feeling, and handling of a live Katana.
Both the bokken and electronic components are capable of withstanding impact shock. However the bokken strength is reduced during milling for the electronic components, so I would not recommend the Digital Katana for contact training.
The current prototype takes 25x samples of each sensor per second, with a total of 50 samples/second.
Motion latency (lag) is currently averaging between 107ms - 140ms (measured between sword motion and screen response), giving an almost immediate on-screen replication of the movement of the blade.
For comparison the Xbox Kinect sensors run between 150ms up to a whopping 500ms for complex scenes (http://www.nrl.navy.mil/itd/imda/sites/www.nrl.navy.mil.itd.imda/files/pdfs/2012_VRposter_kinectSkelPerf.pdf)
Extended Live Tracking Demonstration Video
The prototype demonstrated has some quite unsightly electronics mounted on the exterior, however the version to be shipped will be streamlined using much smaller microcontrollers and rechargeable batteries.
I will be delivering the hardware to create a Digital Katana in various packages. Each of the packages contains all of the electronics required to turn a bokken into a digital input device.
What I have completed thus far:
Built a fully-functional prototype Bokken.
Written Proof of Concept 3D Rendering Application.
Measured device lag (time between action and display response).
Reviewed Tooling Samples of Bokkens. Below is a Red Oak Bokken sample that I just received from an interested supplier.
Prototype Components and Microcontrollers
The production Digital Katana and kits will utilise a much, much smaller microcontroller.
Pictured is an Arduino compatible Pro Mini (33mm x 18.5mm / 0.73" x 1.3". ). I have since decided to move to a slightly larger Arduino Nano (43mm x 18.5mm / 0.73" x 1.70"). The extra length is minimal (10mm) and makes the Digital Katana firmware upgradeable with a simple USB cable, as opposed to the required FTDI programmer for Arduino Pro Mini microcontrollers.
Software Technical Specifications
Application Programming Interface (API)
The API is at the heart of the Digital Katana. It is a simple interface that programmers can use to create custom uses of the Digital Katana. Destined to be available for C#, Unity, C++, Java, and Python, the API will be accessible to everyone.
As an Open Source initiative once the API is completed and released to the public (June 2014) you can be sure that there will never be licencing fees, closed source code or any other nasty surprises in the future.
Above all you will be able to contribute to the API too, so if you find a way to do things faster, smarter, or cleaner, you will be able submit your changes for acceptance into the API repository (online code storage).
Along with the API, I will be developing various sample pieces of software to make learning how to program and use the Digital Katana API as easy as possible. Below is a list of the samples that are guaranteed to be included in the API:
Basic 3D Tracking game as shown in the demo videos.
Calibration software to calibrate and test various Digital Katana settings.
Motion recording and playback example, showing how to use the SDK to record motion, save it, and even replay it.
Hardware Technical Specifications
1x Quality Wooden Bokken
2x MPU-9150 9-axis Sensors (Located in the Tsuba (Guard) and Kissaki (Tip))
NRF24L01+ Wireless transceiver
Arduino compatible microcontroller operating at 16Mhz
Li-Ion battery providing power to all of the on-board hardware.
NRF24L01+ Wireless transceiver
Arduino compatible microcontroller operating at 16Mhz
USB connection to host PC.
USB cable to fit standard USB Port
Li-Ion charging port
Components that will be used in the bokken development kits:
MPU-9150 9-Axis Sensors (http://www.invensense.com/mems/gyro/mpu9150.html)
These little guys can track motion to an incredible accuracy with inbuilt gyrometers, mangometers (digital compass) and accelerometers.
NRF24L01+ 2.4Ghz Wireless transceivers (http://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01P)
Designed for ultra low power environments these chips are capable of operating on 128 frequencies with each unit having a unique 40-bit address. This means you can have as many digital katanas in your Dojo as you can fit!
Arduino Compatible Nano (http://arduino.cc/en/Main/ArduinoBoardNano)
An Arduino Nano is at the heart of the PC-based transceiver. It manages the Katana configuration and moves the motion data from the Wireless module to the Host machine as fast as possible. Running at 16Mhz the board doesn't even break a sweat processing 1 katana, I may even be able to get two running on the one receiver in the future (currently you will need 1x receiver per digital katana.
Li-Ion Batteries + Charging System
The exact size, capacity, and voltage of the Li-Ion battery solution is still being revised and will be updated as components are tested and selected.
USB Li-Ion Charging Circuit
This is the Li-Ion charging controller that I am currently testing for the Wireless Digital Katana
Components that are still being tested and revised:
Bokken microcontroller + Power Supply
Arduino Compatible Nano + Step-Up Voltage converter or dual Li-Ion batteries
This will allow us to run an Arduino at full speed (16Mhz). To run a 5V Arduino I will need to use two Li-Ion batteries (7.4v) or use a Step-up Voltage Converter.
The consequence of using a step-up converter is more power loss (around 8%) and another component to be placed in the Bokken.
The consequence of using two Li-Ion batteries is the difficulties of making room for these to fit into the bokken.
$40,000 At this milestone I will have a large enough order of Bokkens to research custom milling that will internalise all of the electronic components. Pending testing, all backers ordering a milled bokken will receive a bokken with a matching Saya (scabbard), prepared specifically for internal mounting.
Why I need your help!
I want to build a community of developers and enthusiasts to use and enjoy these bokkens.
From clans recording Iaido katas in their Dojos, to an Indie developer creating a lightsaber game, I want to see the world enjoy what I have created.
Where does my money go?
Be assured that your money is not going to be spent on beer or pizza, I've carfeully allocated resources, factored in exact costs, and worked with suppliers to make sure I can deliver what is promised to you all in the timespan allocated.
The funds will be used to:
Host a website for the Digital Katana community supporting a blog, a forum, and most importantly GIT repository where you will be able to see what is going on, download source code, and even help develop the SDK.
Source tooling samples of the Bokkens and Sayas.
- Purchase the extra machinery and tools I will require to mill the large quantity of wooden bokkens required.
Purchase all of the hardware required (this is where the majority of the funds will go).
The hardware will be manufactured in my workshop, as pictured with an Arcade Machine that I have just finished building (pending some more airbrushing)
In addition to my workshop I also have access to an Industrial 3D Printer, Bench Saw, CNC Mill, and Drill Press as pictured below (photos are of the actual machines, not similar machines).
The 3D Printer will be used to create supports, spacers and other jigs. The jigs make it simple to perform reliable and repeatable cutting, drilling and milling.
In case you are worried about my woodworking, design, and soldering skills, here are some examples of objects I've designed and manufactured in the past.
Inside each of these cubes is a combination of 3D Printing, Milled Wood and Electronics.
I manufactured 8 of these cubes and 12 matching base plates for an educational interactive game that ran at Federation Square (Melbourne) during September this year.
The Production Plan
December 2013 - Kickstarter campaign finishes, final hardware testing is completed. I begin volume sourcing from suppliers.
January 2014 - It's hot in Australia and I code through the summer, making sure there will be an API when the hardware is delivered to our backers.
February 2014 - Components pile up in storage. I start packing and shipping the Hacker Kits + Bokken Hacker Kits. I start manufacturing the Bokkens for the Quick Assembly and Auzzie Apocalypse kits. I push out the Alpha build of the API along with sample code.
March 2014 - I ship the Quick Assembly and Auzzie Apocalypse kits. Use the feedback I am getting from supporters to refine the API and work towards the Beta build.
April 2014 - Winter is coming in Australia, I can continue coding without the Air conditioner.
May 2014 - Release the Beta build of the API.
June 2014 - Project completion - I release version 1.0 of the API and open up the source code to the public.
Post Project - Look into the viability of a production run of the Digital Katana as a consumer device (this would need to be in the 1000s to cover custom hardware and certifications).
Hardware Development Plan
The first step of the project is to finalise the design and set up the tooling that will be required to machine the bokkens.
Finalise hardware selection - This involves testing the low-power Arduino Compatible devices that I have already ordered and selecting the best model in terms of power requirements and processing power.
Order tooling samples of Bokkens and Sayas - I've already received a sample from an Australian supplier and am in negotiations as to supply capacity and bulk pricing.
Confirm manufacturer supply capacity for each component - As the components used are off-the-shelf there are many suppliers of each component making availability not an isssue.
Finalise bokken design (component placement, sensor testing) - This will require the creation of the final prototype, all going to plan it will have internalised hardware, and will be usable with a Saya (Sheath).
Tooling for custom bokken cutting. - Various Jigs (holders) will need to be created for reliable, repetitive milling of the bokkens. I will be designing the Jigs using OpenSCAD and manufacturing the Jigs with an industrial 3D printer.
Bulk-Ordering - With the design 100% complete I will be bulk-ordering all of the required components to assemble the kits and Digital Katanas.
Hardware Manufacturing Plan
With tooling all under control and parts ordered, the next step is to mill the bokkens, and to solder the complete Digital Katanas.
To complete the modifications to the bokkens I will need to:
- Mill a groove down the Mune (back) to allow for the wires to run to each sensor and the battery.
- Mill / route a slot for each 9-axis sensor in the bokken.
- Mill / route a slot for the Arduino microcontroller and Wireless module.
- Precision drill mounting holes.
- Tap threads into bolt holes.
- Route cavities for batteries in the Tsuka (Hand grip).
To assemble to complete Digital Katanas I will need to:
- Mount the electronic hardware into the bokkens.
- Solder the wiring between each sensor, the microcontroller, Wireless module, and the batteries.
- Configure and test the hardware.
- Seal the wiring down the Mune (back) so that it is not able to get caught on anything.
Hardware Delivery Plan
With all of the hardware sourced, milled, and soldered it will be time to start packing and distributing the hardware to all of my backers.
Software Development Plan
Set up a GIT Repository for Development + Backers
Firmware Revisions (Firmware is already written and functional)
SDK Development towards Alpha build
Release of Alpha Build (C# only)
Development towards Beta Build (Branching for platforms)
Release of Beta Build (C# / Unity / C++ / Java / Python)
Development of Revision 1.0 Build
Release of Revision 1.0 Build
There could be no successful venture without the help of the people around me.
A special shout-out goes to David Feillafe, network engineer and long-time friend, and Daniel Tosello, a man with skill in Kendo along with many other martial arts that put me to shame.
Video music track is Logan's Run by ROBTON http://www.jamendo.com/en/artist/384306/roboton
With an exciting project like this there are going to be many more questions than I have managed to answer in this short video and page.
Please do not hesitate to ask me any and all questions you have, as I am sure the answers to your questions will be desired by many.
Risks and challenges
With a working prototype we are certain that we can deliever the most responsive and accurate digital sword control available.
The hardware for the Digital Katana is comprised of all common off-the-shelf parts, with all of the components being manufactured by many companies. This makes the supply of parts almost 100% secure as we can easily change suppliers.
Alongside getting the Digital Katanas out to people who want to be a part of the development, the creation of the software development kit (SDK) is the other most challenging task.
I have worked in Software design and development for many years, and am well versed in languages from low-level Assembly through to high-level langauges including C# and Java. The aim of my project is to create an open-source SDK that will be both useful and accessible to the community.Learn about accountability on Kickstarter
- (30 days)