60 lines
2.3 KiB
Markdown
60 lines
2.3 KiB
Markdown
|
+++
|
||
|
date = "2020-05-23T00:00:00+02:00"
|
||
|
title = "Pan/tilt mount for a cell phone"
|
||
|
highlight = true
|
||
|
draft = false
|
||
|
tags = ["pudel", "ros"]
|
||
|
+++
|
||
|
|
||
|
I think it's important to also post about the projects that didn't
|
||
|
turn out. Pudel was a project to automatically track and video a
|
||
|
model plane using a cell phone camera.
|
||
|
|
||
|
![mount](mount.jpg)
|
||
|
|
||
|
The pan and tilt components were modeled in
|
||
|
[OpenSCAD](https://openscad.org/) and 3D printed. The pan unit had a
|
||
|
standard [1/4-20 tripod mount][tri] and the tilt unit had a Samsung
|
||
|
A40 mount that I've used on a few other projects.
|
||
|
|
||
|
[tri]: https://www.matrix-vision.com/manuals/mvBlueFOX/mvBF_page_tech.html
|
||
|
![close](closeup.jpg)
|
||
|
|
||
|
Both were driven by standard [HS-422][hs422] servos with a [Trinket M0][m0]
|
||
|
for I/O and a 2S LiPo through a [6V BEC][bec] for power.
|
||
|
|
||
|
The I/O board ran [CircuitPython][cp] with custom firmware that takes
|
||
|
MIDI-like messages as servo commands. It implemented an
|
||
|
acceleration limiter and velocity limiter to limit the
|
||
|
[jerk][jerk], as the servos are capable of 60 deg/0.2 s which is much
|
||
|
faster than the plane would move.
|
||
|
|
||
|
The host side was going to be similar to Kieferbot and use ROS with an
|
||
|
IO specific node, OpenCV based detection, and a PID controller to keep
|
||
|
the plane centered in the frame.
|
||
|
|
||
|
So why did it fail?
|
||
|
|
||
|
- The servos aren't intended for precise, slow movement and hence had
|
||
|
mild jerk.
|
||
|
- There was too much slack in the mechanics, and the phone was mildly
|
||
|
heavy, so mild jerk caused the phone to move about too much.
|
||
|
- The plane is too small to resolve on a wide angle lens, so tracking
|
||
|
was unlikely to work.
|
||
|
|
||
|
If I wanted to take it further, I can imagine some improvements:
|
||
|
|
||
|
- Take the load off the pan servo. The tilt unit sits directly on top
|
||
|
of the pan servo shaft and there's not much material to sit on which
|
||
|
increased the shake. Perhaps add a turntable style plates that most
|
||
|
of the downwards force could go through.
|
||
|
- Decrease the arm length out to the phone. It's 30 mm and reducing
|
||
|
to 20 mm would reduce the load on the tilt servo.
|
||
|
- Try a phone with optical stabilization.
|
||
|
|
||
|
[bec]: https://hobbyking.com/en_us/turnigy-3a-ubec-w-noise-reduction.html?___store=en_us
|
||
|
[cp]: https://circuitpython.org/
|
||
|
[hs422]: https://hitecrcd.com/products/servos/sport-servos/analog-sport-servos/hs-422/product
|
||
|
[jerk]: https://en.wikipedia.org/wiki/Jerk_(physics)
|
||
|
[m0]: https://www.adafruit.com/product/3500
|