Smart Lamp
Hi, we are Matias Benedetich, Marcos Kapuza and Juan Sforzini, and today, we are going to teach you how to do our Smart Lamp, the Smart Lamp works by a switch that when you turn it on, allow the passage of current, with the passage of current, is enable a potentiometer that as we turn it vary the passage of current, so the intensity of the light it varies.
Supplies
The materials that we need to do 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:
Fibrofacil 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
LAMP BASE
We are going to start by the lamp base.
For 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!