I reinvented the wheel

How I finally built my first hardware project after six years of excuses

Not literally, unfortunately. I made an alarm clock. For 6 years, I’ve always wanted to do something with hardware. I always loved doing software, but hardware seemed so cool because it was actually real; you could feel what you made. But I always told myself I was too busy, or I didn’t know how, or I didn’t have any of the resources to do hardware. And that was enough to convince me not to do it until this semester.

This semester, I was surrounded by people doing hardware projects, and some of them were learning hardware for the very first time. And Purdue Hackers just opened up their very own makerspace. I literally had no more excuses not to build something with hardware. Except I had one problem: I didn’t know what to make.

the Purdue Hackers makerspace
the new Purdue Hackers makerspace

Don’t reinvent the wheel

When I was younger and teaching myself software, I made small, pointless projects that taught me how to build software bit by bit, by reinventing the wheel. But somewhere in college, I got so focused on building things that mattered that I decided my first hardware project had to be original. I forgot everything I knew about learning. People love to say “don’t reinvent the wheel”, and the older I get, the angrier that makes me, even though I fell for it too. Reinventing the wheel isn’t just okay; it’s quite possibly the best way to learn a new skill so that you can invent something new someday.

So after 6 years, I finally made the leap: I was going to build an alarm clock. Now, this wasn’t going to be any old alarm clock; this was going to be a Bluetooth alarm clock. And yes, the only reason for this was so I could make a companion app to go along with it (I really like making apps). Well, that’s actually not the full truth. You see, the main problem this alarm clock was going to solve for me was that I had the terrible habit of using my phone right after I woke up. If I could just have something that knew when I woke up and would disable all my apps on my phone, then the problem would be solved, yay!

Harder than hello world

So on Friday, October 2nd at Hack Night 7.3, I got started. I downloaded the Arduino IDE, got a breadboard, a few wires, an LED, a buzzer, a button, and an ESP32-S3. And for the next hour, I tried to get the LED to turn on when I pressed the button. Let’s just say, it took me a little longer than an hour. Turns out, getting an LED to turn on when you press a button is a little harder than printing hello world. Turns out buttons can have two different ways of saying it’s pressed, which I still think is unnecessary. Thankfully, Arduino had a few tutorials that walked through how LEDs, buttons, and buzzers worked, and it was amazing. I had finally gotten an LED to turn on when I pressed a button. But I was still so far from finished.

As the night went on, I kept learning. I learned how buzzers made sounds by really just turning on and off in patterns. I also noticed my button presses weren’t always registering. The buzzer was blocking the main thread every few milliseconds, so any press during that window got missed. The fix was to move the buzzer to its own thread so the main thread could keep listening for the button. I finally got to use my CS180 knowledge of multithreading (Turkstra would be so proud).

I left Hack Night with a working alarm clock. Well, if by “alarm clock” you mean a breadboard with a buzzer, an LED, and a button held together by wires, and by “set the alarm” you mean opening a locally hosted website in Chrome (because basically no other browser supports Bluetooth, for some reason), and typing “SETI [Insert desired time in milliseconds since epoch]”. Then yeah, a working alarm clock.

Also, notice how I didn’t mention a resistor; we’re getting there.

An “app”

My alarm clock was only missing two things: a companion app and a case. For the companion app, I decided that it should be written completely in Swift since I had never made an app before in Swift (ik, surprising; I’ve always used Flutter), and since this wasn’t the focal point of the project, I handed the whole thing to Astra 6. Two days later, I had an “app.” It actually wasn’t half bad, though it put explainer text under every single button, just in case you didn’t know what to type into a box labeled “Your Name.” The biggest lesson: just because AI can build something with almost no direction doesn’t mean it should. I spent hours asking it to fix small things a more detailed prompt would have prevented. With the app done, all that was left was the case.

screenshots of the Swift companion app built by Astra 6
the home screen of the app

Really? A sun?

To design the case, I decided to use Autodesk Fusion since I got it for free as a student and I knew that it was industry standard, so I might as well learn what the professionals use. I started by learning Fusion by watching a 30-minute tutorial on how to make a base plate and a bracket. Fusion didn’t actually seem that difficult after the tutorial; now I just had to design the thing. For the design, I thought a sun would be cool, because it wakes me up in the morning, and none of my past alarms had been shaped like a sun, which I felt was a missed opportunity. After some messing around in the Create window in Fusion, I found the conic curve tool, which creates parabolic curves. And when you combine that with the Circular Pattern tool, you get this pretty cool sun shape. Once I had designed the case, I needed to make it so the case could hold all of the parts of the alarm.

Fusion sketch of the sun-shaped case made with the conic curve and circular pattern tools
the sun sketch

Up until this point, the alarm was all connected via a breadboard and a lot of wires. However, with the case I had in mind, the breadboard wasn’t going to work. After talking with a few of my friends, I learned that the breadboard wasn’t really necessary, and I could just connect everything to the ESP32-S3. But I also learned that I should probably have a resistor attached to the LED, something about stopping the LED from overheating or burning out or whatever. I then spent the next 30 minutes searching through a bag full of resistors just to find the one that I needed, but it was too long. So, I did what any CS major doing hardware for the first time would do and said, “are resistors really needed?” (Turns out the answer is yes, more on that later) and gave up on the hunt for a resistor. Now it’s Thursday, and I leave for fall break on Friday, and I really wanted to have the case after fall break, so I did what any sensible person would do. I measured every single part of the alarm and wrote it down in my notes. And you might be thinking, why didn’t he just take the alarm home so he could just measure it as he goes. And that’s a great thought; I no longer know why I didn’t do that.

Nevertheless, during Fall break I was able to spend the bulk of it designing the rest of the case, and using my measurements I was able to make it so all of the parts would snugly fit into it, or so I thought. The last obstacle I had to face when designing the case was making sure everything would snap together, but also be easy to take apart. After some back and forth with ChatGPT, I learned that a snap fit was exactly what I was looking for. And after this amazing tutorial (https://youtu.be/HcLT5Hz9-mk?si=yscMeFbmlVzw9piK) I felt like I was the master of snap fits and easily added snap fits to all of the parts. Fall break ended and I felt pretty good about the case.

Fusion render of the full case
the finished case design

Will it fit?

Upon getting back to campus and printing the case, I learned another lesson in how the hardware world is quite different from software. Just because a 3D model says something will fit doesn’t mean it’s going to fit. Once the case had printed, basically the only things that fit together was the top and bottom of the case and the LED case. And only the ESP holder was the correct size. The LED and buzzer didn’t fit inside the case and the button holder was too short. And the case was impossible to take off. So I went back to Fusion.

Something had clearly gone wrong. And you guessed it, it was my measurements and my lack of 3D modeling experience. I didn’t give any of my measurements enough padding for error in my measuring and for error in the printing. And for the problem of the case being impossible to take off, the problem was twofold. The snap fit was actually a little too snug of a fit and the bottom of the case was pretty thin so it was hard to pull on both sides. The solution was to make the case come apart by rotating it. This was done by making the indent on the rim of the case be a full rectangle next to the snap fit cutout so the top could slide right down the indent and then rotate into the snap fit cutout. And with that, I felt the case was ready to be printed again.

close-up render of the rim indent and snap fit cutout that let the top slide down and rotate
the rotate-to-open snap fit

This time the case worked perfectly except for two issues. The holes for the wires for the LED were too small and the holes for the button prongs were misaligned. After 2 more prints, these issues were fixed and I had a working alarm clock with a case! I thought I was done, so I took it home, plugged it in, and set my alarm for 9:00 am. And it didn’t work…

all four case prints lined up from first to final
past prints

Are resistors really needed?

Thankfully I realized this about 1 minute after setting the alarm because I didn’t see the LED flash confirming that the alarm had been set, but I was very confused as to why it didn’t work. Upon opening the case I saw that the wires connecting the LED and ESP32 had been disconnected which was just great. The solution to this problem was obvious, soldering, but I had been avoiding doing it because my only experience soldering was when I was a kid and I burnt my entire hand doing it. But we do what we have to do. So that hack night, I spent 2 hours soldering all of the wires to the parts, and I didn’t burn myself. Soldering actually wasn’t that hard, except for when I had to undo some soldering because I did it in the wrong order.

soldered wires connecting the LED, buzzer, and button to the ESP32-S3 inside the case
Taylor helping me solder

Now that all of the wires were guaranteed to stay connected I put the case back on and tried it again. Still nothing. The LED refused to turn on and this time it wasn’t a wires or software issue. Remember when I said that I didn’t believe I needed to use a resistor. Well turns out, they’re actually kind of helpful in preventing situations like these. My LED had burnt out and would no longer turn on. By this point I was done dealing with this LED so I just changed the software to make a buzz to confirm an alarm being saved and called it good. Now the alarm was actually done, I could actually use the alarm. The alarm worked great and the screetime features actually helped me stop using my phone right after waking up.

the finished sun-shaped alarm clock
the finished alarm clock

Reinvent the wheel

After four weeks, I had finally completed my first hardware project! Yippee! And I learned so much. I learned how to 3D model, solder, design software for an ESP32, design a case that can snap together, and most importantly why resistors are very much needed.

In all honesty, this project reminded me of the importance of “reinventing the wheel” and has started me down the very fun rabbit hole of hardware. So I hope the next time you want to learn something or have a project in mind, don’t worry about if it’s new or not, just build it and see what happens next! :)

Back to all posts

Stay in the loop

Get our monthly newsletter, full of things we're making and magic from Purdue Hackers.

By subscribing, you agree to receive the Purdue Hackers newsletter.