JST Battery Input
There is no battery INPUT pin on the Gemma. You can connect a battery via the JST jack. We have found that Lipoly batteries, coin-cells, and AAA's work great. You can also make your own battery input pack using a plain JST cable. And use a JST extension cable if necessary.
You can plug anything from around 4 VDC up to 6 VDC. That means any single-cell LiPoly, or 3-4 AAA or AA batteries. This input is polarity protected. Gemma and DotStar LED light up, you're good to go. You can turn off the battery with the on/off switch, which will completely disconnect power on the Gemma M0.
Power Pads
Half of the pads on the Gemma M0 are related to power in and out: 3Vo , Vout and GND
- Vout - This is a voltage OUTPUT pin, it will be connected to either the USB power or the battery input, whichever has the higher voltage. This output does not connect to the regulator so you can draw as much current as your USB port / Battery can provide (in general, thats about 500mA)
- 3Vo - This is the 3.3V OUTPUT pad from the voltage regulator. It can provide up to 500mA at a steady 3.3V. Good for sensors or small LEDs or other 3V devices.
- GND is the common ground pin, used for logic and power. It is connected to the USB ground and the power regulator, etc. This is the pin you'll want to use for any and all ground connections
Input/Output Pads
Next we will cover the 3 GPIO (General Purpose Input Ouput) pins! For reference you may want to also check out the datasheet-reference in the downloads section for the core ATSAMD21E18 pin. We picked pins that have a lot of capabilities.
Common to all pads
All the GPIO pads can be used as digital inputs, digital outputs, for LEDs, buttons and switches. In additon, all can be used as analog inputs (12-bit ADC) or hardware capacitive touch. All pads can also be used as hardware interrupts inputs.
Each pad can provide up to ~7mA of current. Don't connect a motor or other high-power component directly to the pins! Instead, use a transistor to power the DC motor on/off
On a Gemma M0, the GPIO are 3.3V output level, and should not be used with 5V inputs. In general, most 5V devices are OK with 3.3V output though.
The three pads are completely 'free' pins, they are not used by the USB connection, LEDs, DotStar, etc so you never have to worry about the USB interface interfering with them when programming
Unique pad capabilities
- Pad #0 / A2 - this is connected to PA04 on the ATSAMD21. This pin can be used as a digital I/O with selectable pullup or pulldown, capacitive touch, analog input (use 'A2'), PWM output, and is also used for I2C data (SDA), and hardware Serial RX.
- Pad #1 / A0 - this is connected to PA02 on the ATSAMD21. This pin can be used as a digital I/O with selectable pullup or pulldown, capacitive touch, analog input (use 'A0'), and true analog (10-bit DAC) output. It cannot be used as PWM output.
- Pad #2 / A1 - this is connected to PA05 on the ATSAMD21. This pin can be used as a digital I/O with selectable pullup or pulldown, capacitive touch, analog input (use 'A1'), PWM output, and is also used for I2C clock (SCL), and hardware Serial TX.
The onboard Dotstar LED
You can program the onboard dotstar LED like a one pixel strand of dotstars. For CircuitPython, see this example for details.
Secret SWD and Reset Pads
On the bottom of the Gemma M0 you will see three small pads. These are used for our programming/test but you can use them too.
Starting from the pad closest to the edge there is:
- SWDIO
- SWCLK
- Reset
On the off chance you want to reprogram your Gemma M0 or debug it using a Cortex M0 debug/programmer, you will need to solder/connect to these pads. We use them for testing and you will likely never need it but they are there if you do!
Text editor powered by tinymce.