Introduction: Diy Webcam Slider
Hello again, Been some time since my last upload here. But I was busy with learning some cool stuff and can't wait to show that to you. Before that, let me tell you what this project is. So, this is a cheap slider mechanism for my webcam. The reason for making this slider was just to test my 3d designing skills (which I am still a beginner at). After designing the mechanism I got soo tempted that I printed the parts out and assembled this little project. I don't know where you might use this, but do check it out if you find it interesting.
Step 1: Supplies
- 3d printed parts (STL files given)
- Gt2 Pulley and Belt
- Gt2 Perlin Pulley
- 28byj-48 Stepper Motor and ULN2003 Stepper Motor Driver
- For the smooth rods I decided to re-purpose my old drafter. The designs are made considering those rods.
- Buck Converter
- Joystick Module
- Arduino Uno
- Webcam
- Jumper Cables
- 8 mm MDF sheet to mount the parts
- 12 V adapter to power the system
- Screws to mount the 3d printer parts
- Zip ties to loop the timing belt.
Step 2: 3d Printing and Assembling
As I do not have a 3d printer, I opted the 3d printing services offered by robu.in.
For printing the parts I used their Standard services with layer height of 0.2 mm and an infill of 20%.
Print material was PLA Black.
After about 4-5 days I received all the 3d printed parts and they looked awesome.
Mounting the motor mount and pulley mount to the MDF is straight forward. If you notice closely there is a hole to insert a nut on each side of the motor mount. Adjust that according to your needs.
After mounting the mounts I installed the rods. There are extruded cylinders which align perfectly with the drafter rods.
For installing the camera platform, insert the first rod then slide the platform in and then insert the other rod. If the movement of the platform is not smooth then it calls for some filing.
Cut the timing belt slightly longer then your smooth rods. Now create loops on the ends of the timing belts and secure them with zip ties. Now just insert the loops into the extruded cylinders on the back of the camera platform.
Now last step is to adjust the timing belt(tight/loose) and then put the belt stop on the extruded cylinders.
With that we move on to the electronics part.
Step 3: Electronics Assembly
Follow the connection diagram given above and make the necessary connections.
Arduino Uno pin A5 => Joystick X Axis
Arduino Uno pin D4 => ULN2003 In1
Arduino Uno pin D5 => ULN2003 In2
Arduino Uno pin D6 => ULN2003 In3
Arduino Uno pin D7 => ULN2003 In4
The ULN2003 is supplied regulated 5V output from the buck converter.
Step 4: Arduino Program
The code for this project is given below.
Before uploading the code to the board we need the Stepper_28BYJ_48.h library by Thomas O Fredericks. So, a huge shoutout to him for writing this simple to use library.
Check all the connections and pins initialized in the code and then upload the program to the board.
Now you can control the slider movement with your joystick.
I hope you like this project. Do check it out on my YouTube.
That's it for now.
Thankyou and have a great day.