So I made this commitment to design a plug and play powered turntable and write a tutorial on it , something that can be built with (mostly) off the shelf parts, including an Arduino. (This isn't about the visible bits of the turntable, just the mechanism that turns it.) Any wiring will be restricted to standard things like switches and pushbuttons, with no circuit building required. The recent post by AnyRail shows one possible approach using a popular stepper motor with internal gearing. I've ordered some of these, and should be able to start testing by the middle of the week. However:
While I understand what a turntable is supposed to do, there are many options for how to control it:
- A simple clockwise/counter-clockwise switch with eyeball alignment
- One button per track-- push the button and the turntable rotates to that track.
- Two buttons per track-- one points the front of the table at the track, the other points the rear of the table at the track.
- Two buttons per lead track and one button for each stall track-- locos will always back into stalls.
- One button per track, and a reverse switch-- the switch determines which end of the table will move to the target.
- A keypad.
- Rotary switch. (Practical limit is 12 positions.)
Keeping in mind that the cost of the Arduino depends on how many buttons you have, what is your preferred control method?
A second issue relates to the installation of the turntable. With a stepper motor system, each track is identified by a step number in relation to the lead. If the stepper has 4096 steps, the stall across from the lead is step 2048. How should these numbers be assigned to the tracks in a particular installation?
- They can be written into the sketch-- which essentially means the tracks have to be aligned to the turntable slots (which seems to be the case with many commercial tables.)
- If the computer programming the Arduino is close by the layout, the numbers in the sketch can be rewritten if the tracks don't quite line up.
- If there will be any moving or addition of tracks, or there is no convenient access to the computer, it may be necessary to make the spots programmable, perhaps by a long press on the target button or by pressing two buttons at once.
The final issue is related to how a stepper actually works. We turn the motor by issuing a series of pulses. Count the pulses, and we can go accurately to a desired spot. However, that depends on knowing where we start. Unfortunately, the zero point is forgotten when the power goes off. How should we tell the system the table is at zero?
- The most common approach is to use a switch or sensor to mark the spot and look for it on power up-- that is the purpose of the song and dance your inkjet printer goes through every morning. It's harder with a continuously rotating system, but I included this feature in my Control the World with Arduino tutorial. However, that violates the no circuit building dictum. (It's also a little disconcerting to see the table start spinning by itself.)
- The system can just assume zero is the start up point. But what if the table was pointing elsewhere when it was shut down?
- The Arduino can remember where it was when power went off. This adds to the complexity of the code, but I'll be writing that. But what if the table gets moved by hand? Power on or off, this will mess it up.
- So there pretty much needs to be a reset button, or a special function for the zero button. This of course opens the system to mischief, because if it's pressed at an inappropriate time, everything gets screwed up. Also, if the table is difficult to turn by hand (and you will need to turn the power off to turn it), a hand drive system is pretty much required.
So, what are your thoughts? Preferred control system, approach to installation, zero method, number of tracks to manage, or any other information and ideas will be appreciated.
pqe
ps. I will also discuss the design as it develops here so I can continue to get feedback throughout the process.