Introduction: Arduino Powered Lego Saturn V Launchpad
My 8yr old had just finished his amazing Lego Saturn V rocket and it just sat on his table looking a bit sad.. so we decided we needed MORE to show this off!
The photos of the Saturn V floodlit on the launchpad at night look amazing, so we started the project to recreate this on a smaller scale.
- It needs to look good (it can't be just LED lights on and off), needs to look like floodlights
- Needs to impress his friends
- Has to be as a night light (not crazy bright)
- Can be high enough that his 3yr old brother can't fiddle too much!
- Learn a bit about Arduino coding & get him his hands dirty doing some sawing/glueing/filling/sanding/soldering
- Elegoo UNO Project Super Starter Kit https://goo.gl/ZaFmdT = £27.99 (not necessary if you already know Arduino and have a reasonable bag of electronic bits)
- Elegoo Mega 2560 - https://goo.gl/U2kMNN = £11.99
- Elegoo Mega Prototype Board - https://goo.gl/4BmMzR = £6.99
Super bright 10mm LED - https://goo.gl/c6EWjA = £1.77
4 x 220Ω resistors (in the Super Starter Kit)
- 1 x 100Ω resistor (in the Super Starter Kit)
- 4 x Adjustable Spot Lights (3v no resistor needed)- https://goo.gl/vuPTVL = £13
- Lego Creator Sticker - https://goo.gl/67icCh = £3.75
- Vinly NASA Logos - https://goo.gl/wU8aYi = £1.50
- Breadboard PCB Screw Blocks - https://goo.gl/kfhnCR = £2.79
- Some wood = Free!
Total cost around £70, or cheaper if you've got some spare parts already.
Step 1: Create the Shelf
The first requirement was to build a shelf to support the rocket and also contain all of the electronics.
- Measure the rocket and make a guestimation on how big the platform needed to be to get enough distance from the bottom of the rocket to make sure it was lit to enough high enough - This works out to be 220mm square
- Go hunting in the garage to find any bit wood that can be cut to 220mm square
- Cut the wood :)
- We needed to create a vertical edge so that we could hide the electronics, for this some spare skirting board was perfect
- Cut the skirting board with a 45 degree mitre so it meets cleanly
- Pre drill, screw and glue the skirting board to the MDF base. Make sure you leave a small (around 4mm) lip around the edge, this means the shelf can hold items without them sliding off (such as the Saturn V lander etc)
- Fill - If you've not used filler before go and find some Tetrion, all other filler is the devils work! Tetrion makes the job so much easier!
- Repeat (the fill + Sand + Paint bit)
At the end of this, you'll have a shelf that looks great, now, onto the electronics!
Step 2: Learning Arduino
We knew we wanted this to look like floodlights, and not just on / off, and it also had to have a 'wow' factor - so, time to learn some Ardunio and make this remote controlled!
If you haven't used Arduino's yet (I hadn't) don't be phased, they're simple computers that have inputs + outputs that are perfect for a project like this. I won't go into details of how to write a sketch (Arduino programme) or connect it up as there are many more full-featured articles on this. However, I do fully recommend picking up an Arduino starter kit, they come with excellent examples and allow you to (as we did) cut/chop/change bits of programme to make what you want.
Get started with this - Elegoo UNO Project Super Starter Kit https://goo.gl/ZaFmdT
To write the code we took bits of the following example code supplied in the kid:
- Lesson 3 - LED
- Lesson 5 - Digital Inputs
- Lesson 13 - IR Receiver Module
By hacking these together after a bit of fiddling we ended up with a program that:
- Has an on/off manual button (this will be attached to the shelf in case the remote is lost)
- LEDs turn on in sequence in a fake-floodlight, blink&light mode
- Has remote control for:
- Dimming up and down
- Individual LED control using buttons 1-5
- Disco mode by pressing 'ST/REPT' button
Step 3: Coding & Prototyping
Making it work
The Elegoo set comes with an Arduino UNO which is excellent to learn on, however, it has limitations on the number of IO pins, and specifically pins that can do PWM - which is basically an ability to turn on and off VERY quickly, and this is the function we use to dim the leds.
So the first prototype was on the UNO, but due to using the IR code we only had 4 PWM pins, not enough.
Version 2 used an Arduino Nano - but the same problem persisted (At this time I was trying to work out why a PWM output wasnt working - the answer is that the IR code uses one of the pins as its clock).
So... Version 3 and final uses an Ardunio Mega 2560 - another Arduino board, with many more PWM pins
- Elegoo Mega 2560 - https://goo.gl/U2kMNN
Wiring it up
The various INputs (IR receiver + button) connect to two pins, and the OUTputs connect to other pins. In Arduino you define these in the Sketch (Arduino program).
- Download the .zip file above and open it in the Arduino programme
- Wire it up! Some notes:
- LED's must be wired the correct way around, the long wire is always positive (+), so must always go to the IO pin, the other pin is negative and will go via the resistor
- The negative pins on the normal LEDs go to a 220Ω resistor
- The negative pin on the big LED goes to a 100Ω resistor (this is because the larger LED can take more power
- Pin 3 - Signal (pin on the right) of the IR receiver
- Pin 4 - Normal LED 1 long pin
- Pin 5 - Normal LED 2 long pin
- Pin 6 - Normal LED 3 long pin
- Pin 7 - Normal LED 4 long pin
- Pin 8 - Big LED 1 long pin
- Pin 9 - One end of the push switch
- Left pin to GND
- Middle pin to +5v
Upload the sketch
If you've not used Arduino before make sure you've played with the starter kit first, this will help you get through this.
If it doesn't work then use the Serial Monitor to look at the output, when you press buttons are the commands registering, if not you may need to look at your IR codes to see if they match.
Keep the board powered up by your PC and it should all work, if so then on to the next step!
Step 4: Making It Permanent
The next step is taking the prototype circuit layout and soldering it onto the more permanent prototype board.
The prototype board sits on top of the Arduino and allows you to permanently solder on items, this makes it neat and tidy.
To achieve this we placed 5 connector blocks in the middle of the board, on the underside of the board the left pins were all soldered to a common ground. This was done by cutting small pieces of spare resistor wire and soldering one end, then the other, then trimming.
The positive (right hand) connection was soldered to one end of a resistor, and the other end of the resistor was poked through the corresponding PIN port (PINs 4 > 8)
The IR receiver
We soldered a 3 wire cable to the IR receiver making sure the black + red went to positive and negative on the IR receiver, and the other wire was then the signal (which connects back to pin 3), and the positive goes to +5v, and the negative to GND.
Having the IR receiver on a wire means that placement later on is flexible
This is simply wired to GND and PIN 9
If power is plugged straight into the Arduino it means that if someone (the 3yr old!) pulls on the cable all of the wiring + board will be ripped out, which would be sad day... So...
We took a spare female power socket and soldered this to the board, this will be glued vertically on the shelf so any pull will just disconnect the wire.
STOP AND READ before doing anything else!
To power the board you should be able to use any 7v > 12v power supply, so I used a 12v DC power supply..and then smelt burning and saw 'magic' smoke coming from the board. Tears ensued. I tested the '12v' supply and found it was putting out 16 volts, so it had fried the board....
Lesson learned, before powering the Arduino with a power supply, check it on a multimeter that it is really the voltage it says it is.
The board is now powered by a 9v 1A supply and it works perfectly.
Step 5: Time to Make It Permanent
- Mounting the board
Rather than just stick the board to the shelf we had some mounting poles from an old project, so we screwed these to the board and then to hot glued them in place.
Mounting the switch
Hot glue (LOTS of hot glue) holds this in place, it's easy to find and operate
Mounting the spotlights
- The mini spotlights (which are amazing by the way!) - Drill 4 holes around 15mm from the edge of the board with equal spacing, use a drill bit that gives a tight fit for the screws, this means you don't need to use the bolts underneath. If you go too big, just use a dab of hot glue to hold them in place.
- The rear big light - Drill 1 hole 20mm in from both sides in the rear corner of the shelf, use hot glue to secure the LED. This LED will also need wires soldering to attach it back to the board
Mounting the power
Got glue (LOTS!) this to the back of the board - I made a mistake and did this on the wrong side.
Mounting the IR receiver
I used a spare piece of plastic to lower the receiver so that it peeks out from underneath the shelf, as the IR needs line of sight (or at least nearly) to work properly)
Mount the shelf
- Use a level and draw two lines in the corner of the room at the level you want the shelf (take off the depth of the shelf so this is accurate).
- Take two small batons and drill:
- 2 horizontal holes - these will go into the brick
- 2 vertical holes - these will contain screws that will screw up into the shelf
- Drill 4 holes in the brickwork (aligned with the horizontal holes you earlier made in the batons) and use wall plugs to secure.
- Screw the batons to the wall.
- Place the launch pad shelf on the batons
- Screw from underneath through the batons into the launch pad
Step 6: Final Touches and Admire
We found some vinyl NASA and Saturn V info stickers on ebay, these fit the project perfectly!
Plug it in, sit back and admire!
ltjbone made it!
We have a be nice policy.
Please be positive and constructive.