C8: Arduino Basic + Sensor Interfacing

Aim:
To connect different sensors to the Arduino Uno and read their values in Tinkercad.

Requirements:

  • Computer with internet access

  • Tinkercad account

  • Virtual components in Tinkercad:

    • Arduino Uno

    • Breadboard

    • LDR (Light Dependent Resistor)

    • Ultrasonic Sensor (HC-SR04)

    • Temperature Sensor (TMP36)

Steps:

Step 1: Open Tinkercad Circuits

  1. Log in to Tinkercad.

  2. Go to Circuits → Create New Circuit.

  3. You will see a blank workspace.

Step 2: Place Arduino and Breadboard

  1. From the components menu, drag an Arduino Uno into the workspace.

  2. Drag a breadboard beside it (this helps in connecting sensors neatly).

Step 3: Add and Connect Sensors

(A) Light Sensor (LDR):

  1. Drag an LDR onto the breadboard.

  2. Connect one pin of the LDR to 5V (Arduino power).

  3. Connect the other pin to A0 (an analog pin).

  4. Also connect a 10kΩ resistor from that pin to GND (to stabilize readings).

(B) Ultrasonic Sensor (HC-SR04):

  1. Place the ultrasonic sensor on the breadboard.

  2. Connect VCC → 5V, GND → GND.

  3. Connect Trig pin → Digital pin 9, Echo pin → Digital pin 10.
    (These pins help Arduino measure distance by sending and receiving sound waves.)

(C) Temperature Sensor (TMP36):

  1. Drag the TMP36 sensor onto the breadboard.

  2. Connect Left pin → 5V, Right pin → GND, Middle pin → A1.
    (This gives a voltage that changes with temperature.)

Step 4: Start Simulation

  1. Click Start Simulation in Tinkercad.

  2. Open the Serial Monitor (top right corner).

  3. You will see numbers being printed. These are the sensor readings.

Step 5: Test the Sensors

  • For LDR: Use Tinkercad’s slider to change light intensity. Watch values change from low (dark) to high (bright).

  • For Ultrasonic Sensor: Drag an object closer or farther in simulation. Values show distance in cm.

  • For Temperature Sensor: Adjust the environment temperature in simulation. The readings increase or decrease.

Fill in the form for S’O’A Fablab Orientation 2021.