Part 1.1 – How difficult can panning a camera be?

Should be simple, wouldn’t you think? Push a joystick and make the camera follow its movements.

…and you run and you run to catch up with the sun,
but it’s sinking.

1973 © Roger Waters, Time

Should be simple, wouldn’t you think? Push a joystick and make the camera follow its movements. And it is that simple, but only to someone who knows what they are doing. We [kind of] did.

Background

For the purposes of this discussion, there are two basic approaches to making a [DSLR] camera(*) pan and tilt. Obviously you need a pan/tilt platform which will accept a camera of that size. But the two approaches may be (1) building a pan/tilt platform, or (2) purchasing a pre-made one. We decided on the latter – building one would be too much.

(*) There are a number of cameras with built in PTZ capabilities – those are mostly IP cameras used in security.

Pan/Tilt Head

We chose the vastly popular Bescor MP-101, which, along with its variants [Hague Camera, Maxwell] seems to rule the consumer market based on its availability and cost. It is a low cost, sturdy built, DC motor based pan/tilt head which can handle loads of up to 6 pounds [2.7 kilograms]. This should be sufficient to load the head with a typical DSLR, a lens and supporting elements [focus and zoom motors].

For more information on the Bescor MP-101, please see here.

For the patent application on the Bescor MP-101 and its variants, please see here and here.

The head and its variants come with a wired remote control, which allows for 8-way control, as well as very rudimentary speed control based on a resistor slider. Although working perfectly good, this will not do as it has a limited range, needs one remote per camera, and lacks automation of any kind. Of course it has to go.

Microcontroller

We want something that is small, something that is portable and has minor power requirements, and at the same time allows for great expandability. And there is no lack of microcontroller boards made for programming once the likes of Arduino [Genuino] came to light. For more on Arduino, and what it is, please see here.

The popularity of Arduino and similar boards allows for a great number of manufacturers to offer a lot of expansion boards and similar elements [shields in Arduino “speak” or breakout boards] that allow for communication, expansion and extendability.

After some research, we settled on the Moteino.

The Moteino, built by LowPowerLab, is an Arduino compatible development platform, based on the ATmega328 microcontroller chips, most similar to the Arduino Uno. What differentiates the Moteino from an Arduino Uno, is the inclusion of a compatible wireless transceiver [configurable both as receiver and transmitter] such as the HopeRF RFM69 and RFM12B. Additionally, the Moteino has an option for a built in SPI Flash chip, allowing for both wireless programming [!] and data logging [storage].

The Moteino can be programmed via the Arduino IDE, and LowPowerLab makes available RFM69 libraries, along with specific example sketches to get you started.

Control

A joystick is much better than a button pad, wouldn’t you think? Also, this makes it possible for the movement to be controlled without directly looking at the button pad, defeating the purpose of having the original remote control in the first place. We wanted control that is [1] precise and [2] repeatable. At the same time, the joystick needs to have a suitable size and form so that it can be easily actuated [no thumbjoysticks!] and it needs to be able to survive moderate abuse.

To that effect, we looked at two options for a joystick controller:

Switch based Arcade Joystick

A typical arcade joystick [specifically “Euro style”], with actuation based on four separate micro-switches. Since the switches operate as momentary switches, they can easily be emulated within the Arduino IDE and act as pull-ups.

Switch Based Arcade Joystick
“Euro” Arcade Joystick, available at the Brainy-Bits shop.

Pros:

  1. Cheaper to acquire.
  2. Available from reputable vendors.
  3. Simpler to implement within Arduino.

Cons:

  1. No variable speed control possible.
  2. Only 2 axes of movement, so cannot implement zoom. (*)

(*) More on this in later articles. Whenever possible, no information overload. 🙂

Potentiometer based PTZ Joystick

More typical for PTZ control systems, these types of joysticks are commonly known as 3-axis joysticks, and allow for actuation along X, Y and Z axes. Actuators are based on potentiometers, read by the Arduino [typically AnalogWrite()], thus allowing for modulation of the output voltage [hint, hint!].

potentiometer_joystick
Potentiometer [3-axis] joystick, available at Super Droid Robots.

Pros:

  1. Allows for variable speed control to be implemented.
  2. Less available from reputable vendors [eBay is your friend].
  3. 3 axes of movement, so can implement zoom. (*)

Cons:

  1. Rather more expensive.
  2. Slightly more difficult to implement than a switch based controller.

(*) Nothing to see here.

Making it Work

Matt Alford, over at Protechy, has published a lot of details about the specifics of the Bescor wire connections. Going over to his website, you can see the diagram of wires and how they connect to the various button pads on the wired remote. This is important to note as we use this to interface with the microcontroller.

The proper approach would be to get a male DIN 7-pin connector [such as this one from REAN], solder some colored wires to it and use it for experimentation. For us, having three remotes meant being able to sacrifice one, so we hacked off the remote and used the wire bare ends.

The colors of the wires, at least on the remote, seem to be standard, and the numbers correspond to the numbered pins on the connector body.

  1. Purple [not used]
  2. Green [direction right]
  3. Black [direction up]
  4. White [Vin @ 6VDC]
  5. Blue [direction down]
  6. Yellow [direction left]
  7. Red [common ground]

Applying voltage to each of the direction wires will move the motor to that direction. And that is what the remote, in essence, does. This is supplemented only by the resistor based slider which varies the voltage thus providing basic speed control. Make the Arduino push these buttons and we should be golden.

But the Arduino cannot push buttons. Well – it can – but that is not really the point here. We want to make the platform wireless, and we want more control than a simple actuator.

So we have to start somewhere, and that is the arcade joystick. (*)

(*) Next time.

Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedInPin on Pinterest

An avid tinkerer, Marjan has dabbled with software, hardware and the occasional guitar (he is not very good at the latter). Could hardly wait on the emergence of IoT, and now will simply not let it go...

...burns fingers regularly on soldering irons.

Leave a Reply

Your email address will not be published. Required fields are marked *