“AT THE END OF THIS TUTORIAL, YOU WILL LEARN HOW TO SIMULATE ARDUINO IN PROTEUS, YOU CAN WATCH THE VIDEO ABOVE OR YOU CAN READ THE TUTORIAL BELOW.“
What is Arduino?
Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino microcontroller is a microcontroller unit that can be used to make varieties of electronic projects, like robots, RC cars, 3D printers, embedded systems, displays, etc. The internet abound with so many Arduino projects and designs. At the same time, Arduino has a large community of tech enthusiasts and hobbyists, who are building and making things everyday. Most enthusiasts and hobbyists have access to Arduino parts to carry out their designs. For those that do not have Arduino parts, they resort to Electronic Circuit simulation. Sometimes, people resort to circuit simulation not because they do not have access to parts, but because they want to test the behavior of the Arduino circuit before they can eventually delve into the real design. Whatever the reason is, we will understand that Arduino simulation is a big practice in the hardware hobbyist community. If you want to learn more about Arduino board and how to use it, then check the tutorial at the end of this article.
There are few platforms and software out there that can be used for Arduino simulation, but one of them stands out to be the commonly used, and that is the Proteus design suite.
What is Proteus?
Proteus Design Suite is a proprietary software tool suite used primarily for electronic design automation. The software is used mainly by electronic design engineers and technicians to create schematics and electronic prints for manufacturing printed circuit boards.
Proteus circuit design and simulation software has been in use for years, and has proven to be efficient in circuit design and simulation including printed circuit board design (PCB) design. The Arduino board is made with Atmel AVR controllers like the Atmega32 and host of others. the Proteus design suite comes with simulation libraries for these microcontrollers, however, some tech geeks in the Arduino community have done a great job in creating some Arduino boar libraries for Proteus. they have also created a lot of Arduino compatible sensor libraries. TheengineeringProjects has done a tremendous work in creating such libraries.
How to simulate Arduino in Proteus
To simulate Arduino in Proteus, you need the following:
- Proteus design suite
- Arduino IDE
- Arduino Proteus library
If you do not have Proteus already installed on your computer, do not worry, I have already made a tutorial on how to download and install Proteus on a computer. The tutorial has everything you need to know about downloading and installing Proteus on your computer, it also has all the Arduino libraries.
Once you have installed Proteus on your computer, you will have to install the Arduino IDE if you do not already have it. To install Arduino IDE, you have to visit the Arduino official website Arduino.cc to download the software.
After installing the Arduino IDE, you will then add the Arduino libraries to the Proteus simulation software you have downloaded. If you do not have Arduino libraries, then visit theengineeringprojects.com to download it.
Once you have all these, we then take the following steps to simulate Arduino in Proteus:
- Add the Arduino library to Proteus
- Design the circuit in Proteus
- Write the Arduino sketch
- Copy the Arduino sketch HEX file and upload on the Arduino in Proteus
- Run the Proteus simulation
Add Arduino library to Proteus
- Highlight and copy the Arduino library files
- Navigate to the location on your computer where Proteus is installed and open Library. If you downloaded the Proteus software from my website, then, you can find the Proteus library using the information on the image below as a guide. However, if you couldn’t find it there, then navigate to ProgramData>>Labcenter electronics>>Proteus>>Library the, paste the copied files in this library folder.
Draw circuit diagram in Proteus
To design the circuit in Proteus, you open the Proteus design suite and draw the circuit below. The circuit is a simple circuit to blink an LED.
To pick the parts in Proteus, click the Part button and type the following parts to add them to the Proteus simulator:
- LED-ACTIVE RED
After that, you connect the parts as shown below.
Write the Arduino sketch
After designing the circuit as shown above, you open the Arduino IDE and navigate to File>>Examples>>Basics>>Blink. This will open the pre-installed blink sketch. See image below:
Copy HEX file and upload to Arduino in Proteus
Once you have opened the blink file, click the File button on your Arduino IDE and navigate to preference, then check the box “show verbose output during“, see image below.
After you have done the above, compile the Arduino code. Once it is done compiling, then copy the HEX file of the compiled sketch and upload to the Arduino in Proteus. To do this, you copy the file as shown in the image below. Highlight the text in blue and press Ctrl + C to copy the text. Open the Proteus simulation where your Arduino circuit is. Double the Arduino board and paste the copied file in the window called “Program file” then press ok. Now we are ready to run the simulation.
Simulate Arduino in Proteus
Now that everything is set, to run the simulation, you simply press the green play button, and you will the simulation. See video of simulation result below.
Now you have learnt to simulate Arduino in Proteus. Congratulations!!!
Suggested Further reading