Robot Power supply setup

In this section, we will discuss setting up the power supply for the Raspberry Pi Zero. We will discuss powering the Raspberry Pi Zero and the motors of the robot. Let's discuss the major components of our robot and their power consumption:

The total power consumption estimate is about 550 mA (150 + 150*2 + 250).

In order to calculate the battery capacity, we also need to decide the duration of continuous operation before requiring a recharge. We wanted the robot to operate at least for 2 hours before requiring a recharge. The battery capacity can be calculated using the following formula:

In our case, this would be:

550mA * 2 hours = 1100 mAh

According to the Digi-Key calculator, we need to account for factors that affect the battery life. Accounting for such factors, the battery capacity would be:

1100 mAh /0.7 = 1571.42 mAh

We took this number into account while purchasing a battery for the robot. We decided to purchase this 2200mAh USB battery pack that operates at 5V (shown in the picture later and the link for purchase has been shared with the bill of materials discussed earlier in this chapter):

2200 mAh 5V USB battery pack

Ensure that the battery pack is fully charged before assembling it on to the robot:

  1. Once the battery pack is fully charged, mount it on to the robot using double-sided tape and plug a micro-USB cable, as shown in the picture:
2200 mAh 5V USB battery pack
  1. We need to verify that the Raspberry Pi Zero powers up when a battery pack is used.
  2. Plug in the HDMI cable (that is connected to a monitor) and using a very short micro-USB cable, try to power up the Raspberry Pi Zero and make sure that everything powers up correctly.