Skip to content

Commit 89c3cae

Browse files
committed
Spellcheck
1 parent 050a181 commit 89c3cae

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

content/hardware/01.mkr/01.boards/mkr-wifi-1010/tutorials/mkr-battery-app-note/mkr-battery-app-note.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ software:
1515

1616
## Introduction
1717

18-
While you can run your MKR board from USB, you can make best use of it when your MKR board is able to operate independantly of your computer and a USB cable. This is particulary useful for many IoT applications, use of relays with high current draw and remote sensing. Batteries can help us in this regard and a special connector is included in the MKR products for this end. In this application note, we will take a closer look at the battery capabilities of the MKR boards.
18+
While you can run your MKR board from USB, you can make best use of it when your MKR board is able to operate independently of your computer and a USB cable. This is particularly useful for many IoT applications, use of relays with high current draw and remote sensing. Batteries can help us in this regard and a special connector is included in the MKR products for this end. In this application note, we will take a closer look at the battery capabilities of the MKR boards.
1919

2020
### Goals
2121
The goals of this project are to:
@@ -31,7 +31,7 @@ The goals of this project are to:
3131
- LiPo battery with JST-PH connector
3232

3333
### LiPo vs Fe vs Li-ion batteries
34-
Several different chemistries of rechargeable batteries are commerically avalible. The two main types are Li-Po and Li-Ion. Lithium Ion batteries have been around for a longer time and are generally cheaper. Lithium Polymer batteries have a higher energy density, allowing you to run your board longer with a similar sized battery.
34+
Several different chemistries of rechargeable batteries are commercially available. The two main types are Li-Po and Li-Ion. Lithium Ion batteries have been around for a longer time and are generally cheaper. Lithium Polymer batteries have a higher energy density, allowing you to run your board longer with a similar sized battery.
3535
You can see a comparison between these three in the table below.
3636

3737
| Battery Chemistry | Cost | Energy Density (mass) | Energy density (size) | Stability | Nominal voltage (single cell) |
@@ -44,10 +44,10 @@ You can see a comparison between these three in the table below.
4444
Apart from being a single cell (3.7V), a key factor to selecting the correct battery is that the connector is compatible.
4545

4646
### Connector
47-
You can connect a battery to the MKR WIFI 1010 via a 2-pin JST-PH female connector. The PH varient of JST connectors are identified by a pin-to-pin distance of 2 mm. Here are several examples of LiPo batteries with a 2-pin JST-PH connector. Each individual connector is made of one plastic housing and two metal crimp terminals. A crimping device may be required. Note that when looking from above (with the notch facing you), the red (positive) wire should be on your left.
47+
You can connect a battery to the MKR WIFI 1010 via a 2-pin JST-PH female connector. The PH variant of JST connectors are identified by a pin-to-pin distance of 2 mm. Here are several examples of LiPo batteries with a 2-pin JST-PH connector. Each individual connector is made of one plastic housing and two metal crimp terminals. A crimping device may be required. Note that when looking from above (with the notch facing you), the red (positive) wire should be on your left.
4848

4949
![JST-PH connector connected to the MKR WiFi 1010. Note that the positive terminal (red wire) is to the left, towards the PMIC](assets/battery-in-mkr.png)
50-
You can connect a battery to the MKR WIFI 1010 via a 2-pin JST-PH female connector. The PH varient of JST connectors are identified by a pin-to-pin distance of 2mm. Here are several examples of LiPo batteries with a 2-pin JST-PH connector. Each individual connector is made of one plastic housing and two metal crimp terminals. A crimping device may be required. Note that when looking from above (with the notch facing you), the red (positive) wire should be on your left.
50+
You can connect a battery to the MKR WIFI 1010 via a 2-pin JST-PH female connector. The PH variant of JST connectors are identified by a pin-to-pin distance of 2mm. Here are several examples of LiPo batteries with a 2-pin JST-PH connector. Each individual connector is made of one plastic housing and two metal crimp terminals. A crimping device may be required. Note that when looking from above (with the notch facing you), the red (positive) wire should be on your left.
5151

5252
### Protection circuit
5353
A protection circuit cuts off the battery if overcurrent or under/over voltage is detected. This adds an additional layer of safety.
@@ -59,14 +59,14 @@ The BQ24195L IC is responsible for charging the single cell lion battery, as wel
5959
### Electrical Properties
6060

6161
**Voltage**
62-
The nominal voltage of both LiPo and Li-Ion batteries is around 3.7V and is commonly refered to as the voltage of single cell batteries. However, this is an ideal scenario since as a battery is used the voltage changes. The voltage can be considered similar to a waterfall. The higher the waterfall, the higher the voltage.
62+
The nominal voltage of both LiPo and Li-Ion batteries is around 3.7V and is commonly referred to as the voltage of single cell batteries. However, this is an ideal scenario since as a battery is used the voltage changes. The voltage can be considered similar to a waterfall. The higher the waterfall, the higher the voltage.
6363

6464

65-
In the MKR boards, the battery terminal is connected to the SAMD21 via a reserved pin (PB09) known as `ADC_BATTERY` within the Arduino Core. This pin is used internally on the board, and is not accesssible via the MKR pins. Since the voltage of a Li-ion battery exceeds 3.3V (the AREF value), a voltage divider must be used to extend the range while also ensure that only safe voltages are applied to the microcontroller. We can calculate the output voltage using the following formula
65+
In the MKR boards, the battery terminal is connected to the SAMD21 via a reserved pin (PB09) known as `ADC_BATTERY` within the Arduino Core. This pin is used internally on the board, and is not accessible via the MKR pins. Since the voltage of a Li-ion battery exceeds 3.3V (the AREF value), a voltage divider must be used to extend the range while also ensure that only safe voltages are applied to the microcontroller. We can calculate the output voltage using the following formula
6666

6767
$$ V_{out} = \frac{V_{source} \times R2} {R_1 + R_2} $$
6868

69-
In the MKR WIFI 1010, $R_1$ and $R_2$ are 330k ohm and 1M ohm respectively. Therefore, for a resolution of 12 bits, the board is subject to 3.3V that corresponds to about 4.39V on the battery side. Therefore, we can cover the operating value of a whole battery. The high values reduce the leakage current that may pass throught, increasing the life of the battery. The capacitor acts to clean the signal.
69+
In the MKR WIFI 1010, $R_1$ and $R_2$ are 330k ohm and 1M ohm respectively. Therefore, for a resolution of 12 bits, the board is subject to 3.3V that corresponds to about 4.39V on the battery side. Therefore, we can cover the operating value of a whole battery. The high values reduce the leakage current that may pass through, increasing the life of the battery. The capacitor acts to clean the signal.
7070

7171
![Voltage Divider Circuit on the MKR WIFI 1010](assets/voltage-divider-samd21.png)
7272

@@ -75,7 +75,7 @@ Continuing with the waterfall analogy, the volume of water passing through a wat
7575

7676
![LiPo batteries with various capacity sizes](assets/three-lipo-batteries.png)
7777

78-
While the MKR boards do not provide a mechanism for identifying capacity, we can get a general idea of the current status by mapping the voltage to the capacity. A more precise value can be obtained with the help of a fuel gauge IC (Integrated Circuit), avaliable in the Portenta X8 and H7.
78+
While the MKR boards do not provide a mechanism for identifying capacity, we can get a general idea of the current status by mapping the voltage to the capacity. A more precise value can be obtained with the help of a fuel gauge IC (Integrated Circuit), available in the Portenta X8 and H7.
7979

8080
**Discharge rating**
8181
When the battery is fully charged or when it is near to discharge, the discharge rate changes considerably. Yet, there is a region where the discharge rate is constant (change in voltage over change in discharge capacity does not flunctuate). Within this region, the maximum current draw is defined as:
@@ -106,7 +106,7 @@ We will go through the lines needed to create a Sketch to read the battery value
106106

107107
![Calling the BQ24195 Library](assets/include-BQ24195-library.png)
108108

109-
**2.** Then, we will create variables to store the variables for the raw ADC value (from pin PB09), the equivilent voltage expereienced by PB09 and finally the calculated battery voltage.
109+
**2.** Then, we will create variables to store the variables for the raw ADC value (from pin PB09), the equivalent voltage expereienced by PB09 and finally the calculated battery voltage.
110110

111111
```arduino
112112
float rawADC;
@@ -193,7 +193,7 @@ voltADC = rawADC * (3.3/4095.0);
193193
voltBat = voltADC * (max_Source_voltage/3.3);
194194
```
195195

196-
**15.** We can approximate the battery voltage to be propotional to the capacity level. Since the `map()` function does not work with float variables, we will manually map the values.
196+
**15.** We can approximate the battery voltage to be proportional to the capacity level. Since the `map()` function does not work with float variables, we will manually map the values.
197197
```arduino
198198
int new_batt = (voltBat - batteryEmptyVoltage) * (100) / (batteryFullVoltage - batteryEmptyVoltage);
199199
```
@@ -275,7 +275,7 @@ float batteryCapacity = 0.750; //set battery capacity in Ah
275275
276276
void setup() {
277277
278-
Serial.begin(9600); // start Serial port with a buad rate of 9600bps
278+
Serial.begin(9600); // start Serial port with a baudrate of 9600bps
279279
280280
analogReference(AR_DEFAULT); // the upper value of ADC is set to 3.3V
281281
analogReadResolution(12); // this will give us 4096 (2^12) levels on the ADC
@@ -284,7 +284,7 @@ void setup() {
284284
PMIC.begin(); // start the PMIC I2C connection
285285
PMIC.enableBoostMode(); // boost battery output to 5V
286286
287-
PMIC.setMinimumSystemVoltage(batteryEmptyVoltage); // set the mininum battery output to 3.5V
287+
PMIC.setMinimumSystemVoltage(batteryEmptyVoltage); // set the minimum battery output to 3.5V
288288
PMIC.setChargeVoltage(batteryFullVoltage); // set battery voltage at full charge
289289
290290
PMIC.setChargeCurrent(batteryCapacity/2); // set battery current to C/2 in amps

0 commit comments

Comments
 (0)