4.5. Microcontrollers and Sensors#

Just like motors and lights, microcontrollers and sensors also need the right electrical supply to operate safely and reliably. Because they are made from delicate silicon electronics, their requirements are often stricter than those of actuators.

4.5.1. Voltage Requirements#

Most modern microcontrollers (like the micro:bit or Arduino boards) are designed to work at 3.3 V or 5 V. Supplying too little voltage will make the system unstable or cause it not to start at all. Supplying too much can permanently damage the chip.

Sensors follow the same rule: each has a rated operating voltage. You can find this rated voltage in the sensor’s datasheet.

Warning

Many I2C sensor modules (or breakout boards) accept any voltage in the range 3.3-5V, but some are 3.3V only. It is your responsibility to verify the voltage required!

4.5.2. Current Requirements#

Although microcontrollers and sensors don’t draw nearly as much current as motors, they still consume power. A typical microcontroller might draw 20-50 milliamps (mA) when running, while an environmental sensor might add another 5-10 mA.

Your power supply must be able to provide enough current for all components together. Otherwise, voltage will sag, leading to random resets or communication errors.

4.5.3. Data and Logic Levels#

Besides powering the device, we also need to consider logic voltage levels for signals. A microcontroller running at 3.3 V will expect input signals to also be at 3.3 V. If you connect a 5 V sensor directly, the sensor’s “high” output might damage the input pin on the microcontroller.

4.5.4. Power Distribution#

Because sensors are sensitive to voltage drops, the wiring and connections matter. Thin or very long wires can reduce voltage by the time it reaches the sensor. Good design practice includes:

  • Using sufficiently thick wires for power lines.

  • Keeping power traces short on circuit boards.