For this project14, I thought to build a camera that travels along a cable and take videos using a GoPro
First version
The starting point is the TMC2300-IOT-REF board, that I will use to drive to motor that makes the camera move along the rope. I created a 3D-printed base to host all the components
Added a stepper motor
Then two pulley that will support the weight and stabilize the whole assembly as it moves along the rope
I added a servo to make an action cam rotate while the Cablecam moves
A battery holder has been glued on the back
Finally I added the TMC2300 board and connected all the components
Here is the final result
Revised version
After the first tests, I unfortunately realized the stepper motor had not enough torque. So I replaced the stepper motor with a continuous-rotation servo and, since I need to print a new board, I added a couple of holes that will let me give the possibility to place the pulley above or below to row (if the latter is the case, the pulley will just stabilize the Cablecam, since all the weight will be supported by the servo shaft)
With these changes, I was able to make my first movie
To control Cablecam, I create a Blynk application. Blynk is a really interesting platform that allows you to create a control application for your projects that runs in a browser or on your mobile. You can find more details about Blynk in my review of the TMC2300-IOT_REF board
For this project, I used five virtual IOs, namely
#define VIRTUAL_PIN_DIRECTION 3 #define VIRTUAL_PIN_ENABLE 4 #define VIRTUAL_PIN_DURATION 5 #define VIRTUAL_PIN_STARTANGLE 6 #define VIRTUAL_PIN_ENDANGLE 7
Each virtual pin has it own handler function, that sets the value of a specific variable of the Arduino sketch. When the "Enable" button is pressed, the servo responsible for the motion is started and the servo that rotates the camera is moved as smoothly as possible. The servo position is updated every 100 ms by the code in the PeriodicJob function
// Called once per second by the Blynk timer void periodicJob() { if (enable) { if (millis() >= endMillis) { enable = false; #ifdef SERVO_MOTION motionServo.write(SERVO_PWM_STOP); #endif } } if (enable) { Serial.print("Periodic job: currAngle: "); Serial.print(currAngle); Serial.println(); greenLedStatus = (greenLedStatus == HIGH)? LOW : HIGH; digitalWrite(PIN_GREEN, greenLedStatus); unsigned long delta = millis() - startMillis; currAngle = startAngle + (((endAngle - startAngle) * delta) / (duration * 1000)); rotServo.write(currAngle); } }
Future works
The platform was a little bit unstable, so I am going to create a self-stabilizing platform for the GoPro. This is the first prototype, but I am still far away from something that really works
BOM
Quantiy | Description | |
1 | TMC2300-IOT-REF board | Link |
1 | Continuous-rotation servo | |
1 | Micro servo | |
1 | 3D-printed board (see github repo) | |
1 | 3D-printed pulley (for the servo) | |
2 | 3D-printed pulley | |
1 | 3D-printed battery holder | |
1 | Powerbank |
Source code
Source code available on my github repository at https://github.com/ambrogio-galbusera/cablecam