Answers.Body: <p>Power consumption and battery life will of course vary based on the load that the hub is driving. Philo has an <a href="https://www.philohome.com/motors/motorcomp.htm" rel="noreferrer">extensive analysis</a> for motor power consumption, so I'll just look at what the hub itself consumes while running a program to come up with a baseline battery life estimate.</p>
  <p>I've uploaded a test Python program to my hub that gently blinks a heartbeat LED:</p>
  <pre><code>import hub,utime
  while True:
      hub.led(0,0,10)
      utime.sleep_ms(500)
      hub.led(0,0,0)
      utime.sleep_ms(500)
  </code></pre>
  <p>In order to measure the current draw, I first wired up the battery to the hub with the battery outside the hub:</p>
  <p><a href="https://i.sstatic.net/n1V3p.png" rel="noreferrer"><img src="https://i.sstatic.net/n1V3p.png" alt="Hub with battery wired up" /></a></p>
  <p>I then connected a basic multimeter up in series with the hub as a current sensor:</p>
  <p><a href="https://i.sstatic.net/KPUo4.jpg" rel="noreferrer"><img src="https://i.sstatic.net/KPUo4.jpg" alt="Hub with multimeter" /></a></p>
  <p>We can see that the Hub with the simple program running consumes about <strong>150mA</strong> of current. Assuming ideal usage of the included 2100mAh battery, the hub should be able to run for approximately 2100mAh / 150mA = 14 hours while not driving any peripherals.</p>
  <p>Peripherals such as motors (and even the LED display) quickly dwarf the power consumption of the hub itself, but under normal usage we should expect to see several hours of battery life.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-29T17:28:03.367Z
Answers.Text: Wow! Incredible answer.  What do you do in your spare time‽
Answers.UserDisplayName: Mark Stewart
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-31T14:25:57.710Z
Answers.Text: Open the battery please. It seems to have basic Philips screws. Wonder if there are plain 18650 cells inside we can easily replace...
Answers.UserDisplayName: bert
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-06T18:40:32.620Z
Answers.Text: @bert I swore I saw a picture of a breakdown, and they were LiPo cells, not LiIon/cylindrical.
Answers.UserDisplayName: some bits flipped
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-29T00:13:35.790Z
Answers.LastActivityDate: 2020-07-29T00:13:35.790Z
Answers.UserDisplayName: jncraton
Body: <p>The new Mindstorms v4 and SPIKE Prime hubs include a 2100mAh Lithium-ion battery. How long is it expected to last when running a program?</p>
  
Tags: <battery><spike-prime><robot-inventor>
Title: What is the battery life of the new Mindstorms and SPIKE Prime hubs?
UserDisplayName: jncraton
ThreadText: # What is the battery life of the new Mindstorms and SPIKE Prime hubs?
  
  (Asked by: username_0 on 2020-07-29)
  
  The new Mindstorms v4 and SPIKE Prime hubs include a 2100mAh Lithium-ion battery. How long is it expected to last when running a program?
  
  **Tags:** battery, spike-prime, robot-inventor
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-07-29. Score: 14 | Accepted answer
  
  Power consumption and battery life will of course vary based on the load that the hub is driving. Philo has an extensive analysis for motor power consumption, so I'll just look at what the hub itself consumes while running a program to come up with a baseline battery life estimate.
  I've uploaded a test Python program to my hub that gently blinks a heartbeat LED:
  import hub,utime
  while True:
      hub.led(0,0,10)
      utime.sleep_ms(500)
      hub.led(0,0,0)
      utime.sleep_ms(500)
  
  In order to measure the current draw, I first wired up the battery to the hub with the battery outside the hub:
  
  I then connected a basic multimeter up in series with the hub as a current sensor:
  
  We can see that the Hub with the simple program running consumes about 150mA of current. Assuming ideal usage of the included 2100mAh battery, the hub should be able to run for approximately 2100mAh / 150mA = 14 hours while not driving any peripherals.
  Peripherals such as motors (and even the LED display) quickly dwarf the power consumption of the hub itself, but under normal usage we should expect to see several hours of battery life.
  
  > **Comments:**
  > **username_1**: Wow! Incredible answer.  What do you do in your spare time‽  
  > **username_2**: Open the battery please. It seems to have basic Philips screws. Wonder if there are plain 18650 cells inside we can easily replace...  
  > **username_3**: @bert I swore I saw a picture of a breakdown, and they were LiPo cells, not LiIon/cylindrical.  
  
  ---
  
  