element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino Projects
  • Products
  • Arduino
  • Arduino Projects
  • More
  • Cancel
Arduino Projects
Blog TinkerCad Tutorial #2 Arduino Relay Activated Lamp
  • Blog
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: meera_hussien
  • Date Created: 27 Jun 2019 8:59 AM Date Created
  • Views 15726 views
  • Likes 6 likes
  • Comments 4 comments
  • tutorial
  • electrosoft
  • arduino
  • tinkercad
Related
Recommended

TinkerCad Tutorial #2 Arduino Relay Activated Lamp

meera_hussien
meera_hussien
27 Jun 2019

TinkerCad Tutorial #2

Arduino Relay Activated Lamp

    

          Hi there. Sorry for the time i took to prepare the next tutorial video. In our next tutorial we shall see on how we can turn on the lamp using the relay through Arduino. And in this tutorial we shall see some of the basic theory of relay.




image



               First lets get a very simple introductory to relay. Basically a  relay works a switch whereby it can be either open or close. The relay
uses electromagnetism from small voltage to provide higher voltages. It has two basic contacts, either NO -> normally open or NC -> normally close. When input voltage is applied across its coil, NC changes to NO and NO changes to NC. That is a very brief idea of the relay. In our upcoming blog, we shall discuss further on this relay.



Now let's look at the circuit which we have constructed in the tinkercad

image



The connection for the LDR sensor is connected as per the image below. One end is connected to the Ground and and the other side is connected to resistor and from resistor to VCC. The output signal from the LDR is tapped between the LDR leg and the resistor leg.

image


Next, the connection for the relay and the lamp is done as per the image below,


image


Once we are fine with the hardware, we can move on to the coding part.


image



The coding part for this is pretty straight forward. As you can see, the first line shows that the we read the input from the analog pin A0 and print it to the serial monitor. Next we do the conditional formatting, whereby we check the value of A0. If the value of A0 is equal or more than 500 it sets the digital pin 4 to LOW, and if  the value is less it sets the pin 4 to HIGH. The pin 4 is connected to the relay.



Below is the result of this tutorial.


image


Below is the complete tutorial video




Thank you.


  • Sign in to reply

Top Comments

  • ralphjy
    ralphjy over 6 years ago +1
    The tutorial video is missing.
  • noorpuri
    noorpuri over 5 years ago

    A nice introductory tutorial but run it on actual hardware as well for confirmation.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • meera_hussien
    meera_hussien over 6 years ago in reply to meera_hussien

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • meera_hussien
    meera_hussien over 6 years ago in reply to ralphjy

    Thank you for the notification. I will update it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ralphjy
    ralphjy over 6 years ago

    The tutorial video is missing.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube