Spaceship Control Panel - Laser Cut Arduino Toy

14,015

101

15

Introduction: Spaceship Control Panel - Laser Cut Arduino Toy

About: Driven by forever learning new stuff!

A few months ago I decided to become a member of the local maker space, since I've been wanting to learn the tools of the maker trade for ages.

I had a tiny bit of Arduino experience and a had taken a Fusion-course here on Instructables. However I had no experience with a lasercutter, nor with any sort of intermediate Arduino programming or components besides the standard LED or simple sensor.

Since my nephew's 6-years birthday was coming up in a few months I decided that I wanted to make him a present. Since he loves anything space-related (especially if it contains buttons and lights) I came up with the initial idea of making him a simple Arduino-based toy with some LED's, buttons, a speaker, sliders etc.

So I trawled the internet for tutorials on simple Arduino toy tutorials to get inspired by, but I couldn't quite find exactly what I was looking for. Jeff High Smith's amazing spaceship toy and Duncan Jauncey's remix of it were great inspirations, but were a bit too big a mouthful for me since I was lacking: a) Enough experience to build it, b) Enough time to gain the experience and c) I wanted the project to be controlled only by an Arduino to make it simpler (and cheaper) than having to interface with e.g. a Raspberry Pi or similar. Bob Lander's beautiful little control panel toy, was also an inspiration, but I wanted to build something with a bit more interactivity.

So I started sketching down a few ideas for the control panel until I reached a look that I was happy with.

With the initial design in place (well - sketched out rather quickly on a piece of paper at least) I was ready to move on to actually figuring what it would take to build this - how many and which parts I would need, which Arduino controller to use etc.

WORD OF ADVICE...

... for those that want to venture into the journey of building this: Using the 4017 decade counters is an unnecessarily complicated way to control the LEDs. If you want to make your own version, I'd highly recommend using something like WS2812B (or similar) LEDs, as it will make controlling the LEDs a lot easier (for example using the FastLED library).

Another fellow Instructable member has also discovered some discrepancies between the schematic and the code (with certain I/O pins in the code not corresponding to the shown schematic). I will try to make an updated version of the schematic as soon as I have time. In the meantime, use the code as the basis for the I/O pin setup (not the schematic).

Step 1: Structure of This Tutorial

Now that I had an overall idea of what the spaceship control panel should look like, and having decided to make it relatively simple, I was certain that actually building it would be a breeze...!

Well... turned out the breeze became more of a, well if not a storm, then at least a gale! It was somewhat more difficult than first expected.

The project ended up taking close to three months of sparetime hours, and I only finished the last bit of coding the day before my nephew's birthday!

However, the build process was a great and fun (and only sometimes frustrating) learning experience with tons of trial and error and things that I would do differently, were I to build it again.

Most steps in this tutorial therefore will each have two sections:

  • A "Long Read" section for the patient reader, where I describe my process, thoughts and (likely) mistakes in detail.
  • A "Tl;dr" section for the more impatient reader, where I get to the point a bit quicker, and present a recipe to follow (revised by learning from my mistakes).

Enjoy the ride and please feel free to ask questions!

Step 2: Tools and Materials

With my sketch in hand, I could start figuring out how many LED's, buttons and other stuff I needed.

LONG READ

Since my sketch contained a lot of LED's (42 including the lit buttons), it was clear that I needed to go for an Arduino Mega. However even using the Mega, there still weren't enough I/O-pins to accomodate for all of the LED's, buttons, piezo buzzers and potentiometers.

So I once again trawled the internet for tips on how to control multiple LED's with just a few I/O-pins and ended up deciding on the "CD4017 decade counter" after reading this neat tutorial.

If I were to make an updated version I would definitely replace most of the LED's with something like the WS2812B-type LED's since they are a lot easier to chain, program and play around with. But since I did not know that by the time of the build, this tutorial will still focus on using the CD4017-method.

I also didn't yet have a clear idea of what the circuit would look like, so I wanted to make sure that I'd be able to disconnect and reconnect wires and components along the way. I therefore chose to make (almost) all of the connections between the components and the board using female/female dupont cables and male header pins.

To make connecting the components to the arduino via the dupont cables easier, I decided to buy a sensor shield for the Mega.

As for the rest of the tools and materials, you can find them below.

TL;DR

Tools:

  • Laser Cutter.
    Our makerspace has a Universal Laser Systems VLS 3.50 45W which I used for cutting and engraving the acrylic, and a big no-name chinese 120w laser that I used for cutting the MDF. You could quite easily cut the box and the acrylic using standard power tools, however for the engraving on the acrylic/paint the laser is to prefer.
  • Soldering iron.
  • Hot glue gun (optional, but nice to have)
  • Screwdriver set.
  • Countersink bit.
  • Drill bits 2mm-3mm or similar.
  • Drill driver (any will do, but a bench drill press will make it easier).
  • Masking tape
  • Clamps
  • Caliper
  • A variety of small pliers
  • Adobe Illustrator ($$) or Inkscape (free) - or any other vectorbased drawing software.
  • Autodesk Fusion 360 (optional) - for designing the case.

Materials
For the case and assembly:

  • Acrylic sheets, 5mm thickness. Preferably cast acrylic (since it doesn't melt and remerge as easily as rolled acrylic does when laser cut).
  • Acrylic sheet 2mm.
  • MDF, 6mm thickness.
  • Spray paint, I used:
  • Screws - 2.5 x 13mm (or similar - diameter should not exceed 4 mm.)
  • Standard (PVA) wood glue (for gluing the wooden case)
  • Contact adhesive or acrylic adhesive (for gluing the 2 mm protective acrylic sheet to the bottom of the faceplate).
  • Multimeter (optional, but super useful for finding shorts, testing diodes and general continuity testing).

Electronics:

Step 3: Measuring Parts and Test-fitting

LONG(-ish)READ

With all of the parts in hand, I could now start measuring each of the individual components to make sure that when I began designing the final design in Illustrator or Inkscape, all of the parts would fit and none of them would overlap on the bottom side of the faceplate.

Especially the key switch was very deep, and thus the final depth (or height, however you wanna put it) of the box would need to accommodate for this, and take this into account when placing the internal components in the case (such as the Arduino Mega, the decade counters etc.).

I then produced a simple vector drawing in Illustrator depicting all of the different component diameters/widths, put a 5mm acrylic test piece in the laser cutter, and cut it out.

Having made sure that all of the components fit snugly into their respective holes/slots I then proceeded to draw each of the components in Illustrator (see photo) to make it easy to use in the the final design.

TL;DR

  • Measure all of your components using calipers.
  • Use the measurements to produce a vector test file with all button/component sizes in Illustrator.
  • Cut out the test file on 5mm acrylic on the laser cutter.
  • Use the test piece to see if all the components fit snugly.
  • If necessary, adjust the hole sizes in the vector file and make a new test piece with the revised sizes.
  • Using the final measurements, make a new Illustrator file and draw in all of your components in the correct scale.
  • OR don't do any of the above. I will provide the final vector-file in the next steps, if you just want to use that.

Step 4: Designing the Case

With all of the component measurements in place I could now begin designing the control panel case.

LONG READ

For some reason I decided to make this process a lot harder for myself than necessary and chose to make a parametrically defined finger jointed case in Fusion 360. Well - to be honest, really I just wanted to learn Fusion 360 better, so it wasn't entirely the decision of a madman, but I could have much more easily used the (quite excellent) MakerCase tool and be done with it.

Instead I chose to follow The Hobbyist Maker's parametric finger jointed box tutorial, which I can highly recommend, if you want to getter better at 3D parametric design. However making a full 3D model for a design as simple as mine is a bit overkill, since you'll have to export each surface as a 2D vector drawing afterwards anyway, so you might as well just make it in Illustrator to begin with.

Either way, I continued in Fusion 360 until I was happy with the design. Since I knew (well, hoped at least) my nephew would be carrying this thing around a lot, I wanted to make it easy to for him, by adding some handles. The handles are part of the wooden case and protrude through the acrylic faceplate, providing grip and helping lock the case in place.

With the design in place I exported all of the parts from to 2D .dxf vector files, using the "simple sketch" method described in Taylor Sharpe's Instructable.

I then modified the dxf files in Illustrator and added a small hatch for accessing the battery compartment and holes for connecting to the Arduino Mega (that I'd also measured in the previous step). I also added a hole for an on/off switch for the sound on the side of the case, and little drill holes on the bottom.

The final drawings for the case are attached to this step (in .ai, .svg, and .pdf format), while the design of the faceplate is coming up in the next steps.

TL:DR

  • Use MakerCase to make your basic finger jointed box for the case.
  • Modify the MakerCase vector files in Illustrator to fit your needs - remember to add a hatch for the battery and holes for the Arduino ports.
  • OR just download the plans attached to this step.

Step 5: Designing the Faceplate and Laser Engraving the Paint

LONG READ

With the final overall size of the case and the faceplate in place, I could now finally get to the (even more) fun part: The design of the faceplate!

Since I'd already measured and drawn a small library of all the parts in Illustrator (in step 3) and I had the initial hand drawn sketch to refer to, it was "just" a matter of placing the parts on the clean faceplate vector drawing (exported from Fusion in the previous step) in Illustrator, and adding some cool space graphics.

With the initial vector design in place, it was laser time!

Finding the right process:

For the design of the faceplate, I wanted the faceplate background to be painted black and the space graphics on it to stand out in a signal color (orange in my case). However I couldn't really find any tutorials on this process of laser etching through paint. There were quite a few examples of enhancing an already etched piece with paint or etching once onto a non-transparent surface, or using special laser etching paint that sticks to the surface when lasered (which was kinda the opposite of what I wanted). I later found this video showing more or less exactly what I wanted to achieve - but by then it was too late, and I'd already spent way too much time, testing out different types of paint, different amount of layers of paint and a million different settings on the ULS laser :|

Luckily, you won't have to do that and I'll spare you most of the agonizing details of the many tests og trial and errors, and just present you with the main findings:

The laser etching process - TL;DR:

The process of cutting out the faceplate and etching the design onto it, consists of a few separate steps, in short:

  1. Cut out the faceplate itself and all of the holes and slots for the buttons and components.
  2. Paint the underside of the faceplate with one layer of black acrylic spray paint and let it dry fully.
  3. Put the painted faceplate into the laser cutter again, and etch the design into the painted surface.
  4. Paint the (now laser etched) underside of the faceplate again with one layer of the orange acrylic spray paint and let it dry.

The laser etching process - LONG READ:

The laser etching process in detail:

  1. Cut out the faceplate itself and all of the holes and slots for the buttons and components. In the design files attached to this step there are three different layers:
    A. The cut layer (red lines)
    B. The vector engrave layer (blue lines)
    C. The raster engrave layer (black features)
    In this step you must only ask the laser cutter to cut out the red layer and the blue layer. The red layer should be cut all the way through, while the blue layer should merely engrave in a fine line into the acrylic.
    The blue crosses mark the drill points (for later, when we have to drill the mounting holes into the faceplate), while the blue cross above the planet in the lower left corner is an alignment marker, that we will use when engraving the faceplate in step 3 of the process.
  2. Paint the underside of the faceplate black. Please note that since the design files are mirrored, the underside is actually the side facing up when it's placed in the laser cutter.
    Also, before you start painting you should definitely use some masking tape to mask off the parts of the acrylic that you don't want painted!

    I tried out a couple of different types of black paint, but ended up using the Molotow Urban Fine-Art Artist Acrylic signal black, because it is amazing! It has a very high concentration of pigment, so you only really need to apply one layer of paint for it to cover the acrylic completely (which will also come in handy in the next step).
    Once the underside is painted black, let it dry fully and continue to the next step.
  3. With the faceplate underside painted black, place it back into the laser cutter and (if necessary) use the alignment marker (described in step 1) to align the laser perfectly to the faceplate (see attached photos).

    To do the etching, I used the VLS 3.50 laser, which comes with a materials library with a ton of presets. However it doesn't really come with any presets for "etching off paint" off acrylic, so I had to experiment a bit.

    For the first test pieces I did, I had used several layers of paint, which meant that I had to fiddle a lot with the presets to make the laser etch all the way through the paint layer. However using only one layer of paint, the standard "raster engrave" setting for 5mm acrylic on the VLS 3.50 was sufficient to etch off the paint layer! Nice!

    So using the attached design file send the raster engrave layer (black lines) to the laser and start etching some spacey patterns into the paint and acrylic!
  4. All of the spacey design features of the faceplate should now be etched into the bottom of the faceplate - i.e. you should be able to see through the acrylic, where the paint has been etched off. But we don't want the text, symbols and lines on the faceplate to be see-through! We want them to light up in bright orange!

    Therefore grab your orange acrylic paint (I used one from the same Molotow series as the black paint in step 2) and paint a layer or two onto the black underside of the faceplate. Again, mask off the parts you don't want orange paint on - especially the square in the middle of the faceplate! The square needs to remain transparent, as we will later mount a simple LED-display to it.
    While you're at it, you might as well paint the handles of the case too (see attached image).

With the painting and the laser etching done, I was ready to test-fit the parts.

Step 6: Case Test-fitting, Assembly and Paint

LONG READ

Earlier I'd cut out an extra case, to use for test fitting (see images) and it seemed to fit (very) snugly, so I thought "All is good"... All was not good...

After painting the "final" case, the added layers of paint meant, that the faceplate just could not fit the case (at least not without scraping all of the paint off the handles..."But you haven't even shown how to paint the case!", you might say. And you're right. Because you shouldn't actually paint and assemble the case until after you've made the faceplate. Or rather you should actually add about 1 mm of tolerance to all of the case mounting slots on the face plate, and then laser cut the face plate (and paint it, etch it etc.) and then make the case, assemble it, paint it and mount it.

However, since I did none of those things in that order, I was left with having to make yet another case, and sand the handles and mounting pegs thinner, assemble it (gluing only the sides together with wood glue - not the bottom!), paint it and then mount it to the faceplate.

Before I did that, however, I also made and cut out a small 2mm acrylic protective inlay to glue to the underside of the faceplate to prevent my nephew from accidentally (or deliberately) scratching off the exposed paint on the acrylic (see image). I glued this piece to the exposed outer rim of the underside of the faceplate using contact adhesive (but beware to not dissolve the paint in the process!).

Doing that meant that I had to make a slight change to the case design, making the mounting pegs 2mm higher and adjusting the bottom of the handle too. Don't worry though - the case design files in step 4 are the final design and thus take this into account. You can find the vector files for the protective inlay at the end of this step.

So to sum it all up, what you ought to do is:

TL;DR

Make and mount a protective inlay

  1. Cut out the attached protective inlay vector file from a 2mm acrylic sheet on the laser cutter.
  2. Mount it (precisely!) to the painted underside of the faceplate using contact adhesive.

Making and assembling the box:

  1. Cut out the case on the laser.
  2. Sand down the width of the handles and mounting pegs on the case (so they'll fit, when mounting to the faceplate).
  3. Assemble the sides of the case using normal wood glue. Do not glue the bottom of the box to the sides - the bottom will be mounted with screws later.
  4. Once the glue is dry, paint the box black and the handles orange.
  5. Test mount the faceplate to the box.
  6. Rejoice the amazingly snug fit!

Step 7: Preparing Case and Faceplate for Assembly

With the case and faceplate more or less done, only a couple of small things were left to do, before I could (finally) get to play around with the electronics.

I needed to:

  1. Drill all of the pilot holes in the faceplate. In my design I had already etched markers onto the surface, showing me where to drill (see step 5).
    Since I was going to use 2.5mm diam. screws, I made sure to also use a 2.5 mm drill bit to drill through the acrylic (3mm could also work).
  2. Use a countersink drill bit to countersink the holes in the faceplate.
  3. Temporarily mount the faceplate to the case and use a center punch (or just a needle) to mark the screw holes onto the top of the case.
  4. Remove the face plate and use a 1,5 or 2mm drill to predrill the holes for the screws (see image).
  5. Do the same on the bottom of the case.
  6. That's it.

And now - finally - electronics!

Step 8: Designing the Circuit

LONG READ

Since I already knew the placement of all of the components and had some sort of idea of how I wanted them to interact, but had no visual overview, of how everything would be connected, I decided to make an initial sketch by hand and then build on that in Fritzing.

Now was also the time to start thinking a bit more detailed about what the control panel should actually do, since this would to some extent dictate the circuit design. What would happen when I pushed this button? And what would this LED be connected to? Etc.

However since I had already decided that I would use dupont connectors for all of the connections, I would be able to change the circuit design along the way, as I learned more and came up with new ideas for functionality and interaction.

The attached final circuit design has therefore undergone quite a few changes along the way, and was still being changed after all the parts had been mounted and soldered.

The final design

The overall idea for the functionality was that I wanted each section of the control panel to activate in a consecutive manner, meaning that in order to interact with the sections at the top of the control panel, you'd first have to activate the connected lower sections on that side (see image).

Furthermore if all sections on both sides of the control were activated, I wanted the "Supercharge" function to activate (doing whatever a "Supercharge" function does :D ).

To accommodate for this, for the final circuit design I ended up creating two mirrored setups with two 4017 decade counters for each side controlling all of the individual LED's on that side.

The first decade counters controls the LED's that run along the slide potentiometer, while the second decade counter control the five LED's that run along the rotary potentiometer and five of the red LED's that run next to the "Supercharge" arcade button.

As you might also notice on the schematic, the 5v pins of the decade counters are not actually connected to the the Arduino 5v, but directly to each of their separate I/O pin. This was done to be able to easily completely shut off all of the LED's controlled by the decade counter.

The rest of the schematic is pretty straight forward (and by "pretty straightforward" I mean "rather messy to look at, but somewhat functional").


TL;DR

I came up with a circuit design. It took a long time. It's attached below. Use it to build your circuit.

Step 9: Building the Circuit

TL;DR

Building the circuit was a multi-stage process:

  1. Testing the components using a multimeter.
  2. Mounting the components (LEDs, buttons, display etc.) to the face plate.
  3. Soldering male header pins to all of the (necessary) components.
  4. Using the multimeter to test for shorts and continuity.
  5. Mounting the Arduino Mega (with sensor shield) to the inside of the bottom of the case.
  6. Connecting all of the components (correctly) to the Arduino sensor shield using dupont cables.
  7. Solder the battery connector wires to the Arduino Mega jack terminal.

LONG READ

... and had I been a smarter person, I would have followed those exact steps in that specific order... However I was not a smart person, and thus had to go through hours of replacing faulty components that had already been glued on and mounted to the faceplate, shorting LED's and other fun activities!

But my failures should not stop you from doing a better job, so I'll provide a detailed explanation of each step below and you can find images from the process above.

  1. Test your components using a multimeterbeforeyou mount them. Check to see if all of the LED's work, if the buttons open and close correctly, if the potentiometers work etc. It is also a good idea to make a small test setup with the MAX7219-led display (see e.g. this nice tutorial), to make sure everything works. It will save you a lot of headaches later on.
  2. Mount your components to the faceplate.
    All of the buttons can easily be mounted to the faceplate since they all have nuts and threaded shafts.
    The loose LED's however need to be glued onto the board using hot glue (see images).
  3. Solder male header pins to all components. Since I'd decided to use dupont connector cables for all of my components, this ironically meant that I had to do a lot of soldering, since every LED and every button had to have male header pins soldered on.
    To help make this a bit easier, I cut out pieces of strip board and soldered the male header pins and (if needed) resistors to this. I then soldered that finished strip board to the respective component on the control panel (see images).
    The four 4017 decade counters were all mounted on one strip board block to (if necessary) make switching around connections easier (see images).
  4. Test for shorts and continuity. Use the multimeter to check if all of your solder joints make a connection and check to see if any of them make too much of a connection to things they shouldn't connect to!
  5. Mount the Arduino Mega to the bottom of the case so that the power jack and usb-plug on the board match up with the holes on the rear side of the case (see images).
    You should also mount the 4017 decade counter block to the bottom of the case as well as having cut out, assembled and mounted the battery compartment (attached to this step) (see the images).
  6. It's now time to connect all of the components up using the female/female dupont cables. Refer to the schematic in step 8 of this Instructable to make sure you connect everything correctly.
  7. For some weird reason the sensor shield that I bought does not come equipped with a "Vin"-pin to allow for a regulated 7-12 volt input. So I had to solder on the battery connector wires to the Arduino Mega's power jack socket (see image).

So I guess... now it's time to plug it in..!

Step 10: Testing and Coding

You've made it to the final step of the tutorial! Well done!

Coding the control panel was a journey in itself with lots of googling, test programming and rewiring. I was lucky to be able to get some more experienced development assistance from both my brother and my roomie, or else I'd never have been done in time for my nephew's birthday.

Despite this the so-called "final" code that ended up being transferred to the Arduino still has a lot of shortcomings, and is - quite frankly - a bit of a mess. Luckily we weren't developing code for an actual spaceship, so in this particular case the code will more than suffice :)

The code is also not particularly well documented, and since we've been three people working on it, trying to untangle it can be a bit of a trial - even for me.

Either way, the code is attached and - fingers crossed - will still work, if and when you try it :)

Thanks for following along - I hope you've been able to use at least some the things in this tutorial.

Since this is my very first Instructable, I'd be more than happy to hear your feedback and get your tips on how I can improve it (and any future ones).

Enjoy the video of the final project and happy making :D

/ Niels aka. Nilfisken

Step 11: Attributions

Through the course of designing the control panel, I've been using various open-source materials - mainly graphics of various kinds. The creators of these must (and ought to) be mentioned:

From the excellent site TheNounProject, I've used the following icons:

The font used is:

Also a giant thank you to all of you other "tutorialists" out there giving out your tips, tricks and experiences free of charge and for everyone to enjoy. Without you I'd never have been able to build a project like this.

First Time Author

Runner Up in the
First Time Author

Be the First to Share

    Recommendations

    • Battery Powered Contest

      Battery Powered Contest
    • Plywood Challenge

      Plywood Challenge
    • Plastic Contest

      Plastic Contest

    15 Discussions

    0
    AutoSol
    AutoSol

    Question 1 year ago on Introduction

    Great Project. I have completed wiring and loaded the sketch but it is only partially functional. Please confirm that the sketch you included is current and that the schematic is also current.
    Thanks . . .
    UPDATE - I am getting more functionality with changes to the sketch i am making to remedy bugs and errors but have a long way to go.
    Question: How did you wire the flip switches so that the LED lights when it is closed? There are three terminals and i do not see the LED in the schematic.

    0
    Nilfisken
    Nilfisken

    Answer 12 months ago

    Hi AutoSol
    Sorry for the late reply! I have spent too little time on Instructables lately! But awesome to hear that you've had the courage to dive into this mess of wires and code :)

    "Partially functional" is very much the finished state of the project :D I had a deadline (my nephew's birthday), and I worked on it up until the night before basically. If I'd had another week, it'd probably have been a bit more of a finished product, than what is presented here.
    So I've dug through code versions, and it does seem to be the final version that I've uploaded in the instructable - however, I've attached the second-to-last version to this message, so you can try that out - there are a few changes in it, and it may not work any better - but it's worth a try.

    I unfortunately do not have access to the toy itself anymore, so I can't double-check whether the schematic matches with the actual circuit.

    I'm sorry if I'm not much help, but still - if you have more questions, I'll do my best to answer them. And my best advice would be to ditch the decade-counters altogether and use WS2812-led's (or similar) instead. That'll make the wiring much easier and the coding equally so (since you'll be able to use a lot of preexisting libraries, instead of all the weird state machine stuff in the current code).

    I hope you'll make it all work despite my messy code and schematics :)

    Best regards
    Niels

    0
    AutoSol
    AutoSol

    Reply 11 months ago

    Nilfisken,
    UPDATE: There were these additional changes to get similar functionality as you show in your video; Published sketch had all led matrix 'characters' turned 90 degrees so I had to redo each one to be correctly oriented, the schematic showed the key switch second pole being connected to ground when it should have been connected to +V when on, schematic did not show flip switch connection to +V to power the switch and LED so that was corrected, on power up sequence the LED matrix was not turned on so I inserted this in the initialization, several other smaller changes to get the program to transition to the correct state and take care of 'stray LED's not working correctly and fixes for other smaller issues too.

    Even though there were a lot of additional hours troubleshooting issues with the published project, in the end the overall project worked and was a big hit with my grandson.

    I will need to update the schematic to reflect all the changes for my documentation so that I have an accurate record of the final functional design and implementation.

    Some additional changes I may make would be to increase the battery voltage to 9VDC as the MEGA on board 5VDC regulator will not regulate with 6VDC input (needs at least 7VDC). The 6VDC input resulted in poor LED illumination associated with the slide and rotary pots.

    Changing the design to addressable LED's should also provide better LED function and reduce wiring as you noted. But as I noted I was not willing to throw out the current design and go with the addressable LED's because of countless hours wrapped up in the box layout and construction.

    Once again thanks for the inspiration to take on this project and complete it with most of the functionality I was looking for. Also appreciate your help along the way.

    AutoSol

    0
    Nilfisken
    Nilfisken

    Reply 9 months ago

    So great to hear that it worked out in the end - and not least that it brought joy to your grandson - there's no greater reward than that :)

    I apologize for the somewhat incomprehensive tutorial and the resulting extra time you had to spend on troubleshooting. If you ever have the time, don't hesitate to post your revised sketch and corrections - could be nice to make the tutorial a bit more human friendly :D

    As for the battery it would definitely be a good idea to increase it. I only ended up with the 6 volts because I didn't manage to get hold of a 6-pack AA battery holder in time (and didn't want to use a 9v-battery as they seem to run out of juice very quickly) (really, I would have loved to include a charging circuit and a recharchable lipo-battery - but if I'd implemented all of my feature ideas, I'd probably still be building it :D ).

    Again I'm happy and humbled to hear that you built it, and I hope it will bring joy for a long time :)

    0
    Nilfisken
    Nilfisken

    Reply 11 months ago

    I'm happy to hear that you've got it working a bit better! As for the wiring of the LED rocker switch, I believe that I wired it the same way as this image shows: https://i.pinimg.com/736x/c1/18/77/c1187755f7edd722999f6a334f4ddf81.jpg
    with the "+" connected to 5V, the "ACC" connected to the input pin on the Arduino, and the "Ground" connected to Arduino ground.

    Regarding the schematics vs. the code. I am pretty certain that the code (version G) is the version that is actually uploaded to the board. So instead of changing the code to fit with the circuit schematic, I would change the circuit to fit with the code - that way it should be as close to the original build as possible. I know that you have already changed the circuit several times, so it might be easier for you to just go with your current setup. But if all else fails, you might try to change the circuit... again...

    I will try to update the schematic, when I have some more free time on my hands, so that it at least matches the i/o pins of the final code :)

    I hope you'll make it work, and I'm looking forward to hearing about the results :)

    0
    AutoSol
    AutoSol

    Reply 11 months ago

    Neils,
    Thank you for getting back to me and making the previous version of the sketch available. I had already started editing the code in the g version (as posted) of the sketch as some of the pins were not defined correctly per the schematic, and made these changes;
    int potPin4 = 3; // **** Changed to pin 3 as on the schematic ****
    int system1Sw = 26; // changed to 26 as in schematic
    int system2Sw = 27; // changed to 27 as in schematic
    int armSwL = 49; // changed to 49 as in schematic
    int greenMomButL = 28; // changed to 28 as in the schematic
    int greenMomButR = 29; // changed to 29 as in the schematic
    int muxSliderL = 43; // changed to 43 as in the schematic
    pinMode(sys1LED, OUTPUT); // Individual LEDs // Changed comment to define pinMode for Sys1LED

    A quick review of the f version of the sketch revealed the same errors between the schematic and the sketch so i am moving forward with the edits/modifications to the g version.
    After making these modifications above the functionality more closely approximates the video you posted.

    The video shows what I would call 'complete functionality', initialization to function of all states. I am able to get the initialization to work but it lacks certain elements of the video you posted. I have these major issues remaining:
    LED matrix not lighting any/all LEDs on initialization
    Left rotary pot controlling both the left and right rotary LEDs.
    Flip switches not functional to get to other state(s) as seen in the video
    Other issues to be discovered

    I am concentrating on the rotary pot values controlling the 4017 boards and LED outputs via D17 and D18 pins now and suspect there is an bug in the array code that is controlling both 4017 boards at the same time for both sets of LEDs.
    muxRots[] = {17, 18}; // pots and charge

    I realize that changing the design to eliminate the 4017 drivers and go with the WS2812-led's would simplify the hardware and software considerably. But I have a deadline to meet and do not have enough time to redesign. I also have a lot of time invested this approach that I thought would work 'out of the box'.

    Plus using the WS2812's would require I redesign the physical box/front panel as there is not enough room to replace the individual LEDs with the WS2812's. Basically rip and replace, not a good option.

    That being said i appreciate your efforts to help with a solution by sending me the old code and suggestions. Any other help would be greatly appreciated as i am stuck trying to decipher the sketch code that is very difficult because of the way it was constructed from three different authors.

    Regards,
    AutoSol

    0
    brightled
    brightled

    1 year ago

    Great Job That is the neatest toy spaceship I have seen in a long time you should call it An imaganation expander.

    0
    Nilfisken
    Nilfisken

    Reply 1 year ago

    Thanks for the kind comment, Walter :) That is definitely how it works, so that would be very fitting :)

    0
    jessyratfink
    jessyratfink

    1 year ago

    I love this project! Your photos and documentation and fantastic too :D

    0
    Nilfisken
    Nilfisken

    Reply 1 year ago

    Thanks for the kind comment, Jessy :)

    0
    Dave Mc
    Dave Mc

    1 year ago

    Oh all the clicks and the buttons sound so satisfyingly solid. I love this. Fantasitc well done.

    0
    Nilfisken
    Nilfisken

    Reply 1 year ago

    Thanks for the nice comment, Dave. The final build was a lot of fun to play with, flicking switches and clicking all the buttons - I was close to consider keeping it to myself :) But in the end, I knew that it would bring a lot more long-term joy for my nephew, so it was probably the right thing to give it to him :D

    Excellent first Instructable. Very detailed and well written. You should definitely enter this into the First Time Authors contest.

    0
    Nilfisken
    Nilfisken

    Reply 1 year ago

    Thanks so much for the kind words, Jason. Hopefully many more Instructables will follow as time permits.
    Also - the Instructable has now been entered into the First Time Author contest, so I'll keep my fingers crossed :)