Learn How To Use Tinkercad: Design, Program, and Test Electrical Circuit Virtually
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.
PIR Sensor
Relay
Light Bulb
Arduino UNO
Battery
Light Dependent Resistor
1
TINKERCAD TUTORIAL
1.
1. Click join now and follow online instruction to create an account. Select Create a personal
account.
2
TINKERCAD TUTORIAL
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.
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.
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
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 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 suitable power source can be used Terminal + Relay pin 2
according to Bulb, LED, or load requirements. Terminal - Bulb Terminal 2
10
TINKERCAD TUTORIAL
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
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
else
{
digitalWrite(Relay,LOW); // Turn OFF relay
}
}
12
20.
21.
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
15