The FabLab was closed this Saturday, so I had to find something else to do. My brother and I went to the games shop (Game Mania), because he wanted to buy a PS4. In the shop window I saw a second hand Kinect sensor for 39 euros. So I decided to try out some weekend DIY 3D scanning.
When I came home, I tried to plug in the Kinect into my computers USB port. Too bad, a Kinect has a connector that looks like a USB port, but isn’t one. The connector provides an additional 12V to the Kinect next to the 5V USB default. There is a Kinect to USB adapter, but it costs more than the Kinect itself and that would mean no 3D scanning this weekend. I looked on the internet and found an instructable to transform the Kinect plug to a USB plug.
What you need:
- A Kinect of an Xbox 360
- A spare USB cable (will be destroyed)
- A spare 12V, 1.5A adapte
To provide the additional 12V to the Kinect, you need a 12V adapter with at least 1.5A. If the amperage of your adapter is higher than 1.5A, that is no problem. The Kinect will only draw as much current as is necessary, but the voltage needs to be correct. I found an old Lacie drive adapter which provides both 5V at 2.0A and 12V at 2.5A. When cutting off the Lacie connector, I found a white and a red wire and the cable shielding which is the ground. I measured the voltage between the ground and the red and white wires to make sure which one would be the 12V wire. The red wire measured 13.92V, which should be ok for the voltage regulator in the Kinect. We will not be using the white wire, so I clipped off the copper and taped it.
The second thing we need is our spare USB cable. Find an old printer cable or a USB connector from an appliance you don’t use any more. I used the computer link cable of my TI-83 calculator. The advantage of the cable was that the USB plug was connected to a PCB with a connector and the cable shielding ended in an actual wire, which gave me 2 ground wires for an easier connection. A normal USB cable will have 4 wires (black, white, red, green) and the cable shielding. My wires had a small connector clip attached, but you will need to strip the wires when you use a normal USB cable.
Now we can destroy the Kinect connector to expose 5 wires (brown, black, white, red, green) and the cable meshing. Clip off the cable meshing and strip the colored wires.
Now we can connect the USB wires, Kinect wires and the adapter wires. Connect the red, white and green wires of the USB cable to the corresponding colors of the Kinect cable. Connect the ground of the adapter to the black wires of the Kinect and the USB connector. Finally connect the 12V wire of the adapter to the brown Kinect wire. Use a soldering iron to make a good connection and then use heat shrink or electrical tape to shield the naked copper. Below, I made a wiring diagram that gives an overview of the connections. Your cable might not have the extra black cable, but then you will see the cable shielding, which can be clipped off.
After connecting the cables and taping each individual cable, we need to make sure that you will not be able to pull on the connections. I solved this by connecting the cables with zip ties and taping everything with electrical shape. It doesn’t look pretty, but it works.
Before connecting the Kinect to your computer, we need to install the drivers and the Kinect SDK. I use Windows 7, so I downloaded and installed the 64bit version of the Microsoft Kinect SDK v1.8. Additionally, I installed the Developer Kit, which contains some code examples for 3D scanning and skeleton tracking.
Finally it is time to connect your Kinect. Plug in the USB connector and if everything works, the green light of the Kinect should be blinking. To really make sure everything is installed correctly, go to the Control Panel via the Start menu. Type device manager in the search bar in the right upper corner of the Control Panel window. Click on Device Manager and it will open the Device Manager window. In the list, you should find the Kinect for Windows entry and if you expand the item, you should find the Kinect for Windows Audio, Camera and Device in the list.
Now we can test the Kinect using the Developer Toolkit Browser. Press the Start button and type Developer Toolkit Browser. Start the Developer Toolkit Browser v1.8.0 (Kinect for Windows). A window with a lot of code samples will start. Some of them can be run without having to compile anything.
The coolest sample is the shape game. It detects the body of up to two persons and displays this as a stick figure. The stick figure will mimic your movements so you can try to destroy the shapes that are falling downwards.
What I really wanted to try out is the 3D scanning possibilities of the Kinect. Find the Kinect Fusion Explorer-WPF in the list and click the run button.
I made a video of the skeleton Shape Game and 3D scanning example that I tried out. I scan my head in 3D, fill the holes in Meshmixer and prepare the mesh for 3D printing in Cura.