Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use BadgerStick: Examples, Pinouts, and Specs

Image of BadgerStick
Cirkit Designer LogoDesign with BadgerStick in Cirkit Designer

Introduction

The BadgerStick, manufactured by SparkFun Electronics, is a versatile microcontroller board designed for easy integration with various sensors and actuators. It is ideal for DIY electronics projects, rapid prototyping, and educational purposes. The compact design and user-friendly features make it an excellent choice for beginners and experienced developers alike.

Explore Projects Built with BadgerStick

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
STM32F103C8T6 Bluetooth-Controlled Arcade Joystick Interface
Image of RC카 조이스틱: A project utilizing BadgerStick in a practical application
This circuit features an STM32F103C8T6 microcontroller interfaced with a Bluetooth HC-06 module for wireless communication and an Adafruit Arcade Joystick for user input. The microcontroller's pins B0 and B10 are connected to the TXD and RXD pins of the Bluetooth module, enabling serial communication, while pins B14 and B15 interface with the joystick's directional controls. The circuit is powered by a battery, with power distribution managed through the microcontroller's 3.3V pin and common ground connections.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Joystick-Controlled Bluetooth Module with Battery Power
Image of padelpro transmitter: A project utilizing BadgerStick in a practical application
This circuit is a wireless joystick controller that uses an Arduino Nano to read analog signals from a KY-023 Dual Axis Joystick Module and transmits the data via an HC-05 Bluetooth Module. The system is powered by a 18650 Li-Ion battery with a rocker switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Raspberry Pi Zero with OLED Display and EmStat Pico for Portable Data Acquisition
Image of RPI Zero Prototype: A project utilizing BadgerStick in a practical application
This circuit is a portable system powered by a 3.7V LiPo battery, which is boosted to 5V using an Adafruit PowerBoost 1000C to power a Raspberry Pi Zero and an EmStat Pico. The Raspberry Pi Zero interfaces with an OLED display via I2C and a tactile switch for user input, while the EmStat Pico communicates with the Raspberry Pi over UART for data acquisition or control purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Game Controller with SparkFun Pro Micro and Raspberry Pi 4B
Image of Raspberry Pi handheld: A project utilizing BadgerStick in a practical application
This circuit is a custom game controller featuring a SparkFun Pro Micro microcontroller, multiple tactile pushbuttons, and two analog joysticks. The Pro Micro reads inputs from the buttons and joysticks, processes them, and sends the corresponding gamepad signals. Additionally, a Raspberry Pi 4B is powered by a Pisugar S Pro battery module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with BadgerStick

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of RC카 조이스틱: A project utilizing BadgerStick in a practical application
STM32F103C8T6 Bluetooth-Controlled Arcade Joystick Interface
This circuit features an STM32F103C8T6 microcontroller interfaced with a Bluetooth HC-06 module for wireless communication and an Adafruit Arcade Joystick for user input. The microcontroller's pins B0 and B10 are connected to the TXD and RXD pins of the Bluetooth module, enabling serial communication, while pins B14 and B15 interface with the joystick's directional controls. The circuit is powered by a battery, with power distribution managed through the microcontroller's 3.3V pin and common ground connections.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of padelpro transmitter: A project utilizing BadgerStick in a practical application
Arduino Nano Joystick-Controlled Bluetooth Module with Battery Power
This circuit is a wireless joystick controller that uses an Arduino Nano to read analog signals from a KY-023 Dual Axis Joystick Module and transmits the data via an HC-05 Bluetooth Module. The system is powered by a 18650 Li-Ion battery with a rocker switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of RPI Zero Prototype: A project utilizing BadgerStick in a practical application
Battery-Powered Raspberry Pi Zero with OLED Display and EmStat Pico for Portable Data Acquisition
This circuit is a portable system powered by a 3.7V LiPo battery, which is boosted to 5V using an Adafruit PowerBoost 1000C to power a Raspberry Pi Zero and an EmStat Pico. The Raspberry Pi Zero interfaces with an OLED display via I2C and a tactile switch for user input, while the EmStat Pico communicates with the Raspberry Pi over UART for data acquisition or control purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Raspberry Pi handheld: A project utilizing BadgerStick in a practical application
Battery-Powered Game Controller with SparkFun Pro Micro and Raspberry Pi 4B
This circuit is a custom game controller featuring a SparkFun Pro Micro microcontroller, multiple tactile pushbuttons, and two analog joysticks. The Pro Micro reads inputs from the buttons and joysticks, processes them, and sends the corresponding gamepad signals. Additionally, a Raspberry Pi 4B is powered by a Pisugar S Pro battery module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Prototyping IoT (Internet of Things) devices
  • Interfacing with sensors and actuators
  • Educational projects for learning microcontroller programming
  • Wearable electronics and compact embedded systems
  • Rapid development of small-scale automation systems

Technical Specifications

The BadgerStick is based on the ARM Cortex-M0+ architecture, offering a balance of performance and low power consumption. Below are the key technical details:

Key Technical Details

Specification Value
Microcontroller ATSAMD21E18A (ARM Cortex-M0+)
Operating Voltage 3.3V
Input Voltage (USB) 5V
Flash Memory 256 KB
SRAM 32 KB
Clock Speed 48 MHz
Digital I/O Pins 14
PWM Pins 6
Analog Input Pins 6
Communication Interfaces I2C, SPI, UART
USB Interface Micro-USB
Dimensions 2.0" x 0.7" (50.8mm x 17.8mm)

Pin Configuration and Descriptions

The BadgerStick features a simple pinout for easy integration with external components. Below is the pin configuration:

Pin Number Pin Name Description
1 GND Ground pin
2 3.3V 3.3V power output
3 A0 Analog input pin 0
4 A1 Analog input pin 1
5 D0 Digital I/O pin 0
6 D1 Digital I/O pin 1
7 D2 Digital I/O pin 2 (PWM capable)
8 D3 Digital I/O pin 3 (PWM capable)
9 SDA I2C data line
10 SCL I2C clock line
11 MOSI SPI Master Out Slave In
12 MISO SPI Master In Slave Out
13 SCK SPI clock
14 RST Reset pin

Usage Instructions

How to Use the BadgerStick in a Circuit

  1. Powering the Board:

    • Connect the BadgerStick to a computer or USB power source using a Micro-USB cable.
    • Alternatively, supply 3.3V to the 3.3V pin and GND to the GND pin.
  2. Programming the Board:

    • The BadgerStick is compatible with the Arduino IDE. Install the necessary board definitions by adding the SparkFun SAMD Boards package via the Arduino Board Manager.
    • Select "SparkFun BadgerStick" as the board in the Arduino IDE.
  3. Connecting Sensors and Actuators:

    • Use the digital and analog pins to interface with sensors and actuators.
    • For I2C devices, connect the SDA and SCL pins to the corresponding pins on the sensor or module.
    • For SPI devices, connect MOSI, MISO, and SCK pins, along with a chip select (CS) pin.
  4. Uploading Code:

    • Write your code in the Arduino IDE and upload it to the BadgerStick via the Micro-USB connection.

Important Considerations and Best Practices

  • Ensure that the input voltage does not exceed 3.3V on any pin to avoid damaging the microcontroller.
  • Use appropriate pull-up resistors for I2C communication if the connected devices do not have built-in pull-ups.
  • Avoid drawing more current than the board's maximum output capability (50mA on the 3.3V pin).
  • Use decoupling capacitors when connecting external components to reduce noise and improve stability.

Example Code for Arduino UNO Integration

Below is an example of how to use the BadgerStick to read an analog sensor value and control an LED:

// Define pin connections
const int sensorPin = A0; // Analog sensor connected to A0
const int ledPin = D3;    // LED connected to digital pin D3

void setup() {
  pinMode(ledPin, OUTPUT); // Set LED pin as output
  Serial.begin(9600);      // Initialize serial communication
}

void loop() {
  int sensorValue = analogRead(sensorPin); // Read sensor value
  Serial.print("Sensor Value: ");
  Serial.println(sensorValue); // Print sensor value to Serial Monitor

  // Map sensor value to PWM range (0-255) and write to LED
  int ledBrightness = map(sensorValue, 0, 1023, 0, 255);
  analogWrite(ledPin, ledBrightness);

  delay(100); // Small delay for stability
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The board is not recognized by the computer:

    • Ensure the USB cable is functional and supports data transfer.
    • Check that the correct board and port are selected in the Arduino IDE.
  2. Code upload fails:

    • Verify that the BadgerStick is in bootloader mode by double-tapping the reset button.
    • Ensure the SparkFun SAMD Boards package is installed in the Arduino IDE.
  3. Sensors or actuators are not responding:

    • Double-check the wiring and ensure proper connections.
    • Confirm that the sensor or actuator is compatible with 3.3V logic levels.
  4. I2C devices are not detected:

    • Use a pull-up resistor (4.7kΩ to 10kΩ) on the SDA and SCL lines if necessary.
    • Verify the I2C address of the device and ensure it matches the code.

FAQs

Q: Can the BadgerStick be powered by a battery?
A: Yes, you can power the BadgerStick using a 3.3V battery connected to the 3.3V and GND pins.

Q: Is the BadgerStick compatible with Arduino libraries?
A: Yes, the BadgerStick is compatible with most Arduino libraries, especially those designed for SAMD-based boards.

Q: How do I reset the BadgerStick?
A: Press the reset button once to restart the board. Double-tap the reset button to enter bootloader mode for firmware updates.

Q: Can I use the BadgerStick for low-power applications?
A: Yes, the ARM Cortex-M0+ processor is optimized for low-power operation, making it suitable for battery-powered projects.