Moon Light With Leds and Microbit
by salome_ in Circuits > Microsoft
513 Views, 0 Favorites, 0 Comments
Moon Light With Leds and Microbit
This is my coursework for in my University of Turku, Degree Programme in Craft, Design and Technology Teacher Education, course 'Digital Modelling and Smart Products'. I needed to use Microbit in my work and do coding at least 50 rows. I decided I want to make a Led light 'a lamp' where the Leds light up like fireflies randomly, and it changes how long the lights are on. I also thought it would be cool if it looked like a moon.
Supplies
Microbit and power source to it
Microbit breakout board
Leds as many as you are planning to do (I recommend getting at least couple extra just in case)
Laser plywood as much as you need
Jumper wires
Hook-up wire
(Transistors)
Power source (I used 9V battery)
Solder Wire
Machines:
Soldering station
Laser Cutter and the computer program that works with your laser cutter
Websites:
Idea
My idea was a moon light where Leds will light up randomly, or all the Leds could be on all the time. I decided I will use 36 Leds and 9V power supply to power the Leds. Because I had so many Leds, I needed a breakout board to my Microbit where I could connect it all. Even tho I decided to do 3 Leds as a series circuit and 2 parallel circuits under one code. I needed to use 7 Microbit pins.
Testing and Planning
Firstly, I tested does my Leds work (I recommend doing this first, because if one of the Leds is broken nothing will work, especially if you have led on series). I started to figure out how my idea may work. I tested my circuit with simple code from Microbit. I had 3 Leds in a series and a transistor connected to Microbit. First, I thought I needed a separate pin from Microbit to tell transistor when to let the power through and another pin to the Leds if I wanted one series to light up. This is how it worked when I didn't have an outer power supply. Now later I think that the transistor probably didn't do anything here either and Microbit sended the code straight to Leds.
Making the Circuit to Work
To figure out how the frow of electric current works and what I need to make my circuit work. This is the step I struggled with the most, it took me almost a month to figure out how it is supposed to go. I used a lot of hours just to figure out how it could work, and I googled, I consulted my classmates and my friend who works with coding, but nothing helped and everything I tried didn't work correctly. Either it didn't shut down at all or Led emitted light a little all the time and then when I send the code to it, then the Led light was a little brighter... So, there were a lot of problems. And I believed if I want the electric current to work, I'll need a transistor in between, but then I accidentally (I didn't have one of my jumper wires connected to transistor and it worked correctly) got it to work. I realized that I probably don't need transistor at all, because it works perfectly when it's only in a transistor's negative leg and this doesn't make sense to me... (I did laser cutting in between because this step took me a long time to figure out.)
Laser Cutter
My laser cut moon, I created my base with RDworks, because it is simple, just one big circle that has little circles in it. Firstly, I created one big circle (as big as I needed) then I made 5 mm holes for Leds as many I wanted. Then with RDworks I decided which circles I want laser cutter to cut first. My setting for my 3 mm plywood was 25 for the power 25 and speed was 15. Then I downloaded it to laser cutter made sure everything was good and laser cutter did rest of the work.
Making My Moon Look Like a Moon
In this step I choose how I want it to look. Like a moon. I had black spray paint and white spray paint and with those I created ' a moon'. How I created this, you may ask. Well, firstly I painted my moon with white regular furniture paint, to make a smoother surface (it works without this too). After that I just sprayed black on the other side and white a little whiter to the other side, so it looks like 3D. Then I took a plastic bag and gently pressed it to the surface to make 3D effects to it and make black and white pop more out.
Planning and Soldering
Then I started to solder every Led to its series. Firstly, I connected my Leds from cathode (negative leg) to anode (positive leg) and 3 Leds together like that. I marked these that what is what series, example 1 & 1 and 1 & 2, (because I wanted 3 Leds in a series and 2 series under one pin/code, in your work it could look a lot different)
My Circuit
Like before I said, at firstly I thought I needed a transistor, but it works without it, so I'm 99% sure it works like this. Anyways I finally got my circuit to work, and my code works how it is supposed to! It blinks the way I want to and if I want to it shines like a moon all the time. That every Leds is on. I haven't tested this circuit that is in the picture (I had a transistor in between), but I will test it later. And with this (well I had a transistor in between but otherwise like this) I started to do my soldering and wiring.
Soldering and Wiring
I used a circuit board where I could connect every series together (1 & 1 to 1 & 2 etc.) and I connected one jumper wire, that will go to the Microbit breakout board. (Last picture tells more clearly how I did it) There are a lot of ways you could do this. I just did this way because these were the supplies what I had at home. It could look a lot different depending on how many Leds you have and how many Leds you want to be in one series or under one code.
How It Looks
This is my final look from the back... it's a bit messy but it works, so I'm happy.
Coding With MakeCode
Now that my circuit finally worked, I started to have fun with my coding in Microsoft's MakeCode. The coolest thing is that I can change my code and make the leds light up differently every time I want. There is an app where you can code it and send it to your Microbit straight away (if you have at least 2nd version Microbit), and you don't need any wires or a computer, so it is very easy.
Final Product
This is my final product; I'm really satisfied with it, and it is just the way I wanted it to be. I needed a lot of problem solving and testing, since I didn't find anyone that has done something similar, but it was a fun project, and the finished product is beautiful.
Btw, my smaller piece on top of the moon where the text is, was kinda accident, I did my laser cutting before I knew how I'm going to do my circuit, so I did a bigger hole there because I was thinking I wanted to have a button there where I can turn on and off my light but realized my Microbit brake outboard will be on the other side and the push button too, so I improvised and did another piece on the top and tried to make it look like it belongs to the product. I attached it with hot glue, and I did it with Laser cutter and the text is lyrics from one of my favorite songs. So that's why I didn't put it as one of the steps, but it is a nice addition to my work.
How to Teach This in School?
I think this is something that could be in secondary school. The students learn the making process and learn to plan their own product and to use problem solving skills and develop their skills through the process.
Firstly, students would decide how they want their product to work, there are unlimited possibilities, and everyone can do it the way they want it (I would say that at least 3 Leds.) I would show what amount of plywood they can use, and they can use all of it or just a part of it.
There would be a lesson where the students could learn how to do circuits with Leds and there would do practice tasks to learn more about circuits.
Students would also do coding practices, with Microbit, to just get familiar with MakeCode.
When starting their work, firstly they will design their idea and do it to the program and laser cutting will be done. Then students will do the planning how wires will go and where the Microbit will go on their product etc. After that soldering and wiring and in the end, they will do the coding with MakeCode