Archived: Capstone

First a little back story: I couldn’t have done this myself, so thanks Adam Thomson and Alix Krahn for all the help! This was done for our ECE 492 class which is a final design project that engineering students do before graduating. Only, I’m wasn’t graduating with the rest so I had wayy more time to work on this.

Our initial ideas were pretty insane and undoable (mostly my ideas). To be fair, I had been on a roll as of recently with my last two jobs. What I didn’t know was what was awaiting us in the labs…

Enter the DE2

If I had to draw a pi chart of how I spent my time on this project, it would have to be this:

Although, I must be the one to blame because it wasn’t that the DE2 Board couldn’t do what I wanted it to but rather that I couldn’t make it do what I wanted to.

This “development” board, provided by Altera, leads to more character development than anything else. You know you’re fucked when the guys working at Altera can’t quite get the bugs worked out of their tutorials!!!

But enough about the hardware…

Physics

How does it do what it does? How it does what it do? Does how what it does it do? It does, but what it do?! What?! How? Do?!

Our touchscreen uses FTIR (pronounced Fe-Tehr). Which probably means something but everyone who uses the word FTIR doesn’t seem to say what it is. I’m guessing it’s like some kind of Magician’s Circle(jerk) or something, so I’ll just keep my mouth shut and use more words I don’t know.

The FTIR is implemented in a Full Stack IEEE Javabean, enabling our Bricks-and-Clicks Big Data to Step Outside the Box. Utilizing social trends, we extract the Cloud NUI using 4G Lean Manufacturing Methodologies. Then with Hyper-Scaled Fuzzy Logic, our Haskel Back-End Ingest a…uuuugh…wait…what just came over me. I’ve just been possessed by management…am I in a Dilbert Cartoon!? AAAAAAaaaaaAAAAAaaaaAAAAaAAAaaAAAAA!!!

Alright alright….here’s how it actually works:

It’s a table with an acryllic surface surrounded by infrared LEDs. The LEDs shine into the acryllic and because of the refractive index (google it) of the acryllic, the IR beams get stuck inside. Unless your finger swoops down to save the day.

Then, our space age (read: as old as space) camera will read the incoming IR beams as white pixels on a black backdrop. We made our LED camera ourselves using the best things of the 90’s: Eyeball shaped webcams and Floppy Disks. Tutorial Link

Here’s a sample image from our touchscreen

DSP

To interpret that data as fingers (no, you can’t just cast it to a finger type) we need to group the pixels together and manage a list of the groups. Groups of sufficient pixel size can stay and the others don’t get picked in gym class….errr I mean don’t stay. You can check out the full code on my github repo. The output of the centroid (center of the pixel group) calculation looks like this:

We also used a few other tricks to help with the sensitivity of the screen. By lowering the triggering threshold / amplifying the values we can increase the sensitivity but we end up catching the edges of the screen more than anything else. So we decided to store an initial image of the screen, and subtract that from every image to just get the difference. Kind of like how you’re not supposed to touch the joystick on your gamecube controller when it starts up.

We also used a calibration algorithm that I know nothing about, nor do I care (for the moment). I gotta say though, uncalibrated touchscreens or….badly calibrated touch screens, are hilarious.

Final Product

To use our touchscreen we made a sample app that takes advantage of our hardware (well, mostly my laptop because fuck the DE2). Yea, see that academia, we actually found a use for our technology then applied it! There are actually 2 programs we made, one is a multifingered clusterfuck of a paint app. Just paint w/e you want with however many people, the DE2 don’t judge, each finger gets it’s own color of whatever the hell the program decides to give it. The other is a more structured application for the artist in us (if they were 5). You can paint with 1 finger, pick the color with 2 fingers, change the size with 3 fingers and erase the screen with the palm of your hand. To achieve the palm effect we look for a really big centroid.

END OF POST

Archived from my old website. You wouldn’t believe the amount of time I spent debugging a USB stack I wrote, and then the stunningly short amount of time we wrote everything else when we couldn’t use that stack. DAMN YOU ISOCHRONOUS PACKETS!!! YOU AND YOUR PING-PONG BUFFERS CAN ALL GO TO /dev/null!!!1!10101!!0