Okay, so I got tired of my phone sliding all over the place in the car. You know how it is. It ends up on the floor, under the seat, just everywhere but where you need it. The cup holders are okay, but not really made for phones. So, I got this idea – make an automatic holder that fits right into one of the cup holders.
Getting the Idea Rolling
First thing, I just thought about how it should work. I wanted something that would grab the phone when I put it near, and let go when I needed it. Seemed simple enough, right? Famous last words. I figured I’d need some kind of arms to grip the phone, a small motor to move them, and a sensor to tell it when the phone (or my hand) was there.
Hunting for Parts
I started digging through my boxes of junk. Found a small hobby servo motor, those are easy enough to control. Needed something for the body and arms. I thought about 3D printing something, but ended up grabbing some scrap plastic sheets I had. Easier to cut and shape quickly. For the brains, I grabbed an Arduino Nano knock-off I had spare – cheap and does the job. Oh, and a simple IR proximity sensor. Those things are everywhere online.
Stuff I rounded up:
- Small servo motor
- Plastic sheets (like old project box lids)
- An Arduino Nano board
- An IR proximity sensor
- Some wires
- A small battery pack (or maybe wire it to the car later)
- Hot glue and some small screws
Putting Things Together
This part was messy. I cut the plastic to make a base that would wedge into the cup holder. Then I made two simple arms. Getting the servo mounted so it could open and close the arms took some fiddling. Lots of trial and error. I basically hot-glued the servo to the base, then attached the arms to the servo horn with tiny screws. It looked pretty rough, honestly.
Wiring was next. Connected the sensor power and signal pins to the Arduino. Connected the servo power and signal pins too. Powered the Arduino temporarily from my laptop USB while I figured out the code.
Making it ‘Smart’ (Sort Of)
The coding wasn’t too bad. I’m no expert, but the Arduino stuff is pretty straightforward for simple tasks. The basic idea was: check the sensor. If the sensor detects something close (like a hand bringing the phone), tell the servo to move to the ‘closed’ position, gripping the phone. I added a small delay so it wouldn’t react instantly if I just brushed past it. For releasing, I thought about another sensor, but just decided to code it so after a few seconds of detecting nothing, it would open up again. Simpler that way for now.
Testing and Fixing
First power-up! Waved my hand… and the arms slammed shut way too fast. Nearly pinched my finger. Okay, needed to slow down the servo movement in the code. Tweaked that. Then, the grip was too tight, felt like it might crack the phone screen. Adjusted the ‘closed’ position angle for the servo. Tested again. Better.
The sensor was a bit finicky too. Sometimes it saw my hand from too far away, sometimes it didn’t see it until it was really close. Played around with the sensor position, pointing it slightly upwards. That seemed to work more reliably. Took it out to the car, wedged it into the cup holder. Ran the power from a USB adapter plugged into the car’s power outlet. Worked okay!
The Final Thing
So now I’ve got this kind of clunky-looking, homemade auto phone holder. It’s not pretty, definitely not something you’d buy in a store. But, I stick my phone towards it, the little arms motorize closed and grab it. When I pull the phone out, they open back up after a second. Does the job. Stopped my phone from doing gymnastics around the passenger seat. Pretty satisfying little project, even if it took a few hours of fiddling and gluing my fingers together.