Arduino LilyPad library for Proteus overview, Arduino LilyPad, Proteus library installation, AVR simulation

Arduino Lilypad Library for Proteus

2.5K Views
40
700
60
25
60
PCBWay

Hello friends! Today, we will install the Arduino LilyPad library for Proteus and prepare a small simulation to check the installation. This article continues our earlier Arduino library tutorial, with particular attention to the LilyPad and Nano parts included in this older library package.

Updates

Arduino Lilypad Library for Proteus

Latest version: V1.0 (December 2014, this tutorial)

Helping Tools

We will start by identifying the files, place the library in a directory that Proteus actually searches, select the board and load a compiled sketch. I will also explain the clock and processor settings, because finding a board in the component picker is only the first part of a working simulation.

The original post credited this library to blogembarcado. That credit is retained: this particular archive was not created by The Engineering Projects. It is a historical library download, and the earlier report of testing on Proteus 7 should not be interpreted as a fresh compatibility test of every current Proteus release.

Arduino LilyPad library for Proteus overview, Arduino LilyPad, Proteus library installation, AVR simulation
Figure: Arduino LilyPad library for Proteus overview.

What Is the Arduino LilyPad?

LilyPad boards were designed for wearable and electronic-textile projects, with connection pads that make it easier to attach conductive thread and external components. The round appearance is a board-layout feature; the program still runs on a particular microcontroller with defined pins, memory and peripherals.

Different LilyPad products are not identical. The classic LilyPad Arduino options in the official Arduino AVR board definitions include ATmega168 and ATmega328P configurations using an 8 MHz build clock. LilyPad USB variants use a different processor and should not be selected merely because their names contain LilyPad.

For a simulation, the processor represented inside the Proteus part must match the program you compile. A drawing that resembles a LilyPad is not enough to establish the correct target. Check the model properties and any documentation included with the package before choosing an Arduino processor option.

Boards Listed in the Historical Library

The original package was presented as a collection containing the following board symbols. The screenshots show the historical selection interface and help identify the package, but they do not establish that every peripheral on every board has been tested.

Board entries described by the original library post
Board entryWhat to check before compiling
Arduino UNOProcessor, board pin mapping and model clock
Arduino UNO SMDModel target rather than package appearance alone
Arduino MegaExact processor variant, not just the Mega label
Arduino NanoProcessor option and clock associated with the selected part
Arduino LilyPadClassic LilyPad processor option and matching clock

Some entries may overlap with other Arduino libraries already installed on your computer. Keep track of which library supplies a selected part. Two components with similar display names may use different models, property names or pin mappings.

The earlier screenshot also included an ultrasonic component, but the original author explicitly had not tested it in that post. This tutorial therefore focuses on installing and using the Arduino board entries. For a separate sensor example, see the ultrasonic sensor library article.

Download the LilyPad Library

Use the original download below. Keep a copy of the archive before extracting it so you can identify the package later or restore the same version when reproducing a project.

Arduino Lilypad Library for Proteus

The original installation instructions identify a file named BLOGEMBARCADO.LIB. Extract the archive into a temporary working folder and inspect its contents. If it includes documentation or companion files, retain them with the package and follow their stated placement requirements.

Do not rename the archive extension to LIB, and do not create an empty index file because another tutorial mentions one. Different library packages can contain different combinations of files. A filename extension is not a conversion tool, and a fabricated companion file cannot replace missing library data.

This article preserves the historical download rather than claiming that it has been rebuilt or retested. Before sharing the library in another package, check the permissions supplied by its creator and keep the original attribution. A download being accessible does not by itself define its redistribution licence.

Install the Library in Proteus

Close the schematic application before changing its library files. Then identify the library directory configured for your Proteus installation. The original tutorial used the following Proteus 7 location on one Windows computer:

C:\Program Files (x86)\Labcenter Electronics\Proteus 7 Professional\LIBRARY

That path is historical, not a universal location. Later versions and different installations can use other folders, including shared-data or user-library locations. Check the configured library paths or Library Manager in your installed version rather than copying files into a similarly named folder at random.

Labcenter documents its library-management facilities on the Proteus libraries page. Keep custom libraries separate from vendor-supplied libraries where your installation supports it, so a future application update is less likely to overwrite your additions.

  1. Extract the downloaded package completely.
  2. Locate BLOGEMBARCADO.LIB and any documented companion files.
  3. Identify an active Proteus library directory.
  4. Copy the required files into that directory.
  5. Restart Proteus so its library list can be refreshed.
  6. Open the component picker and search for Arduino or LilyPad.

If Windows denies permission to write into a protected installation directory, use an appropriate configured user-library location or your normal authorized installation process. Changing permissions across an entire application folder is unnecessary for installing one library.

Find and Place the LilyPad Component

In the component picker, search for Arduino and inspect the available entries. The historical screenshot below shows the board list from the package. Your interface may look different, but the important result is that the intended LilyPad entry appears and can be selected.

Arduino board entries in the historical Proteus library, Arduino LilyPad, Proteus library installation, AVR simulation
Figure: Arduino board entries in the historical Proteus library.

Place one LilyPad component on a blank schematic. Before adding a sensor or display, open its properties and identify the program-file and clock settings. A minimal circuit is easier to diagnose than a large project with several unrelated faults.

The next image preserves the original overview of the five board entries. It is useful for recognizing their symbols, but do not infer that all five use the same microcontroller or the same clock.

Five Arduino board symbols in the BLOGEMBARCADO library, Arduino LilyPad, Proteus library installation, AVR simulation
Figure: Five Arduino board symbols in the BLOGEMBARCADO library.

The LilyPad and Nano entries were the main additions discussed in the original post. They are shown together below. Although a sketch using basic digital outputs may look similar on both boards, compile it for the actual simulated target.

LilyPad and Nano components from the historical library, Arduino LilyPad, Proteus library installation, AVR simulation
Figure: LilyPad and Nano components from the historical library.

Prepare the Arduino Build Environment

Open Arduino IDE and install the Arduino AVR Boards platform if it is not already available. Select the classic LilyPad Arduino board and the processor option that matches your model. Do not select an UNO simply because it uses a related AVR device.

The processor selection affects the generated machine code and memory assumptions. The board clock also affects timing functions and peripheral configuration. The AVR board-definition file is a useful reference, but the library's own model settings still need to be checked against it.

Settings that must agree
ItemArduino sideProteus side
ProcessorSelected board and processor optionMicrocontroller represented by the component
ClockBuild-time CPU frequencySimulation clock property
Pin identityArduino digital or analog pin labelCorresponding labelled connection on the board symbol
ProgramFresh compiled outputProgram File points to that output

For the classic 8 MHz configuration, a sketch built with a 16 MHz assumption can run with incorrect delays and serial timing on an 8 MHz model. Correcting a delay value manually may hide one symptom while leaving other timing-dependent functions wrong. Match the underlying configuration instead.

Create a Minimal LED Test

Use one external LED connected to a known digital pad, such as D2, through a series resistor. Connect its cathode to the circuit ground and supply the model as required by its exposed or documented power connections. Do not assume an onboard LED is implemented or mapped identically in every third-party symbol.

const byte testLed = 2;

void setup() {
  pinMode(testLed, OUTPUT);
  digitalWrite(testLed, LOW);
}

void loop() {
  digitalWrite(testLed, HIGH);
  delay(500);
  digitalWrite(testLed, LOW);
  delay(500);
}

This test has a nominal half-second on interval and half-second off interval. Its full period is approximately one second, so the expected frequency is about 1 Hz. The short program makes it easier to isolate a missing program file, wrong pin or clock mismatch.

Choose the resistor from the selected supply and LED characteristics. For an illustrative 3.3 V supply, a red LED with a 2 V forward drop and a 3 mA target current, R = (3.3 - 2)/0.003 = approximately 433 ohms. A 470-ohm standard value gives about 2.8 mA under those assumptions.

This calculation is an example, not a universal LilyPad supply recommendation. Check the exact physical board's voltage limits before building hardware. The correct value also changes with LED colour, output voltage and desired current.

Export the HEX File

Save the sketch in a named folder and compile it. Resolve compilation errors before looking for a usable output file. Then use the Arduino IDE's Sketch menu and Export Compiled Binary command to produce a persistent copy of the compiled output.

The Arduino platform specification describes the export mechanism. The exact output layout can depend on the IDE and board package, so inspect the sketch's output location and compilation messages rather than relying on an old temporary-directory path.

For an AVR sketch, locate the generated HEX file. Where both application-only and bootloader-inclusive files are produced, the application-only image is normally the relevant starting point for a simulator loading the program directly. Check the model's reset and program-loading expectations rather than selecting a bootloader image by name alone.

An INO file contains source code. A HEX file contains encoded program data for the target device. Renaming an INO file to HEX does not compile it. Similarly, an old HEX file left in the folder does not prove the latest edit compiled successfully.

Load the Program and Run the Simulation

  1. Stop the simulation if it is already running.
  2. Open the LilyPad component properties.
  3. Set Program File to the freshly exported HEX file.
  4. Confirm the simulated clock matches the build setting.
  5. Check supply, ground and the external LED connection.
  6. Start the simulation and observe D2 and the LED.

Loading a program into a Proteus model is different from uploading firmware to a physical board. You do not need a USB port merely to compile and load a simulation image. A real board may require a bootloader, serial adapter or programmer, depending on its exact design.

Use simulation time when checking the blink interval. If the computer cannot maintain real-time simulation, one second of wall-clock time may not equal one second of simulated circuit time. A logic analyser or timing cursor gives a more useful measurement than watching the LED by eye.

Troubleshoot the Installation in Order

Symptoms and likely places to investigate
SymptomCheck
LilyPad is missing from the pickerArchive extraction, configured library path and application restart
Several similar LilyPad entries appearLibrary origin and duplicate installations
Part appears but simulation cannot startRequired processor model and available VSM support
Program file cannot be loadedFile path, file type and successful recent compilation
LED remains darkPin mapping, polarity, supply, ground and resistor connection
Blink timing is wrongBuild clock, model clock and simulation-time measurement

Change one variable at a time. If you replace the library, change the processor option and rewire the LED together, a successful result will not tell you which correction mattered. Keep the first working test as a separate project before adding more components.

If a library symbol loads but the underlying microcontroller model is unavailable, copying the same LIB file repeatedly will not supply that missing model. Check your installed Proteus capabilities and the component's requirements. The original post's Proteus 7 experience does not establish support in every edition or later release.

From a Library Test to a Useful Project

Once the LED test works, add one input and verify its electrical state before writing a complex response. A button should have a defined pull-up or pull-down; an unconnected input can produce unpredictable readings. Then add the next output or sensor and repeat the same small-step approach.

For a guided example, continue with Arduino LilyPad simulation in Proteus. That tutorial uses three LEDs and an input to show how pin configuration, circuit wiring and firmware behaviour fit together.

Keep the source, compiled image and schematic together, but also record the library version and clock settings. A schematic copied to another computer may retain an absolute program-file path that no longer exists. Re-select the local HEX file rather than assuming the old path remains valid.

Keep a Small Compatibility Record

Before moving on, write down the Proteus version and edition, the library filename, the selected board entry, the Arduino AVR Boards version, the processor option and the clock value. Add the observed blink period measured in simulation time. This short record is much more useful than a note saying only that the library works.

If another computer produces a different result, compare those fields first. An older component may expose its processor settings through a nested model or use different property names. Identify the actual setting rather than creating a new text label that the simulator does not use.

You can also distinguish a pin problem from a timing problem with two small experiments. First, make D2 continuously HIGH and measure its voltage relative to ground. Then restore the blink program and measure the transition interval. A correct static level with incorrect timing points toward configuration or execution details, while a permanently LOW output suggests a different problem.

When the test succeeds, preserve the working schematic before changing its processor, supply or attached devices. That gives you a known baseline to return to and prevents a later sensor problem from becoming confused with library installation.

Library Review and Simulation Limits

The value of this package is that it provides recognizable board-level components for learning and reproducing older projects. Its main limitation is its age and the need to establish compatibility with your actual Proteus environment. A successful basic output test is a useful first check, not a complete validation of every peripheral.

A wearable circuit also introduces physical effects that a board symbol does not automatically model. Conductive thread has resistance, connections can loosen and a battery's voltage changes under load. A simulation of ideal wires and a fixed source cannot establish the reliability of a finished garment.

Similarly, the presence of an Arduino-shaped symbol does not add every external sensor library to Proteus. The firmware library, schematic component and simulation model are separate dependencies. Verify each one when extending the circuit.

Frequently Asked Questions

Was this library developed by The Engineering Projects?

No. The original article credited blogembarcado, and that attribution remains. This page explains the historical package and its installation workflow.

Can I install BLOGEMBARCADO.LIB through Arduino Library Manager?

No. It is a Proteus library file. Arduino Library Manager installs code libraries used when compiling sketches, which is a different purpose.

Will it work in every Proteus version?

That is not established. The original report referred to Proteus 7. Check the file format, processor-model support and minimal test in your installed version.

Should I choose LilyPad USB in Arduino IDE?

Only if the selected Proteus model actually represents that hardware. For the classic AVR LilyPad configuration, select its matching board and processor instead.

Why does my program run at the wrong speed?

Check whether the firmware was compiled for the same clock configured in the simulated microcontroller. Also compare simulated time rather than only elapsed time on your computer.


Comments

3

Join the conversation

1 reply
Reply2

When I simulate arduino I got this error
mixed model AVR2.DLL failed to authorize - Missing or invalid Customer Key.. [SIM1]