Project tutorial
Smart Table Lamp

Smart Table Lamp © GPL3+

Build a table lamp that's sturdy and smart.

  • 7 views
  • 0 comments
  • 0 respects

Components and supplies

Necessary tools and machines

Hy gluegun
Hot glue gun (generic)
09507 01
Soldering iron (generic)

Apps and online services

About this project

Hey all!

How's you doing?

Ever wondered making a Lamp that turns on automatically when you sit on a chair to study..?

I am back with a similar type of project.

In this project I made a Smart Study Table Lamp with ultrasonic sensor and Arduino Uno.

When you sit on a chair of your study table the lamp automatically turns on, thus saving precious study time.

This project is very useful for students.

Watch the entire video and please do subscribe my YouTube channel.

"Help me achieve my dream of 1K subscribers in my channel"

Channellinkis:

https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g

Steps to build this project.

1. Gather all components like Arduino Uno, Ultrasonic sensor, M - F Jumper wires, Lamp, Dc converted, Relay Module, Box etc.

2. For testing on breadboard you have to collect some more components.

3. For testing I made a circuit on breadboard.

First place ultrasonic sensor on Breadboard.

4. Now connect Jumper wires from Ultrasonic sensor and supply wires.

5. Take relay module and connect wires as shown.

6. For testing made a circuit with led on breadboard.

7. Connect battery clips and wires from led.

8. Connections:

9. After connection it will shown like that.

10. Connect battery and upload the code and check it is working or not.

11. It is now working.

12. Now the main works starts here.

13. I placed the sensor in a box.

14. This is my study table.

15. I have placed lamp over on wall.

16. I placed dc converter, Arduino and relay module on a cradboard.

17. Dc converter connections.

18. I fix sensor below my lamp.

19. I placed Board on left side of table and please place it in a secured box.

20. Connect Arduino supply and Lamp supply and power it on.

21. Check it is working or not.

Now last step:

Channel link is below:

https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g

.

Code

Arduino codeC/C++
//www.YouTube.com/Electronics is Fun//
//https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g //
//MOHD SOHAIL//
//16 AUGUST 2019//

const int trigPin = 2;  //trig pin of ultrasonic sensor

const int echoPin = 3;  //echo pin of ultrasonic sensor

const int relay = 5;   // output pin for relay, relay is low level triggered

long duration;
int distance;

void setup() 
{
pinMode (5,OUTPUT);
pinMode (trigPin,OUTPUT);
pinMode (echoPin,INPUT);
Serial.begin(9600);
}

void loop() {

digitalWrite(trigPin,LOW);
delayMicroseconds (2);

digitalWrite(trigPin,HIGH);
delayMicroseconds (10);
digitalWrite(trigPin,LOW);

duration = pulseIn(echoPin,HIGH);
digitalWrite(trigPin,HIGH);

distance = duration*0.034/2;

Serial.print("Distance: ");
Serial.println(distance);

if (distance <=70)
{
digitalWrite(5,LOW);  // to make lamp on
delay(500);
}
else
{
digitalWrite(5,HIGH); // to make lamp off
delay(500);
}
}

Schematics

Circuit Diagram
Circuit qlhhxwbnax

Comments

Similar projects you might like

LUMOS: Smart Lamp for Better Sleep

Project tutorial by Jonty

  • 6,913 views
  • 1 comment
  • 31 respects

Smart Voting Machine

Project tutorial by msr048

  • 1,275 views
  • 0 comments
  • 9 respects

Arduino Smart Lamp

Project tutorial by Arduino “having11” Guy

  • 7,008 views
  • 0 comments
  • 12 respects

Remote Controlled Smart Lamp

Project tutorial by gadget programmers

  • 4,823 views
  • 2 comments
  • 16 respects

Smart Garbage Monitoring System Using Arduino 101

Project tutorial by Technovation

  • 31,479 views
  • 10 comments
  • 46 respects

The Smart Table Assistant

Project in progress by Dixon

  • 2,997 views
  • 0 comments
  • 6 respects
Add projectSign up / Login