ARDUINO LILYPAD FOR BEGINNERS

ARDUINO LILYPAD FOR BEGINNERS 21

[otw_is sidebar=otw-sidebar-1]ARDUINO LILYPAD PINOUT,ARDUINO LILYPAD FOR BEGINNERS,ARDUINO LILYPAD PINSIn this post I will discuss the introduction of the Arduino Lilypad. In the previous post I have discussed about the Arduino NANO, UNO, MEGA and other Arduino boards. This article is oriented around the discussion on the Arduino Lilypad and the similarities and differences of the Arduino Lilypad and other Arduino boards.

After reading this article the reader will be able to learn about the Arduino Lilypad, the applications of the Arduino Lilypad, the schematics and the similarities and differences of the Arduino Lilypad and other boards.

 

[otw_is sidebar=otw-sidebar-2]

 

 

Arduino Lilypad:

Arduino Lilypad is the open-source microcontroller development board based on the ATMEGA168V (low power version of the ATMEGA168) or ATMEGA328V microcontroller IC. It is important to note here that the Arduino UNO is based on the ATMEGA328P microcontroller IC. Arduino Lilypad is very unique in its shape and applications as compared to the other Arduino boards that is Arduino Lilypad is based on the circular PCB with the wide holes at the corner and is optimized for the e-textiles and wearable electronics. The Arduino Lilypad shares an important feature with the Arduino PRO MINI that is it does not have built in USB to UART converter which means that unlike Arduino NANO, UNO, MEGA and MICRO the Arduino Lilypad needs an external hardware in order to program and monitor the Arduino Lilypad. It is important to mention here that the Arduino UNO and MEGA board has USB to UART converter mounted on boards which acts as the bridge between USB data and UART data, whereas the microcontroller IC of the Arduino NANO and MICRO has built in USB interface therefore neither they need and external hardware nor they need USB to UART bridge. The Arduino Lilypad is programmed and monitored through the USB to UART FTDI converter which I will discuss in the section to follow. Arduino Lilypad looks like the one in the following image.

Note in the above image that the Arduino Lilypad has no USB port on it as described earlier. Lilypad is programmed via FTDI connector as shown in the above picture. Arduino Lilypad has 14 digital input / output pins out of which 6 are PWM enabled. The PWM (Pulse Width Modulation) phenomenon and the use of these pins will be discussed later in the post. Arduino Lilypad has 6 analog pins which mean that it can read up to 6 analog sensors simultaneously. The pinout of the ATMEGA 168V is as shown in the following figure:

Arduino Integrated Development Environment (IDE):

In the post on the Arduino UNO we learned that the Arduino UNO can easily be programmed using the Arduino IDE. The Arduino Lilypad can also be programmed in the similar way; that is the programming of the Arduino Lilypad is not different from that of the Arduino UNO however it should be kept in mind that Arduino Lilypad has different number of pins and different pin configuration. The care should be taken while configuring the Arduino Lilypad pins. As most of you might have known that in order to program a microcontroller one need to write the code in the editor, and then compile that code in the compiler after which you get the HEX file of that code and later upload that HEX file in the microcontroller IC using another program. In case of Arduino all these steps are performed in single software which is called the Arduino IDE. By integrated Development Environment it means that all the steps that editor, compiler, burner are integrated in the same software. In short Arduino Lilypad is quite easy to program it is just a matter of few clicks. I will go through in detail about how to write a code and upload it in Arduino Lilypad later in the post. Note. Before concluding this section it is important to note here that the drivers for the Arduino Lilypad should be installed in the computer before uploading the code because otherwise the Arduino board would not be recognized by the computer.

Arduino Lilypad features:

Let us now learn some of the general specifications of the Arduino Lilypad microcontroller development board. As stated earlier that the Lilypad is based on the ATMEGA168V microcontroller IC so the basic features of the Arduino Lilypad are essentially that of the ATMEGA168V microcontroller IC. Some of the general specifications of the Arduino Lilypad are as shown follows:

[otw_is sidebar=otw-sidebar-3]

  • Microcontroller IC:                  Microchip ATMEGA168V or ATMEGA328V
  • Operating Voltage:                    2.7V to 5 Volts
  • Input Voltage:                            2.7V to 5 Volts
  • Digital I/O Pins:                         14 (of which 6 provide PWM (Pulse Width Modulation) output)
  • Analog Input Pins:                     6
  • DC Current per I/O Pin:             40 mA (This is the current that can be sourced or sink into and out of the Input / Output pins)
  • Flash Memory:                           16 KB out of which 2 KB is used by boot loader
  • SRAM:                                         1 KB
  • EEPROM:                                     512 Bytes.
  • Clock Speed:                               8 MHz

Notice from the specifications of the Arduino Lilypad that most of the specifications of the Arduino Lilypad are in common with other Arduino boards such as Arduino PRO MINI and MICRO.

Arduino Lilypad Pinout:

Let us now dive into the discussion of the pinout of the Arduino Lilypad. As described earlier that the Arduino Lilypad is based on the ATMEGA168P microcontroller IC so it follows that the pinout of the Arduino Lilypad is simply that of the ATMEGA168P microcontroller but note here that the Arduino Lilypad has its own nomenclature for its pins and here I will use the nomenclature used by the Arduino for pin reference.

The Arduino Lilypad has a circular shape with the wholes on it for creating connections with the external circuits. The holes are made extra wide as Arduino Lilypad is intended to be sewn on the clothes. All the pins of the microcontroller can be accessed via these holes.

As pointed out earlier that the Arduino Lilypad has total 14 Digital Input / Output pins. The digital Input / Output pins can receive a digital signal or transfer a digital signal. Out of these 14 Digital Input / Output pins 6 are PWM (Pulse Width Modulation) enabled and some pins can also be configured as either SPI (Serial Peripheral Interface) or I2C (Inter-Integrated Circuit) computer bus. The Arduino Lilypad also has one UART with Rx and Tx signals on pin number 0 and 1 respectively that are used for serial communication. The Arduino Lilypad also has voltage pins on board with which it can be powered up itself or can power up other peripheral ICs. There are total 6 analog pins on the Arduino Lilypad. Unlike Digital pins these pins can just act as the Input pins, that are these pins can only receive signal and cannot provide signal or voltage that is why they are called Analog inputs. These analog inputs are actually the inputs of the Analog to Digital Converter inside the ATMEGA168P microcontroller. These pins can be connected to the output of the analog sensors. 6 different analog sensors can be connected to the Arduino Lilypad simultaneously. The analog pins of the Arduino Lilypad need some more discussion which will follow in the next sections.

Let us now discuss in detail the digital Input / Output pins, Analog input pins and Voltage pins of the Arduino Lilypad.

 

ARDUINO LILYPAD PINOUT,ARDUINO LILYPAD FOR BEGINNERS,ARDUINO LILYPAD PINS

Arduino Lilypad Digital Input / Output Pins:

As described in the previous section that the Arduino Lilypad has total 14 digital input / output pins out of which 6 digital input / output pins are PWM enabled. Some of these Digital Input / Output pins can also serve as the SPI (Serial Peripheral Interface) or I2C interface (Inter-Integrated Circuit). The detailed description is shown in the following figure:

The function that the digital input / output pins perform depends upon the coding of the Arduino Lilypad. That is whether the pin number 28 and 27 functions simply as Digital Input / Output or they are used as the Inter-Integrated Circuit(I2C) bus depends upon the coding that specifies their functionality using particular functions. In a similar way the digital input / output pins can also act as the SPI (Serial Peripheral Interface) bus, that is the pin number 18 and 17 act as the MISO (Master IN Slave Out) and MOSI (Master Out Slave In) respectively and pin number 16 and 19 gives the functionality of the Chip select (SS) and Serial Clock (SCK) and together they create the SPI bus. It is also important to note here that the Digital Input / Output pins are called as Input / Output because either they can be used as Input in which case they are intended to receive the signals from sensor or transducer (digital) or they can be used as Output in which case they drive the actuators such as relays. The functionality of the Digital Input / Output pins as either Input or Output is determined by the code also. It is important to realize here that digital input / output pins can only supply a limited amount of current which is not sufficient to drive the motors or relays therefore we need to use drivers such as stepper motor driver or L298 DC motor driver. I will come to the coding of the Arduino Lilypad later in this post. Another point worth mentioning is that six out of the 14 digital input / output pins are PWM enabled that is these pins can provide PWM (Pulse Width Modulation) signal as output. These PWM pins find applications in which we need to regulate something for example the speed of the motor or brightness of the lamp.

The pin number 0 and 1 bears the functionality of the Tx and Rx signals of the UART and these pins are also used for programming the Lilypad as pointed out earlier.

Arduino Lilypad Analog Pins:

As mentioned previously that the Arduino Lilypad has 6 Analog inputs which means that 6 different analog sensors can be interfaced to the Arduino Lilypad and the Arduino Lilypad can fetch the data from these 6 analog sensors simultaneously. Unlike the Digital Input / Output pins these Analog Pins are the input only that these pins can only receive the analog signals that is read the signals and cannot drive the signal outwards. The six analog pins are basically the inputs of the ADC (analog to digital converter) and are present on the pins 14, 15, 16, 17, 18, 19.

Arduino Lilypad PWM Pins:

Let us now discuss the PWM pins of the Arduino Lilypad in some detail. As mentioned in the previous section that the Arduino Lilypad has 6 PWM pins which are numbered as 9, 10, 15, 16 and 17. These digital pins can deliver the PWM signal as output. The PWM is the abbreviation of the Pulse Width Modulation and it is a phenomenon in which we adjust the width of the pulse according to the requirement of the applications. For example if one needs to regulate the speed of the motor or the brightness of the lamp this can be achieved by varying the width of the PWM signal. The power delivered by the PWM signal is the average of the signal for which it is zero and for which it is maximum. If the width of the PWM signal for which the signal remains HIGH is greater than more power will be delivered and thus reducing the width will cause the reduction in the power delivered. The width of the PWM signal for which the signal remains HIGH during its time period is referred to as the Duty Cycle of the PWM signal. The PWM pins are also used to control the angular position of the Servo motors.

Arduino Lilypad Schematics:

The Arduino Lilypad has simplest schematics among all the boards and almost similar to that of the Arduino PRO MINI. As told earlier that the Arduino Lilypad is based on the ATMEGA168P microcontroller which lacks the built in USB to UART Bridge and thus needs the external hardware in order to program the Lilypad which I will discuss in the next section. The schematic of the Arduino Lilypad is as shown in the following image:

 

 

Arduino Lilypad Programming:

As pointed in the earlier sections that we need an external hardware in order to program the Arduino Lilypad. This external hardware is called the FTDI converter and acts as the bridge between USB and the UART data. The FTDI converter receives the data in the USB format and then converts it to the form that is compatible to the Arduino Lilypad. As the Lilypad has the UART interface thus it can understand the data received from the FTDI converter.

Arduino Lilypad Applications:

Before discussing the programming language of the Arduino Lilypad let us first know the applications of the Arduino Lilypad for motivation.  Arduino Lilypad can be used in almost all the applications that are served by the other Arduino Boards unless limited by the number of the pins and the size of the memory. But it is important to note that die to the unique design of the Arduino Lilypad it has some unique applications. Arduino Lilypad is popular among e-textiles and wearable. Some of the applications of the Arduino Lilypad are as shown in the following.

  1. Pillow alarm.
  2. Helmet indicator.
  3. Jacket indicator.
  4. Step counter Shoes.
  5. Body Position sensor.
  6. Blood Pressure measurement.

 

Arduino Lilypad programming language:

[otw_is sidebar=otw-sidebar-3]

One of the perks that make Arduino Lilypad quite popular among the hobbyists and beginners is it’s easy to use programming language and programming. The programming language used by the Arduino Lilypad is the C++. The Arduino Lilypad IDE has a well-defined function for each task that is easy to remember. As an example the function that specifies the Arduino Lilypad digital Input / Output pin to work as input is:

pinMode(12,INPUT);

Here in this function there are two arguments. First argument is the pin number which we want to make input or output and second argument specifies the property that is input or output to the pin number used. The detailed discussion on programming the Arduino Lilypad will come later in the next posts.

That is all for now I hope this post would be helpful for you. In the next post I will come up with more interesting topics. Till then stay connected, keep reading and enjoy learning.

21 Comments

  1. Good – I should certainly pronounce, impressed with your website. I had no trouble navigating through all tabs as well as related information ended up being truly simple to do to access. I recently found what I hoped for before you know it at all. Quite unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your customer to communicate. Nice task.

  2. http://finasteride.store/# cost generic propecia pill

    WilliamReX
  3. tamoxifen lawsuit: tamoxifen hair loss – nolvadex pills

    RandallFaila
  4. tamoxifen generic where to buy nolvadex tamoxifen buy

    DavidbritY
  5. The Sumatra Slim Belly Tonic emerges as a groundbreaking solution in the realm of weight management, embodying a tropical formula meticulously crafted to support healthy weight loss. It is a culmination of a proprietary blend featuring eight natural ingredients, each playing a crucial role in fostering an environment conducive to shedding unwanted pounds.

  6. https://ciprofloxacin.tech/# cipro ciprofloxacin

    WilliamReX
  7. I like this web blog so much, saved to favorites. “American soldiers must be turned into lambs and eating them is tolerated.” by Muammar Qaddafi.

  8. Hi would you mind letting me know which hosting company you’re using? I’ve loaded your blog in 3 different internet browsers and I must say this blog loads a lot faster then most. Can you suggest a good internet hosting provider at a honest price? Thanks a lot, I appreciate it!

  9. lisinopril 20 mg price online: lisinopril without an rx – lisinopril in usa

    RandallFaila
  10. ciprofloxacin 500mg buy online buy generic ciprofloxacin п»їcipro generic

    DavidbritY
  11. CEREBROZEN aims to improve your hearing naturally. By taking drops of CEREBROZEN’s highly concentrated liquid formula daily, you can purportedly support healthy hearing and boost overall ear health.

  12. zestril brand buy zestril best lisinopril brand

    DavidbritY
  13. Hey very cool web site!! Man .. Excellent .. Amazing .. I’ll bookmark your website and take the feeds also…I am happy to find so many useful information here in the post, we need work out more strategies in this regard, thanks for sharing. . . . . .

  14. cost generic propecia without rx: cost of cheap propecia – cost cheap propecia tablets

    RandallFaila
  15. Wonderful goods from you, man. I’ve take into account your stuff prior to and you are just extremely excellent. I really like what you have got here, certainly like what you are stating and the way by which you are saying it. You make it enjoyable and you continue to take care of to keep it sensible. I can’t wait to read much more from you. That is actually a tremendous web site.

  16. https://finasteride.store/# cost propecia price

    WilliamReX
  17. cytotec abortion pill buy cytotec over the counter Abortion pills online

    DavidbritY
  18. lisinopril 10: 208 lisinopril – buy cheap lisinopril 40 mg no prescription

    RandallFaila
  19. Hi there would you mind sharing which blog platform you’re using? I’m planning to start my own blog soon but I’m having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique. P.S Apologies for getting off-topic but I had to ask!

  20. http://finasteride.store/# buying cheap propecia online

    RonaldAveve

Leave a Reply

Your email address will not be published. Required fields are marked *