Each of you has an Arduino kit which includes an Arduino circuit board and a variety of components. Please take a few minutes to look through your components to figure out what is there. You may not use everything that you have in this lab, but it is good to know what is there for future projects you may decide to complete.
Next, you’ll want to install the software programming environment used with the Arduino. The software, called an IDE (integrated development environment), allows you to write code which will then be uploaded to the processor on the Arduino board. The main organization provides two methods for communicating with your Arduino.
Whichever method you choose to use, make sure you can get successfully connected to your Arduino.
A breadboard is a simple component intended to help you prototype electronic devices without needing to solder anything. The two columns on either side of the breadboard are called the “power rails” as these will typically be used to supply power to the board. Most components run on either 3.3V or 5V. The rows in the middle are where you put your components, each row is connected so things can be wired together.
There are several ways to power your Arduino and your associated components. The board can be supplied with power either from the DC power jack (input voltage between 7-12V), the USB connector (5V), or the VIN pin of the board (7-12V). Most of the time you will probably supply power to the board via USB since you will have the board connected to your computer using the USB cable anyways. The USB port on your computer outputs 5V with a limit of 500 mA of current.
For the components that you connect, these can be supplied power either directly via the Arduino or separately using the included power supply module. This module fits conveniently on the breadboard and can supply either 3.3V or 5V to each of the power rails.
Your kit includes a 9V battery with an adapter to use with the barrel jack on the Arduino or power supply module though you may wish to purchase a 9V power adapter in order to not rely on batteries as batteries will not last very long if using components with higher current draws such as motors.
Motors are some of the more commonly used components in mechatronic projects. There are three main types of motors that we’ll focus on here: DC motor, servo motor, and stepper motor. For further reading on motors, see these notes on motors.
A DC motor is a simple motor that uses electrical current running through windings of wire to generate a magnetic field. By introducing a permanent magnet and alternating the direction of the electrical current, the motor can transform electrical energy into rotational motion.
DC motors are good for providing high speed rotation but not very high torque. To get higher torque from a DC motor typically requires using a gear reducer which reduces the rotational speed and increases the torque. It is also difficult to control a DC motor to a specific rotational position. Therefore, a DC motor is most useful when you need to spin something quickly but not drive it to a specific position.
A basic servo motor consists of a DC motor, a gear reducer, a potentiometer, and some control electronics. The embedded DC motor provides the rotational motion, the gear reducer slows down the rotational speed, and the control electronics allow you to get some positional control as feedback is provided by the potentiometer.
A stepper motor is a motor that provides more precision in rotation than a DC motor or servo motor. Control of a stepper motor is a little more difficult because there is a specific pattern of electrical pulses necessary to make the motor rotate. Fortunately, there are provided libraries which make this easy to implement. Stepper motors generally do not rotate as fast as DC motors, but they provide good positional control and high torque for applications which require these things. On the downside, they are significantly more expensive than the alternatives.
As you dig into using your Arduino and explore its functionality, make sure you are making use of the ample online resources. Here are some to get you started.
Also, programming in Arduino is grounded in the programming language C++. Some resources for learning C++ programming.