loading

We love MINECRAFT and we love Arduino, so we decided to combine the two! Along with a recycled tennis ball canister, a peanut butter jar, Arduino Nano, and a few everyday components and created a light sensitive night light with a MINECRAFT themed shade made of vellum paper.

There are a myriad of ways to achieve this, but this is simple, straight forward and easy to achieve for those new to electronics and a fun inspiration for those that use electronics everyday. Feel free to use a plug if you choose to connect to an outlet or a solar panel and rechargeable batteries outside.

Step 1: What You'll Need...

Tall, wide mouthed empty bottle or canister: we chose a tennis ball canister for it's height and a peanut butter jar for its width.

Drill and small bit

Soldering Iron and Solder

Scissors

Assorted pliers, wire strippers, etc.

Vellum Paper

Double Sided Tape or Glue Gun

9V Battery Snap Connector with loose leads for soldering : We chose 8 x AA for ours. You can use 9V, AAA, AA if you prefer. **You MUST have at least 5V going to Arduino Nano

Arduino Nano: You could use other microcontrollers as well as 'Arduino Compatible' knockoffs to keep costs down.

400 Point Breadboard - Self-Adhesive

Assorted male-male Jumper Wires

4.7KΩ Resistor

LDR(Light Dependent Resistor)

White Piranha LED (you can use any LED, we just like the brightness of this type) Here is a video of different types of LED's.

Small gauge Solid Hookup wire

Step 2: Drill a Hole in the Bottom of Your Jar/cannister

This is hole large enough for the LDR to poke through.

Step 3: Print Design on Vellum Paper...

We have a MINECRAFT theme going here, but feel free to be creative and print any picture you want to have as a "lamp shade".

The lid will be ON THE BOTTOM of your lamp. Adjust your print accordingly and cut to fit the length of your chosen canister/jar.

Step 4: Cut Two Pieces of Solid Core Hookup Wire....

These are going to be soldered to the LDR. The length should correspond to the height of the night light and be able to connect into the breadboard.

Any color is ok as there is no polarity in the LDR.

*NOTICE our wires are actually too short and we had to had male to female jumpers at the end to be able to connect while shutting the lid. CUT YOUR WIRES APPROXIMATELY 6 INCHES LONGER THAN IN THE FIRST PICTURE.

Step 5: Solder the Wires to the LDR...

Solder one wire to each of the legs of the LDR to extend it through the hole we drilled in step 1.

Use heat shrink or electrical tape to guard against a short circuit as the legs will be close together.

PRO TIP: Use simple tape to hold small wires in place for easy soldering.

Step 6: Solder the Battery Leads (optional)

Solder a header pin onto each wire and shrink wrap.

We like to do this for a secure connection into the breadboard. If you feel that the bare leads work fine for insertion, then skip this step.

Step 7: Solder Piranha LED Legs...

Piranha LED's are made to sit close onto the breadboard and we need to extend their legs. We achieve this by simply soldering 4-6 inch pieces of small gauge Solid Core hook up wire to extend the legs.

We do recommend marking the legs of the Piranha LED so you know the orientation and polarity.

Step 8: Build the Circuit...

Here is the Fritzing Diagram and the .fzz if you want to redesign the circuit.

Step 9: Load the Arduino Sketch...

Make sure you choose Arduino Nano as your board. Here is the sketch we used. Simply copy and paste into the Arduino IDE.

int ldrPin = A0;
unsigned int ldrValue = 0;

void setup ()

{ pinMode(12, OUTPUT); Serial.begin(9600);

}

void loop()

{

ldrValue = analogRead(ldrPin);

if (ldrValue<200) digitalWrite(12, HIGH);

else digitalWrite(12,LOW);

}

Step 10: Test Your Circuit...

When the LDR is covered (darkness) the LED should light nice and bright. If the LDR is partially covered (dusk) the LED will glow lighter and get brighter as the sun/light falls.

Step 11: Attach Battery to Back of Breadboard...

Draw a line and remove just enough to attach the battery but kep the remainder of the back of the breadboard covered.

Step 12: Place Circuit Onto the Lid...

Use a piece of double sided tape or a drop of glue stick to secure the circuit inside of the inverted lid. This is the bottom of your lamp and the cannister/jar will attach to become the 'lamp shade'.

You can bend the legs of the LED you soldered to direct the light. We faced ours up.

Step 13: Feed the LDR Through the Drilled Hole...

We added a piece of black electrical tape for neatness and a snug fit.

<p>this nice project, we can use more (RGB) led??</p>
<p>Thank you mohannadh! You bet, go wild with RGB's!</p>

About This Instructable

3,054views

21favorites

License:

More by Bullock STEAM MakerSpace:2 TIPS TO QUICKLY FINDING a LOST CHILD IN a CROWD Useful Guides Rolling Tool & Craft Cart from Child's Truck 
Add instructable to: