Step 6: Building the Electronics
The code running on the Arduino basically translates serial commands from the PC computer. These commands are then used to perform the following:
- moving the x-axis stepper motor
- moving the z-axis stepper motor
- moving the y-axis servo motor
- reading the x and z axis limit switch
- controlling the LED strip
Controlling stepper motors are very easy. Each stepper is driven by a driver board. By sending a step and direction signal from the Arduino to the driver board the motor can be made to move forward or reverse by one or more steps.
The servo motor for the y-axis is also very easy to drive. The servo actually contains a motor driver board internally. A certain type of digital waveform is sent to the servo to make it move anywhere between the extreme clockwise and counter clockwise positions. Scope captures of this servo waveform are in the attached pictures.