Arduino Pulley System for Art Installation

Hi guys. I am software developer dealing with arduino for first time.

I am developing a system for an art installation which is as follows.

Brief description -

The art installation consists of a grid made of ropes which is 12 meter x 12 meter (144 sqare meter
area). The internal squares of the grid is 1 meter x 1 meter each. The rope will be around 7.5mm to 10mm
in diameter. The grid will be suspended by its four corners using fishing line strings for each corner.
Three of the corners will be tied to fixed points(static) and the fourth will be suspended by a pulley(dynamic) fixed
at the same height. The pulley will wind / unwind a maximum length of fishing string to suspend one
corner of the art installation depending on some variables. (most likely time of day/night).

Grid would be suspended at around 10 feet height in air using strings.

I don't have the grid to calculate its mass yet. So please ignore the lack of torque / mass calculations if any. They are not a concern for now.

Main purpose -

The main purpose of the pulley system is accurate position control. The pulley should wind / unwind certain lengths of string depending on time of day. I would be using an Arduino Uno with a DC motor
with quadrature encoder for the same (Components being considered listed below).

The entire setup would run for 12 hours per day. But the motor won't rotate all the time. The motor
will rotate minimum 15 to maximum 40 times per day. Each time for around 1-2mins depending on variables.
This setup would be running for 3 months straight.

Thoughts on Impementation

The basic idea is I would have to write a PID loop or use PID library from Arduino Playground. Based on the circumference of the pulley and having encoder counts per rotation (which is given), I could calculate how many counts would be required to wind/ unwind a length of string of unit length.
say for e.g. 1mm. From that data I would be able to rotate motor to wind/ unwind exact amount of string
required.

For e.g
pulley radius = 2cm
therefore, circumference = 2 * 3.142 * 0.02 = 0.12568 meter = 125.68mm
therefore 125.68mm of rope will be winded/unwinded in one rotation.

encoder has 44280 counts per rotation.
therefore in 44280 counts, 125.68mm of string is unwinded/winded.
how many counts to rotate 1mm of string?
by cross multiplication we obtain, 352.32 counts for 1mm of string to rotate.
Say, Max. limit for string to be unwinded is 2 meter.
2 meter = 200 cm = 2000mm
Therefore to unwind 2 meter string we would require 2000 * 352.32 = 704640 counts.

I have few questions as follows -

  1. In PID, Can I use setpoint as required number of counts and use input as counts from encoder? And
    keep the PWM constant for constant speed (Maybe 25% duty cycle?)? This would require me to
    maintain a track of how many counts have elapsed in order to avoid the counts from going higher or
    lower than a certain thresholds.

  2. I have been using a low power 12v geared dc motor with L298N driver for testing. But I read that
    the L298N module is not good for running longer periods due to problems with overheating. Anyway,
    since the module only outputs 4amps total and my motor requrires upto 7.5amps I won't be using it.

But I mentioned it because, usually I have seen that encoder pins are connected to arduino board.
But the motor driver given below (RMCS 2301) has pins for encoder input too.(unlike the L298N)

So I am wondering how would I be able to read those values from encoder as they would be conencted
to motor driver instead of arduin?.

  1. I see there are pots for P, I and D gains on the motor driver itself. Why are they there? Does the
    driver have a built in PID controller? If yes, does it mean I can't / don't have to write PID controller
    through software in arduino?

  2. Motor is 12v and uses up to 7.5amps max. Would a 12v 8.5amps power supply be enough?

  3. In manual for motor driver it states, its good for power supply to have -ESR decoupling capacitors. I
    read up on wiki about it. Does the power supply given below have it? How can I know that?

I have Arduino Uno and am considering the following.

  1. Motor RMCS 3012
    Datasheet for Motor RMCS 3012

  2. Motor Driver RMCS 2301
    User Manual Motor Driver RMCS 2301(I could not find datasheet for this. There was only user manual.)

  3. 12v 8.5amps AC to DC Power Supply

just a note, but I think that the length of string is based on radius plus 1/2 diameter of the string

I’d probably use high power stepper motors with limit switches instead of DC motors with PID loops. Stepper motor control is much easier to implement and is a more accurate technique.

Stepper motor control ... is a more accurate technique

Not correct.

Without encoders, you cannot determine whether a stepper motor has stalled or skipped steps. Microstepping is not accurate, and gearing down a stepper motor leads to backlash problems.

With analog motors and encoders, the precision can be much, much higher than with stepper motors (10,000 counts per revolution is not uncommon), and positioning to one encoder count is practical.

For these reasons, industrial position control is very often accomplished with brushed motors and high precision encoders.

@OP: your questions are premature. You need to construct the rope grid, measure its mass and the forces required to make it move in the desired way, before thinking seriously about which motors/gearing/encoders to use. 26 x 12 m lengths of rope, 10 mm diameter will weigh more than 20 kg.

For the line drive - I'd suggest (as I did in a previous thread), to use a capstan method - with the excess string hanging out the 'back' of the exhibit with a counterweight equivalent to the mass of the primary load.

This almost completely eliminates the torque requirement of the string motors.
I'd also go for DC motors on an H-bridge - for speed and torque - with an encoder driven from the rope movement (and a spring idler so there's no intermediate slippage).

Speed, low-cost, positioning accuracy and a big project!

That sound like a total of 312m of rope ( 2 x 13 x 12 ). Three strand polypropylene at 10mm dia is roughly 3.6kg/100m. So on the safe side that is 12kg of rope. That is not that much and the motor only has to pull one corner of the square. A stepper is only going to stall or skip if it is undersized. I would have thought a stepper would be a good choice.

I am curious as to why you think you need PID ?
if you are going to raise only one corner, there is some visual effect to be created, but you can program in a ramp up to speed any holding position, and ramp up to other speed, any other holding position.

I would expect that for most such applications, speed and distance would be all that is needed.

And since most PID is just to maintain a setpoint, the movement of a thing may have more than 2 points, ergo, a variable or multiple setpoints.

Also to blend your first post and jremmington's about accuracy, measuring
to be able to resolve 0.0028 mm on a thing that is 12 meters on a side, is some really-really fine resolution.

ardly:
That sound like a total of 312m of rope ( 2 x 13 x 12 ). Three strand polypropylene at 10mm dia is roughly 3.6kg/100m. So on the safe side that is 12kg of rope. That is not that much and the motor only has to pull one corner of the square. A stepper is only going to stall or skip if it is undersized. I would have thought a stepper would be a good choice.

at this time, we do not know the application.
it's all about the application....
if this is for a presentation of a micro-manometer with a 12 meter pointer and the pulley is to rotate that 12 meter pointer with an accuracy of 1/10 of 1mm on that dial, then this is all about resolution.
if this is to create a wave effect of balls in a tub, or overlaying different strips as to show two different pictures, the speed and positioning are more important.
a stepper is much better at low RPM, delivering most of it's power at the very low end, then tapering off as speed increases.
a DC motor delivers it's power at full speed, with loss of power as speed decreases.
a stepper can be 'considered' infinitely strong at zero speed and have zero power at high speed, a DC motor is the inverse.
the feedback of the encoder blends the two weak points to make them overlap in applications.
I do not like a stepper in this as the power needed to maintain position will make the motor very hot.
but, without knowing the actual application, the OP has to pick and choose and experiment.
I am a big fan of use what you got, overcome, adapt, make it work, figure out the problems and re-group, re-adjust, overcome, adapt, make it work.
BTW, if you need a stepper to handle this, and you are anywhere near NJ, let me know. shipping of a 30 pound NEMA 42 round stepper that is a foot long may be as hefty as the motor, but hey, not everyone has such a beast.

PID doesn't make sense in this application at all, unless you want to keep the speed of the motor constant during operation. It's quite easy to let a motor run for a specific length: switch on the motor, start counting pulses from your encoder, then when the required length has been measured switch off the motor again. No PID or anything fancy needed. PWM control: depending on the motor type and whether you need to change the speed of the motor. I would expect it to be geared down so full speed is a good overall speed to raise/drop your installation.

Another thing: you described having a square, suspended from four corners, and then lifting only one corner. That means that very soon the square will basically be suspended on just two corners (the lifting corner and the diagonal opposite one), if in perfect balance - or more likely, leaning to one of the two other corners depending on which side is the heavier. So one corner's suspension rope will be slack, and one have a small strain (the imbalance), while the other two effectively carry the full weight. That means your motor has to lift half of your contraption, which can easily be like 50 kg (and the whole contraption 100 kg).

It would be much better (safer, and better control overall) to have a pulley system on at least two corners. Then at least you know which edge of the square is going up and you distribute the weight better over four wires.

I am assuming it's a rigid square of course. If not rigid, it'd make much more sense to me to have four motors on all four corners, so you can manipulate the whole thing and lift it to just about any angle and direction.

Three of the corners will be tied to fixed points(static) and the fourth will be suspended by a pulley(dynamic) fixed
at the same height.

dave-in-nj:
I am curious as to why you think you need PID ?
if you are going to raise only one corner, there is some visual effect to be created, but you can program in a ramp up to speed any holding position, and ramp up to other speed, any other holding position.

I would expect that for most such applications, speed and distance would be all that is needed.

wvmarle:
PID doesn't make sense in this application at all, unless you want to keep the speed of the motor constant during operation. It's quite easy to let a motor run for a specific length: switch on the motor, start counting pulses from your encoder, then when the required length has been measured switch off the motor again. No PID or anything fancy needed.

Hi. That was exactly what crossed my mind a few weeks ago. But will the motor positioning be accurate enough with just the counting of pulses from encoder? Speed won't be an issue as we will be keeping it constant.

Also, can I map a potentiometer to a certain length of rope as per the calculations?

Here are the calculations which I did.

Given

  1. Motor has 29520 counts per revolution

Assuming

  1. Circumference of pulley = 5cm

  2. Max length of string allowed to wind/unwind = 2m = 200cm
    5cm completes 1 revolution, thus 200cm complete in 40 revolutions.
    Hence, Maximum allowed degrees = 360 * 40 = 14400 degrees
    and Maximum allowed counts = 14400 * counts per degree
    = 14400 * 82
    = 1180800 counts


Calculate counts required to cover a certain distance.

Therefore,

for 360 deg - counts = 29520
for 1 deg - counts = 29520/360 = 82 counts ...(1)

for 360 deg - distance covered = 5cm
for 1 deg - distance covered = 5/360 = 0.0138cm ...(2)

If we want to unwind rope by 100cm, then counts required are given as follows.
Degrees required for 100cm - 100/0.0138 = 7246 degrees
Counts required for 100cm - 7246 * 82 = 594172 counts

If we want to unwind rope by 66cm, then counts required are given as follows.
Degrees required for 66cm - 66/0.0138 = 4783 degrees
Counts required for 66cm - 4783 * 82 = 392206 counts


Controlling winding, unwinding using potentiometer.

  1. Potentiometer inputs value from 0-1023 range inclusive.
  2. Map values from 0-1023 to 0-desired counts.
    i.e. map 0-1023 to 0-1180800

Would this work?

lastchancename:
I'd also go for DC motors on an H-bridge - for speed and torque - with an encoder driven from the rope movement .

Yes. I am selecting a DC motor with encoder. But the L298n would not be suitable. Any other alternative H bridge driver which could drive high current motor?

lastchancename:
(and a spring idler so there's no intermediate slippage)

I'll read up on this.

Rather than PID, use simple S-Curve ramping if needed...
That's simpler, and avoids overshoot (or target bounce) if that's a problem.

lastchancename:
Rather than PID, use simple S-Curve ramping if needed...
That's simpler, and avoids overshoot (or target bounce) if that's a problem.

Hi. Would a simple distance calculation based on encoder pulses with constant and low motor speed work? Like I have done in post #10?

Normally the motor will be driving the actual take-up roll, and the circumference changes as the layer of rope on it increases. How much depends on how thick your rope is; and whether it's a problem for you depends on the accuracy you need. This may very well be good enough for your installation (as it's an arts installation with a fixed amount of rope going back and forth, not an industrial application where you actually measure how much rope you're winding on a roll or so). By using a second pulley (free running, with encoder attached to it that measures the rotation) you'd be able to get much better accuracy but it'll be a bit harder to do the overall control.

You apparently have a stepper motor, which when powering the take-up roll would of course greatly simplify the project. If "move up 100 cm" is "turn left for 594172 steps" (and you don't care if it's 95 or 103 cm in reality) then that's the way to go.

The motor normally powers the take-up roll as that prevents slip, and it takes care of all the excess rope.