Motors

I may be a mechanical engineer, but I don't relish the idea of designing and fabricating the clockwork mechanisms to accommodate 48 separate motors. Fortunately, the automotive industry has faced exactly this situation, and so they produce a dual stepper motor with two shafts along a single axis meant for dashboard indicators. I have found three manufacturers:

  • Sonceboz (Swiss) makes the 6407. I was unable to find this for sale in low quantities.
  • Juken (Swiss) makes the X40. Again, I was unable to find this for sale in low quantities.
  • VID (Hong Kong) makes the VID28-05. This is pretty widely available. I bought 5 on Aliexpress for under $5 each.

The VID28-05 has two hard stops. In the instrument panel, the controller would force the motor up against its hard stop and then use that as the zero reference. In my case, I need 360° rotation - so the hard stops have to go.

(I'll need to post a video of that procedure here.)

Now that the hard stops are gone, we need a new way to zero the motor. I plan to use a pair of optical sensors for this task, but I haven't gotten that far yet...

These steppers draw very little current (less than 20mW) - so low that you can, technically, drive them directly from an Arduino or a 74HC595 shift register. However, I think that is asking for trouble so I am using an Easy Driver - at least for now. If someone is more adventurous than me, they could save $30 or so by driving the steppers directly from a shift register. I may also try some ULN2803A Darlington transistor arrays, which are about 1/10 the price of an Easy Driver. But at this stage I just want to concentrate on making it work at all - and the Easy Driver lets me do that by sending just a direction, enable, and pulse to each motor.

I added an Eagle library to the files section which contains the VID28-05.

Microcontroller selection

I'm going to start with a regular Arduino Uno. Unless I run out of horsepower, it is cheap and there is documentation for just about any problem I could run into. Obviously I can't control 48 individual steppers with the limited number of pins on the Uno, so I'll use a bunch of shift registers on the hardware SPI bus. I also need to read the home sensors - again I will turn to shift registers, this time just using the regular digital registers - speed is not an issue for homing so I don't need hardware-SPI.

The motors can be driven at up to 200Hz before things start to go south. That means the microcontroller has 5 ms to do any other work between step pulses. The Uno is 16MHz, so that gives us 80,000 clock cycles to play with. I can't imagine that being too few, but maybe sophisticated animations will require more horsepower.

Real Time Clock

The DS3231 seems to be a popular choice and there are plenty of tutorials out there. I bought one and hooked it up. It talks to the micro-controller via I2C.

GPS

The GY-NEO6MV2 was about $10 - it is a GPS board meant for remote controlled aircraft. It communicates via serial. I don't need to know position, but it would be handy to automatically update the time. I'm hoping that even indoors I can see a satellite or two in order to grab the time (not a position fix). Other options include a WWVB receiver or using a cellular data shield to grab the time from the cellular network. The WWVB receiver seems hard to get and expensive, and I haven't spent a whole lot of time looking into the cellular data solution - but apparently GSM has no standard way to get time.