GERARDO MORA - FAB ACADEMY

Week 10: Output Devices

This week we reviewed different electronic output devices, which are common in consumer electronics and retail products. As an individual assignment, I added an output device to a microcontroller board I designed and programmed it to do something. The power consumption of different output devices was measured as part of the group assignment. Click here to check on this week's group assignment page.

Work log

Completed tasks

1.What is an output device?

In electronics, an output device is a component that converts electrical energy into a form that can effectuate a change in the environment or be perceived by humans or other systems. Examples of output devices include LEDs, LCDs, buzzers, speakers, and actuators, such as DC, servo, or stepper motors. When selecting an output device, it is paramount to consider factors such as power consumption, brightness, size, and the type of signal it needs to respond to.

2.Which output device I worked with for this assignment?

As I mentioned on my final project page, I am working on a revised version of a mobile robot with transforming wheel legs that I developed during my master's degree studies. Similar to the previous version, I plan for each wheel-leg to be actuated by an individual motor. For the variable geometry, I intend to maintain my current actuation scheme, which utilizes a micrometal gear motor paired with a metallic worm drive.

My current system comprises eight micrometal gear motors. I opted to control each motor using a commercial DRV8871 board, as my project's initial goal was to measure the current for each motor during operational cycles. I planned to use these current measurements to develop strategies for gait and wheel transformation. Since each DRV8871 needed to be powered individually, I was able to measure the current for each motor accordingly.

Each DRV8871 was controlled by a Teensy 4.1 development board. As I mentioned during week 4 , this board costs around $50, which represents a serious blow to a project budget whenever one of those boards is damaged, as has already happened during the development of my robot. Although the processing power of the Teensy 4.1 enables complex control algorithms, my project's objectives do not require such processing power for RTK navigation. For this iteration of the robot, I have decided to replace the Teensy 4.1 board with a Xiao ESP32C6 board. This new setup will be used in conjunction with four Attiny 1616 MCU boards. For this week's assignment, I designed and tested my own versions of an Attiny 1616 breakout board and DRV8871 drivers.

3.What is a micrometal gear motor?

Micrometal Gear Motor

To understand what a micrometal DC motor is, we should first explore its broader category, the DC motor. A DC motor is a device that operates on direct current (DC) and converts electrical energy into rotational motion. The most common type of DC motor is the brushed DC motor. In these devices, current flows through coils in the rotor, creating interactions between magnetic fields that cause the shaft to rotate. Brushes and a commutator work together to ensure that the torque remains correctly directed as the rotor turns.

In a DC motor, voltage primarily affects speed, while current is mainly responsible for torque. Voltage acts as the driving force that pushes electrical charge through the motor. When the voltage applied to the motor increases, it typically results in a faster spin, as the motor can achieve a higher rotational speed before the internal opposing voltage, known as back EMF, balances the supply. As the motor operates, it generates a voltage that opposes the applied voltage. The faster the motor spins, the greater the back EMF becomes. The motor's speed continues to rise until the applied voltage is approximately equal to the back EMF plus any losses in the winding.

Current flows through the windings, creating a magnetic field in the rotor, which in turn produces torque. In a brushed DC motor, torque is approximately proportional to current. When the motor experiences a heavier load, it draws more current to generate the necessary torque. On the other hand, when the motor spins freely with little load, it needs less torque and, as a result, uses less current. As the load increases, the motor may slow down slightly, which reduces the back EMF. This reduction permits more current to flow, and the additional current results in increased torque.

While a motor can spin very fast, its output is often connected to a gearbox that reduces speed while increasing torque. The speed of a motor refers to how quickly it can rotate, whereas torque indicates how forcefully it can twist. A low-torque motor might rotate freely in the air, but when a load is attached, it can slow down, stall, or overheat. Torque is essential for real-world applications that involve lifting, accelerating from a standstill, or maintaining a position against gravity. Gearmotors address the need for increased torque by using gears to reduce speed and increase torque, thereby providing mechanisms with more usable force.

A micrometal gear motor is composed of two main components: a small brushed DC motor and a metal gearbox. The key parts of a micrometal gear motor include the following:

  1. Motor terminals: Two electrical connections where direct current (DC) voltage is applied. Power enters through one terminal and exits through the other. Reversing the polarity causes the motor to change direction. This is the general principle behind powering brushed DC motors.
  2. Brushes: Stationary components that make contact with the spinning commutator. Their function is to conduct current from the external circuit to the rotating part of the motor. In small brushed motors, the materials used for brushes typically include precious metals or carbon, depending on the specific motor design.
  3. Commutator: A segmented metal ring connected to the rotor. As the rotor rotates, the brushes make contact with different segments of the commutator, which changes which coil receives power at any given moment. This mechanical switching mechanism ensures that the motor continues to turn in the same direction rather than stopping after completing part of a turn.
  4. Rotor: Rotating inner part of the motor. It contains wire windings. When current flows through those windings, they create a magnetic field that interacts with the stator magnets to produce torque.
  5. Stator magnets: Permanent magnets fixed to the motor housing. They do not rotate, instead providing the magnetic field that the energized rotor pushes against.
  6. Motor shaft: The rotating shaft that transfers mechanical energy from the motor to other components.
  7. Gearbox: Gearbox: The front section contains multiple small gears. Its purpose is to reduce speed and increase torque. A higher gear ratio results in lower output speed and higher torque. As suggested by their name, the gears in a micrometal gear motor are made of metal.
  8. Gear train: Stages of gears inside a gear box. Each stage trades a bit of speed for more turning force. By the time the motion reached the front shaft, it was much slower but much stronger than the raw motor output.
  9. Output shaft: The front shaft that extends from the gearbox. It is the point where the motor's mechanical output can be connected to other components, such as wheels or levers.
  10. Bearings/ bushings and housing: These components support the rotating shaft and keep everything aligned. The housing holds the motor and gearbox together.

When selecting a motor, it is crucial to ensure that the torque it provides under normal operating conditions does not surpass the stall torque. "Stall" refers to the situation where the motor is overloaded but the shaft remains stationary. This condition results in two critical values: stall current, which is the current drawn by the motor when it is energized but not rotating, and stall torque, the highest torque the motor can generate when it is at a standstill. Both stall torque and stall current should be avoided, as stall represents one of the most demanding situations a motor can encounter, primarily due to the risk of overheating. When the shaft is not in motion, the current increases, converting electrical power into heat within the windings, resulting in minimal or no cooling benefits from rotation. Overheating can damage the components of a micrometal gear motor and its driver circuit.

The micrometal gear motors I used for this assignment were rated for a voltage of 12 V, a speed of 100 rpm, a no-load current of 0.03 amperes, and a current of 0.09 amperes at a rated load. They also have a stall current of 0.7 amperes and a stall torque of 15.5 kgf cm.

4. What is a motor driver?

A motor driver is an electronic circuit situated between a microcontroller and a motor. It allows the low-power control signals from the microcontroller to safely manage the significantly higher power required by the motor. Motors need enough current, protection from electrical noise and voltage spikes, a way to change direction, and a higher voltage than what the microcontroller pins can give them. A motor driver acts like a power amplifier and switch system for the motor; in turn, the microcontroller dictates when to turn on, turn off, go forward, go backward, and speed. Even though a microcontroller can provide a 5-volt signal sufficient to power a small DC motor, a motor driver is still necessary. A motor is an inductive load; inductors resist changes in current. When current through a motor winding changes suddenly, the motor can generate voltage spikes. Voltage spikes can reset the microcontroller, create noise, and damage electronics if not controlled properly.

To reverse a brushed DC motor, the polarity across its terminals must be changed. This requires a specific switching arrangement, typically an H-bridge. An H-bridge is a circuit configuration that enables a DC motor to be driven in both directions. It is named an H-bridge because its basic schematic resembles the letter H. The motor is depicted as the horizontal bar in the center, with four switches (commonly transistors or MOSFETs) arranged around it. A transistor is a component that allows a small control signal to manage a larger current flow. In motor driver applications, transistors function as switches rather than as linear amplifiers. When a transistor is in the ON state, current can flow; in the OFF state, current is blocked.

A bipolar junction transistor, or BJT, has three terminals: base, collector, and emitter. A small current entering the base allows a larger current to flow from the collector to the emitter. A base signal can be interpreted as the command that opens the switch. A base signal can be interpreted as the command that opens the switch. Currently, BJTs are less common in modern motor drivers due to their power waste when compared to MOSFETs, which are more efficient and generate less heat, making them preferable for applications requiring high efficiency and performance.

A MOSFET, or metal-oxide-semiconductor field-effect transistor, also has three main terminals: gate, drain, and source. The gate is different from the BJT base because ideally it does not need continuous current in the same way. It is mainly voltage-controlled. If the voltage between gate and source is high enough, the MOSFET turns on and creates a low-resistance path between drain and source. This voltage-oriented control results in H-bridges that are fast-switching, efficient, and generate low heat when properly driven.

DRV8871 Motor Driver

H-Bridge Diagram

To spin the motor in one direction, the microcontroller must activate switches S1 and S4, creating a current path that flows from VCC through S1, through the motor, and then through S4 to GND. To reverse the motor's direction, the microcontroller must activate switches S2 and S3, establishing a current path from VCC through S2, through the motor, and then through S3 to GND. This switching of current paths results in a voltage reversal across the motor, changing its spin direction. The switches on the same side must not be activated simultaneously; for example, activating S1 and S3 together or S2 and S4 together would create a direct short to ground, resulting in a shoot-through condition. A proper motor driver chip is essential for preventing or managing this situation safely.

DRV8871-Chip
Commercial DRV8871
DRV8871-Schematic
DRV8871-PCB
DRV8871-PCB Fabricated
DRV8871-PCB Processed
DRV8871-Driver Soldered

5. Microcontroller Board

Attiny1616-Picture
Attiny1616-Schematic
Attiny1616-PCB
Manufactured Attiny1616 PCB
Soldered Attiny1616 PCB

5. Files

Here are the downloadable files for this week:

KiCad schematic and PCB layout

Reflection

While some ideas must initially be drafted by hand, such as circuit designs, it is advantageous to live in the era of EDA (Electronic Design Automation) software. I was previously unaware of the compatibility between EDA software and 3D CAD files; this capability can assist designers in more effectively sizing the spaces for housing electronics within a product.

Back to Weekly Assignments