My project is a concealed box storage system that comes out and upward from under your bed to collect items (for me it was my book) so you don't have to get up from your bed to put the item away.
I present to you my long journey solving mountains of hurdles with tons of engineering.
The Drawer IdeaMy first Idea was to have motors to the sides of the drawer so that it would spin wheels in grooves (like a friction driver) to push the drawer horizontally and it would have the same mechanism for vertical motion except it would push a scissor lift's leg via slab. I tried to simulate this on my drawer and it moved, barely though, and I quickly found out that it wouldn't work.
Figure 0:
After proposing this drawer idea to my CS teacher, he quickly proclaimed I was out of my mind. This reaction was because I explained my "how" in a sort of lackluster manner. My dad happens to be a mechanical engineer, so I came to him and explained the "how" of my project. He calmly said "nope, it's not gonna work" and told me why. A friction driver is definitely the most finicky and unreliable way to go about building this. So, I proposed that I use pinion gears & racks, and my dad agreed. But, he also said that the motor placement and the extruded channels need to be completely different. He used to work on truck engines and knew that in order for a gear to actuate anything, there would have to be a sufficient amount of force pushing the two. So he proposed that I meticulously create a system of fixed ball bearings attached to screws on two wooden tracks so that the normal force of those bearings would keep the drawer floating up (not touching the floor) and pushed down so that the pinion gear would engage. But it would require an enormous amount of precision.
Figure 1:
Figure 2:
After digesting these notes, asking a couple of questions, and revising, I agreed.
The Push IdeaFor the horizontal motion, the bearings would be more on the outside of the wooden track, and the rack gears would be on the inside of the track close to the meat of the drawer.
Figure 3:
But the vertical motion would be more difficult. I kept the scissor lift, but revised my initial idea from a slab to a stick on an angle to push the scissor lift leg. This allowed me to fit a motor on top of the drawer while also accommodating for the height of the motor since it was taller than where we would push the scissor leg.
Figure 4:
The bearing system for the vertical motion, though, was much harder to dream up. How would I secure a stick which at this point was free standing? It was hard to visualize how I'd go about this so I waited for when I built the horizontal drawer to visualize better.
DimensionsRemember how I said that it'd have to be really precise? I wasn't kidding. I needed to measure out many things so that the bearings would be in just the right position to not push down too much so that the gear can't spin, but not push up enough to where the gear isn't engaged. I took a lot of measurements. There's a long list of now convoluted measurements I wrote down in a Google doc that I'll screenshot below, but here's nutshell of examples to help you better visualize.
Figure 5 (screenshot of dimensions Google doc):
The diameter of the bearings, the height of the motor, the height of 4 wood slabs, how big to make the box, frame, drawer, scissor lift extension height, etc. But there's one measurement that ruled over all the other measurements...
The First HurdleThe height from my floor to the bottom of my bed is only 7 inches! I took all the measurements with this limiting factor in mind.
Figure 6:
Over the next couple of days, I measured dimensions with my caliper and created lines of where I was going to precisely saw the wood to make it all fit under 7 inches and engage the gears well.
Figure 7:
Figure 8:
Figure 9:
After I had the materials ready (although I prepared some of the wood while I was constructing the drawer), it was time to assemble. With the horizontal, all was mostly well. I glued, screwed, and nailed.
Figure 10:
Figure 11:
But it did leave my kitchen table like this:
While I started visualizing the assembly of the vertical motion I found that it is hard, and I mean hard, to push the scissor lift leg from all the way down to all the way up. There was no way that the motor could output that much torque to drive my book up from 0. So, I gave the scissor lift a little head start so the motor was able to push it. But, it was still really hard. So, I greased up the little grooves the scissor leg runs on and cut out a smoother surface (made from a mcdonald's happy meal bucket) and it ran better, at least enough to where the motor can push it.
Figure 13:
I put off making the bearing holder for the vertical motion stick and now I had to deal with. After sitting there and brainstorming a solution for 30 min-1 hour, my dad thought up a brilliant idea to tie this bearing down unto the motor and a wooden block using a patterned metal strip with holes therefore creating the downward force necessary to engage the gears while also adapting to the changing angle of the stick while it moves down.
Figure 14:
Figure 15:
Figure 16:
After building a container and some limit switch infrastructure, the mechanical was done.
With the mechanical side of the project finished, it was time to do all the wiring, coding, and configuration. Contrary to the mechanical side, my dad did not have all the expertise in the electronics side with the components I was working with. He did teach me basic skills like how to solder, how to use a multimeter, how to strip wires, etc. But it was up to me to study the pinout diagrams, specific coding aspects, and wiring tutorials to make this mechanism actually run. And without electrical engineer to mentor me through the process, I made many more mistakes and had to scale many more hurdles.
The Motor Hurdle and The Driver Hurdle:While I had a little bit of experience wiring a sonar scanner and a reaction time game (and a 5 in APCSA under my belt :) ), it was jarring trying to make these stepper motors work because, before, almost always in these easier projects the electrical components and code worked exactly how I imagined they would, this stepper motor was very different.
After reading the stepper motor guide [embed link], I wired it up and it didn't work. The reason it didn't work was because I sort of ran through the guide and wiring without being completely thorough in my work. The connections were scraggly, I missed some crucial wiring bits in the guide, and was careless with my capacitor usage.
Figure 17:
I ended up frying one of my stepper drivers and exploding multiple capacitors before I corrected my wiring mistakes. My CS teacher and I spent days trying to figure out why the thing wasn't spinning. I made the wired the circuit correctly and neatly, fixed the capacitor reverse polarization, but it was one observation which I believe fixed the problem of the motor not spinning. The power supply I was using only outputted 0.6 A when my motor was rated for 1.16 A. So, I plugged in the right power supply and it worked.
Figure 18:
The Limit Switch DilemmaI though the limit switches were going to be easy. I understood the logic and just wired em up. And they worked.. sort of. During testing, when I pressed the limit switch it stopped. A little bit. The motor was still barely moving when it should not be moving at all (because of noise). But given how precise the mechanism had to be and how important it was for the rack gears to not be rubbed out, these little movements couldn't persist.
I set out to fix the issue but weird and spooky things started to happen. I found that when I bridged the limit switches terminals with my finger, the motors would either decide to move when the motors weren't working or move accurately when the motors were working. I pondered about what my fingers are and what they're doing. I found that they're just resistance and that they're acting as a pull-down resistor to filter out some noise. So, after a quick Google search on pull-down resistors, I wired it myself. And... my microcontroller broke. Prior to this, I was using a Particle Photon 2, but I kept shorting the microcontroller trying to wire this pull-down resistors my own way.
Figure 19:
My CS teacher told me that my project was over and to present why my project didn't work. What he didn't know was that I had my own microcontrollers and determination to finish and prove him wrong from the beginning when he told me that the project would never work.
So, I restarted smarter. I redid my wiring, watched a real YouTube tutorial on how to wire a limit switch, and coded the motors (and sorted out some little logic hiccups).
I finally crossed the finish line with weeks of deep thought, learning, coding, wiring, constructing, and making mistakes into one big project.
The Final ProductFigure 20:
Figure 21:
Quick LinksStepper Driver Guide
Limit Switch




_wzec989qrF.jpg?auto=compress%2Cformat&w=48&h=48&fit=fill&bg=ffffff)



















_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)
Comments