Help with Kinetic Art Project

Hi all,
After months of hard work, I have finally made a replica of this beautiful kinetic art work. Pls see the video below:

As you'll notice, the artist uses his hands to rotate the discs. where as I'd like to use a stepper motor, pulleys, belt and an Arduino to obtain the same result.
I intend to use a sensor to sense a person close to this object. When the sensor is triggered the stepper should move to a position, making a pattern, then stop. Next signal from the sensor, next stop, and so on.
Since regular steppers don't have position feed back I'm stuck on how to to do what I need.
I've looked at ( but have never used) smart steppers, smart stepper drivers, hall effect sensors, optical encoders, etc. But I'm lost on the best choice to implement.
Appreciate your help and guidance.

Steppers use a "home" sensor, usually an optical interrupter with a vane.

Once you know the starting position. you expect the steppers to faithfully respond to the number of steps they are sent.

The problem I can see with that is that pulleys and belts can slip, resulting in misalignments which could ruin the effects. Toothed belts might fix that, or direct drive using a stepper with a gearbox.

Mount a shaft encoder on the driving element and count pulses. Since there's only one direction an incremental encoder would work.

Hi,
I think @ba47 has indicated that he has all the gearing between each disk raken care of.

He basically needs a method of driving one of the disks, but getting it into a home position first,
then count steps to get it to stop at predetermined positions.

Tom... :smiley: :+1: :coffee: :australia:

I'm thinking since there are two gear sizes two sensors are needed - one each on different size gears - to align to indicate the home position.

From the link above,

The two different size gears are in a ratio of 3:4

So 12 full revolutions would be needed to get back to the same point?

Perhaps you could attach a large cog on the rear which is driven by the the motor with a 12:1 ratio. Then only a single sensor would be needed.

Thanks all. Actually, I never got an email notification that I had replies to my post ?!?!? So I just walked in and saw the replies.

@Paul_B I'll be using toothed belts. I tried with a small motor but it doesn't have enough torque. Might need more than one stepper or a bigger one.
@dougp would't I lose track if I have power failure or a shut down with a shaft encoder ?

I've ordered some hall effect sensors and I'm thinking on putting just one sensor on one of the large discs for home position. If the large disc makes x turns to reach home position i.e. original starting position, then I ignore the signal for x-1 times.
Then I'll have an array of stops or revolutions in the software (I think about 10 or 12). I'll then generate a random number which will pick one of the stops in the array and go there.
The drawback is that I'll have to start from home position every time but it seems the easiest way.
Am I on the right track ?

Perhaps having to seek to the "home" position on startup is a "feature"? :rofl:

You could use an absolute encoder.

That won't work. Think about it. You don't know how many signals to ignore. The large cogs reach home position every 3rd rotation. So you might need to ignore either zero or one signals before you get the "real" home signal.

There are also techniques you can apply to sense a power loss and save the current machine state to EEPROM before power shutoff occurs.  When power is restored you retrieve the saved state and continue on.

@Paul_B yes you are right, that won't work. Maybe multiple sensors for each stop on a desired pattern ?
@dougp good idea, thanks.

Over the past few days I tried pulleys and toothed belt but they slip and are hard to deploy.
I'm thinking of re doing the project using discs instead of gears. But that would mean one small stepper like 28BYJ for each disc for a total of 41.
Then my problem will become controlling 41 steppers. I know I can mod those steppers and use only 2 pins of Arduino. So with a Mega I can control 16 of them. i.e 3 Megas as slaves and one as master.
The question before I jump to this approach is will I ever be able to synch all those steppers ?
I tested running continuous servos with a PCA9865 16 channel driver but they go out of synch.

I forgot to mention that all motors should share the same signal since they turn and stop all the same.

The 28BYJ-48 steppers usually come with a little driver board using the obsolete ULN2003 chip. Do not buy those boards, just the steppers. Either 5 V or 12 V versions.

To drive them, use TPIC6B595 chips which are octal shift register drivers, so each will drive two 28BYJ-48 steppers. These are chained so a number of them - potentially up to 22 to drive 41 steppers - can be controlled by just three Arduino pins.

If you propose to use the inconvenient Mega for any reason other than its RAM and code space, you are almost certainly doing something wrong. For a serious project, you should only be using a Nano which is much more practical to assemble than a UNO.

You will still need the 41 "home" sensors though they really should not get out of sync (we are talking steppers, not servos). It may even be good enough to write code to manually set the home position for each of them in turn using a PC connected to the USB! :face_with_raised_eyebrow:

If you do use the home sensors, you want either five 74HC165s or three PCF8575 modules to read them.

Oh! I see. :roll_eyes:

Of course! :upside_down_face: "Continuous rotation servos" are actually pretty useless in general.

@Paul_B THANKS .
Your suggestion takes me back to a post I started months ago, now closed.
Here's the link :

It's very long, 280 answers. But if you scroll to the last post you'll see a post by WAWA who designed and made boards with TPIC6B595 which could control 48 steppers.
He was so kind to send me 2 of his boards. Unfortunately, dumb me, never understood how to use them. I guess I'll just have go back to those boards and see if I can find out how to use them. If you look at the picture of the boards you'll see they are ready to use and professionally made.

One last question pls. Do you think there will be no synch problems ? The patterns require millimetric synching.

Yes, that's the forum thread I had in mind. So it was yours also. :grin:

Well, that is probably what you should use since it is the proper way to control a number of steppers.

For a very lightweight object - such as a balanced disc, half black and half white, there really should be no loss of synchronisation but you may have to do this occasionally, so your choice - use the home sensors or do it manually. :sunglasses:

Yes, keep it simple. Stick to cogs.

Much more complex, much less likely to work reliably or even at all. In any case, you already said:

My suggestion would be to go with your cogs idea. Make one of the shafts of the cogs, one near the edge of the frame, pass thru to the rear of the frame where you attach another cog.

Let's assume the cog with its shaft passing through the frame is one of the small cogs, and those cogs have 30 teeth, and the larger cogs have 40 teeth.

Let's also say that the cog on the rear of the frame also has 30 teeth. You drive that with a much larger cog with 120 teeth. One complete revolution of the 120 tooth cog causes 4 revolutions of the 30 tooth cogs, and 3 revolutions of the 40 tooth cogs, which is one complete cycle of the patterns.

You then only need one sensor on the 120 tooth cog to detect the home position. Your motor can drive the 120 tooth cog with a small cog on its shaft.

Designing mechanisms isn't my forte but try this: gear all the large discs together and all the small discs separately together.  The small discs are still driven by the large ones but add a clutch to disengage the two.  To sync, or resynch, all gears are driven until the small gear home position is reached.  When small gears are homed disengage the small gears and run 'til the large gears reach their own home position.  Release the clutch and reengage the two sets of gears.

YMMV

It's actually an awful lot simpler to just use the original construction - CNC cut gears.

Looking back, I am not sure exactly where ba47 is at present. I think he has built the gear version and simply wants to power it with a motor. A "gearmotor" is the obvious solution with some sensors to determine a "home" and any intermediate positions. A version with independent steppers only really makes sense if you want the option to create different patterns.