Mechatronics Exercises

Workspace Navigation

Linear Camera Slider with pan and tilt

Team 4: Aleksi Pippuri and Benjamin Jokinen

Our plan is to make a motorized camera slider for a DSLR camera. The camera will slide along a rail on top of a rotating and pitching ''sled''. There are multiple driving modes to be implemented.

The Plan

Ways of working

Starting from the ground up: The frame will be built from two aluminum pipes which are held and aligned with end pieces. The end pieces have slots for auxiliary tripod mounting.

The sled itself has four 3D printed concave rollers which make contact with the pipes. The radius is designed to be a bit less than the radius of the pipe. This is so that the rollers will make contact on two points and the effect of wear will be less in the long run. The rollers are attached to the bottom of the sled with bolts and two ball bearings per roller.  The sled is driven laterally by a stepper motor which is onboard the sled. There is a belt strung between the end plates which is used to drive the sled.

In the first level of the sled there is the lateral stepper motor, 5V power bank for the Arduinos and the stepper motor drivers and a hinge to level out any roll from the rails. 

The second level will house the electronics, Arduino Leonardo, Nano 33 IoT, 3 A4988 stepper motor drivers, circuitry and attached to the end is the stepper motor responsible for rotating the pan/tilt head. 

The pan/tilt head is free to spin full 360 degrees basically to infinity thanks to an 8 lead slip ring and a turn table bearing which is basically two aluminum discs with bearing balls in between. The inner circle of the bearing is attached on top of the second level. The panning motor has a 3D printed gear which spins the base of the pan/tilt head from the outside. This is attached to the outer ring of the pan bearing. 

The geared base of the pan/tilt head is attached to a base plate which in turn attaches to an idle support arm and the motorized support arm for the cradle. Both axels will be mounted with bearings. The motorized arm will have a hole for the tilt stepper motor. Attached to the motor is going to be another gear which drives a larger gear attached to the cradle. 

The cradle will hold the camera and has few possible mounting holes to adjust the balance of the camera on the cradle.

Two hall effect sensors are used to define the zero positions for the pan and tilt motors, and an end switch is used to define a zero position for the lateral motor.

Steppers will be run with a 12V motorbike battery, which is the only part not onboard the sled.

Most parts will be 3D printed but the level surfaces will be made out of plywood.

Pictures of the 3D model

What is done already?

We have made a complete parts list and have ordered and received all the parts and components that weren't available from a hardware store or electronics store locally. Locally sourced parts are yet to be bought because Corona struck the one of us who has a car.

We have planned the circuitry and have a very rough code.

We have made a 3D model. Most of the parts are already printable but the gears are still to be modelled.

What needs to be done?

3D print the parts. Luckily we have a helpful friend who has a 3D printer, authorization to use ADDLab printers and the K4 printers. We can use ADDLab when K4 is reserved and use our friends one outside office hours.

Grab the rest of the parts from hardware and electronics stores (namely pipes, hardware and small electronics like resistors and capacitors).

Build the circuitry. Test every lead and component.

Write the code by bit by bit implementing functions. First get the motors running, then sensors, then math, then functions.

Get frustrated and fall into the integration inferno.


Most of the problems we will face are yet to show up because of the delay on the schedule from the pandemic which has been our biggest problem.

Designing gears is hard and laborious part of the model. 

The code is complex and long.

The Outcome (toteutus)

Starting the physical build

We made a lot of prebuilding design by drawing the machine on paper, building a cardboard model and 3D model to find most problems and solutions to them before buying the parts to save on costs and it did help a lot. We went and bought the required parts (list down below) and put the 3D printable parts to print. The parts totaled around 80 hours of printing and over 100 hours when counting also the failed prints. The construction went well and we decided to leave one of the designed levels out because it was unnecessary and brought unneeded extra weight and complexity. The second level would have been useful and also can be if we implement wireless connection and store our batteries there.

Most problem arose from the 3D printed gears. 3D printers have problems making perfect circles and also having errors in precision makes making gears hard. The printed gears looked great but need a lot of fiddling and physical modification by sanding to center them correctly to have uniform contact on each on every angle.

The rails which the slider moves on are made of two aluminium tubes which are attached to each other with mdf-board by screws. The sledge is made with two levels of mdf and is held together by a friction hinge so we can level the camera cradle if we have the rails on an angle or vertical. We 3D-printed convex wheels which the sledge uses to have smooth slide on the rails and because of their shape the sledge can be attached upside down. Sledge moves on the rails by having a stepper motor on it which interacts with a stepped band which is part of the rail installment. The wheels are attached below the lower level.

On the lower level is most of our circuitry more of which below. The two levels are sandwiched and top level accommodates the camera cradle. As intermediator we used a slipring to carry information for the cradles motors and get sensor data from the Hall sensor on it.

Cradle consists of a spin table bearing which allows for the free rotation of the cradle and thus allowing pan of the camera. 3D-printed lower gear which works also as a ground for the pillars which hold the tilting camera mount. Tilt and pan are controlled by two stepper motors and as a homing point there are magnets and Hall sensors.


Our first plan was to use Arduino Nano and slaving a Arduino Leonardo so we could have bluetooth control of the system but because bad circumstances made some timetable problems we ditched the Nano for now but might implement it after the course. We ended up using a Arduino Leonardo in the center of our circuit. We have a moped battery as the power source for the stepper motors and to power the arduino we used computer usb. The computer in current system is our only interface to control the Camera Slider and may be improved to be a app and wireless.

The Code

Code itself is on a file attached to this page. Code was sourced from a project which we found during our research part of R&D. The channel of source of our code and for the code: The source code is quite good and has a lot of features which we turned off, like EEPROM and battery power check. We had to convert the code to work on our dimensions and luckily for us it was quite straight forward in theory but as usually with coding it still was time consuming. We still have problems with code. Mostly with the AccelStepper.h library as it reads our slider motor going backwards as it is on the "wrong side" so our Slider moves on the negative x-axis. This brought problems with maths in some of the more complicated functions. This should have been easy fix but it wasn't for multiple reasons fixable in our code so for the next step we shall modify the library to correctly identify the orientation of our motor. We had more ideas for the code which we didn't have time for but will be implementing in the future. One of which is adding star and planetary tracking to the code. We might have to have as a discrete modified code because our current code already takes 97% of our Arduinos memory.

Problems we have

We still have some problems which we would like to overcome and some of which I have already opened some in the previous texts.

Our slider has some wobble when it slides especially in high speeds and this is a problem in the attachment points on our tripods which support the structure with only single screws.

The code has some bugs which we have to go through. Like sometimes it randomly doesn't do smooth transitions with slow acceleration and jerks around. Also the negative x-axis thing I mentioned.

Video of end product


  • No labels
  File Modified
JPEG File 20220305_184032.jpg Apr 07, 2022 by Benjamin Jokinen
JPEG File 20220330_000924(1).jpg Apr 07, 2022 by Benjamin Jokinen
File CameraSliderVer1.cpp Apr 07, 2022 by Benjamin Jokinen
File CameraSliderVer1.h Apr 07, 2022 by Benjamin Jokinen
File CameraSliderVer1.ino Apr 07, 2022 by Benjamin Jokinen
File Iibrary.h Apr 07, 2022 by Benjamin Jokinen
JPEG File IMG_20220407_143740.jpg Apr 07, 2022 by Benjamin Jokinen
JPEG File IMG_20220407_143858.jpg Apr 07, 2022 by Benjamin Jokinen
JPEG File KääntöYläOsa alaviistosta.jpg Mar 20, 2022 by Aleksi Pippuri
JPEG File Kelkka.jpg Mar 20, 2022 by Aleksi Pippuri
JPEG File Kelkka alhaaltapäi.jpg Mar 20, 2022 by Aleksi Pippuri
JPEG File KelkkaPohja.jpg Mar 20, 2022 by Aleksi Pippuri
JPEG File Kelkka Väliosa sivusta.jpg Mar 20, 2022 by Aleksi Pippuri
JPEG File Kokomalli.jpg Mar 20, 2022 by Aleksi Pippuri
JPEG File Koko malli.jpg Mar 14, 2022 by Aleksi Pippuri
JPEG File Koko malli väärinpäin.jpg Mar 14, 2022 by Aleksi Pippuri
PDF File Parts list.pdf Apr 07, 2022 by Benjamin Jokinen
JPEG File Räjäytyskuva 1.jpg Mar 14, 2022 by Aleksi Pippuri
JPEG File Räjäytyskuva 2.jpg Mar 14, 2022 by Aleksi Pippuri
JPEG File Slider ja Koko malli.jpg Mar 14, 2022 by Aleksi Pippuri
Multimedia File VID_20220407_135729.mp4 Apr 07, 2022 by Benjamin Jokinen