Smart Lamp

by Benedetich in Circuits > Arduino

94 Views, 0 Favorites, 0 Comments

Smart Lamp

Captura de pantalla 2022-11-16 222419.jpg

Hi, we are Matias Benedetich, Marcos Kapuza and Juan Sforzini, students of the “Escuela Tecnica Roberto Rocca” in Campana, Argentina, and today, we are going to teach you how to do our Smart Lamp. The Smart Lamp works by a switch that allows the passage of current when you turn it on and enables a potentiometer that changes the passage of current, so the intensity of the light varies.   

Supplies

The materials that you need to make it are: 

For the Circuit: 

1 Protoboard 

1 Arduino Uno 

40 wires male-male 

10 wires male female 

5 LEDs 

5 Resistant's 220 ohm 

1 Potentiometer 10k ohm 

1 Switch 

Insulating tape 

Tin welder 

Tin 

Arduino IDE app 

 

For the Anchor Design: 

Fibreboard 615mm tall x 200mm long x 2mm width 

1 Saw 

Paper tape 

Carpenter Glue 

Tube of 20mm diameter x 260mm long x 25mm width (It's not mandatory) 

Rule 

Pen 

SKETCHES

Captura de pantalla 2022-11-16 221758.jpg
Captura de pantalla 2022-11-16 221745.jpg
Captura de pantalla 2022-11-16 221733.jpg

First, we have to start planning what the lamp will be. 

SKETCH

Captura de pantalla 2022-11-16 222122.jpg
WhatsApp Image 2022-11-12 at 14.09.38 (1).jpeg
WhatsApp Image 2022-11-12 at 14.09.38.jpeg
WhatsApp Image 2022-11-12 at 14.09.37 (1).jpeg
WhatsApp Image 2022-11-12 at 14.09.37.jpeg
WhatsApp Image 2022-11-12 at 13.23.35.jpeg
WhatsApp Image 2022-11-12 at 13.23.34 (1).jpeg
WhatsApp Image 2022-11-12 at 13.23.34.jpeg
WhatsApp Image 2022-11-12 at 13.23.33 (1).jpeg
WhatsApp Image 2022-11-12 at 13.23.33.jpeg
WhatsApp Image 2022-11-12 at 13.33.58.jpeg

Once the above is done, we must plan how the model will really be 

MODELING 3D

Captura de pantalla 2022-11-16 232909.jpg
Captura de pantalla 2022-11-16 232857.jpg
Captura de pantalla 2022-11-16 232844.jpg

This in order to know how it will really be. 

TESTING IN THE SIMULATION

Captura de pantalla 2022-11-16 232921.jpg

We spent several days thinking and analysing until it came out 


PROGRAMMING

Captura de pantalla 2022-11-16 232934.jpg

As it was difficult for us, we asked a teacher for help 

// C++ code  

//  

void setup()  

{  

  pinMode(A0, INPUT);  

  pinMode(3, OUTPUT);  

}  

  

void loop()  

{  

  analogWrite(3, (analogRead(A0) / 4));  

  delay(10); // Delay a little bit to improve simulation performance  

RAPID PROTOTYPE

Captura de pantalla 2022-11-16 233006.jpg
Captura de pantalla 2022-11-16 232957.jpg
Captura de pantalla 2022-11-16 232946.jpg

To give us an idea of the size it will have when doing it 

LAMP BASE

Captura de pantalla 2022-11-16 233121.jpg
Captura de pantalla 2022-11-16 233116.jpg
Captura de pantalla 2022-11-16 233111.jpg
Captura de pantalla 2022-11-16 233106.jpg
Captura de pantalla 2022-11-16 233100.jpg
Captura de pantalla 2022-11-16 233054.jpg

We are going to start by the lamp base. 

To do it we have to mark with the pen and the rule the following measures in the fibrofacil. 

Cut this with the saw. 

Once cut you must make the holes on the top and front, then stick the front and back on the base with the carpenter's glue and hold it with the paper tape. 

Once glued, remove the paper tape and glue the side parts, not on the base, on the side. 

When this is done, the upper part fits exactly into the base and we will have finished it. 

LAMP HEAD

Captura de pantalla 2022-11-16 233222.jpg
Captura de pantalla 2022-11-16 233214.jpg
Captura de pantalla 2022-11-16 233157.jpg
Captura de pantalla 2022-11-16 233147.jpg
Captura de pantalla 2022-11-16 233138.jpg

For this step you must mark with the pen and the rule the following measures in the fibrofacil.

Cut this with the saw. 

Once cut you must make the holes in the down part, then stick all the parts on the base with the carpenter's glue and hold it with the paper tape. 

When we finish it the head and the base can fit through the tube. 

PREPARE FOR THE CIRCUIT

WhatsApp Image 2022-11-13 at 19.03.01.jpeg

To start making the circuit we must make cables as follows: 

Join a male-male wire, with a female-male wire and add a male-male wire, secure with electrical tape, repeat ten times and join each two of these in parallel with the tape. 

Solder the ends of the newly made wires to the LEDs. 

Solder a wire to each of the potentiometer legs. 

Insert the switch into its respective hole and solder a wire to each of its legs. 

I leave referential image. 

CIRCUIT

Captura de pantalla 2022-11-16 232921.jpg

Join the circuit as follows:  

Leave the switch for the end. 

FINAL ARMED

WhatsApp Image 2022-11-09 at 09.13.24.jpeg

Delicately insert the circuit to the base box, pass the Arduino cable through the hole in the front part, pass the long cables through the tube already inserted to the top of the box, assemble the switch, close the box and put head over the tube and secure the potentiometer with the paper tape under the lid. 

FUNCTIONING

Connect the lamp to a computer, paste the following programming to the Arduino Ide app and put the following programming: 

// C++ code  

//  

void setup()  

{  

  pinMode(A0, INPUT);  

  pinMode(3, OUTPUT);  

}  

  

void loop()  

{  

  analogWrite(3, (analogRead(A0) / 4));  

  delay(10); // Delay a little bit to improve simulation performance  

 

¡Upload it and enjoy it!