On December 20th, 2018, I saw this GIF and I immediately knew that I had to build my own motorized chair.
On October 20th, 2019, we finally presented the TurboChair at HackUMass VII and won Best Hardware Hack. The following article is an attempt to explain everything that happened in between that 10 month span.
The Hackathon Team
Andi - Me!
Amrit - WPI CS ‘21 - One of my best friends from high school, we did FRC robotics together. Great at putting together hardware and building software.
Matt - WPI Aeronautical Engineering ‘21 - Another one of my high school best friends, also did robotics. Can build and wire anything!
Norlinda - UConn BME ‘22 - My venerable girlfriend, who kept up team moral and put in major contributions to the design of the final product.
I found out about HackWPI, which is how this whole chair-ade started. I asked Amrit, Matt, and Dan (previous hackathon team members) if they’d like to do something together, and we started brainstorming ideas.
Originally we wanted to do a self driving Barbie jeep (the kind for kids), but we decided to save that project for next time once I saw the GIF which made me want to build the chair. After a few hours of discussion, everyone was on board and we started writing up a parts list.
January 8 - Sofa Hunt
Arguably the most important part was, well, the chair. We started checking Craigslist for any cheap offers that would be small enough to transport via car yet sturdy enough to allow us to bolt on motors and other electronics. Furthermore, we wanted an ergonomic seat for comfortable rides.
January 12 - Chair Secured
We found two listings that matched our requirements, but unfortunately both were pretty far and the cheapest one was $25. However, the scales tipped once one of the owners sent back:
You do not need to pay cash. At this point, if you would like to come and get it, it is yours at no cost.
I would like to say thank you to Rik from Connecticut for giving us the chair for free. Without him, TurboChair would not exist.
Matt came over with his dad’s pickup truck and we both took a trip to Rik’s house to collect the chair. Rik was visiting his granddaughter in Massachusetts at the time and he helpfully left the chair right outside the door to make it easier for us to load it into the truck.
After sending my thanks to him, I received the following reply:
You’re very welcome. We had a lovely visit with our granddaughter. I hope you enjoy the chair and get as much good use out of it as we did. Rik
If only you knew, Rik!
Once we claimed the chair, we took it to Matt’s house and got to work on the base assembly. To make a good day even better, it reclined! Matt happened to have some motors laying around from a mobility scooter he and a friend had found at the town dump - these would end up being part of the final product as well.
The motors appear to be the “M4-7UM” model from the PIHSIANG company, and they went for around $300 the last time we checked eBay. It certainly looked like we got a deal.
Eventually I went home while Matt and Clay (another one of our high school friends) worked on the assembly.
January 13 - Max Power
Up till this point we had been using two power drill batteries in series to power the motors. While this was fine for testing, we’d need something stronger for the actual chair.
Matt found a battery:
This thing is absolutely overkill. It holds more juice than a typical car battery and outputs nearly twice the voltage. Regardless, it was exactly the type of over the top absurdity TurboChair demanded.
The battery ended up being the most expensive part of the chair, totaling well over $200 and requiring its own special charger. Thankfully Matt happened to have it lying around from past projects so we didn’t have to wait for it to shipping. Also, if we weren’t shooting for absurdity, we definitely could have found cheaper options to fit the bill - but how fun would that have been?
By the end of this day, Matt and Clay finished the drive assembly and had it securely attached to the bottom of the chair. They added shopping cart wheels to the front (also from the dump) so the chair now officially qualified as a motor vehicle. Everything was starting come together.
January 14 - Move In Day
Matt and Amrit drove the chair to Worcester and stored it in the basement of Amrit’s frat house. Things were looking good for Dan and I to come up on Friday for HackWPI.
At this point I also ordered:
- A 5V voltage regulator
- A Raspberry Pi touchscreen display
- Turn signal lamps, like the kind you find on tractor trailers
January 15 - Unexpected Turbulence
Unfortunately, this is where things went downhill. Right before the hackathon, a really nasty winter storm moved in that kept us from going up to WPI. Amrit and Matt ended up not competing, and the chair stayed in the basement.
With the school year starting for all of us again, the chair became an afterthought.
Five Months Later…
May 9 - Shipment Delivered
Remember how I ordered some stuff four months ago? It finally came in on this day. I had totally forgotten about it while trying to figure out how to deal with the storm.
At least we felt better about missing HackWPI now, because even if we had gone these parts would definitely have not been there.
Another Five Months Later…
September 10 - Revival
About this time HackUMass started sending out emails again asking people to sign up to compete. I figured, why not give the chair a second try? It had been over half a year, but we already bought the parts, and we might as well use them to finish the project. I didn’t care about winning - the completed chair was the prize.
So I asked Amrit and Matt to join me once again, and I wanted to bring Lin along so she could help out and see how big hardware projects like these came to fruition. Up until this point she only had experience with Arduino kits. This was going to be her second hackathon, and we needed to go big!
October 18 - Point A to B to C
Today was the big day: HackUMass begins.
This day was a logistics nightmare. Because the chair was still in Amrit’s frat house basement and it couldn’t fit in his car, we needed to go from UConn to WPI to UMass in about 5 hours. Once Lin got out of class, Matt got dropped off at my place and we began the journey to Matt’s apartment in Worcester. We grabbed some tools and equipment (including the battery) from there and drove over to Amrit’s frat house, where we acquired the chair.
At this point it was about 7:30PM, and we only had an hour to get to HackUMass before check-in ended. Amrit and Matt drove in Amrit’s car while Lin and I drove with the chair to Amherst.
By the time opening ceremonies were over, we were all way too tired from driving to get much hacking done. We decided to get some rest for a few hours before working on the chair.
October 19 - Hacking Day
All of the ground work for the chair happened on this day. This is also where we encountered all of our major obstacles.
The first goal was to integrate MOSFETs with the motor controllers so that they could go backwards. Up until this point both motors could only go forward, making it hard to turn and impossible to reverse. Unfortunately it turns out one of the MOSFETs we brought was totally abnormal and didn’t respond correctly to the right commands.
Amrit and Matt lost at least a few hours to debugging this stupid MOSFET. One of the most annoying parts of hardware development is that there are a hundred different places where things can go wrong - if it’s not your wiring, it could be your code, and if not any of that, it could be the hardware itself or any one of the components connected to that hardware. There’s not really any way to know. Software is much easier in this regard - at least you can use error messages to figure out what’s going on.
Eventually they decided to retire the MOSFETs in favor of two simple on/off relays courtesy of the HackUMass hardware table. The relays were a joy to work with and soon TurboChair was capable of individually reversing motors.
While this was going on, I put together the Raspberry Pi that would make up our “infotainment system.” A few days ago I had ordered a Raspberry Pi 4 and a Pi camera which would give us a backup view like most modern cars have. Unfortunately, I had misjudged how everything would get wired together. I thought that the touchscreen I got from May (still in its box untouched) would use HDMI, allowing me to put the Pi on the back of the chair and thus making the short ribbon cable for the Pi camera not too big of a deal.
In reality the Pi was meant to be attached directly onto the back of the touchscreen display. While this wasn’t hard to assemble, it did mean that the Pi camera ribbon cable became a major issue - it simply wasn’t long enough to reach the back of the chair.
In my great wisdom, I had brought my GoPro with me, which solved everything, right? Just duct tape the GoPro wherever I want and then live stream its viewfinder to the Pi over WiFi (which is built in to the Pi 4). Problem solved, right?
Wrong. GoPro apparently discontinued .m3u8 livestreaming from its API for the newer models (I have a Hero 7 Silver), meaning that the only way to do it now is through some wild amalgamation of
ffmpeg commands. I’m sure there’s a way, but I’m simply not a video streaming expert so I was way out of my league trying to solve that problem. At the same time, hours were ticking by and we still had nothing to show.
Around 8PM I gave up and took Lin to Walmart with me to buy a USB camera. It was $30 (I was hoping it’d be like $5…) but it got the job done.
The USB camera worked flawlessly and gave us a consistent 30+ FPS stream. With both goals complete, the next big step was to get the chair moving.
While Matt and Amrit worked on MOSFETs and I wrestled with the GoPro, Lin was hard at work ripping up the side of the chair to give us the “engine hood” - a giant rectangle of fabric that covered all of the electronics including the battery. When we needed to work on chair electronics, we could simply lift the hood up. When driving, the hood was held in place by strategically applied Velcro strips.
Lin also worked with me to come up with preliminary UI designs for our infotainment system, which would run on the Raspberry Pi.
With the motor controlling apparatus installed under the hood and an Arduino thrown in to interface with the relays, we were ready to drive. Amrit wrote some simple control code that let us use a joystick module to command the motors.
The joystick ended up being completely awful to work with, but it was enough to give us the moral boost to keep working on the chair throughout the night.
The first static run of TurboChair occured at 10:14PM, with the full hallway run at 11:12PM.
It wasn’t very long until bystanders saw what we were up to and wanted a shot at driving!
Eventually though, it was time to get back to work.
October 20 - After Hours
We had a driving chair. But we wanted more.
The two big goals for this sprint were to get the Nyko Kama nunchuck I brought to interface with the chair, and to also mount the Raspberry Pi w/ touchscreen display onto the side of the chair. As a bonus goal, we wanted to add turn signals and brake lights using this purpose-built LED strip we got from our previous Walmart trip:
Nyko Kama Wii Nunchuck
The nunchuck was the most important part as the tiny joystick we were using before was doing a really poor job at being useful. The nunchuck would give us a (hopefully) more precise 2-axis joystick as well as 2 buttons and force readings from its built-in accelerometer. While we didn’t end up using accelerometer readings, it would of course be helpful nonetheless in case we ever wanted to in the future.
I had actually gotten this model to work four years ago in 2015. I open sourced the code I used then but afterwards I had no idea what I would use it for (originally I bought it for an electric skateboard project that fizzled out). I figured it shouldn’t be too hard to port that code to the Raspberry Pi. However, the breakout adapter used I2C, and I’m not an I2C expert. To complicate matters, the Raspberry Pi had various libraries available for I2C that didn’t provide a 1:1 match with Arduino’s
Wire library. In the end, I decided to hook up the nunchuck to the Arduino instead, and just connect the Arduino with the Pi together to transfer data over (more on this later). This ended up being a better choice as it made the Pi non-essential to chair operation - if my app crashed or the Pi restarted, it wouldn’t stop the nunchuck from controlling the chair.
The nunchuck control code ended up getting finished around 4AM. At the same time I had been working on the front end web design for the infotainment system. I was able to use the MediaDevices web API to get video access to the USB camera, and wrote some basic CSS to place a sidebar next to the camera feed.
After finishing the UI design, I converted the whole page into a Vue web app. The idea was to set up a render loop that would read data from the Arduino, parse it into values that I could plug into Vue, and from there Vue would render the page.
I ended up writing a WebSocket bridge server in Python that read data values over serial USB (connected to the Arduino) and sent them through a connected client. In this way I could read any values from the Arduino from the web page - as long as the bridge server was running.
An example data packet from the Arduino looked like this:
Each field, in order, represents:
Armed: Whether the Z button on the nunchuck was being held. This would show an “ARMED” bubble on the screen and prevented the chair from moving unless the user was holding down that button.
Going Forward: The infotainment system had this concept of “gears” (D/N/R) even though the chair itself didn’t really have a transmission. To support the illusion, we calculated whether the chair was going forward based off of if either motor was in reverse. If both motors were moving forward, the gear was “D”, if they were both going backwards it was “R”, if neither of them were moving the gear would show “N”.
Joystick X: Exactly what it sounds like, the nunchuck’s joystick X value from 0 to 255 (in the center, it was 128).
Joystick Y: Same as the last value but for vertical direction.
Left motor output: The voltage going to the left motor scaled from 0 to 1.
Right motor output: Same as before but for the right motor.
In all, the infotainment system consisted of:
The Raspberry Pi connected to the USB webcam and the Arduino via USB
The bridge server running in the background
The Vue web app running in Chrome full screen
Hackathon Pro Tip
A lot of people seem to struggle with getting code onto the Raspberry Pis. Generally you’ll have a better dev environment (like VSCode) set up on your laptop, so trying to code directly on the Pi is inefficient. Usually it wouldn’t matter, but in a hackathon seconds count.
What I ended up doing is setting up the Git repo first, and then
git clone-ing it onto the Pi. This way I could push changes from my laptop and
git pullthem onto the Pi’s file system.
What you definitely want to avoid is editing code in multiple places (i.e. on your laptop and on the Pi). Unless you set up version control, this is a great way to get confused and use the wrong versions of things and then wonder why things that used to work start breaking…and why things that were broken started working.
Although you generally shouldn’t have to worry about other teams stealing your code (in our case, they’d have to steal a chair too…), if you are that concerned you can just make a private repo on GitHub and use that between your laptop(s) and Pi(s). Fun for the whole electronic family!
Also around 4AM, Matt and Amrit started building the mount for the Pi. We realized that running the Pi, Arduino, and LEDs on the same circuit was drawing too much power, so we switched the Pi’s power supply to a handheld USB battery bank. I was worried it wouldn’t last nearly long enough to survive demo day, but it did!
At this point it was 6AM, and I was starting to crash. Matt, Amrit, and Lin had already gone to bed and woken up. Since the LED strip needed 24V to power the lights, it would have been too much work to set up 3 new relays to support interfacing with it from the Pi. No worries - we had another LED strip around, which Matt ended up installing under the chair!
After a few trial runs, we were ready to call it. TurboChair was officially finished at 8:08AM, October 20th 2019. Almost exactly 10 months to the hour. When we went to submit the project, it asked us what we wanted to name it. Up until this point we hadn’t put any thought into it - so in our sleep deprived state we came up with TurboChair and called it a day.
October 20 - Demo Day
The Big Day!
Hacking officially ended at 10:30AM but I had submitted our project a few hours ago before I went to sleep. By the time I woke up we had already been assigned a table and were busy packing things up to get the table ready. Lin helpfully drafted a presentation in Google Slides to catch people’s attention in case the giant motorized chair didn’t.
Our chair was super popular, with other hackathon participants (and judges!) all taking rides around the lobby. Shockingly, at the end of it all, our battery had only gone down to 58% throughout the ~3 days we had been driving this chair around!
Here’s a video showing off the infotainment system:
And here are some more pictures under the hood.
From left to right:
The “emergency cutoff” switch, which killed power from the battery in case anything went wrong (thankfully, it didn’t!) It might look far away but it’s actually pretty easy to grab on to in the driver’s seat
The power box for the undercarriage LED strip, which Matt carefully spliced open to allow it to be powered by our circuit instead of a USB port
The two relays that allow the motors to go backwards and forwards
From top to bottom:
- The Arduino Uno which interfaced with the motor controllers and talked to the Pi!
- Our 5VDC regulator which powered the Uno and the relays
- The two huge (but cheap) motor controllers running our scooter motors
The Nyko Kama receiver and breakout board which allowed the Arduino to read commands from the nunchuck over Bluetooth
And finally, here’s the chair in typical operation:
A few hours into demoing, Amrit decided to add a tiny little addition to the control loop: pressing the B button (above Z) would enable “Turbo Mode.” See, up until this point, the chair had been operating at half power, because we were afraid of crashing it into things. With people dispersing to view other projects, we had a clear view at an empty hallway to try going Turbo.
It might be hard to tell how fast the chair is going from the video alone - try turning up your volume :)
Demo time came and went, and now was the closing ceremony (around 4PM). We were all anxious to see if we had won. We had been told beforehand that we were finalists for the “Best Hardware Hack” prize category, but there had been other impressive hardware projects…
Not only did we each win a free drone, but each drone came with a little slip letting us know that we were randomly selected to win another drone model from the same manufacturer!
Clearly it was all worth it. But the final challenge loomed ahead of us: how do we get everything home?
TurboChair doesn’t need anyone in the driver’s seat to move, so obviously…
We put all of our stuff onto the chair and drove it outside. I don’t think anyone else could say they had their project drive their stuff to their cars :)
So that was TurboChair. It may have taken nearly a year, but it was oh-so-worth it.
I’d like to thank Amrit, Matt, and Lin for completing this fever dream of a project. What a ride it was - metaphorically, and now physically too.
Till next time.