top of page

DIY 4-axis camera motion control - The PC GUI

  • Immagine del redattore: Maurizio Schnabl
    Maurizio Schnabl
  • 30 mag 2016
  • Tempo di lettura: 3 min

Let’s talk now about the Motion Control System.

The goal was to create fluid repeatable real time camera motions. The professional systems available are used mainly for filming products or miniatures.

The system I developed is based on an aluminum base that slides on two-meter steel pipes.

Slider Console - Tab 1

The base is provided with a pan/tilt video head.

The base movement rely on a synchronous belt-driven system (T2.5 belt and pulleys)

The head can load a DSLR- or similar camera. I’ve been using a Blackmagic Pocket Cinema Camera for my tests, mounted inside a custom aluminum cage I devolped.

On the aluminum base of the motion-control system there is an Arduino Due board based on the Atmel SAM3X8E ARM Cortex-M3 CPU, with an Arduino CNC Shield v.3 on top of it.

The shield is provided with four SilentStepStick - Trinamic TMC2100 Stepper Motor Driver that drive four stepper motors (slide, pan, tilt, focus).

The base and head movement are controlled remotely from the PC with a java-based GUI.

The communication between the PC and the Arduino Due is performed via an HC-06 bluetooth module mounted on top of the board and is based upon the open source Ardulink 1.0 solution.

The baud rate selected on both pc and the Bluetooth module is 115200.

Here are the Graphic Interface screenshots.

The first tab manages the connection between the pc and the Arduino Due module. In the lower bar, from left to right, there are:

  • A Lanc (Logic Application Control Bus System) Controlled record button that triggers the rec button on the camera, specific for the Blackmagic Pocket Cinema Camera (REC)

  • A drop down to select the number of keyframes/points the user can choose to program.

  • A push button to reset all programmed values both on the GUI and the connected board (Reset),

  • A push button to trigger the graphical representation of the movement to be displayed in the Graphic Panel tab (DRAW PATHS). The curves displayed are based on the algorithm selected and the number of keyframes programmed.

  • A push button to activate the movement using interpolated curves created from the number of keyframes programmed (MOVE),

  • A button to activate the movement using the AccelStepper library that supports acceleration/deceleration (MOVEA)

  • A toggle button to instruct the system if the curve computation must be done in real-time or stored in advance on the Arduino Due RAM (Realtime)

  • There is also a power indicator not yet implemented.

The Live Action Panel tab has four mouse drag sliders, each with a one axis Joystick-like behavior, that is to say the slider indicator returns back to idle state when released. The more the slider is far from zero the more the stepper motor speed is high. The slider indicator is centered on zero value in order to drag it in both forward and backward direction.

Below the sliders on the left there are two panels containing the button used to store the Home and Target position. Once the button are pressed the text fields below are populated with the value of the current position of the stepper motors.

There are two more panels used to select the interpolation parameters of the computed curve based on the keyframes programmed. The last frame (“Delays”) is used to specify the user delays when the movement is based on the Accelstepper library , that is to say the user can program how long the camera should be remain paused between every two segments.

The Keyframe panel is used to set a maximum of nine keyframes beyond the Home and Target keyframes.

The Global Setting Panel tab contains two mouse drag sliders to modify the speed and acceleration/deceleration of the motors. Immediately below there are two panels containing buttons to move to the Home and Target positions with the speed and acceleration selected. These movements are based directly on the AccelStepper Arduino library.

The Graphic Panel tab is used to give a graphical feedback of the motors programmed movement. In addition to the motor curves there is also a white colored curve indicating the computed global speed.

The x-axis represents time and the y-axis represents the relative number of steps for the motors and the steps per second for the speed curve. The curves are normalized to the curve that for the given programming has the maximum number of steps to be done. In this way we have a graphical overview of the programmed movement. To display the curves, if the keyframes have been already setup, we need to push the “Draw Paths” button on the GUI lower bar.

I based the development of the GUI on the Ardulink 1.0 source code (https://github.com/Ardulink/Ardulink-1). I used NetBeans IDE to edit the project. I modified the Console java class and rewrite several swing components to suit my needs. Here is the link to the modified Ardulink Master Project.

The code is far from being optimized but it works!

And here is the link to the executable application that relays on java version 8

 
 
 

Comentarios


RECENT POSTS:
SEARCH BY TAGS:

© 2016 by ON THE MOVIE. Proudly created with Wix.com

  • b-facebook
bottom of page