4.7. Exercise: Electrical Requirements#

  1. Complete the pre-reading.

  2. Answer the following questions.

4.7.1. Pre-Reading#

Every electronic system has two fundamental needs:

  • Correct voltage (\(V\)) - the “push” that moves electrons. Too low and devices behave erratically; too high and parts can be damaged.

  • Enough current (\(I\)) - the “flow rate.” Add up the current for all parts that may be on at the same time to size your supply.

These are tied together by Ohm’s Law:

\[V = I \times R\]

where \(R\) is resistance in ohms (\(\Omega\)). It is the key to estimating voltage drop in wires: longer or thinner wires have more resistance, so they waste some voltage as heat.

Power, measured in watts, describes how fast electrical energy is used:

\[P = V \times I\]

Energy is power over time. Batteries are often specified as watt-hours (\(\text{Wh}\)) or milliamp-hours (\(\text{mAh}\)):

\[\text{Wh} = \frac{\text{mAh}}{1000} \times V\]
\[\text{Runtime (h)} = \frac{\text{mAh}}{\text{Total mA}}\]

These equations describe the ideal case. Real systems consume more energy and have shorter runtimes because of losses.

4.7.2. Examples#

Example 1: Current Budget#

Consider a project with:

  • A microcontroller consuming \(40 \text{ mA}\)

  • A combined accelerometer and gyroscope consuming \(10 \text{ mA}\)

  • Two small servos that can consume up to \(150 \text{ mA}\) each

The total peak current required is:

\[40 + 10 + 150 + 150 = 350 \text{ mA}\]

The power supply must comfortably meet this requirement, preferably with a small margin, for example \(500 \text{ mA}\).

Example 2: Voltage Drop over a Wire#

Consider a sensor that draws \(60 \text{ mA}\) of current over a \(2 \text{ m}\) long wire. The wire’s resistance is \(0.08 \ \Omega/\text{m}\).

The total resistance of the wire is:

\[2 \times 0.08 = 0.16 \ \Omega\]

The voltage drop is:

\[V = I \times R = 0.06 \times 0.16 = 0.0096 \text{ V}\]

If the power supply produces \(5 \text{ V}\), then the sensor at the end of the wire receives approximately:

\[5 - 0.0096 = 4.9904 \text{ V}\]

This is likely within the sensor’s voltage range.

Question 1

You are wiring up a small obstacle-avoiding robot for a competition. It uses a microcontroller for control, an ultrasonic sensor for obstacle detection, and two DC motors for movement. You have chosen a small battery pack with a regulator that can supply \(250 \text{ mA}\) maximum.

The robot has:

  • Microcontroller: \(50 \text{ mA}\)

  • Ultrasonic sensor: \(15 \text{ mA}\)

  • Two DC motors: \(120 \text{ mA}\) each

  • Supply limit: \(250 \text{ mA}\)

Questions

  1. Calculate the total current demand of all parts running at once.

  2. Decide whether the regulator is strong enough.

Solution
  1. The total current demand is:

    \[50 + 15 + (2 \times 120) = 305 \text{ mA}\]
  2. The regulator is not strong enough because:

    \[305 \text{ mA} > 250 \text{ mA}\]

    Choose a higher-current supply or reduce the load.

Question 2

A sensor is mounted at the end of a long arm on a robot. The cable run from the power board to the sensor is about \(1.5 \text{ m}\) each way. The thin wires have some resistance, and the sensor is sensitive to supply voltage.

Given:

  • Load current: \(80 \text{ mA} = 0.08 \text{ A}\)

  • Round-trip wire length: \(3 \text{ m}\)

  • Wire resistance: \(0.05 \ \Omega/\text{m}\)

  • Supply voltage: \(5.0 \text{ V}\)

  • Sensor operating range: \(4.5\text{--}5.5 \text{ V}\)

Questions

  1. Calculate the total resistance of the round-trip wires.

  2. Calculate how much voltage is lost when \(80 \text{ mA}\) flows.

  3. Decide if the sensor still receives enough voltage.

Solution

Solution is locked

Question 3

You are planning a rover project for a science fair. It will run continuously for about \(2 \text{ hours}\) during demonstrations. It has a microcontroller, three sensors, and four drive motors. You need to pick a battery that lasts the full time.

The rover has:

  • Microcontroller: \(40 \text{ mA}\)

  • Three sensors: \(20 \text{ mA}\) each

  • Four motors: \(300 \text{ mA}\) each

Questions

  1. Calculate the total current consumption.

  2. Calculate how many \(\text{mAh}\) the battery must provide for \(2 \text{ hours}\).

  3. If you have a \(2000 \text{ mAh}\) battery, estimate how long the rover will really run.

Solution

Solution is locked

Question 4

A group project is building a solar-powered weather station. At night, it runs only on its \(1200 \text{ mAh}\) backup battery. The system includes a microcontroller, an environmental sensor, and an LCD to display readings. The team needs it to last at least \(24 \text{ hours}\) on battery.

The weather station has:

  • Microcontroller: \(30 \text{ mA}\)

  • Environmental sensor: \(10 \text{ mA}\)

  • LCD: \(25 \text{ mA}\)

  • Battery: \(1200 \text{ mAh}\)

Questions

  1. Calculate the total current draw.

  2. Estimate how long the battery will power the system.

  3. Decide whether the \(1200 \text{ mAh}\) battery is large enough, or whether a bigger one is needed.

Solution

Solution is locked