Specifications
70 
Since  most  current  sensors  don‟t  have  an  output  that  5V  or  higher,  their  voltage  will 
need to be modified to that accepted by the microcontrollers in the same way as above. 
These voltage divider circuits will be included on the same circuit board that the sensor 
is mounted to in order to allow for any current sensor to be used in the case that one 
fails. 
5.6.2 Battery Charge State Sensors 
It will be our next task of computing in real time the amount of time remaining that the 
battery  can  be  used.    This  can  be  done  be  using  the  data  collected  by  the 
microcontroller in the power usage calculations.  The amount of energy remaining in the 
battery will also be another consideration for  our battery charge state calculations, as 
well as the minimum power level that the battery can reach before risking damage to the 
battery. 
This task will be accomplished using a sensor to monitor the energy level of the battery. 
The minimum energy level allowed for the battery will be a set value that is programmed 
into  our  microcontroller.    This  number  will  be  subtracted  from  the  energy  remaining, 
giving us the total amount of energy that can be consumed by our components. 
Once this task is accomplished, the overall battery charge state will be determined by 
dividing  the  energy  available  to  the  components by  the  power  wattage  that  they  are 
consuming.  This operation will leave us with the time value of energy remaining for the 
components.  If we are left with a negative value, this means that we are storing more 
energy than we are consuming, and time remaining on the battery cannot be calculated. 
If left in this condition, the battery will be able to power its components indefinitely. 
With the time value of power remaining determined, the microcontroller will be able to 
export this information to the LCD screen to be displayed.  If we are in fact storing more 
energy than we are consuming, then this will instead be referenced on  the screen in 
place  of  a  time  value.    This  function  will  be  done  by  the  same  microcontroller  that 
performs the power usage calculations. 
AS  it  would  be  highly  undesirable  to  drain  the  battery  of  more  power  than  it  could 
handle, our group has decided to add an alert system that will warn the user when the 
battery is dangerously low on energy. A small speaker  will be  controlled by the 
microcontroller to go off whenever there is less than 5 minutes remaining on the battery. 
This will give the user enough time to ensure all data on the laptop is properly saved 
before power is cutoff to all external components so the battery is able to recharge itself. 
In order to calculate the charge state of the battery, its voltage must be known. This is 
the same voltage that was necessary for the power calculations in section 5.6.1, so the 
same voltage divider circuit that was already built for those calculations, can again be 
used for these calculations. There is a linear relationship between the batteries voltage 
and its percentage remaining. At 100% full, the batteries voltage should be 13.1V, and 
at  0%  its  voltage  should  be  10.5V.  In  reality, at  10.5V,  the  battery  is  not  completely 
empty,  but  it  is at  this  point  that  the power  it  outputs  becomes pretty much useless. 










