WEEK 10

Output Devices

How the week started

Input device week did give an idea about how these devices work. So the output devices have been chosen after discussing with my instructor Sibin and Saheen.

How the week ended

The week did start off well. As part of the spiral development, I chose to try out a servo motor and a stepper motor. A bit of planning would have been better on my side. I am yet to test the module.

Week 10’s Assignment

Group assignment:

  • Measure the power consumption of an output device.
  • Document your work on the group work page and reflect on your individual page what you learned.

Link to group assignment

Individual assignment:

  • Add an output device to a microcontroller board you’ve designed and program it to do something.

Group assignemnt insight

We are calculating the power consumed by 3 NeoPixel lights (WS2812B). In NeoPixel lights, we can change the colors and the brightness. These affect the power consumption.

Source

Source

The board was programmed and then the NeoPixel was set to white light and 50/255 (20%) brightness level. The NeoPixels were powered from Bench Power Supply 9123A with a 5V supply voltage and 0.5A maximum current limit.

The probes were connected to the power and ground pins. A digital multimeter was used to measure the current consumption. The meter was set to current measurement mode. The probes connect the meter in series with the power supply to measure the current consumption. The measured current consumption was 0.0337A at a 5V input supply.

NeoPixel Power Consumption = Current × Voltage = 0.0337A × 5.0V = 0.16W
This means that if we want to run 20 NeoPixels for 3 hours, we will need 3.2Wh or about a 640mAh 5V battery.

Source

Source

With a motor controller board, we powered the servo motor. With a 5V input supply, it consumed 0.011A of current.
Motor Power Consumption = Current × Voltage = 0.011A × 5.0V = 0.05W

If you scroll a bit above you could find the group link. In case you are feeling lazy to do so Here is the link to group assignment

Why I need an Output Device?

This week we are using devices that interact with us. In my final project I need the sun to move in a curved path. This movement of the light is linked to the time in the RTC. The RTC tells time to the microcontroller, then the light moves. This is the output part.

To do this movement I need a motor. There are stepper motors and servo motors.

My understanding of Output devices

How Electric Motors Work

Introduction

What is a Motor?

An electric motor converts electrical energy into mechanical energy, usually as rotational motion. There are two types of electric motors based on the type of current they use, the coil design, and the magnetic field created.

‖ An Introduction to Motors ‖ What is an Eelctric Motor? ‖ ‖ Youtube - How does an Electric Motor work? ‖

DC motors

The DC motor works by direct current flowing to the commutator. The commutator is connected to the electromagnets. The electromagnets rotate as the polarity changes due to the current. The electromagnets are surrounded by permanent magnets. The rotation happens because of continuous switching of current direction through the commutator and brushes.

DC motors are of two types based on the commutation they use: brushed motor and brushless motor.

Brushed DC Motor

Dc Motors that use mechanical commutation , that is they use brushes as the mechanical contact. The current is delivered as the rotor turns, the brushes make contact with the commutor. These brushes stay in contact with the rotating part (Shaft).

‖ Brushed DC Motors ‖

BLDC - Brushless DC Motor

Dc Motors that use elctronic commutation are called Brushless DC motors (BLDC). As it operates without brushes it has high efficiency, long life, and precise control when compared to brushed dc motor.

  • ESC (electronic speed controller) electronically commutates the motor by controlling the flow of current in the stator’s winding based on feedback from hall sensors.
  • Hall sensor gives real time rotor position feedback, allowing the electronic controller to switch the stator coil current (commutation) at the precise moment for smooth, efficient operation.

‖ Working Principle of BLDC Motor (Brushless DC Motor) ‖

Stepper Motor

Stepper motors are a type of brushless motors. It is rotated by direct current. It is an electronic motor which rotates in steps rather than an continuous rotation motion. Since it rotates in steps it has larger number of magnetic poles.

Stepper motors have a relatively large torque, especially at low speeds .

Stepper Motor + Driver

Stepper motors work based on the number of steps required for the motor to rotate. The number of steps can be called input impulses. The driver rotates the motor based on the number of steps it is instructed to move. The driver does not know the exact position of the motor, it only follows the given steps. Therefore, if there are any unexpected changes in the load or the device, the change in position of the rotation is not known by the driver.

‖ Stepper Motors ‖ ‖ Brushless DC Motors vs. Stepper Motors 1 ‖ ‖ Brushless DC Motors vs. Stepper Motors 2 ‖

Servo Motor

Servo motors can roate to a specific angle or position. It has built-in position feedback mechanism therfore allowing precise control over angular velocity and position of motor. the servo motors are usually DC motors but somethimes AC motors. Servo motors are usually rated in kg/cm (kilogram per centimetre), Exanmple:

Stepper motors have a relatively large torque, especially at low speeds .

‖ Servo Motor Basics ‖ servo control of stepper motors ‖ Understanding Basics of Servo Motor Working ‖

Servo motors are usually rated in kg/cm (kilogram per centimetre). This means the torque the motor can provide at a certain distance from the shaft. For example, a 25 kg·cm servo means it can support 25 kg at 1 cm from the shaft. If the distance increases to 2 cm, it can support 12.5 kg. At 3 cm, it can support around 6.25 kg.

If the motor is unable to move due to excess weight, the current consumption increases.

Servo - Closed-loop feedback system

The servo motor control system continuously compares the input signal (desired position) with the feedback signal (actual position) obtained from the position sensor. When there's a difference, the control circuit generates an error signal that drives the motor until the desired position is reached. This closed-loop feedback system ensures precise positioning accuracy.

When connecting a servo motor, make sure the connections are correct:
• Yellow to PWM (Pulse Width Modulation)
• Orange to power
• Brown to ground
Note: One must cross check the pinout diagram of the microcontroller to identify the PWM pins and ensure the servo motor functions correctly.

In the XIAO RP2040, all pins support PWM, so I could connect the servo motor to any pin. I connected it to D0.

Schottky diode controls the direction of current flow. It allows current to pass in only one direction. Therefore, it is used in devices that require low voltage operation and the ability to switch quickly with minimal power loss.

Example: In my PCB this week, I am using a motor that requires 12V and a XIAO that requires only 5V. To ensure that only 5V reaches the XIAO, I used a Schottky diode. The diode provides a low voltage drop and fast switching characteristics, making it suitable for power management circuits.

This makes Schottky diodes an ideal choice for radio frequency applications and devices with low voltage requirements.

MG90S Micro Servo Motor – 180° Rotation

KiCAD Designs

Electronics Rules Checker

ERC. I added the power flags to the mentioned points. This error occurs because KiCad doesn't understand where the power is connected to the board. This error wouldn't affect the physical aspects of the design.