Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use SparkFun LilyPad USB Plus: Examples, Pinouts, and Specs

Image of SparkFun LilyPad USB PlusDesign with SparkFun LilyPad USB Plus in Cirkit Designer

Introduction

The SparkFun LilyPad USB Plus is a versatile, sewable microcontroller board designed for wearables and e-textiles projects. It is built around the ATmega32U4 microcontroller and features built-in USB connectivity, allowing it to be programmed directly through the Arduino Integrated Development Environment (IDE) without the need for an external programmer. The LilyPad USB Plus is part of the larger LilyPad ecosystem, which includes a variety of sensors, LEDs, and other components that can be sewn together with conductive thread to create interactive textiles.

Explore Projects Built with SparkFun LilyPad USB Plus

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 ATmega328P-Based Sensor Hub with OLED Display and LIDAR: A project utilizing SparkFun LilyPad USB Plus in a practical application
ATmega328P-Based Sensor Hub with OLED Display and LIDAR

This circuit features an Mtiny Uno ATmega328P microcontroller as its central processing unit, interfacing with a variety of sensors and peripherals. It includes a 0.96" OLED display and an MPU6050 accelerometer/gyroscope for user interface and motion sensing, respectively. The circuit also integrates a TF LUNA LIDAR for distance measurement, a DHT11 sensor for temperature and humidity readings, and uses a 9V battery with a 7805 voltage regulator for power management. Communication with a computer for programming and data exchange is facilitated by an Adafruit FTDI Friend module.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Function Description
1-9 Digital I/O Digital pins which can be used for input/output.
A2-A5 Analog Input Analog pins which can be used for analog input.
+ Vcc Positive supply voltage (3.3V).
- Ground Ground connection.
A Analog Additional analog reference pin.
R Reset Reset pin, active low.

Usage Instructions

How to Use the Component in a Circuit

  1. Connecting to a Computer:

    • Connect the LilyPad USB Plus to a computer using a micro USB cable.
    • Ensure that the board is recognized by the computer and the appropriate drivers are installed.
  2. Programming:

    • Open the Arduino IDE on your computer.
    • Select the correct board from the Tools > Board menu (LilyPad Arduino USB).
    • Choose the correct port from Tools > Port.
    • Write or load your sketch (program) into the IDE.
    • Click the upload button to program the LilyPad USB Plus.
  3. Sewing into Fabric:

    • Use conductive thread to sew the LilyPad USB Plus onto fabric.
    • Ensure that connections are secure and that there are no short circuits between conductive traces.

Important Considerations and Best Practices

Troubleshooting and FAQs

Common Issues

Solutions and Tips for Troubleshooting

FAQs

Q: Can I wash my LilyPad USB Plus project? A: Yes, but you should remove the battery and ensure the project is completely dry before powering it up again.

Q: How do I connect additional components to the LilyPad USB Plus? A: Additional components can be sewn to the board using conductive thread, connecting to the appropriate pins.

Q: What is the maximum number of LEDs I can connect? A: This depends on the current draw of the LEDs and the total current limit of the board. Each I/O pin can supply up to 40 mA.

Example Code for Arduino UNO

// Blink the onboard LED
void setup() {
  pinMode(13, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}

void loop() {
  digitalWrite(13, HIGH); // Turn the LED on
  delay(1000);            // Wait for a second
  digitalWrite(13, LOW);  // Turn the LED off
  delay(1000);            // Wait for a second
}

Note: The above code is for demonstration purposes and is written for the Arduino UNO, which shares the same LED_BUILTIN pin as the LilyPad USB Plus. When using the LilyPad USB Plus, ensure you select the correct board in the Arduino IDE.