Sparkle Nightlight Project

Screen Shot 2018-04-23 at 11.42.55

Task: To create an automatic nightlight
Difficulty: Beginner/Intermediate

For this project you will need:

  • A computer running the Crumble software
  • A Crumble with USB lead
  • A battery box (NO RECHARGEABLE BATTERIES)
  • A Sparkle Matrix (or lots of Sparkles)
  • An LDR
  • Seven croc-leads
  • The printed template (if using ours)
  • A marker pen
  • Scissors
  • Glue

1 First of all, gather your materials for making the shell of the lamp.

2 Now thicken each line. We have gone for black but you could use any colour.

3 Make sure you go either side of the internal lines.

4 Cut out the template.

5 This is what you are left with.

6 Carefully fold along each of the black lines

7 Once you’ve folded all of the lines, it’s time to glue it together.

8 Working one tab at a time, apply glue.

9 After adding glue, carefully stick it together.

10 After gluing all of the tabs together, you should be left with your shape.

11 We have turned it over, and it is ready to be lit up!

12 Now get all of your Crumble equipment ready.

13 Connect your battery pack to the Crumble, + to + and – to -.

14 Connect +, – and D on the Crumble to the corresponding +, – and -> D on the Sparkle Matrix.

15 This is how your setup should look so far.

16 If using an LDR, attach one end to a + output, and another to an input, A, B or C (D is being used).

17 Place your shade over the Sparkle Matrix, lining up the notch with where your croc-leads connect. Now it’s time to program!

18 Just turning on your light is really simple. Set all of the Sparkles to a colour of your choice, and you’re ready to go.

20 As the light level decreases, the resistance of the LDR increases, and so the value at A will be higher. Or the brighter it is, the higher the value of A. We have set up a condition here – when the value of A, or ‘LDR’ is greater than 90 – do something. Else, do something different.

19 To make this an automatic nightlight, we’re going to need to make use of the light-dependant resistor (LDR). Here we have set up a variable to constantly monitor the input going into the Crumble at A.

21 To complete our basic nightlight, we need to put what happens when the ‘lDR’ value is larger or smaller than 90. If it is light, and LDR is above 90 then turn all the Sparkles off. Else it must be dark so turn all the Sparkles on.

And there you have it. An automatic nightlight, perfect to keep the largest monsters at bay!