In mechatronic systems, understanding power and battery requirements is crucial for successful design and implementation. This knowledge ensures that all components receive the correct voltage and current, and that the system can operate for the intended duration. In this lesson, we'll explore the basics of power in mechatronics, examine specific component requirements, and learn how to use simulation tools for prototyping and testing.
Voltage (V): The electrical potential difference between two points in a circuit, measured in volts (V).
Current (I): The flow of electric charge through a circuit, measured in amperes (A).
Power (P): The rate at which energy is transferred in an electrical circuit, measured in watts (W).
The relationship between these concepts is expressed by the equation: P = V * I
This is known as Watt's Law, where:
P is power in watts (W)
V is voltage in volts (V)
I is current in amperes (A)
Lithium-ion (Li-ion): High energy density, rechargeable, commonly used in mobile devices and electric vehicles.
Nickel-Metal Hydride (NiMH): Rechargeable, good capacity, often used in consumer electronics and some robotics.
Alkaline: Non-rechargeable, inexpensive, widely available, suitable for low-power devices.
Battery capacity is typically measured in milliamp hours (mAh). This unit tells us how much current a battery can supply over time. For example:
A 2000mAh battery can theoretically supply:
2000mA (2A) for 1 hour
1000mA (1A) for 2 hours
500mA (0.5A) for 4 hours
To calculate how long a system will run on a battery, you need to know:
The battery's capacity (in mAh)
The system's current draw (in mA)
Use this formula: Runtime (hours) = Battery Capacity (mAh) / System Current Draw (mA)
Power options:
USB power (5V)
Battery pack with 2 AAA batteries (3V)
Operating voltage: 3V
Current consumption:
Typical: ~10mA
Maximum: ~30mA (with all features active)
Power source: 18650 Li-ion battery
Battery specifications:
Voltage: 3.7V nominal
Capacity: Typically 2000mAh to 3500mAh
Operating voltage: 3.5V-5V
Different components in a mechatronic system have varying power needs. Here are some common examples:
Voltage: Usually 3V or 5V
Current: Generally low, often in the range of 10-50mA
Voltage: Varies widely, common ranges include 3-12V for small motors, up to 24V or higher for larger motors
Current: Depends on motor size and load, can range from 100mA for tiny motors to several amps for larger ones
Voltage: Typically 4.8-6V
Current: Varies based on size and torque, usually 100mA to 2.5A at peak
Voltage: Often 3.3V or 5V
Current: Generally low, typically in the range of 1-50mA
Voltage: Varies by color, typically 1.8-3.3V
Current: Usually 10-30mA for standard LEDs
Let's calculate the power requirements for our Maqueen robot, focusing on current draw in milliamps (mA).
Our robot has:
1 Micro:bit (3V, 10mA)
2 DC motors (6V, 200mA each)
1 Ultrasonic sensor (5V, 15mA)
5 LEDs (2V, 20mA each)
Total current consumption:
Micro:bit: 10mA
DC motors: 200mA * 2 = 400mA
Ultrasonic sensor: 15mA
LEDs: 20mA * 5 = 100mA
Total current: 10mA + 400mA + 15mA + 100mA = 525mA
Power source: a 3.7V, 2000mAh 18650 battery.
Theoretical runtime calculation:
Battery capacity: 2000mAh
Total current draw: 525mA
Estimated runtime: 2000mAh / 525mA ≈ 3.8 hours
Note: This simplified calculation assumes all components are running at the battery's voltage (3.7V). In reality, some components might require voltage regulation, which would affect efficiency. A more conservative estimate might be around 3 hours of runtime.
TinkerCAD is an excellent online platform for simulating circuits and testing power requirements. In these challenges, you'll use TinkerCAD to explore power consumption in a simple robotic system, similar to our Maqueen robots.
In this challenge, you'll create a simple LED circuit and learn about current limiting resistors.
Setup:
Add a 3.7V power source to your TinkerCAD circuit.
Add a breadboard, LED, and resistor.
About Breadboards:
Breadboards allow you to create temporary circuits without soldering. They have horizontal rows for power distribution and vertical columns for component connections. They are great for making temporary circuits and prototyping, and they require absolutely no soldering.
Prototyping is the process of testing out an idea by creating a preliminary model from which other forms are developed or copied, and it is one of the most common uses for breadboards. If you aren’t sure how a circuit will react under a given set of parameters, it’s best to build a prototype and test it out.
More here: https://learn.sparkfun.com/tutorials/how-to-use-a-breadboard/all
Why LEDs Need Resistors:
LEDs (Light Emitting Diodes) have very low internal resistance. Without a current-limiting resistor, they would draw too much current and burn out quickly. The resistor protects the LED by limiting the current flow.
Your Task:
Find a resistor value that will limit the current through the LED to just under 20mA. This is typically the optimal current for most LEDs.
Connect the cathode (shorter leg) of the LED to the negative power rail of the breadboard.
Place a resistor from the positive power rail to any empty column on the breadboard.
Connect a wire from the column where your resistor ends to the anode (longer leg) of the LED.
Connect your power source: positive to the positive rail, negative to the negative rail.
Experiment with different resistor values until you achieve a current just under 20mA.
Now, let's simulate the motors of our Maqueen robot.
Setup:
Keep your LED circuit from Challenge 1.
Add two DC motors to your circuit.
Your Task:
Determine the total current draw of your circuit with the two DC motors running.
Connect the DC motors in parallel to your power source.
Use the display on the power source to measure the total current drawn.
Let's complete our robot simulation by adding a microcontroller, servo motor, and ultrasonic sensor.
Setup:
Keep your circuit from Challenges 1 and 2.
Add a Micro:bit, a servo motor, and an ultrasonic sensor.
Your Task:
Determine the peak current draw of your complete "robot" and estimate its battery life.
Connect the Micro:bit, servo motor, and ultrasonic sensor to your circuit.
Write some simple Micro:bit code to make the servo sweep left and right continuously.
Use the power source display to measure the peak current draw of your entire circuit.
Based on the peak current draw, estimate how long this system would run on a 2000mAh battery.