The Ultimate Guide to Arduino Simulation using Tinkercad

by Jul 5, 2022Arduino IDE Programming, arduino uno projects

Introduction

In this tutorial, we will learn how to use the Tinkercad platform for Arduino Simulation. Tinkercad is one of the best platforms for circuit building and simulation, mainly because of its user-friendly interface. This tutorial will serve as a basis for circuit building using Arduino in Tinkercad. So let’s get started by getting familiar with the Tinkercad platform.

Creating an Account in Tinkercad

The first step is to create an account in Tinkercad. You can access the website by clicking here.

After visiting the website, click on SIGN UP to create a new account. Alternatively, you can directly login if you already have an account.

Tinkercad Homepage

Next, click on CREATE A PERSONAL ACCOUNT to start with your account creation.

Account Creation Interface

After that, you will be provided with several options to create an account.

You can either sign-up using your email ID, or sign in using your Google/Apple ID.

Sign-in Interface

Once you sign in to the Tinkercad platform, you will be able to see the following interface.

Subsequently, click on the TINKER drop-down menu

Tinkercad user-interface

As a result, you will be able to see many options. In order to get used to the platform, click on LEARNING CENTER.

Here, you will get lots of tutorials on how to use various sections of the platform.

Lessons

Creating your first project

Now, in order to start making your circuit, click on the CIRCUITS option.

Following that, click on the CREATE NEW CIRCUIT option.

Circuits interface

Now, let us make a simple Arduino simulation to make an LED blink.

The right-most part is the components section. Firstly, type in Arduino in the search bar. Drag out the Arduino into the workspace.

Placing the Arduino

Similarly, choose a breadboard and an LED and drag them onto the workspace.

After placing the main components, the workspace would look as shown below. Click the ZOOM TO FIT (square icon) on the top-left to view the entire setup.

Workspace

Now before making the connections, there are a few things to keep in mind about the breadboard. The first and the last 2 rows are internally connected (indicated by the blue markings). These rows are used for connecting the power supply(+) and the ground(-).

The holes in the middle (marked from A to J) are internally connected column-wise (indicated by the red markings). We place the components and connect them with each other using these holes.

Breadboard internal connections

Now, let’s start with the connections. Firstly, connect the cathode of the LED to the ground (GND) terminal of Arduino. Next, connect the anode of the LED to any of the digital pins (for eg. 9) of the Arduino. In order to limit the current flow through the LED, add a resistor (for eg. 1kΩ ) between the connection from the anode to the digital pin. The final setup would be as shown below

The final circuit for the Arduino simulation

Coding the Arduino

Now, let’s dive into the coding part. For coding the Arduino, Tinkercad provides us with 3 options – BLOCKS, BLOCKS+TEXT, and TEXT. In this tutorial, we will be focusing on the TEXT option i.e coding using C++.

First, click on the CODE option on the top right side of the interface. Then, select the TEXT option of the Edit mode. As a result, a default template code will be visible as shown below

Coding interface

First, let’s look at the setup() function. The code that we write within the setup() function only runs once. Here, we use the pinMode() function to configure a pin as input/output. For our project, we configure pin 9 as the output by replacing the LED_BUILTIN with 9.

Next, let’s look at the loop() function. The code that we write within the loop() function keeps on getting executed until we stop the simulation. The digitalWrite() function is used to write (assign) a HIGH/LOW value to a pin. We do this in order to turn the LED ON/OFF respectively. Remember to replace the LED_BUILTIN parameter with the pin number (9).

We use the delay() function between the digitalWrite() functions in order to make the blinking action visible. So here, we use 1000 milliseconds as the delay time.

On making the necessary changes, the code will look as follows

C++ code for the simulation

Now, we’re ready to go for our first simulation! Click on START SIMULATION on the top right side, and see the LED blink ON and OFF!

Starting the Simulation
LED ON
LED OFF

Conclusion

So, we have successfully completed our first simulation project in Tinkercad. Also, if you are interested in knowing about the hardware implementation of blinking an LED using Arduino, you can click here. Hope that this tutorial was informative and worth your time.

Happy learning!

Creating a multiplication Skill in Alexa using python

Written By Monisha Macharla

Hi, I'm Monisha. I am a tech blogger and a hobbyist. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning!

RELATED POSTS

DIY project: Using RGB LED with Blynk

DIY project: Using RGB LED with Blynk

We already have talked about using Blynk with Arduino. In this tutorial, we will make a DIY project using RGB LED with Blynk. We will also control the intensity of it using some special widgets in Blynk. Contents: RGB LED with Blynk IntroductionMaterials...

Using a Seven Segment Display with Arduino

Using a Seven Segment Display with Arduino

Let's learn how to configure a SSD (Seven segment display) with Arduino. You will also learn to make the counter using a single SSD. Contents: IntroductionMaterials RequiredCircuitArduino CodeCode Explanation 1. Introduction The Seven Segment Display has basically 10...

Using Stepper motors with Arduino

In this tutorial, you will learn to configure the stepper motors with the Arduino Uno. https://iot4beginners.com/arduino-uno-a-basic-introduction/ Contents: IntroductionMaterials requiredHardware ExplanationThe circuitArduino CodeA DIY Project's idea 1. Introduction...

DIY Project: Arduino controlled Bluetooth Car

DIY Project: Arduino controlled Bluetooth Car

Let's make a wireless Arduino Controlled Bluetooth car. Contents: IntroductionMaterials RequiredIntegrating the Chassis kitArduino CodeThe Circuit and it's ExplanationConfiguring the Mobile ApplicationThe Final Run 1. Introduction Hey everyone, today we are going to...

How to use Ultrasonic Sensor with Arduino?

How to use Ultrasonic Sensor with Arduino?

Introduction Ultrasonic sensors work by emitting sound waves at a frequency too high for humans to hear. They then wait for the sound to be reflected back, calculating distance based on the time required.  Since ultrasonic waves can reflect off a glass or liquid...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....