Thursday, February 19, 2015

Cablecam rope considerations

This Blog post is one of an entire series
Motivation and Design
Download Link for CAD drawings (updated regular)
Bill of Materials
Motor and ESC considerations
CableCam rope
Building the DSLR CableCam
CableCam controller board

Rope to use

Initially we discussed various options, steel cables, different types of ropes and at the end after some trial and error the conclusion was, a Dyneema rope with sheath is what we need. It is strong and yet lightweight. Its surface allows for smooth driving without much vibrations. Most important: Its prolongation under load is under 5%.
But it is very expensive.

The best rope currently is this one

The 6mm rope has 2500daN maximum load, it should be used with no more than 60% of that, which is 1500daN or about 1.5tons.

Forces

The formula to calculate the rope force is shown here

Let's try a simple calculation.

The distance to cover is l=100m. The weight of our cablecam is p=3kg. The tolerated maximum slack when in the middle is f=1m.

sqrt( (3/2)² + (3*100/ (4*1)² ) = sqrt ( 1.5² + 75² ) = 75kg

CableCam Controller Board

This Blog post is one of an entire series
Motivation and Design
Download Link for CAD drawings (updated regular)
Bill of Materials
Motor and ESC considerations
CableCam rope
Building the DSLR CableCam
CableCam controller board

Motivation

The goal from the outset was to automate the cablecam as much as possible. While it is okay for one person to drive the cablecam and operate the gimbal at the same time, I cannot film myself without help. It should have a mode where it repeats the same movements on a trigger signal and drives back to start all by itself.

When discussing we came up with a first list of features
  1. Safety mechanism to stay between the start and endpoint always: No matter what the user does with the stick, never drive into the pole the rope is attached on. It is so easy to focus on the live stream of the camera, completely forgetting the braking and as result crash into something.
  2. Acceleration/Deceleration limiter: If you push the stick brutally forward, the wheels would be spinning, the timing belt of the gear might jump over some teeth,... Hence the controller should increase the speed linear.
  3. Point of interest: At a first position you point the gimbal to fixed point, then you drive to a second position and retarget the camera to the some point. With this information the controller can calculate the relative position and when driving the cablecam, it can turn the gimbal automatically facing the same object. Great for introduction shots, when filming once from front, driving by and then from the rear.
  4. Hold position: If the cablecam is driving downhill, the initial brake force might be too weak, the cablecam keeps rolling downhill slowly. But neutral means "Stay where you are".
  5. Record a run and repeat it
Of course we can later add more functionality and more sensors if needed, e.g. LiPo voltage control, alerts, monitoring,....

Requirements

In order to use this controller you need
  1. The OpenPilot CC3D board. No software, just the board.
  2. A receiver sending a Sum-PPMS signal or S-Bus
  3. A way to program the CC3D with a new firmware, best is buying a STM32F4 Discovery board and using its ST-Link Programmer and Debugger
  4. The sensor board with a matching sensor wheel - see below
  5. The Firmware either as source code or the hex file, latest version to be found on github.
  6. Either an FTDI adapter or a Bluetooth module with an on board 7V voltage regulator.

Implementation

Without the controller the RC receiver would be connected directly to the ESC and gimbal. Our controller acts as a preprocessor to the receiver signal with various additional inputs like the current position.


For the gimbal signal the most common behavior of the controller will to simply route the signals through, logically unchanged. The ESC is a problem. When you read our wishlist from above, we actually want the stick to control the speed. 0% means stop, 100% full speed forward. That sounds obvious but actually it is not. Imagine the cablecam is driving downhill a steep slope. For the ESC a 0% means 0% energy - let it roll downhill. And 100% thrust means full energy whatever the speed will be. And downhill, that is going to be fast.
Hence the controller takes the RC input signal as the desired speed and has to turn that into an energy/thrust value for the ESC.
On the steep hill the input of 0% means zero speed and the ESC might get -10% thrust to hold the cablecam at its current position instead of rolling downhill. And +100% speed might mean  20% forward thrust because with this little it rolls downhill already at 50mph.
Regarding the position information, my immediate thought was to use the motor hall sensors. I wanted to avoid any complex mechanics and would have accepted the slippage of the motor as error. Over the months of discussions and testing we found that the mechanics are quite simple and the slippage of the motor wheel not as little as I thought, hence changed my mind.
We drilled into the skate wheel 22 holes, 9mm deep and 3mm in diameter, equidistant on a d=60mm circle. In we gave d3x8mm magnets alternating north/south pole. These are then secured with Loctite.

The distance between two magnets is 8.6mm (=60mm*pi/22), the distance between two magnets with the same orientation 17.2mm. In order to not only measure the rotation speed but also its direction, we need to use two hall sensors where one is always a bit behind in measuring a north/south switch. I have put the two sensors 13mm apart.

These hall sensors (AN1120) work from 3V onwards to 24V and output their supply voltage. Hence a voltage regulator (LM1117 MP3,3 low drop) and its required tantalum capacitor (10uF 16V Typ C) was added to get a proper 3V input to the microprocessor.


Another huge discussion was the microprocessor to use. I insisted on one with enough UART channels, a 16bit hardware quadruple counter for the hall sensor and a convenient way to measure the input RC signals and create my own. The break through idea was to hijack the hardware of a flight controller, the OpenPilot CC3D board.
The 16bit counter makes life much easier and allows counting from 0 to 295m (or from 0 to -295m).

It has a powerful STM32 MCU, lots of timers, even SPI and an EEPROM for saving settings and monitoring information.

Best of all, you get in easily and costs just 20USD.


Usage

The controller should get input mostly from the rc receiver, later support Bluetooth as alternative command input.
The cablecam is turned on and this current position is hence zero. The start and end position is set to -32768 and +32768. Using the RC stick the cablecam is driven either forward or reverse towards the desired end position. The controller checks the rc input and allows the cablecam to drive normally, only the max speed is greatly reduced. If no RC input is received for 30 seconds, the current position is assumed to be the end position, the start position is zero.
From now on the cablecam can be driven between those two points with the programmed speed and acceleration limits. If at any time the speed is so high that the remaining braking distance would not suffice, the controller does reduce the speed at max acceleration.
This video gives a first impression of the positional control

Hardware installation

The CC3D comes with a couple of cables which we use for the various connectivity.



Motor ESC

The Motor ESC with all its three pins is connected to Servo Out 1, the multi-pin connector with the label "1". The ESC does also power the CC3D and all its connected peripherials, hence we need all three wires connected: Gnd, Vcc and Signal-

Sensorboard

The Conn1 connector is the broadest JST-SH 8 pin plug and we use the two outer pins of it.
Pin1 - black - Gnd <--> Gnd
Pin2 - red - Vcc <--> Vcc
Pin7 - grey - Sensor1 <--> S1
Pin8 - white - Sensor2 <--> S2

RC Receiver

Program your RC receiver to produce a SumPPM signal and connect its 3 Pins to the Pin called Servo out 4. In the image above it is the multipin connector with the label "4". Yes(!), the Input from the receiver goes into the Servo Out 4, it is reprogrammed as input.

Gimbal

Servo Out 2 and 3 does produce a normal PWM Signal for Pitch (2) and Yaw (3). As the gimbal board is powered from the same battery like the ESC, they share a common Gnd already and hence connect the signal pins only. Two wires only!

UART for Debugging and settings

The Flexiport provides a serial port to send commands to the CC3D firmware and provide debugging information. The port settings are 38400 baud, one stop bit, no parity.
Attention! Do not connect Pin2 with your FTDI UART-to-USB.
In my case I have connected a pre-configured Bluetooth module here and can use the tablet with a bluetooth serial terminal to send commands.

Installing and using the software

In the google drive folder there is the "CC3D Cablecam Controller.zip" file, which contains all the source code and the CooCox IDE project files. In the bin subfolder the compiled hex file is found.
Flash the CC3D with this hex file by whatever standard methods available to you.

Once all is powered up, open a terminal session with the board and type a first command "$h" followed by a sequence. This will print the help text with all further commands.

One of the first settings you have to make is setting the channels. So type "$i" and you will see the current RC values for each channel and what channel is used for which input function. The first 8 channels are from regular PWM inputs which we haven't talked about yet and the next 8 channels are the first 8 Sum-PPMS channels. Using the command "$i 9,11,12" you would set the Speed Input to the first channel (8+1) of the SumPPMS, channel 3 (8+3) is pitch and channel 4 (8+4) is yaw input.

To make save these changes permanently to the eeprom of the CC3D use the command "$w".

The first test you can make is moving the cablecam manually on the rope. Thus the sensor board will recognize the move, the controller finds that it is no longer at position 0 and will start to engage the ESC to move it back into the proper positon. Hopefully the P, I and D values are a good enough match for your cable cam.

Software implementation

The basic principle is that we read the rc input, based on the last position and current speed calculate the new target position. In parallel a PIC control loop does whatever it takes to drive the cablecam to this target position.





Building the GoPro CableCam - Part 4 - Final Assembly

This Blog post is one of an entire series
Motivation and Design
Download Link for CAD drawings (updated regular)
Motor and ESC considerations
CableCam rope
DSLR CableCam - Bill of Material
DSLR CableCam - Assembly of the two arms
DSLR CableCam - Assembly of the main body
DSLR CableCam - Final assembly
GoPro CableCam - Bill of Material
GoPro CableCam - Assembly of the upper body
GoPro CableCam - Assembly of the lower body
GoPro CableCam - Final assembly
CableCam controller board

Final assembly

To connect the two parts two lock pins d6 50mm (or slightly longer) with extra safety is used.
When connecting the two, the battery holder is on one side, the motor on the other side to balance the CableCam.



The lower body has four holes for mounting a regular sized brushless gimbal control board already and the gimbal itself has to be adapted to the center plate at the bottom.






Building the GoPro CableCam - Part 3 - Lower Body

This Blog post is one of an entire series
Motivation and Design
Download Link for CAD drawings (updated regular)
Motor and ESC considerations
CableCam rope
DSLR CableCam - Bill of Material
DSLR CableCam - Assembly of the two arms
DSLR CableCam - Assembly of the main body
DSLR CableCam - Final assembly
GoPro CableCam - Bill of Material
GoPro CableCam - Assembly of the upper body
GoPro CableCam - Assembly of the lower body
GoPro CableCam - Final assembly
CableCam controller board

The lower body

We start with the CC3D controller board, as this is mounted with the screws on the inside of the body, board is outside. Two times four M3x6 screws and 4 plastic distance nuts M3x6 are used for that.




The SkyRC TS120 ESC will be inside the body, the two pockets are used for the motor cable and the on/off switch.
(You should solder the cables first)


Then eight 30mm distance nuts are mounted with M3x10 screws.


And the other plate attached using another eight M3x10 screws.


With this we are done, all that is left is the motor with its drive dog and wheel.


Building the GoPro CableCam - Part 2 - Upper Body

This Blog post is one of an entire series
Motivation and Design
Download Link for CAD drawings (updated regular)
Motor and ESC considerations
CableCam rope
DSLR CableCam - Bill of Material
DSLR CableCam - Assembly of the two arms
DSLR CableCam - Assembly of the main body
DSLR CableCam - Final assembly
GoPro CableCam - Bill of Material
GoPro CableCam - Assembly of the upper body
GoPro CableCam - Assembly of the lower body
GoPro CableCam - Final assembly
CableCam controller board

Building the upper body including wheels

We start with either of the two upper body parts mounting seven distance nuts 30mm as shown using M3x10 screws. This assumes we will use one battery holder only, else you mound need more.

The triangular shaped parts are the mounting points for the lower body, there M3x12 screws are used. The triangle is not symmetrical, hence hold one of the lower body parts next to it as reference.


The other side part is then mounted similarly...

except for the 4 screws next to the cross, that is the battery holder.

Here M3x45 screws are used.
One side of the sled comes the sensor wheel. It is the side which has an extra 3mm hole to optionally secure it. This skate wheel has 22 magnets on a 60mm diameter circle, magnets are inserted with alternating poles, plus a sensor board. For the wheel itself we need a M6x40 screw, two ball bearings, spacer inbetween and two washers.
Make sure the sensorboard does not have any electrical connection to the metal frame.




Same procedure with the other wheel except that a washer of similar thickness like the sensor board is used here to align both wheels.





Building the GoPro CableCam - Part 1 - BOM

This Blog post is one of an entire series
Motivation and Design
Download Link for CAD drawings (updated regular)
Motor and ESC considerations
CableCam rope
DSLR CableCam - Bill of Material
DSLR CableCam - Assembly of the two arms
DSLR CableCam - Assembly of the main body
DSLR CableCam - Final assembly
GoPro CableCam - Bill of Material
GoPro CableCam - Assembly of the upper body
GoPro CableCam - Assembly of the lower body
GoPro CableCam - Final assembly
CableCam controller board

The parts


Item Qty
hex screw M3x10 26
hex screw M3x12 8
distance nut d3x30 19
hex screw M6x40 2
lock nut M6 2
spacer M6 1
sensorboard 1
hex screw M3x6 8
CC3D 1
plastic distance nut hex screw M3x6 4

Motor and ESC considerations for the CableCam

This Blog post is one of an entire series
Motivation and Design
Download Link for CAD drawings (updated regular)
Bill of Materials
Motor and ESC considerations
CableCam rope
Building the DSLR CableCam
CableCam controller board

Brushless versus Brushed DC motors

Without going into the details of what each is, the difference between the two options are
  • Brushless is way more powerful. The 300g motors we use have 1800Watt of power
  • Their weight is significantly less than an equally powerful brushed motor
  • Brushless motors come in various KV numbers which lets you adjust the rpms by simply exchanging it
  • They are cheaper and easier to get
  • Brushless motors have issues at startup unless they have a sensors built in
  • The Electronic Speed Control (ESC) is way more difficult to build
With the price of current ESCs we have committed ourselves to using brushless motors but they have to be sensored and the ESC has to utilize the sensor input signal.

This way we get the smoothness of the brushed motors with the advantages of the brushless motors. Brushed motors might perform a tick better at ultra slow speeds but decide yourself, I have created a video for that. It also shows the difference between a sensored motor and sensorless, by simply disconnecting the sensor cable.


Picking the right motor and some math

In the intro page of the cablecam I provided an example where a RED camera and gimbal is used. The overall weight is 12kg for the entire rig and they are using an LRP Dynamic 8 1600kV motor at 6s (=22V).

We should now approach the calculation from two sides. First the rpms at no load at all, then the power it provides.

RPM check

For the rpms the KV number is the key. The more windings then motor has, the stronger the magnetic force but at the same time, it will rotate slower. 1600kV tells us that the motor is built to provide 1600rpm per volt. Since we use a 6s battery in this example, meaning 22V, the motor speed would be 35200rpm.
That boils down to 586 revolutions per second (=35200/60).

Since we have a timing belt with 16 teeth on the motor and 84 teeth on the drive shaft, the wheel itself will rotate slower at 112 revolutions per second (=586*84/16).

Let's try to convert that into forward speed. The wheel has a diameter of about 76mm, one revolution means a distance of 238mm (=76*pi) or 0.238m.

If the wheel makes 112 revolutions per second, that is 26m/s (112*0.238) or 96km/h or 60mph.

So from this side we are safe, this combination is fast enough. The only problem might be that the motor does not have enough power. Just imagine above motor is very tiny. It can be rated to any KV number, it will never have enough power to even move the cablecam a bit.

Power check

But actually, above motor provides 1760W power at 14V. How much that might be at 22V the vendor does not tell. It could be up to 2640W if the power increases linear with the volt. Anyway, let's stick to the 1760W.

Power = Force * Speed

Okay, we have a problem here. What will the force be? The force will consist of roll resistance, wind resistance, grade resistance and inertia. So let's try a very extreme example, our cablecam should drive vertically up, what will its possible speed be?

1760W = 12kg * 9.81m/s² * speed
<==>
speed = 15m/s

That's 54km/h or 34mph driving vertically up. In other words that is more than enough power for our applications.

On the other hand, let's assume our rope is not horizontal but goes uphill at a 30° angle. Then the downhill force would be 50% of above. But we want to accelerate the cablecam quickly as well, but at the same speed we would achieve just 0.5g acceleration.


GoPro CableCam example

Motor is a 300kV motor with 1500W at 6s, but we operate it with 3s batteries only. No gear is used, it is a direct drive. Weight overall is 2.5kg.

300kV * 11V / 60 = 55 revolutions per second
55 * 76mm * pi /1000 = 13m/s or 47km/h

750W = 2.5kg * 9.81m/s² * speed
<==>
speed = 31m/s or 110km/h

Here we have an example of a motor that has more than enough power but is limited by the rpms. 

Guess what the GPS measurement showed? 45km/h!

Keep in mind, we have approached the problem from two extremes, the rpms with no load at all and the power. But in reality it is a mixture of the two. Imagine the motor would provide just half the power. For sure it would not be able to reach the rated rpms just based on the kV number. Not even close.

Further more, while an acceleration of 1g sounds like a lot, it actually isn't for the GoPro CableCam. You want to get to to speed quickly, adjust your speed with the object to film asap. I would not opt for a motor with significantly less power. Does work for sure, but limits your options.
That's the beauty of the brushless motors, we do not have to restrict ourselves to low powered motors as their weight and costs are the same essentially.


The proper ESC

Most mistakes are made when choosing the ESC. At first sight, any ESC supporting a brushless motor and the motor's sensor signal would work. Work in the sense of "being able to turn it".

First distinction is car versus plane/boat. An ESC meant for planes is not built for smooth startup, it might not even allow to go into reverse. So such an ESC would be completely useless for us.

For cars there are various types as well: Street cars, Rock Crawler, Truck Puller.
Usually there is not one ESC per type but one ESC either supports all or just street cars.
I would suggest to pick an ESC that supports Rock Crawlers as this comes our application the closest. Slow movements, forward/reverse etc. In particular the ESC should have the following options explicitly called out
  • Sensor support
  • Reverse 100% of Forward speed. We do not want to drive the cable cam at different max speeds depending on the direction.
  • Forward/Reverse mode without brake. We want to put the stick in one position to drive forward and in the other position for reverse. Most ESCs engage the brake when going into reverse and you have to pull the stick back in neutral and into reverse again to drive backward.
  • Drag Brake to control the amount of braking force when the cablecam is moving and suddenly the stick is in neutral. We want a rather high drag brake as stick in neutral means to stop the cablecam asap.
  • Initial Brake to hold the cablecam in position. On a horizontal rope not needed but you do not want the cablecam to roll downhill by itself.
Finally, the ESC has to match the motor. This is not much of a problem with regular inrunner brushless motors but the AlienPowerSystems 300kV motor used in the gopro cabelcam is an outrunner and most ESCs were not even able to bring it up to medium speed.

The ESCs I tend to suggest currently are the SkyRC TS120 for the gopro and the DSLR cablecam, when 3s batteries are enough. Else the TS150.


The best ESC

I have a request for you: Could you please send a suggestion to SkyRC (http://www.skyrc.com/index.php?route=information/companyinfo) to enhance their ESC supporting a Car-Governormode with a sensor motor and in forward/reverse mode?
The idea is the following:
What happens when you put an RC car on a downhill road and the throttle is in neutral? It will roll downhill. Not too fast because of the initial brake setting but it won't stop or stand still. But isn't that exactly what we want? The stick should not control the throttle (=energy) it should control the speed (=rpm). In Heli mode ESCs do have such mode to make sure the rotor speed is the same no matter of the rotor blade pitch. I'd like to have the same for the car forward/reverse mode as well.
That would have numerous advantages:

  1. Above "stick in neutral means stay where you are" behavior would be great already by itself.
  2. The initial brake would consume less energy as it is dynamic. The ESC does reduce the initial brake power in neutral until the car starts rolling, then it does increase it again. So depending on the steepness of the road, it applies more or less power to the motor winding.
  3. Super low speed. Currently you increase the power slowly to overcome the static friction, but the rolling resistance is less and hence the car picks up speed and you have to carefully dial back the throttle. Which does not work well. As a result there is a minimum speed for the car which is quite high in fact. Something around walking speed. If the ESC would consider the input as an rpm signal, it could adjust the power to any kind of speed.
  4. More natural control. With the car you want to control speed, not throttle. Moving the stick from 25% to 50% should double the speed, not double the energy and hence increase the speed by half or less (kinetic law, wind resistance).
  5. Smooth brake control. Today, when you are in the forward/reverse mode and you want to brake, you put the stick in neutral and the drag brake kicks in. The drag brake is a fixed value, so either you are braking with full force or you are not braking, just reducing the energy/throttle. But if the stick position would control the speed, then the ESC would know that you want to decrease the speed to e.g. half the current value and it can by itself activate the drag brake until the target speed is reached and then increase the power to hold that speed. Today you have to move the stick into neutral, wait until the target speed is reached and then increase the power again to hold that speed.
I am of the opinion that such a feature would be excellent for the cable cam but actually for all cars except street racers. Trucks, Rock Crawlers, Buggies,.... all would benefit from such.




Building the DSLR sized CableCam - Part4 - Final Assembly and Motor

This Blog post is one of an entire series
Motivation and Design

Final Assembly

In order to attach the arms with the main body, we could use the same distance nuts and screws as before, but then you would have to remove many screws. Instead we use three M3x45 screws pushed all the way through and lock them with a nut. In order to avoid bending, between is again the d3 spacer of 25mm length.

This allows to assemble and disassemble the arms quickly for transportation.


Motor and ESC

The motor is mounted as shown in the picture below, without tightening the screws yet. It should be moveing still so we can control the tension of the belt later.

Then we insert the motor pulley, which comes from a RipRap 3D printer. Tension the timing belt by sliding the motor downwards and then secure it in place.

The CableCam has quite some holes prepared on one side of the main body for mounting either the TS120 or TS150 ESC.


All that is left is connecting the sensor cable and the three motor wires. Please note that there are 9 combinations for connecting the three ESC wires with the three motor wires, but only two are valid. In most cases it is easy to find out, the motor and the ESC have labeled those A, B and C.