The LilyPad Arduino USB is the perfect board for e-textiles and wearables projects. It can be sewn to fabric and to power supplies, sensors and actuators with conductive thread. You can attach this board directly to your computer using only a micro USB cable.
Overview
Microcontroller | ATmega32u4 |
Operating Voltage | 3.3V |
Input Voltage | 3.8V-5V |
Digital I/O Pins | 9 |
PWM Channels | 4 |
Analog Input Channels | 4 |
DC Current per I/O Pin | 40 mA |
Flash Memory | 32 KB (ATmega32u4) of which 4 KB used by bootloader |
SRAM | 2.5 KB (ATmega32u4) |
EEPROM | 1 KB (ATmega32u4) |
Clock Speed | 8 MHz |
Documentation
The LilyPad Arduino USB can be powered via the micro USB connection or with a 3.7V LiPo battery (connected to the JST connector on the board). Either power source is regulated down to the operating voltage (3.3V) by the on-board MIC5219.
The power pins are as follows:
- + The regulated 3.3V power supply used to power the microcontroller and other components on the board. This can come either from the USB connection or a battery, both via the on-board regulator. This pin is only powered when the on-board switch is in the ON position.
- – Ground pin.
The ATmega32u4 has 32 KB (with 4 KB used for the bootloader). It also has 2.5 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Each of the 9 digital i/o pins on the LilyPad Arduino USB can be used as an input or output, usingpinMode(), digitalWrite(), and digitalRead() functions. They operate at 3.3V volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms.
- TWI: 2 (SDA) and 3 (SCL). Support a simple TWI communication using the Wire library.
- External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.
- PWM: 3, 9, 10, 11, and 13. Provide 8-bit PWM output with the analogWrite() function.
- LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it’s off.
- Analog Inputs: A2-A5. The LilyPad Arduino USB has 4 analog inputs, labeled A0 through A11, all of which can also be used as digital i/o. Each analog input provide 10 bits of resolution (i.e. 1024 different values). By default the analog inputs measure from ground to 5 volts, though is it possible to change the upper end of their range using the analogReference() function.
The LilyPad Arduino USB has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The 32U4 also allows for serial (CDC) communication over USB and appears as a virtual com port to software on the computer. The chip also acts as a full speed USB 2.0 device, using standard USB COM drivers. On Windows, a .inf file is required>. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB connection to the computer.
The LilyPad Arduino USB can be programmed with the Arduino Arduino Software (IDE). Select “LilyPad Arduino USB” from the Tools > Board menu (according to the microcontroller on your board). For details, see the reference and tutorials.
Rather than requiring a physical press of the reset button before an upload, the LilyPad Arduino USB is designed in a way that allows it to be reset by software running on a connected computer. The reset is triggered when the LilyPad’s virtual (CDC) serial / COM port is opened at 1200 baud and then closed. When this happens, the processor will reset, breaking the USB connection to the computer (meaning that the virtual serial / COM port will disappear). After the processor resets, the bootloader starts, remaining active for about 8 seconds. The bootloader can also be initiated by pressing the reset button on the LilyPad Arduino USB twice in quick in succession. Pressing the reset button once will reset the board and jump directly to the user sketch, bypassing the bootloader. Note that when the board first powers up, it will jump straight to the user sketch, if present, rather than initiating the bootloader.
The LilyPad Arduino USB is a circle, approximately 50mm (2″) in diameter. The Micro USB connector extends slightly beyond this diameter. The board itself is .8mm (1/32″) thick (approximately 6.5mm (1/4″) including components, the tallest of which is the JST battery connector).