Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
558 views

3c - Tinkercad Arduino Simulator Tutorial

The document provides instructions for using Tinkercad to design, program, and test electrical circuits virtually. Key points: - Tinkercad is a free online 3D design program that allows designing circuits virtually without physical components. - The tutorial walks through creating an account, starting a new circuit project, adding components like an Arduino, resistor, and photoresistor, wiring them together, programming the Arduino code, and using the serial monitor to test the circuit's response to light intensity changes. - The example circuit and code demonstrates using a light dependent resistor to detect light levels and map them to states of "dark", "dim", "medium", and "bright".
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
558 views

3c - Tinkercad Arduino Simulator Tutorial

The document provides instructions for using Tinkercad to design, program, and test electrical circuits virtually. Key points: - Tinkercad is a free online 3D design program that allows designing circuits virtually without physical components. - The tutorial walks through creating an account, starting a new circuit project, adding components like an Arduino, resistor, and photoresistor, wiring them together, programming the Arduino code, and using the serial monitor to test the circuit's response to light intensity changes. - The example circuit and code demonstrates using a light dependent resistor to detect light levels and map them to states of "dark", "dim", "medium", and "bright".
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

LEARN HOW TO USE TINKERCAD

Design, program, and test electrical circuit virtually.

Contents
I. Introduction......................................................................................................................................................................2
II. Create a Tinkercad Account and Create a New Project..................................................................................................2
III. Create New Circuit project.............................................................................................................................................3
IV. Building the Circuit.........................................................................................................................................................7
V. Programming with Arduino...........................................................................................................................................12

1
I. Introduction
Tinkercad is a free and easy-to-use application for 3D design, electronics, and coding.

From an idea to projects in minutes!

Autodesk's Tinkercad is one of the most popular classroom tools for creating simple designs from scratch and for
quickly modifying existing designs. It is a free online 3D design program that you can use in your web browser
without downloading any software. Tinkercad is extremely intuitive and easy to use and has built-in Lessons to
help you learn the ropes, making it perfect for beginners both young and old.

No need to buy any physical components, sensors, Arduino boards or modules.

No destruction of any physical components if circuit is incorrect.

Make your presentation clean and professional.

II. Create a Tinkercad Account and Create a


New Project
Access to https://www.tinkercad.com/

Click join now and follow online instruction to create an account. Select Create a personal account.

2
III. Create New Circuit project

3D Design: Tinkercad is similar to a CAD software where you can design 3D models
for 3d printing. The CAD software is based on constructive solid geometry (CSG),
which allows users to create complex models by combining simpler objects
together.

Circuits: This option helps create a virtual circuit, program it, and test it in real
time.

Codeblocks: This new feature helps you create a block programming tree, where
the 3D models are formed step by step following the tree instructions.

Lessons: Tinkercad has feature where one can learn from lessons created by
different users online and can access later with this option.

Create project: This will create a directory where you can store all 3D models and
circuit for one specific project.

3
Select the Circuits option and Create new Circuit.

3 4

2
1

1. This space is where we will place all the components. The components can be
moved around, edited, and wired together.

2. This section holds all the components. Scroll down to access component types.

3. Use this tab to rotate, delete, undo or redo. It also helps users to create and
name labels for components.

4. This option helps you program Arduino, use serial monitor, start real time
simulation, export code, and share your projects.

4
These are the components available in the basic option.

To get access to more components select All option.

5
Tinkercad has many components and modules which can be used with Arduino UNO, some of the examples are
shown in image below.

6
IV. Building the Circuit
This tutorial will guide you by States of lights, used with sensor input (photoresistor).

7
Place all the components as image below by selecting them from the components section on right side. Click on
the component to select and click again anywhere on workspace to place (You can search).

 Breadboard small
 Arduino Uno R3
 Resistor
 Photoresistor

8
For changing the components value, select the component and change value.

9
Move the components to righ position by drag and drop and rotating.
Hover over the points of the components to know the terminal name and click it to start wiring the components.
While wiring click ● to bend the wire as show in image below.

10
Click on wire to select the wire colour. This helps in differentiating between wire use. For example, 5v wire colour
is Red and for GND (Ground) wire colour is Black.

Wire all the components as shown in the image below.

11
V. Programming with Arduino
Once wiring is complete, select the code option to start coding.

Use the Text option to write the code for this tutorial or use block coding.

This is where all code can be written. Copy and paste the code shown on next page.

12
Arduino Code

// these constants won't change. They are the lowest and highest readings
you
// get from your sensor:
const int sensorMin = 0;      // sensor minimum, discovered through
experiment
const int sensorMax = 600;    // sensor maximum, discovered through
experiment

void setup() {
  // initialize serial communication:
  Serial.begin(9600);
}

void loop() {
  // read the sensor:
  int sensorReading = analogRead(A0);
Serial.print(sensorReading);

  // map the sensor range to a range of four options:


  int range = map(sensorReading, sensorMin, sensorMax, 0, 3);

  // do something different depending on the range value:


  switch (range) {
    case 0:    // your hand is on the sensor
      Serial.println(" - dark");
      break;
    case 1:    // your hand is close to the sensor
      Serial.println(" - dim");
      break;
    case 2:    // your hand is a few inches from the sensor
      Serial.println(" - medium");
      break;
    case 3:    // your hand is nowhere near the sensor
      Serial.println(" - bright");
      break;
  }
  delay(1);        // delay in between reads for stability
}

13
Start Simulation after writing the code.

Click Serial Monitor to see the real time value of the LDR sensor output. This helps us know if its dark, dim,
medium or bright.

14
Slide the point on bar towards dark or bright, it detects the brightness intensity.
The raw values and the states can be seen on Serial Monitor.

Dark Bright

15

You might also like