Micro:bit Night Lamp

by Thorsgaard Efterskole in Circuits > LEDs

1750 Views, 4 Favorites, 0 Comments

Micro:bit Night Lamp

IMG_1907.jpg

So this is a rather simple project where we use the Micro:bit to both power and control a small night lamp. I made the project, so I could use the small LED strip from my Neopixel Introduction, but it was also importent for me to make the lamp so cheap and simple that it can eb made in most classrooms.

Supplies

Materials:

1 x Micro:bit

A strip of Neopixels (WS2812B).

Some wire

Solder

3 mm MDF, you can also use plywood

Woodglue

3 x M3 bolts

9 x M3 nuts

A piece of acrylic

Some black or dark painters tape

Tools:

Soldering iron

Laser cutter

Wirecutter

Download Files and Lasercut the Parts

IMG_1907 (1).jpg

Download the files and lasercut them. The acrylic part is just a boring square, so you might want to add your own design to it. In this project I have made it a bit round on the top and added a butterfly that my wife drew for me.

Solder the LED Strip

Screenshot 2020-05-26 at 20.37.14.png
IMG_1659.jpg

Then we cut the neopixel strip so that we only have three neopixels. Neopixel strip can be cut betwen the pixels. If you look at the first picture, then the strip can be clip appart at the white stripe. Just use a wirecutter.

Then solder three wires to it. I have used a green wire on Din, black wire on gnd and red on 5 v.

Add LEDs to Wood

IMG_1908 (1).jpg

Place the LED strip on to the small wood strip. Either use the tape on the strip or double sided tape.

Add Screws and Bolts

IMG_1909.jpg

Now take a wire and wrap it around one of the bolts, then use a nut to hold the wire in place.

Repeat that for all three wires.

Add a Box Side to the Bolts

IMG_1910.jpg

Then use 3 more nuts and fasten the bolts on the piece of woods with holes in it. It is rather importent that the wires is wired correctly. See the picture.

Assemble the Box

IMG_1911.jpg
IMG_1912.jpg

Now just add glue to the wood and assemble the box.

Add Micro:bit

IMG_1913.jpg

Use 3 more nuts to screw the Micro:bit on to the box.

Cover the LED

IMG_1914.jpg

The Micro:bit have a LED that shows when it is powered up. We want to dime the light by putting a few layers of black painters tape on top of it.

Add Your Design

IMG_1915.jpg

Put the acrylic piece into the hole for it.

Get the Extension

IMG_1449.jpg
IMG_1450.jpg
IMG_1664.jpg

First you go to the Makecode editor and start a new project. You then go to "Advanced" and select "Extensions". Be aware that since I am danish, these buttons have slightly different names in the pictures. In extensions you search for "neopixel" and select the top left result.

Program the Micro:bit

image (32).JPG

Here is a small test program that just changes the colour of the three LED's every fifth second, but you can make it much more interesting. You can make it turn on when it gets dark. Change colour when you shake the lamp or make it bluetooth controlled. You can do a lot with programming.

I have made a guide to programming Neopixels here.

You can find the code here.

Test It

IMG_1919.jpg
Night Lamp

When you have finished programming the Micro:bit, then you can try out your new lamp.

There is a lot of ways you can change this project. Different acryllic designs. Different programming, but you can also try to make the box taller, so that it covers the LED on the Micro:bit or maybe broader so you can have 4 LED's instead of only 3.