LilyPad USB ATmega32U4 Development Board – Arduino-Compatible – Support Documentation
The LilyPad USB is a wearable microcontroller board based on the ATmega32U4. Designed for e-textile and wearable projects, it integrates USB functionality directly, eliminating the need for an external programmer. Its circular form factor and large sew tabs make it ideal for sewing into clothing and fabric-based projects.
Key Features
- Microcontroller: ATmega32U4
- Operating Voltage: 3.3V
- Input Voltage: 3.7V LiPo battery via JST connector or USB power
- Digital I/O Pins: 9 (of which 4 can be used as PWM outputs)
- Analog Input Pins: 4
- Flash Memory: 32 KB (4 KB used by bootloader)
- SRAM: 2.5 KB
- EEPROM: 1 KB
- Clock Speed: 8 MHz
- USB: Micro USB connector for programming and power
- Battery Connector: JST connector for 3.7V LiPo battery
- On-board Power Switch
- Dimensions: 50mm diameter, 0.8mm PCB thickness
Pin Descriptions
Pin | Function | Description |
---|---|---|
D0 / RX | Digital I/O | Serial Receive (UART) |
D1 / TX | Digital I/O | Serial Transmit (UART) |
D2 | Digital I/O | General Purpose Digital I/O |
D3 | PWM | Digital I/O with PWM capability |
D4 | Digital I/O | General Purpose Digital I/O |
D5 | PWM | Digital I/O with PWM capability |
D6 | PWM | Digital I/O with PWM capability |
D9 | PWM | Digital I/O with PWM capability |
A0 | Analog Input | Analog Input 0 |
A1 | Analog Input | Analog Input 1 |
A2 | Analog Input | Analog Input 2 |
A3 | Analog Input | Analog Input 3 |
VCC | Power | 3.3V Regulated Power Output |
GND | Power | Ground |
RST | Reset | Reset the microcontroller |
Powering the Board
- USB Power: Connect a micro USB cable to provide 5V, which is regulated down to 3.3V for the board.
- Battery Power: Connect a 3.7V LiPo battery via the JST connector. The board includes a charging circuit to recharge the battery when USB power is connected.
Programming the Board
The LilyPad USB can be programmed using the Arduino IDE:
- Connect the board to your computer using a micro USB cable.
- Open the Arduino IDE.
- Go to Tools > Board and select “LilyPad Arduino USB”.
- Select the appropriate COM port under Tools > Port.
- Write your sketch and click the Upload button.
No external programmer is required as the ATmega32U4 has built-in USB functionality.
Troubleshooting
- Board not recognized by computer: Ensure the USB cable is functional and supports data transfer. Try a different USB port or cable.
- Sketch not uploading: Double-press the reset button to enter the bootloader mode before uploading.
- Board not powering on: Check the battery connection and ensure the power switch is turned on.
Frequently Asked Questions
- Can I wash the LilyPad USB?
- Yes, but you must remove the battery and ensure the board is completely dry before powering it again. Hand washing is recommended.
- Can I use the LilyPad USB for HID projects?
- Yes, the ATmega32U4 supports USB HID, allowing the board to emulate keyboard or mouse inputs.
- What is the maximum current per I/O pin?
- Each I/O pin can source or sink up to 40 mA, but it’s recommended to keep it under 20 mA for prolonged use.
Additional Notes
- The board operates at 3.3V; applying higher voltages to the I/O pins may damage the microcontroller.
- Ensure that the total current draw does not exceed the board’s limitations, especially when powering multiple components.
- Use conductive thread or wires to connect sensors and actuators to the sew tabs around the board’s perimeter.