Clock with 48 stepper motors

Hi guys!

Would you be so kind to share some wisdom please. I'm trying to create digital clock made out of analog ones like here https://www.humanssince1982.com/clockclock24

So I will need to run 48 steppers simultaneously. Will be using BKA30D-R5 dual shaft motors. BKA30D R5 Stepper Motor,Auto instrument step motor,General VID28 05|step motor|stepper motormotor motor - AliExpress

My questions are:

  1. Is it possible to drive them with one arduino/esp32?
  2. What is the way to connect them to limited pin numbers?
  3. What motor driver would you recommend?
  4. Something else, that I'm missing :slight_smile:

Thx!!!

I can't tell from your motor link what sort of stepper motor driver is required. If (as I suspect) each motor needs 4 I/O signals then for 48 motors you will need 192 I/O pins - a lot more even than what's on an Arduino Mega.

The video did not work for me so I don't know how fast the motors need to rotate - in other words how many step pulses will the microcontroller need to produce every second. If the motion is slow, or if only a few motors need to move at any one time that is probably not a problem.

You could probably connect a single microcontroller (such as the ESP32) through a series of port-expanding chips but there would be a lot of thinking and soldering.

...R

Find out how many steps (or microsteps) are required for smooth hands movement. This will tell the driver type and total number of timed steps for all clocks. I guess that multiple controllers are required for neat operation.

Here is youtube link to video with "final" product. Hope this works.

Was thinking adding esp8266 to each clock. Motor draws very little power and can be driven directly by the board. So clocks will be controlled via HTTP. Can't decide if it's an elegant solution :slight_smile:

Here is single clock running with this motor: What's The Time, Mr Wolf? An Arduino remote-control clock - YouTube

On that Aliexpress page it says "100% steppers are all new motor, because we are the manufacturer.", so the first step is to ask the manufacturer for a copy of the data sheet.

It should be as comprehensive as this example for a typical X25 stepper

I asked for datasheet. But this one is 720 steps per revolution. 5V and 20mA.

The clock in the vid only has 24 pivot points. So, if you want to "copy" that clock, you'll need 24 motors and a very good knowledge of gearing.

Edit: I was so impressed by the project in the vid that I somehow blocked out the part where the OP said "dual shaft motors".

That's one impressive clock piece of art! I can't help you but ++Karma; for showing something very interesting :slight_smile:

Good luck making one!

instructions

one clock, 2 steppers can be 3 pins if you share the direction pin or
you can use 2 pins if you only ever move one direction and just set the dir pin.

the link shows that he put 4 on a board with drivers and one micro.
Then created a network for the 504 stepper version. with one micro as the orchestra conductor

there is a dual shaft, dual stepper similar to the one you linked, but stacked, not flat, X40 8798
seems to be used for clocks with 2 hands or instruments for cars and the like,

I know that there is a push to never use more than one micro for a project, but, in some cases it is easier and cheaper to have one board with one micro as a module for a larger project.

If I were to do this, I would make a PCB with one Micro, probably a MapleMini, then put the drivers on that board.
and just wire the steppers to the drivers. smaller footprint, the MapleMini is Arduino comparable for digital stuff like this and have 34 pins GPIO pins so despite it's quirks, 4 of them could run your project.

The ESP8266 could work and with a few shift registers, you could do many motors as well.

As a note, the open loop of running steppers will lead to offset errors over time.
manual setting of each motor should not be hard, but would be a pain in a piece of art.
You could put one IR sensor behind each face to detect a hand. Then spin the hour hand and zero it, move it, then zero the minute hand. then put them both to zero. It would take an additional pin per face.

for the project, I would offer to get a couple of each of the motor types and a bunch of A4988 stepper drivers under $1 in lots of 5 on aliexpress

then hook it all up and test it out.

Which is why you would really need complete documentation of those concentric shaft steppers, as you absolutely need them to already incorporate a homing mechanism. :cold_sweat:

itsskin:
My questions are:

  1. Is it possible to drive them with one arduino/esp32?
  2. What is the way to connect them to limited pin numbers?
  3. What motor driver would you recommend?
  4. Something else, that I'm missing :slight_smile:

#1) yes, speed of movement is the deciding factor
#2) shift registers or port expanders
#3) A3988
the A3988, like many drivers takes the signal to step on a single pin, a step pin, and then steps in the direction based on the High/Low of a second pin the DIR pin.
instead of 4 pins per motor, 2 motors per clock face, it would turn it into 4 pins.
possibly 3 pins if you toggled back and forth, long hand, short hand..... and so forth.
more programming to get smooth movement.
#4) if you were to break the whole into bits and use one Mega , mini-mega (smaller form factor) or an STM32 Maple Mini, you could control many motors with a few boards.
The problem is that each board would need to run part of the whole sketch, but like your multi-core processor, this is possible.
Writing the code becomes the issue. Do you try to make one micro do it all ?
Make many slaves that follow commands and have one master that does the timing and then just signals the slaves for what to do ?
My suggestion is to get some motors, some A3988 drivers and your UNO and make as many work as you can to see how you like it.
get a couple shift registerss, more motors and more A3988 drivers and expand the actions of one micro.
at some point you may (or many not) see a lag that detracts from your desired effect.
if it is just lag, then the EXP8266/32, a Maple Mini or a Teensy, would be able to drive pins faster.
as a note, if you run out of memory, these all have lots more so would be a logical step.

Paul__B:
Which is why you would really need complete documentation of those concentric shaft steppers, as you absolutely need them to already incorporate a homing mechanism. :cold_sweat:

a typical stepper will generally, not loose steps if it is operating within it’s power and speed curves.
however, any loss of power and all the ‘typically’ and ‘generally’ go out the window and you must zero them.

you could manually zero them, or if you put an IR sensor or some a Hall sensor, or some such, you might be able to use one pin.
move the hour hand to the sensor, set home, move off home some distance
move the minute hand, home that, then move both to home.

one pin per clock face.

if you use a step/dir driver and one home sensor, that would be 5 pins per clock face.

VID28 user manual-1.pdf (469 KB)

itsskin:
I asked for datasheet. But this one is 720 steps per revolution. 5V and 20mA.

That's impressing, almost unique - steppers designed for analog clocks only :slight_smile:

If you have the data sheet already, you know how to drive the motors.

Given the large amount of time and effort to build and program the clock, consider paying yourself a fair wage and just buying it at https://clockclock.com/

dave-in-nj:
a typical stepper will generally, not loose steps if it is operating within it's power and speed curves.
however, any loss of power and all the 'typically' and 'generally' go out the window and you must zero them.

In other words, not having a homing mechanism is not an option. :roll_eyes:

dave-in-nj:
you could manually zero them,

Just ain't gonna happen! :astonished:

jremington:
Given the large amount of time and effort to build and program the clock, consider paying yourself a fair wage and just buying it at https://clockclock.com/

And the fun in that would be????

Analog stepper clocks include zero and alarm detection, but eventually only a very simple one. My wireless alarm clock starts an update cycle by stepping to 0:00, then advancing after receiving the new time. How could such homing be done neater in artwork?

At the alarm time a click can be heard, regardless of alarm on/off state. All that seems to be built into the basic(?) dual shaft assemblies.

Don’t perform a specific ‘zero/calibrate cycle’ just reset the step counter each time the arm passes the sensor.
You could add a button to cycle all the hands forward by 24 hours to force them all past each sensor...

can't help but notice that a 1 or a 7 is not shown in any of the videos ,
i wonder what they would look like.

perhaps they’d look like a | or a 7 ?