LEARN HOW TO USE TINKERCAD
Design, program, and test electrical circuit virtually.
                                                                                                Abstract
This guide will help you to create electrical circuits, program it with Arduino and test it in real time.
                                                         Autodesk and TinkerCAD are registered trademark of Autodesk Inc.
    APPLICATIONS OF TINKERCAD
 What is TinkerCAD and what
 is it used for?
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.
Aim for this tutorial is:
Learn how to select, place and program components using Arduino. This tutorial will guide you by
making a motion detection and light detection door light.
                                              PIR Sensor
                                                                 Relay
                                                                               Light Bulb
                       Arduino UNO
                                                                            Battery
        Light Dependent Resistor
                                                                                                   1
    TINKERCAD TUTORIAL
 Create a Tinkercad Account
 and Create a New Project
                                                                                    1.
1. Click join now and follow online instruction to create an account. Select Create a personal
   account.
                                                                                                 2
 TINKERCAD TUTORIAL
 Create New Circuit project
                2.
2. 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
     3.
3. Select the Circuits option and Create new Circuit.
   6.                                                             7.
                                         4.                                                  5.
4. This space is where we will place all the components. The components can be moved
   around, edited, and wired together.
5. This section holds all the components. Scroll down to access component types.
6. Use this tab to rotate, delete, undo or redo. It also helps users to create and name labels for
   components.
7. This option helps you program Arduino, use serial monitor, start real time simulation, export
   code, and share your projects.
                                                                                                   4
8. These are the components available in the basic option.
                                                             9.
9. To get access to more components select All option.
                                                                  5
10. Tinkercad has many components and modules which can be used with Arduino UNO, some
    of the examples are shown in image above.
                                                                                     6
 TINKERCAD TUTORIAL
 Building the Circuit
                                    PIR Sensor    Relay
                  Arduino UNO
                                                          Bulb
                                                          Battery
                    LDR         1k Resistor
11. Place all the components as image above by selecting them from the components section
   on right side. Click on the component to select and click again anywhere on workspace to
   place.
                                                                                              7
                                                                                12.1.
                                 12.
12. For changing the components value, select the component and change value at 12.1.
                                          13.
13. Hover over the points of the module to know the output name and click it to start wiring the
   components.
14. While wiring click   to bend the wire as show in image above.
                                                                                                   8
                                                               15.
15. 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.
16. Wire all the components as shown in the image above. Details of components and wiring is
   as below.
                                                                                                   9
Components and Wiring
PIR Sensor                                       Product Name              HC-SR501 Body Sensor
                                                                           Module
                                                 Operating Voltage Range   5-20VDC
                                                 Quiescent Current         <50uA
                                                 Level output              High 3.3 V /Low 0V
                                                 Delay time                5-300S(adjustable)
                                                                           Range (approximately
                                                                           .3Sec -5Min)
                                                 Board Dimensions          32mm*24mm
                                                 Angle Sensor              <110˚ Cone Angle
                                                 Operation Temp            -15 to +70 degrees
                                                Pin GND           Arduino GND
                                                Pin POW           Arduino 5V
                                                Pin Output        Arduino D2
Relay                                            Product Name              KS23-M-DC5
                                                 Operating Voltage         5VDC
                                                 Coil Power                0.20W
                                                 Dimension                 21 x 10 x 12mm
                                                 Max switch power and      48W 60VA
                                                 voltage                   24Vdc 220Vac
                                                 Operating Temp            -30 to 70 degrees
                                                Pin 8        Arduino D4
                                                Pin 1        Arduino GND
                                                Pin 2        Battery +
                                                Pin 4        Bulb Terminal 1
LDR                                              Product Name              NSL-19M51
                                                 Max AC or DC voltage      320V
                                                 Current                   75mA
                                                 Operating Temp            -60 to 75 degree
                                                 Cell Resistance 1000Lux   400Ω
                                                                 10Lux     9KΩ
                                                 Dark Resistance           1 MΩ
                                                Terminal 1          Arduino 5v
                                                Terminal 2          Arduino A0
Resistor                                         Product Name              Carbon Film Fix Resistor
                                                 Value                     1000Ω
                                                 Power                     1/4W
                                                Terminal 1       Arduino A0
                                                Terminal 2       Arduino GND
Bulb                                            9V Bulb
Note: Any AC or DC Bulb or LED or load can      Terminal 1        Relay Pin 4
be used with relay.                             Terminal 2        Battery GND
Battery (Power Source)                          9v Battery
Note: Any suitable power source can be used     Terminal +       Relay pin 2
according to Bulb, LED, or load requirements.   Terminal -       Bulb Terminal 2
                                                                                                      10
 TINKERCAD TUTORIAL
 Programming with Arduino
                                                                    17.
                                                          18.
                                                                                         19.
17. Once wiring is complete, select the code option to start coding.
18. Use the Text option to write the code for this tutorial or use block coding.
19. This is where all code can be written. Copy and paste the code shown on next page.
                                                                                           11
Arduino Code
#define PIR 2                            // Defining PIR Input pin
#define Relay 4                          // Defining Relay Output pin
#define LDR A0                           // Defining LDR Input pin
void setup()
{
    pinMode(Relay,OUTPUT);               // Initializing Relay Pin as Output
    pinMode(PIR,INPUT);                  // Initializing PIR Pin as INPUT
    pinMode(LDR,INPUT);                  // Initializing LDR Pin as Input
    Serial.begin(9600);                  // Initializing Serial Monitor
}
void loop()
{
    Serial.println(analogRead(LDR));     // print LDR raw value on serial monitor
    if ((analogRead(LDR)) <= 500)        // Condition if it is dark outside
    {
        if((digitalRead(PIR)) == HIGH)   // Condition if we detect any movement on sensor
        {
            digitalWrite(Relay,HIGH);    // Turn ON relay
            delay(5000);                 // Keeps the light ON for 5sec
        else                             // if it is bright outside follow this
        {
            digitalWrite(Relay,LOW);     // Turn OFF relay
        }
    }
    else
    {
        digitalWrite(Relay,LOW);         // Turn OFF relay
    }
}
                                                                                            12
                                                                                         20.
                                                                           21.
  20. Start the simulation after writing the code.
  21. Click serial monitor to see the real time value of the LDR sensor output. This helps us know if its Day
      or Night.
                          22.
                  Day    Night
Slide the point on bar towards Day or Night, it detects the brightness intensity. The Raw values can be
seen on Serial Monitor. We have identified 500 as threshold in the code. Any value below 500 means it is
dark outside and any value above 500 means it is bright.
                                                                                                           13
                                23.
                                  24.
22. Click and drag the blue dot to create a physical movement in front of sensor.
23. If the sensor detects any movement it will turn red and the bulb will turn ON.
                                                                                     14
Contact Information
Contact us for any information at makerspace@uwindsor.ca
Website: www.epicentreuwindsor.ca
Follow us on social media:
Facebook: @WindsorMoldGroupEPICMakersBase and @epicentre.uwindsor
Twitter: @UofW_EPICentre
Instagram: @epicentre_uwindsor
LinkedIn: epicentre-uwindsor
                                                                    15