This is a sample project that can also be used as a tutorial. It has the wiring and the Arduino code necessary to test three types of motors used in many DIY IoT projects. It can be used as reference for how to get started with one of these motor types. It can also be used as a test rig to ensure a motor still works or confirming wiring since these motors come in varying configurations with sometimes inconsistent wire colors.
First is a stepper motor. Check the parts list for the exact model and driver board. The code imports an easy to use and robust library that does much of the heavy-lifting with regards to the Arduino outs to the driver board. The power requirements of these motors exceed the available current of an Arduino Uno or Pro Mini. As a result, you will need an external 5Vdc (or variable set to 5V) power supply.
Next is a continuous motion servo. They do not have a lot of torque but can be used for things like prop. on a small DIY boat or drive wheel for a small car. Either the Arduino 5V power or external is sufficient here. You command, via Arduino code, the speed and direction for the motor and it will run continuous at this speed.
The last motor type is a 180 degree positioning servo. You command a position between 0 and 180 degrees and the motor will move to that position and hold. These motors are useful for positioning applications like pick-and-place and other robotic rotary applications.
Comments
Please log in or sign up to comment.