Android Controlling DC Motors using the AndroiDAQ Module Part 1

This is the first in a series of articles that we will write to help AndroiDAQ users understand basic electronics and the fundamentals in interfacing these electronics to a microcontroller circuit such as the AndroiDAQ module and more specifically how to get the most from your AndroiDAQ module using these fundamental interfacing techniques. 

In this article we will explain the basics of DC motor operation and the necessity of using a DC motor controller circuit when interfacing to any micro-controller, including the one used in the AndroiDAQ module. Upon completion of this series of articles, you will be able to build a DC motor controller circuit that when properly connected to the AndroiDAQ module, will enable you to turn on and off two DC motors, control the direction of rotation of the two DC motors, and set the speed of the two DC motors with your Android device using the AndroiDAQ DEMO program. 

A DC motor is an electromechanical device that operates on direct current (DC) and is a device that for turning DC power into mechanical power. DC is the power, or electricity, that we get from power sources like batteries. DC is a single direction flowing type power, meaning it flows in one direction from one terminal of the battery, through the component that it is connected to, to the other terminal of the battery. DC motors use this single directionality of DC power to turn the armature of the motor in one direction using electromagnetic forces. If one were to switch the terminals of the battery connected to the DC motor, so that power flows in the opposite direction through the motor, the motor rotational direction will change to the opposite direction. 

Electromagnet

Electromagnetic forces are produced in a DC motor’s armature when power is applied to the motor. This is due to the armature having many windings of wire wound around it. A physicist named Andre-Marie Ampere discovered that when DC power is applied to any wire, a magnetic field is produced. It was also discovered that this small magnetic field in the wire can be enhanced by winding the wire around an iron core many times, much like the windings around the armature of the DC motor. This produces what is called an electromagnet. When DC power is applied to an electromagnet, a polarized magnet is produced, meaning that it has a north and south pole. If the DC power connections to the electromagnet are switched, the north and south poles of the electromagnet are also switched. This is an important concept to remember as this switching is what is happening in a DC motor to make it turn.

Simple electromagnet2

The DC motor not only has a wire wound electromagnet armature that is supported by its axles, but it also has stationary magnets, call field magnets, that are cemented inside the motor and surround the armature. You may have experimented as a kid with two magnets and found that if the magnets were held together in one direction, they would stick together and if you turned one magnet completely around that they would repel or try to pull way from the other magnet. This polar or north to south attraction and south to south or north to north repulsion is a physical phenomenon that causes a DC motor to turn. 

If we were to apply DC power to the wire wound electromagnet armature that is surrounded by the stationary field magnets, the north to south attraction would cause the armature to turn slightly until the electromagnet armature aligns with the north and south poles of the field magnets and the armature would stop; not very useful for turning electricity into mechanical power. To solve this stationary alignment of the armature to the field magnets, a commutator was developed. A commutator can be thought of as a switch whose on and off positions are aligned such that when the armature’s north and south poles is almost aligned with the field magnet’s north and south poles, the commutator switches the DC power connections to the armature coil to the opposite direction, causing the attraction/repulsion of the electromagnetic armature to also be opposite of the field magnets, which causes the motor to continuously rotate around on is axles in one direction. 

Electric motor

There are many DC motor theory and DC motor building articles and references on the Internet. One fun project and article that we found on the net is called “The Simple DC Motor: A Teacher’s Guide”. This article/project contains a basic motor theory lesson and instructions on how to build a very basic and simple DC motor. I suggest that you try building this simple DC motor to get a feel for the inter workings of a DC motor, as I feel that hands on learning is the best way in helping you to understand any subject, which also helps in the making of a good foundation in education and engineering. Besides, building that simple motor in the article was fun, even for old pro like me.

We invite you to read more about the AndroiDAQ data acquisition module for Android, LabVIEW, JAVA, and Python: About the AndroiDAQ module.

 

AndroiDAQ with xBee WiFi module