Smart Lamp
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
First, we have to start planning what the lamp will be.
SKETCH
Once the above is done, we must plan how the model will really be
MODELING 3D
This in order to know how it will really be.
TESTING IN THE SIMULATION
We spent several days thinking and analysing until it came out
PROGRAMMING
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
To give us an idea of the size it will have when doing it
LAMP BASE
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
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
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
Join the circuit as follows:
Leave the switch for the end.
FINAL ARMED
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!