This is an open source project for a simple Arduino based camera slider control program. It goal was to produce a low cost and easy to operate controller that can be pre programmed for simple field use. It allows a series of moves and dwells, each with their own distance, speed and acceleration.
It was programmed for the Arduino Uno hardware.
Warning this is free, DIY, open source software that may include bugs and errors. Use at your own risk. Many things could cause the system run on its own potencially damaging the slider, your camera or yourself. Use at your own risk.
Note: Never do any wiring changes or disconnect any parts with power on.
If you use my Arduino shield, the standard location to put the motor driver is in the X Axis position. Be sure to orient the driver correctly or the voltage will be applied incorrectly and it will be destroyed. See the image. The adjustment pot goes above the capacitor on this version of the the PCB. You can get complete details on the shield in this document.
The motor needs to wire to the shield. It uses the 4 position terminal block right near the driver. Wire it using the colors shown in the image. If the motors goes backwards from what you think it should do when you move it reverse green and black.
You need to power the shield on two position terminal block as shown below. Do not apply the voltage backwards or the drivers will be destroyed. The shield also needs 5V from the Arduino or the drivers will not operate. This means the shield will not operate on its own.
The Arduino also needs power. You can power it either from the USB cable or via it's power connector. See the documentation for the Arduino for information on that. You can power both parts with the same power supply.
The Pololu A4988 drivers can run on voltages from 8-35V and currents up to 2 amps per coil. They will only run at full voltage and current if you can keep them cool which will require a heatsink and fan. The stepper motors are way more powerful than you need. I typically run my setup at about 12V and 0.2 amps. They run quieter at these levels and do not get hot at all. To adjust the current see the Pololu web site or my user guide.
The setup shown below has push button switch in one of the driver slots. This switch allows you to start a saved move program without a PC. The switch is connected to pin 11 on the Arduino. Change this statement in the code if you want to use a different pin.
#define PIN_START_SWITCH 11 // this is the switch used to run the sotred program (high = run)
In the current version, pin 11 is pulled low and switched to 5V. This means, if you do not use the switch, you must either add a 10K resistor from pin 11 to ground or change the code to remove the function. If pin 11 does not have the resistor, it could go high on it's own at any time and start the program. The code chages in the main loop would be like this.
// look for start switch if (digitalRead(PIN_START_SWITCH))
// look for start switch if (false) // never enter this section
Future changes will trigger on the pin 11 going low and use the built in pull up resistor of the pin 11 to make the design work with or without the switch circuit.
Change in setup function
pinMode(PIN_START_SWITCH, INPUT); digitalWrite(PIN_START_SWITCH, HIGH); // turn on pull up resistor
This assumes you have some experience with Arduino. If you are not familiar with then spend some time to play with the examples that come with it.
The serial monitor should now present the menu to you.
I strongly suggest practicing with the setup before you mount a heavy and expensive camera. An easy power off switch might be handy too.
The user interface is a interactive menu system. All commands and parameters are separated with a single space.