background image

 

Adafruit Feather 32u4 Adalogger

Created by lady ada

 

https://learn.adafruit.com/adafruit-feather-32u4-adalogger

Last updated on 2021-11-15 06:34:25 PM EST

©Adafruit Industries

Page 1 of 39

Summary of Contents for Feather 32u4 Adalogger

Page 1: ...Adafruit Feather 32u4 Adalogger Created by lady ada https learn adafruit com adafruit feather 32u4 adalogger Last updated on 2021 11 15 06 34 25 PM EST Adafruit Industries Page 1 of 39 ...

Page 2: ...trip Add the breakout board And Solder Soldering on Female Header Tape In Place Flip Tack Solder And Solder Power Management Battery USB Power Power supplies Measuring Battery ENable pin Alternative Power Options Arduino IDE Setup Using with Arduino IDE Install Drivers Windows 7 Only Blink Manually bootloading Ubuntu Linux Issue Fix Feather HELP Using the SD Card Example logging sketch Downloads S...

Page 3: ...tery charging Its an Adafruit Feather 32u4 with a microSD holder ready to rock At the Feather 32u4 s heart is at ATmega32u4 clocked at 8 MHz and at 3 3V logic a chip setup we ve had tons of experience with as it s the same as the Flora https adafru it dVl This chip has 32K of flash and 2K of RAM with built in USB so not only does it have a USB to Serial program debug capability built in with no ne...

Page 4: ...t fine straight from the micro USB connector But if you do have a battery you can take it on the go then plug in the USB to recharge The Feather will automatically switch over to USB power when its available We also tied the battery thru a divider to an analog pin so you can measure and monitor the battery voltage to detect when you need a recharge Adafruit Industries Page 4 of 39 ...

Page 5: ...o get tons of pins 20 GPIO pins Hardware Serial hardware I2C hardware SPI support 7 x PWM pins 10 x analog inputs Built in 100mA lipoly charger with charging status indicator LED Pin 13 red LED for general purpose blinking Power enable pin 4 mounting holes Reset button The Feather 32u4 Adalogger uses the extra space left over to add MicroSD a green LED Pin 8 green LED for your blinking pleasure Mi...

Page 6: ...me header so you can solder it in and plug into a solderless breadboard Lipoly battery MicroSD card and USB cable not included but we do have lots of options in the shop if you d like Check out our tutorial for all sorts of details including schematics files IDE instructions and more Pinouts Adafruit Industries Page 6 of 39 ...

Page 7: ...his is the 3 3V regulator s enable pin It s pulled up so connect to ground to disable the 3 3V regulator 3V this is the output from the 3 3V regulator it can supply 500mA peak Logic pins This is the general purpose I O pin set for the microcontroller All logic is 3 3V 0 RX GPIO 0 also receive input pin for Serial1 and Interrupt 2 1 TX GPIO 1 also transmit output pin for Serial1 and Interrupt 3 Ada...

Page 8: ...og input A10 and can do PWM output 11 GPIO 11 can do PWM output 12 GPIO 12 also analog input A11 13 GPIO 13 can do PWM output and is connected to the red LED next to the USB jack A0 thru A5 These are each analog input as well as digital I O pins SCK MOSI MISO These are the hardware SPI pins used by the microSD card too You can use them as everyday GPIO pins if the SD card is not inserted However w...

Page 9: ...d data or some other user alert Other Pins RST this is the Reset pin tie to ground to manually reset the AVR as well as launch the bootloader manually ARef the analog reference pin Normally the reference voltage is the same as the chip logic voltage 3 3V but if you need an alternative analog reference connect it to this pin and select the external AREF in your firmware Can t go higher than 3 3V As...

Page 10: ...this lets you plug in the Feather into a solderless breadboard Another option is to go with socket female headers This won t let you plug the Feather into a breadboard but it will let you attach featherwings very easily Adafruit Industries Page 10 of 39 ...

Page 11: ...shorter and give a more compact shape Finally there s the Stacking Header option This one is sort of the best of both worlds You get the ability to plug into a solderless breadboard and plug a featherwing on top But its a little bulky Adafruit Industries Page 11 of 39 ...

Page 12: ...Soldering in Plain Headers Prepare the header strip Cut the strip to length if necessary It will be easier to solder if you insert it into a breadboard long pins down Adafruit Industries Page 12 of 39 ...

Page 13: ...pins so that the short pins poke through the breakout pads And Solder Be sure to solder all pins for reliable electrical contact For tips on soldering be sure to check out our Guide to Excellent Soldering https adafru it aTk Adafruit Industries Page 13 of 39 ...

Page 14: ...Solder the other strip as well You re done Check your solder joints visually and continue onto the next steps Adafruit Industries Page 14 of 39 ...

Page 15: ...Soldering on Female Header Tape In Place For sockets you ll want to tape them in place so when you flip over the board they don t fall out Adafruit Industries Page 15 of 39 ...

Page 16: ...Flip Tack Solder After flipping over solder one or two points on each strip to tack the header in place Adafruit Industries Page 16 of 39 ...

Page 17: ...And Solder Be sure to solder all pins for reliable electrical contact For tips on soldering be sure to check out our Guide to Excellent Soldering https adafru it aTk Adafruit Industries Page 17 of 39 ...

Page 18: ...You re done Check your solder joints visually and continue onto the next steps Power Management Adafruit Industries Page 18 of 39 ...

Page 19: ...ower that will only get used when USB power is lost 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 connecte...

Page 20: ...oltage 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 connect...

Page 21: ...attery is plugged in 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 Alternative Power Options The two primary ways for powering a feather are a 3 7 4 2V LiPo battery plugged into the JST port or a USB power cable Adafruit Industries Page 21 of ...

Page 22: ...igned for external power supplies this is a design decision to make the board compact and low cost It is not recommended but technically possible Connect an external 3 3V power supply to the 3V and GND pins Not recommended this may cause unexpected behavior and the EN pin will no longer Also this doesn t provide power on BAT or USB and some Feathers Wings use those pins for high current usages You...

Page 23: ...nu in Windows or Linux or the Arduino menu on OS X A dialog will pop up just like the one shown below We will be adding a URL to the new Additional Boards Manager URLs option The list of URLs is comma separated and you will only have to add each URL once New Adafruit boards and updates to existing boards will automatically be picked up by the Adafruit Industries Page 23 of 39 ...

Page 24: ... arduino board index package_adafruit_index json Here s a short description of each of the Adafruit supplied packages that will be available in the Board Manager when you add the URL Adafruit AVR Boards Includes support for Flora Gemma Feather 32u4 ItsyBitsy 32u4 Trinket Trinket Pro Adafruit SAMD Boards Includes support for Feather M0 and M4 Metro M0 and M4 ItsyBitsy M0 and M4 Circuit Playground E...

Page 25: ...isplay work great with the 32u4 and 8 MHz clock speed Now that you have added the appropriate URLs to the Arduino IDE preferences you can open the Boards Manager by navigating to the Tools Board menu Once the Board Manager opens click on the category drop down menu on the top left hand side of the window and select Contributed You will then be able to select and install the boards supplied by the ...

Page 26: ...in the Tools Board menu Install Drivers Windows 7 Only When you plug in the Feather you ll need to possibly install a driver Windows 10 folks can skip this the drivers now come built into Windows 10 Click below to download our Driver Installer Download Adafruit Drivers Installer https adafru it AB0 Download and run the installer Adafruit Industries Page 26 of 39 ...

Page 27: ...Run the installer Since we bundle the SiLabs and FTDI drivers as well you ll need to click through the license Select which drivers you want to install Adafruit Industries Page 27 of 39 ...

Page 28: ...s It will create a serial COM port you can now select it from the dropdown it ll even be indicated as Feather 32u4 Now load up the Blink example the setup function runs once when you press reset or power the board void setup initialize digital pin 13 as an output pinMode 13 OUTPUT the loop function runs over and over again forever void loop Adafruit Industries Page 28 of 39 ...

Page 29: ...RST button to get back into the bootloader The red LED will pulse so you know that its in bootloader mode Do the reset button double press right as the Arduino IDE says its attempting to upload the sketch when you see the Yellow Arrow lit and the Uploadin g text in the status bar Don t click the reset button before uploading unlike other bootloaders you want this one to run at the time Arduino is ...

Page 30: ...st number of Itsy Feather failures are due to charge only USB cables We get upwards of 5 complaints a day that turn out to be due to charge only cables Use only a cable that you know is for data syncing If you have any charge only cables cut them in half throw them out We are serious They tend to be low quality in general and will only confuse you and others later just get a good data charge USB c...

Page 31: ... up the Blink example Examples Basics Blink Select the correct board in the Tools menu e g Feather 32u4 Feather M0 Itsy 32u4 or M0 physically check your board to make sure you have the right one selected Compile it make sure that works Click Upload to attempt to upload the code The IDE will print out a bunch of COM Ports as it tries to upload During this time double click the reset button you ll s...

Page 32: ...ou have Make sure you select Feather 32u4 for ATMega32u4 based boards Do not use anything else do not use the 32u4 breakout board line If you have a Feather M0 look on the board to read what it is you have Make sure you select Feather M0 do not use 32u4 or Arduino Zero If you have a ItsyBitsy M0 look on the board to read what it is you have Make sure you select ItsyBitsy M0 do not use 32u4 or Ardu...

Page 33: ...he COM port disappears this does not happen on my Arduino UNO UNO type Arduinos have a seperate serial port chip aka FTDI chip or Prolific PL2303 etc etc which handles all serial port capability seperately than the main chip This way if the main chip fails you can always use the COM port M0 and 32u4 based Arduinos do not have a seperate chip instead the main processor performs this task for you It...

Page 34: ...ery is plugged in why is that The charge LED is automatically driven by the Lipoly charger circuit It will try to detect a battery and is expecting one to be attached If there isn t one it may flicker once in a while when you use power because it s trying to charge a non existant battery It s not harmful and its totally normal The Arduino IDE gives me Device Descriptor Request Failed This can requ...

Page 35: ...e Arduino is trying to upload Using the SD Card Once you have your Feather working you probably want to rock out with some SD card reading and writing Luckily the Arduino IDE has an SD card library that works great and it even comes with the IDE You can start with CardInfo which is very detailed Adafruit Industries Page 35 of 39 ...

Page 36: ...ving analog data to SD card and Dumpfile example reading back data from an SD card Example logging sketch If you want to try saving data to the SD card in the simplest sketch try this example You can adjust the delay to set how often analog data is read from pin A0 and saved to the SD card The red LED will blink if there s an error and the green LED will blink when data is written to the SD card N...

Page 37: ...ve Adafruit SAMD board package 1 6 2 define Serial SerialUSB void setup connect at 115200 so we can read the GPS fast enough and echo without dropping chars also spit it out Serial begin 115200 Serial println r nAnalog logger test pinMode 13 OUTPUT see if the card is present and can be initialized if SD begin cardSelect Serial println Card init failed error 2 char filename 15 strcpy filename ANALO...

Page 38: ...r 32u4 Adalogger Pinout Diagram https adafru it z3c 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 logfile SD open filename FILE_WRITE if logfile Serial print Couldnt create Serial println filename error 3 Serial print Writing to Serial println filename pinMode 13 OUTPUT pinMode 8 OUTPUT Serial println Ready uint8_t i 0 void loop digitalWrite 8 HIGH logfile print A0 logfil...

Page 39: ...Schematic Click to enlarge Fabrication Print Dimensions in inches Adafruit Industries Page 39 of 39 ...

Page 40: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Adafruit 2795 ...

Reviews: