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 -
-
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. -
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?.
-
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? -
Motor is 12v and uses up to 7.5amps max. Would a 12v 8.5amps power supply be enough?
-
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.
-
Motor Driver RMCS 2301
User Manual Motor Driver RMCS 2301(I could not find datasheet for this. There was only user manual.)