Modifications

Sauter à la navigation Sauter à la recherche
3 462 octets ajoutés ,  28 octobre 2017 à 14:25
aucun résumé de modification
Ligne 2 : Ligne 2 :     
{{traduction}}
 
{{traduction}}
 +
 +
{{ADFImage|FEATHER-M0-EXPRESS-Alimentation-01.jpg|640px}}
 +
 +
== Battery + USB Power ==
 +
We wanted to make the Feather easy to power both when connected to a computer as well as via battery. There's '''two ways to power''' a Feather. You can connect with a MicroUSB cable (just plug into the jack) and the Feather will regulate the 5V USB down to 3.3V. You can also connect a 4.2/3.7V Lithium Polymer (Lipo/Lipoly) or Lithium Ion (LiIon) battery to the JST jack. This will let the Feather run on a rechargable battery. '''When the USB power is powered, it will automatically switch over to USB for power, as well as start charging the battery (if attached) at 100mA. '''This happens 'hotswap' style so you can always keep the Lipoly connected as a 'backup' power that will only get used when USB power is lost.
 +
 +
 +
{{traduction}}
 +
No class registered in CONVERSION_CLASS for section build-alert alert-warning
 +
<nowiki>
 +
<div class="alert">
 +
<i class='fa fa-exclamation-circle'></i>
 +
The JST connector polarity is matched to Adafruit LiPoly batteries. Using wrong polarity batteries can destroy your Feather
 +
</nowiki>
 +
 +
{{ADFImage|FEATHER-M0-EXPRESS-Alimentation-02.jpg|640px}}
 +
 +
The above shows the Micro USB jack (left), Lipoly JST jack (top left), as well as the 3.3V regulator and changeover diode (just to the right of the JST jack) and the Lipoly charging circuitry (to the right of the Reset button). There's also a '''CHG''' LED, which will light up while the battery is charging. This LED might also flicker if the battery is not connected.
 +
 +
== Power supplies ==
 +
You have a lot of power supply options here! We bring out the '''BAT''' pin, which is tied to the lipoly JST connector, as well as '''USB '''which is the +5V from USB if connected. We also have the '''3V''' pin which has the output from the 3.3V regulator. We use a 500mA peak regulator. While you can get 500mA from it, you can't do it continuously from 5V as it will overheat the regulator. It's fine for, say, powering an ESP8266 WiFi chip or XBee radio though, since the current draw is 'spikey' & sporadic.
 +
 +
{{ADFImage|FEATHER-M0-EXPRESS-Alimentation-03.jpg|640px}}
 +
 +
== Measuring Battery ==
 +
If you're running off of a battery, chances are you wanna know what the voltage is at! That way you can tell when the battery needs recharging. Lipoly batteries are 'maxed out' at 4.2V and stick around 3.7V for much of the battery life, then slowly sink down to 3.2V or so before the protection circuitry cuts it off. By measuring the voltage you can quickly tell when you're heading below 3.7V
 +
 +
To make this easy we stuck a double-100K resistor divider on the '''BAT''' pin, and connected it to '''D9''' (a.k.a analog #7 '''A7'''). You can read this pin's voltage, then double it, to get the battery voltage.
 +
 +
<syntaxhighlight lang="python">
 +
#define VBATPIN A7
 +
 
 +
float measuredvbat = analogRead(VBATPIN);
 +
measuredvbat *= 2;    // we divided by 2, so multiply back
 +
measuredvbat *= 3.3;  // Multiply by 3.3V, our reference voltage
 +
measuredvbat /= 1024; // convert to voltage
 +
Serial.print("VBat: " ); Serial.println(measuredvbat);
 +
</syntaxhighlight>
 +
 +
{{ADFImage|FEATHER-M0-EXPRESS-Alimentation-04.jpg|640px}}
 +
 +
== ENable pin ==
 +
If you'd like to turn off the 3.3V regulator, you can do that with the '''EN'''(able) pin. Simply tie this pin to '''Ground '''and it will disable the 3V regulator. The '''BAT''' and '''USB''' pins will still be powered
 +
 +
{{ADFImage|FEATHER-M0-EXPRESS-Alimentation-05.jpg|640px}}
       
{{FEATHER-M0-EXPRESS-TRAILER}}
 
{{FEATHER-M0-EXPRESS-TRAILER}}
29 917

modifications

Menu de navigation