MINI Night Lamp

12,238

171

10

Introduction: MINI Night Lamp

this project is inspired by Mohit Boite. Electronics is a very big ocean and to explore it today I made a small lamp mini night lamp which is controlled by Arduino microcontroller.

The concept is simple, all you need is an LDR ( light dependent resistor), few LEDs, and a few resistors.

oh! and also our brain the Arduino board.

here I'm using the Arduino pro mini.

Supplies:

1. Arduino pro mini

2. brass wire

3. LDR( light dependent resistor)

4. 2 blue LED

5. 2 18 ohms resistors

6. 1 100k resistor

7. brass wire

8. copper wire

Step 1: Working

take an Arduino pro mini and connect the same as shown above.

here I have uploaded the code for the given project.

Step 2: Coding

in this code, the basic logic is when you place the lamp in a dark place it will glow and when light falls on it then it falls dim

Step 3: Making : the Frame

1. Take the brass wire and cut 8 1inch pieces for the upper and lower faces.

2. solder the wires into a square shape.

3. then take the Arduino board and measure its dimensions, here we have 0.7*1.2 inches.

4. now cut out 4*1.2 inch wire.

5. solder the wire into a block shape.

the mainframe is ready.

Step 4: Freeform Connections

the steps are simple, consider the mainframe as ground and rest as VCC but analog pin must directly be connected to LDR.

1. complete the LED connections, for safety add 18ohms resistor.

here I gave my digital connections at pin 11, but if you want you can use pin 6 also since I have added that to the code.

2. connect 100 k resistor from any VCC present to pin A0 and then from A0 connect LDR to ground.

Step 5: Power Supply Connections

give two connections, one from mainframe and another one from the VCC present near the lower face.

to attach the PCB to the frame, connect one ground pin present at the right side of the PCB to the mainframe with copper wire.

Step 6: Making: the Base

1. Take a 5mm acrylic sheet and a USB cable to make the base.

2. cut a square out of the acrylic sheet with length 1.4 inches.

3. drill two holes with a 1.5mm radius drill bit for outlets of VCC and ground.

4. connect the wire to the outlets and stick it to the sheet.

your base is ready

Step 7: Making : the Outer Frame (optional)

take a translucent acrylic sheet and cut out 1*1 inch squares and stick them with perpendicular connecting burp pins.

Step 8: Making : LED Refractor (optional)

again if you don't like the outer frame then you also have the option to make a small refractor.

just cut an acrylic atrip which u think will approximately cover the led from both the sides, then bend it by heating it with hot air. you are almost done just cover the strip from both sides with smaller chips.

Step 9: FINALLY

our final product is ready.

Step 10: Testing

Step 11: Final Video

Lighting Challenge

Runner Up in the
Lighting Challenge

Be the First to Share

    Recommendations

    • Pi Day Speed Challenge

      Pi Day Speed Challenge
    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Microcontroller Contest

      Microcontroller Contest

    10 Comments

    1
    needfulthing
    needfulthing

    7 months ago

    I love these kind of free form circuit designs in any appearance. The Arduino Pro Mini is a bit of an overkill. For these kind of projects I would recommend to try out something like a plain ATtiny13 DIP CPU (if you don't want to go down the whole 555 route), which can be easily programmed using a normal Arduino in ISP mode. The are plenty of resources on this topic and it will bring you one step further in micro-controller programming without becoming too complex. Also note that the absolut maximum of current that can be drawn from an IO pin is 40mA, so the resistor should limit the current to a value below that, normally you would use 220 Ohms for 5V and one LED. With two LEDs parallel a safe limitation would be something greater than 250 Ohms, which limits both LEDs to <20mA. The 18 Ohms won't have any usable effect, in this case you are relying on your LED's resistance limiting the current to a safe value.

    0
    akshar1101
    akshar1101

    Reply 7 months ago

    oh! thank you :)

    0
    Joey232
    Joey232

    7 months ago

    Very nice project,and a good job on the instructions. I do have one suggestion, like GreenMoon said the 18 ohm resistors are too small, however, the suggested 220 ohms would be too large, you'd get less than 10ma of current. You need to take the forward voltage drop and max current of the LED's into account. If we pick a typical blue LED, say this one: https://www.sparkfun.com/products/11372 sold by SparkFun it has a forward drop of 3.4V with a current rating.of 30ma.

    Using the 18 ohm resistors you chose would give a current of (5-3.4)/18 = 88ma, too much current. The only thing preventing the LEDs from burning out is that fact that the micro can only source about 40ma max from any given pin.

    To calculate the correct resistor take the supply voltage minus the forward drop and divide by the current. (5-3.4) / .030 = 53ohms. Pick 60 ohms to give yourself a little margin. Also, since 2 * 30 = 60ma, use two Arduino pins, one per LED to not go over the max drive current.

    4
    simaopintocorreia
    simaopintocorreia

    Tip 7 months ago

    it's a good project but I thinck that you can make it but with a 555 timer dark sensor circuit. it hold be cheper and I thinck that proMini can do other things more complex than light up a led over the darknesshttp://www.555-timer-circuits.com/dark-detector.html

    (remove the 10u capacitor and put a LED and a resistor

    2
    grimnirson
    grimnirson

    Reply 7 months ago

    Yah, you dont need the 555 even. Photo resistor, transistor, resistor, and capacitor. Done.

    0
    akshar1101
    akshar1101

    Reply 7 months ago

    thanks for the idea man!

    0
    akshar1101
    akshar1101

    Reply 7 months ago

    thank tou :)

    0
    AnandM54
    AnandM54

    7 months ago

    Nice idea and clear instructables!!!

    0
    akshar1101
    akshar1101

    Reply 7 months ago

    tahnk you :)