ENG-CANSAT-CONTENT

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche

Feather M0 Express in few words

The CanSat kit it build around the Adafruit Industries Feather M0 Express plateform.

  • Feather is a new emerging standard -Arduino compatible plaform- for embedded projet.
  • Feather is small, light and already brings lot useful features.
  • Feather M0 is compatible with Arduino M0, so compatible with Arduino IDE.
  • Feather M0 Express also embed FLASH memory that can act like SD Card (Arduino IDE) or USB Stick (CircuitPython)
As Feather M0 is compatible Arduino IDE, everything learned for Arduino Uno can be applied to Feather M0. Just care about voltage, the UNO is 5V Logic and the Feather 3.3V logic.
Feather M0 Features
20 GPIOs
6 Analog inputs 12bits
value from 0 to 4095.
1 Analog output 10 bits
value from 0 to 1023.
PWM on all pins
Hardware I2C et SPI buses
UART
Feather are:
* Small (5c2xm)
* Light (4.7Gr)
* Powerful
* Versatile
* Polyvalent
* Available with
complete ecosystem

ENG-CANSAT-CONTENT-00.png

Kit content

  Description Quantité
Feather M0 Express
FEATHER-M0-EXPRESS.png
New Arduino M0 compatible on a standard platform for embedded project. Also compatible with CircuitPython.
disponible ici chez MCHobby
1
USB A/microB 1m cable
CABLE-USB-MICRO.png
Can be used to plug your feather on a computer to program it or to reload the Lipo.
disponible ici chez MCHobby
1
Half Size Breadboard
BB-DEMI.jpg
Solderless breadboard are used for fast prototyping.
disponible ici chez MCHobby
1
Multi-functional breadboard wires
FILS-BB-FFASSOR-v2.png
Set of wires with plug that can be modified from female to male.
disponible ici chez MCHobby
1
Feather Stacking Headers
FEATHER-STACK-HEAD.png
Plug your feather or prototype wing on breadboard and still having a female connector under the hand.
disponible ici chez MCHobby
1
Feather Prototyping Wing
FEATHER-PROTO-WING.png
Prototyping board for feather platform. Create your own extension board (wing) by soldering connectors and components.
disponible ici chez MCHobby
1
Lithium Polymer Battery
ACC-LIPO-800mAh.png
Transform the Feather into an autonomous plateform with this 800mAh Lipo.
disponible ici chez MCHobby
1
BMP280 – Barometric pressure sensor
BMP280.jpg
Easily evaluate pressure, altitude and temperature.
disponible ici chez MCHobby
1
TMP36 – analog temperature sensor
TMP36.jpg
Transform the sensor voltage read on analog input into an easy-to-read temperature.
disponible ici chez MCHobby
1
RFM69HCW Transceiver Radio
RFM69HCW-433Mhz-BRK.png
Transport data over long distance with packet radio. One breakout act as emitter, the second one as receiver.
disponible ici chez MCHobby
2

Feather M0 Express in details

The Feather M0 use the ATSAMD21G18 ARM Cortex M0+ processor with 3.3V logic and 48 MHz. This chip embed 256K of FLASH (8x more than the Atmega328/Uno) and has 32K RAM (16x more than UNO)!

This ATSAMD21G18 has USB built-in which offers USB-to-Serial and debug feature (so no need for FTDI-like chip).

The feather has the following specs:

  • Size: 51mm x 23mm x 8mm
  • Weight: 5 grams
  • ATSAMD21G18 @ 48MHz
  • 3.3V logic/power
  • 256KB of FLASH
  • 32KB of RAM
  • No EEPROM
  • RTC & Clock based on 32.768 KHz crystal
  • 3.3V regulator (500mA peak current) with Power/enable pin
  • USB native support (has USB bootloader)
  • 20 GPIO pins (PWM on all pins)
  • Hardware Serial + Hardware I2C + Hardware SPI support
  • 6 x 12-bit analog inputs (from 0 to 4095)
  • 1 x DAC 10-bit analog ouput (from 0 to 1024)
  • Lipo Charger included: 100mA charging with status LED
  • Red LED attached on pin #13 (like Arduino UNO)
  • Reset button
  • Mini NeoPixel
  • 2 MB SPI additional Flash storage.
The Feather M0 Express can be be programmed with Arduino IDE -OR- with CircuitPython (a flavor of MicroPython). This tutorial focus on Arduino IDE development. Check the Adafruit Tutorial if you are interested in CircuitPython Programming.

About the additionnal Flash:
The SPI Flash storage act like a tiny hard drive.

  • Under CircuitPython, the 2 MB Flash is used to the Python scripts, libraries and other files.
  • With Arduino, the 2 MB Flash is used to read/write files to it (like a SD card). Adafruit has helper program to access those files over USB.

The UF2 bootloader:
The Feather M0 is pre-loaded with an UF2 bootloader which looks like a USB Flash Drive. Simply drag an UF2 firmware on the USB Flash drive to completely reprogram de board firmware (No special tools, No special drivers needed)! The UF2 bootloader can be used to load up CircuitPython, MakeCode PXT file or Arduino IDE (bossa-compatible).

Feather M0 Express PINOUT

Introduction

FEATHER-M0-EXPRESS-Brochage-01.png
Crédit: AdaFruit Industries www.adafruit.com
Click to enlarge

(Please note that AREF is PA03 (and not PA02)

FEATHER-M0-EXPRESS-Brochage-02.jpg
Crédit: AdaFruit Industries www.adafruit.com

The Feather M0 benefits from the Cortex M0 microcontroler hardware. If has many buses and many pins. Let's review them togheter!

Power Pin

FEATHER-M0-EXPRESS-Brochage-03.jpg
Crédit: AdaFruit Industries www.adafruit.com

  • GND  : is the common ground. The 0v reference voltage for all the logic and power supplies.
  • BAT : positive pin from the JST connector (the optional Lipo).
  • USB  : positive pin from the USB connector. Will allow you to detect if the board is connected on USB.
  • EN : Enable pin of the 3.3V regulator. This pin has a Pull-Up résistor. Connect the EN pin to the ground will shutdown the 3.3V regulator.
  • 3V : Output of the 3.3V regulator (500mA peak)

Logical pins

FEATHER-M0-EXPRESS-Brochage-04.jpg
Crédit: AdaFruit Industries www.adafruit.com

This concerns all the I/O pins on the microcontroler.

All PINS are 3.3V Logic
  • Almost all pins can generate PWM signal (also called "analog output" on Arduino UNO board).
  • All pins can be used for Interrupt Request (IRQ).

The following pins have specific features:

  • #0 / RX - GPIO #0, also receiving pin of the Serial1 UART (hardware serial port, input). Also an analog input.
  • #1 / TX - GPIO #1, also transmitting pins of the Serial1 UART (hardware serial port, output). Also an analog input.
  • SDA - Data pin for the I2C bus. There is no pull-up resistor on that pin, so you need to add a 2.2K-10K pull-up when used for I2C bus.
  • SCL - Clock pin for the I2C bus. There is no pull-up resistor on that pin, so you need to add a 2.2K-10K pull-up when used for I2C bus.
  • #5 - GPIO #5
  • #6 - GPIO #6
  • #9 - GPIO #9, also analog input A7. This analog input is wired on a divider resistor bridge to read the Lipoly battery voltage. As a consequence, the voltage of that pin is fixed to a voltage around ~2V.
  • #10 - GPIO #10
  • #11 - GPIO #11
  • #12 - GPIO #12
  • #13 - GPIO #13, also connected to the red LED near if the microUSB située près du connecteur micro USB.
  • A0 - Analog input A0 and also a real Analog output since the DAC is wired on this pin (DAC = Digital to Analog Converter). The output voltage can be set with a value between 0 and 3.3V. Unlike the PWM output, this pin is a real analog output. So you can experiment with signal generator.
  • A1 to A5 - each pin is an Analog input and also a Digital Input/Output.
  • SCK/MOSI/MISO - those are the pins for the hardware SPI bus. The pin can also been used to as Digital Input/Output.

About buses:

  • The SPI bus can reach really high speed so it is a good idea to preserve it, mostly useful with TFT display requiring high throughput to display the content.
  • The I2C bus can be shared among several devices (usually sensors). So it is also a good idea to preserve the SDA & SCL pins.

SPI Flash and NeoPixel

The "Express" product line is designed to also run CircuitPython. To ease the prototyping, Adafruit added 2 additional items on the Feather M0:

  • a mini NeoPixel LED (NeoPixel are Digital RGB LEDs that can be controled with only one data pin)
  • a 2 MB additional memory (Flash memory on SPI bus.

FEATHER-M0-EXPRESS-Brochage-05.jpg
Crédit: AdaFruit Industries www.adafruit.com

The NeoPixel LED is wired on the #8 (in Arduino), so you can use the library by configuring a ribbon of only 1 pixel. The NeoPixel is powered with 3.3V but this doesn't impact the color or the brightness.

NeoPixel

The NeoPixel is also used by the bootloader to inform the user about the bootloader state:

  • Green : The device has been proprely enumerated over the USB interface.
  • Red : error with the USB.

Note: In CircuitPython, the LED is used to mention the running status.

The SPI Flash memory

The Flash memory is wired on 4 reserved pins. Those pins are not made available as GPIO, so no worries about collision risk when using device on the Feather SPI bus. The SPI Flash memory is wired on a different SPI bus... so no worries.

Sous Arduino

Les broches de la FLASH sont:

  • SCK = broche #3,
  • MISO = broche #2,
  • MOSI = broche #4
  • CS = broche #38.

Sur le Feather M0 Express vous serez capable d'accéder au port de la Flash SPI sous SPI1 - c'est un nouveau périphérique SPI matériel totalement séparé des broches GPIO accessibles à la périphérie de la carte Feather.

Dans le cadre d'une utilisation sous Arduino, cette mémoire Flash SPI permet des opérations de lecture/écriture.

Sous CircuitPython

Sous CircuitPython (MicroPython), la mémoire Flash SPI est nativement utilisée par l'interpréteur Python. Cette mémoire Flash apparaît comme étant en lecture seule pour le code utilisateur.

Autres broches!

FEATHER-M0-EXPRESS-Brochage-06.jpg
Crédit: AdaFruit Industries www.adafruit.com

  • RST - broche de réinitialisation (dite "Reset"). Brancher cette broche à la masse réinitialise le microcontroleur et lance le bootloader.
  • ARef - broche "analog reference", référence de tension pour les broches analogique. Par défaut, la tension de référence est identique au niveau logique du composant (soit 3.3v). Il est cependant possible d'utiliser une tension de référence analogique différente (par ex: 1.5V) et d'indiquer dans votre programme qu'il faut utiliser la référence AREF EXTERNE. Dans pareil cas, la lecture 12bit d'une entrée analogique (valeur de 0 à 4095) couvrira une tension d'entrée de 0 à 1.5V. La tension de référence ne peut jamais dépasser 3.3v. La tension sur une broche analogique ne peut pas être supérieur à la tension de référence!

Debug Interface

FEATHER-M0-EXPRESS-Brochage-07.jpg
Crédit: AdaFruit Industries www.adafruit.com

  • SWCLK et SWDIO - ces pastilles, visibles sous la carte, sont utilisées pour programmer le microcontroleur. Ces pastilles permettent également de connecter un débogueur SWD.

Written by Meurisse D. from MC Hobby - License: CC-SA-BY.