Intro: Automatic Baby-Mobile
Good day to everyone out there and welcome to this instructable concerning a prototype I've made during a project at my school (HKU in the Netherlands) called 'If This Then That'.
For this project I eventually chose to make an automated baby-mobile based on a dream I had, the concept being a mobile that activates(lights turn on, it starts to move, perhaps a tune could play...) the moment the baby begins to cry. Sound-activated seemed like something fun to work with as I explored what an Arduino could do. Note here that I've never before done anything technical, I'm studying to be a game artist so this is no comfort zone of mine, but perhaps my process can inspire you!
As such here is a fair warning in advance for cellphone-quality pictures, unregulated sound in videos and less-than-experienced progression of the project. I certainly learned a lot and wish all that come across this a lot of fun with their own projects!
All available pictures I made during the project- including those unused in this instructable- can be found here, videos can be found here.
Hardware used in final prototype:
-Sheet of wood: hardwood multiplex 5,5 milimeters thick, 59 cm by 61 cm (there was some unused wood left afterwards)
-Silicon wire - 2m 26AWG (x2, red and black)
-4 basic LED's (I used the blue and violet variants)
-15 male-male jumper wires
-Electromic amplifier - MAX4466
-Nylon wire (0.3 mm)
-Resistances 220 Ohm (x5)
-Resistances 10k Ohm (x1)
Step 1: Orientation & Proto-prototyping
Before I could actually begin to design what I had in mind I needed to try out some things to ensure they would work.
I've done nothing extraordinary in order to achieve this. The first version is seen above. Simply cutting out the shapes from sheets of normal A4 paper and putting them together to see if the basic idea holds true. Of course paper does not have the proper thickness to give the structure the sturdiness it needs to stay up- but otherwise it seemed to work!
Moving on to cardboard. The next proto-prototype was a little more in-depth when it came to the structure of the pieces I would like to hang from the mobile and how I'd like to place the lights inside of them. Later I would realize I need two wires to get a LED burning, not to mention it's unwise to let the electric wires also be the supportive constructive wires- but in this little prototype I considered myself very smart for thinking up the idea of it. It being to drill a single hole down the center of the piece of the hanger that's on top (somehow forgetting the other part would probably fall down if not properly attatched) and having the light be connected to the arduino up top through that single wire.
At least the idea of having the LED in the center of the hanger was appealing enough to figure out solutions for these initial oversights!
I recommend trying things out quickly with cardboard and/or paper, even if I already have as well. If only to get a feel for your own project, it truly helps to do these little tryouts and helps you orient yourself better to the final product and make little improvements on your initial idea!
Step 2: The Lasercutter
The first real hurdle in my project which I was quite nervous for and could do a lot of things better with in the future.
First of all- it goes without saying that preparation is important. I've spent many hours reading up on and conversing- with someone recommended on the makerspace's webpage by e-mail- over the files I should have handy by the time I wanted to actually use the lasercutter.
In the end I still got it... Not necessarily wrong but not entirely correct. For one the man helping me out in the makerspace got me started on cutting the wood I bought. This while I ought to have begun etching instead. The misunderstanding probably occured because I didn't get it across properly that I wanted to etch as well as cut on the same pieces and didn't have the etching-design and cutting-design in the same file. I could have tried etching anyway (even though he advised against it)- if I had gotten reserving the machine right. Alas- I didn't, so I had to leave quicker than planned. Learning moment, next time I'll be able to do this better!
the machine itself is very pleasant to work with though. Just make sure there's something walking you through the steps if it's your first time!
I had the designs cut out twice so I had one set I could use for practice (also seen above). This is is a really good idea for anyone looking to make something similar! Putting a first version together will again help you see some mistakes in what you're trying to do and will help making the eventual version much more solid!
In my case the first one I put together was done without glue and with simple sowing thread (upon realizing you can't tie knots in 1mm thick nylon wire). For one- the lack of glue made it very quick to fall apart and the way I tied the wire made most of the hanging pieces end up tilted instead of straight up.
My designs can be seen above and the DXF-files(vector) as well as the Illustrator-file can be found here. You can use them or adjust them for your own use- hopefully it'll go better than mine! Keep in mind that having etch and cut in the same file usually ends up being preferred. Just ask someone more knowledgeable how to put it together!
Step 3: Wires & Code
Now that I had the wooden part of the mobile more or less figured out of course the time came to figure out what I wanted to do with the lights.
Above are some pictures and a video of my messing around with wires, LEDs and a button until they more or less worked the way I wanted them to. I used the breadboard to figure things out so that- when going to solder it all together- I would know what part I would need to put where.
Both code and setup I took mostly from the introductionary colleges given at school. Above you can find the schema for a single LED which I tried to set up for four instead. Clearly it was succesful- to my great joy. I really wanted the lights to fade in and out as well, the code I ended up using at this step is also supplied above.
By this point I should have already gotten the microphone amplifier that I ordered, unfortunately the postal service lost my package. Alas, that's what happens sometimes. Instead of the microphone I used a button instead for now just so I could at least offer something that (hopefully) worked by the time we had to present!
Step 4: Soldering
Before getting to soldering the actual technical part together I first took my second set for the mobile to the wood workshop where I drilled through the put together hangers in such a way that they would be more stable and hang straight (Unfortunately I forgot to take a picture of that moment. Apologies!).
I then took my time to use nylon string to put through the hangers and to put the top part of the mobile together. I kept the hangers apart from the main part to make soldering easier until I had the 'ground board' entirely together. I also used glue on the crossections where it was needed for the stability of the general product.
Before starting to solder I tried to make little sets of what I would need to put together for every hanger. Once I did that I knew I had to get them all grounded so I cut off a piece of board and soldered a white wire to it that I'd pin into my Arduino gnd. Someone next to me had cut off the legs of his LED's which I then used to save myself solder-tin while still covering enough space that would let all the wires from the hangers join together with sufficient distance still there. That way I could have the board rest relatively secure on the wooden cross-piece that carries it all without glueing it in place.
The red wires I needed to lengthen so they could reach the hangers from the Arduino which I wanted to place as shown in the pictures above. For both the grounding wires on the negative side of the LED as the ones on the positive side I used the silicon wires. Cutting the 2m wires in exactly 4 parts worked out wonderful! They can be made a littlebit shorter, though, but I definitely felt it was better to make them too long rather than too short.
Soldering, like most of the other processes during the project, again takes a bit of practice and experience. Definitely have someone show you how it works before trying. To me it was a challenging part because honestly I was terrified of breaking something or doing it wrong. A friend had to tell me multiple times it wouldn't be easy to ruin something- and in the end one try was all it took to at least get everything working the way I intended. I was quite happy to be succesful, trust me!
Step 5: Sound
This is definitely the part where I encourage any readers to take their time to figure out how to most efficiently use the microphone amplicier. I, unfortunately, did not have the time.
After a long day of soldering the technical part of my project together I came home to have the second microphone finally arrived. Unfortunately- with the final presentation first thing in the morning- I didn't truly have the time to experiment with it enough. I did, however, try my best to mess around with whether it would work or not.
Google was my friend. It took a while before I figured out how I had to wire the thing. I'd like to refer anyone trying to figure it out to the following instructable, as it helped me out a lot and also provided me with the code that I ended up modifying to suit my needs: https://learn.adafruit.com/adafruit-microphone-amp.... I especially needed it for assembly and wiring though.
I also kept the button present as I couldn't quite figure out what the microphone responded to or when and why it did. The code I ended up using is supplied above as well, it has the same structure as the button did- just with an additional part that lets the Arduino interpret the input from the microphone.
I hope you'll be able to get more from this little device then I was, it's unfortunate my time ran out!
Step 6: Fin!
And then there it was! The day of the presentation and the end of the time in which I could work on my prototype. It of course wasn't as cool or polished or versatile as I had dreamed it to be, but the idea I definitely managed to bring to life and with that I am very happy.
This is how far I can guide you through my process, for this is where it ended for me (for now). I wish you every bit of fun and luck with your own projects and hope mine can provide some inspiration, information or perhaps things not to do.
Either way I've learned a lot, and that's most important!