Motor Control Demo

This section will teach you how to construct the circuit and how to control the motor.

This is a video of the motor control demo:

Video 2
(If you cannot watch YouTube, please click here for YouKu)

In the motor control demo, the pendulum base motor turns clockwise for 1 second and then turns counterclockwise for 1 second, and repeats this motion afterwards.

This is the motor and motor controller:

motorandcontroller
(The motor controller datasheet, please see DOWNLOAD section.)

This is the electrical connection of this demo:

motordemocircuit

Note that we are using Arduino MEGA 2560, thus before uploading the program to Arduino, don't forget to check if this is selected in Arduino programming software:

arduino0022

Also note that the Arduino programming software we use is version 0022.

Program Codes

This is the program code: (available in DOWNLOAD section)

motor_control_demo.pde

motor_demo_1

motor.pde

motor_demo_2