Tuesday, May 3, 2016

DIY 3D-Printed Electronic Drum Kit


Source files available in GitHub: https://github.com/rossbrigoli/Tambol

Inspired by a 3D printed drum pad by Frank Piesik, I decided to make my own 3D printed drum pads. I have an old cheap Medeli DD402 electronic drum kit lying around and not used for quite a while because of some faulty piezo-electric sensors that I was too lazy to replace. So instead of fixing the those faulty noisy rubber drumpads, I thought to replace it with a 3D-printed mesh head drum trigger.

I have made up my mind from the beginning that I will replace every rubber drum pad of my Medeli drum kit with a 3D printed one. This meant that I had to print 4 drum pads and that I have 4 chances/opportunities of improving the design. I did it in a Agile/ Iterative way and also in a modular design so that I do not have to re-print the whole thing if I decide to change the design in the following iterations. I only need to re-print the specific parts that was affected by the new design.

Iteration 1

I took the design of Frank Piesik from GitHub to have a baseline to start with. The design is good but I could not print the drum's shell because it's too big for my Kossel Mini printer. I started the first sprint by redesigning the shell and by breaking it down into smaller pieces that will fit inside my printer bed while keeping the original rims and the base. My printer print radius is 180mm and the shell actually has 180mm of diameter. I could not print it as a whole because of the nature of Kossel Mini design. It could not print a full 180mm circle because the hot-end fan will hit the belt of the Y tower (front left). I also modified the rack mount so that it can be mounted into my existing Medeli drum rack.
Half of the base being printed.

The drum will not work without a drum head of course. I learned about a "mesh head" from a friend who owns a Roland VDrum set. Mesh heads are drum heads but unlike the regular drum heads it is made of material that does not cause air vibration when hit and it looks like a loosely weaved cloth, a mesh basically. This is typically used to replace the regular drum heads of acoustic drum so that they become quite and be used for practicing drums in your flat or your apartment without getting shouted by your neighbors. I bought 4 Pintech Reaction Series Mesh headsfrom a UK-based online store Musician's Friend for S$30 a piece. It was quite expensive but it was worth it. There were cheaper options, but I did not like the reviews.
Pintech Reaction Series Mesh Head



Printing all the parts took around 24 hours. After printing all parts, I put all parts together using M6 bolts. It was very easy to assemble which only took few minutes.




It was working OK, but as soon as soon as I started cranking up the bolts to tighten the mesh heads, many problems came out. Here's the top 4 of them.
  1. There is just so much pressure focused at the center of the shell that made warp. I guess the original designer's objective of making the center of the shell the only point of contact with the base is to distribute the force evenly and to isolate vibrations of the shell with the base. It also did not work well at isolating the vibrations so I thought I had to redesign this whole thing.
  2. Another problem was the threaded rods started bending significantly, as you can see in the photo, even before I reach a mesh head pressure that is good enough for drumming.
  3. A third problem was that the shell becomes to shallow because I added bridge in the middle of the shell to make room for the bolts that are holing the two parts together. When I hit the drum hard, it makes an ugly "Tick" sound as the drum stick hits the bridge in the middle of the shell.
  4. The last problem was the location of the sensor, it's not in the middle therefor the responses to every hit is not uniform. There is a significant difference when hitting the top and the bottom part of the drum head. There is no option in my cheap drum module to adjust the sensitivity or to add compression.
Iteration 2

In the second Iteration, I decided to redesign everything while maintaining some aspects of the original design like the 4 threaded rods as the base. This time the rods goes through the shell while the shell socket becomes the holder of the piezo sensor.

The shell is also now in 3 parts instead of just two. This is to make room for future builds. 3-parts means the drum can be scaled up and still remain printable in a Kossel Mini printer. The photo above shows the actual result of Iteration 1 and the new design of the second iteration. I knew that iteration 2 will not be so successful because it's a completely new design so I also printed the second iteration in blue to experiment on the looks. I wanted to see how blue would look like.



Iteration 2 was failure. It's totally an experimental iteration. There some part of the design that I missed. I forgot to consider the thickness of the aluminum rings of the mesh head. As a result, the shell was too shallow and that there is not enough room for the mesh head to be pushed down further before it hits the base. it can still be used but the heads are too loose it doesn't feel like a drum head. There is not enough bounce. Although it's a failed iteration, it's not a wasted iteration because I learned a couple of things to correct in the next iteration.

  1. I learned that blue looks ugly in my rack. It looks very cheap, almost like a toy.
  2. I also learned that the shell was too heavy and way to thick and too strong.
  3. I learned that I need to make it taller to make room for the aluminum rings of the drum head.

Iteration 3

All the 4 issues of the first iteration and the 3 things I learned from the second iteration have all been addressed in 3rd and the result was amazing. The structure is sturdy enough that you can tighten the heads up to a point when it produces a note similar to that of an expensive Roland V-Drums mesh pads.



I am happy with the results of iteration 3 and almost wanted to stop there and print everything based on iteration 3. But I thought that maybe this shell is still too thick and too heavy. So started Iteration 4.

Iteration 4

Iteration 4 was a refinement of the Iteration 3's design and the finalization of the piezo electric sensor mount. I redesigned the shell by putting holes in its side to make it lighter. I also made the walls a little more thinner.


Iteration 4 shell being printed.

The final design showing all parts and the assembled shell.

It is roughly around 20% lighter than Iteration 3. I am very happy with it and decided that this will be the final design for all the pads I need. So I started printing 2 more shells like this. I did not want to change the Iteration 3 shells because it was almost the same. It is just heavier. So I only need to replace the shells of Iteration 1 and Iteration 2 drum pads. This is the benefit of designing it in modular. I didn't have to reject all parts of iteration 2, I was able to reuse the base and the rims.

I forgot the mention that in the second iteration, I also made a little modification on the rims because I didn't like seeing the the edge of the mesh head showing that yellow adhesive thing. So I added a 45 degree lip inside the rims to cover it. The photo above shows the final parts of the final design.

While printing the shells, I started coming up with the good mount for the piezo-electric sensor. It has to be isolated from the shell so that it won't pickup vibrations from the shell. But it has to pickup every vibrations from the mesh head. I looked at some commertial trigger cones but they are too expensive for just a simple rubber cone thingy. Here's one from ebay at US$12 each. I experimented on few materials. In fact my girlfriend was wondering why I bought different kinds of sponges. :) I laughed because I did not realize that it looked so weird buying all those stuff. After trying few of the materials, I finally settled for the EVA anti-slip pads.


I used anti-slip EVA/rubber dots which is very cheap in a local neighborhood hardware shop. I bought different sizes and stack them together to form a conical shape using a generic transparent adhesive. I have tested different approaches in previous iterations but so far this is the most effective.

The final product based on iteration 4 design. You can also see the sensor mounted at the center.

I am happy with the overall performance of this drum. My drum kit now feels like an expensive kit. Very good bounce that feels like an acoustic drum. No more pain in the wrist like what I usually get from rubber drum pads. My drumming is now less annoying to the neighbors and to the people watching your without a headset.

After assembling all 4 drum pads, I finally removed the old rubber pads and replaced them. The black and white looks very good on my rack. The blue rack mount part was a re-used part from iteration 2.

3D-printed mesh head pads next to the old rubber pads.
How cool looking is that?
Before testing I also have replaced all the piezo-electric transducers of the cymbals and the bass drum because I have a lots of extra piezo-electric transducers lying around. I bought a 20-pieces piezo-electric transducers from China through AliExpress for just $3 and shipping is free. The triggers are a lot better after replacing them. It feels like a new drum kit.

Iterative and Modular

As a software engineer, it make sense to make this project in an Iterative and modular approach. The benefit for doing iterative approach is that for every iteration you have an opportunity to redesign or improve the design of your model. While the benefit of making it modular is that you do not have to reprint everything of the previous iteration, you only need to re-print the parts that was affected by your new design. Thought there is one major difference between a software and hardware projects. Hardware projects are same as in construction or civil engineering in a sense that they involve materials unlike software engineering. For every re-design, materials are wasted. In this case, here are the total materials wasted due to the iterative approach.



You can also download the source files from GitHub and print your own drums.

Checkout the drums in action in one of my cover music videos.

Thursday, March 24, 2016

Building a 3D Printer and My 3D Printing Adventure

I can't believe it was almost 10 years ago since I first heard about the RepRap project. It is an open source hardware project aims at building a self-replicating 3D printer. The concept of open source mechanical hardware was new at the time. I badly wanted to have one but I could not afford it. The kit was so expensive at the time. If I remember it right, the kit was being sold for 4,000 USD. It was way beyond my ability to afford. It's the price of a second hand car. After all, I was making only a few thousands pesos (Php) at the time.

Two weeks ago, while I was checking for the status of my online purchases at AliExpress, an advertisement came up about a 3D printer called Delta. It caught my attention so I clicked the ad which leads me to a product on sale about a something called Kossel Delta 3D printer. It looks familiar, it looks like a RepRap design but it's different. There is no Cartesian rods, instead, it has a triangular frame wherein three stepper motors are driving a complex kinematic linkages (I have a little background in mechanical engineering and robotics so I understand the kinematics of the machine by looking at it). It was interesting, because it's compact and the kinematics are quite interesting. What was even more interesting was the price. It was priced at $200 US. I couldn't quite believe it at the beginning so I started googling for Kossel Delta and Google brought me to the RepRap page. This is when I said "I knew it", that's why it looks like RepRap design. RepRap design has evolved a lot for the past 10 years. That's the good thing about open source. So I went back to AliExpress and clicked the "Buy Now" button.

Few days have past and I received a big box at my front door. Inside is the 3D printer kit. The kit's main parts are the 4 stepper motors, the aluminum rails already cut in correct lengths, the Arduino based motherboard,  and the 3D printed plastic parts.




Mechanical



The kit arrived on Friday morning so I spent the whole Friday planning about my Saturday, which is "To start building the printer". The first thing I did on that Saturday was to take a coffee and a very quick breakfast as I couldn't wait to see what's in the box. I laid out the parts on the living room table. I couldn't find a build manual in the package. There was 1 sheet of paper listing all the parts that is in the kit but there was nothing about how to assemble it. It did not stop me from building the frame though. That's because I found a youtube video of a guy building his own similar kit. Not exactly the same but it's also based on RepRap's Kossel mini design.


Without an build instruction manual, it was quite difficult to know which bolts and nut I should use for which part. There are more than a hundred of them. But I manage to guess it right. The size of the hole is a hint but the length was quite a lucky guess.




Electronics

I have had a few help form 2 guys specially for the installation of timing belts. I finished the mechanical parts of the build in the afternoon. Then I immediately started working on the electronics side. I installing the micro limit switches for all the end stops. there was one extra limit switch that got me scratching my head. The guy in the youtube video did not have it. He only has 3 limit switches. It took sometime to realize that it was for the Z axis auto leveling feature. Which was not there in former versions of Kossel. There was a fulcrum mechanism in the hot-end assembly that I was wondering about what it was for while I was building it. Not I know that that was for the auto-leveling feature. Auto-leveling is a feature for compensating mechanical alignment in the software. The printer will actually try to find where the base (print bed) is on a certain XY point. The firmware can then do adjust ment in the Z axis to compensate for the mechanical error. Without this, you will have to manually calibrate the printer everytime you print to make sure the the position of the print bed is stil the same as before.

I attached the 4th limit swith to the obvious holes in the hot-end assembly. The design was quite impressive. In other printers there is a dedicated mechanical lever that are used to detect the printbed while some printers use expensive inductive proximity sensors. Well, this printer uses the nozzle itself as the sensor. Isn't that cool?

After connecting everything, stepper motors, limit switches, heater, thermistor and cooling fan. Voila!!! It's time to give it a brain.




Firmware

What was funny about this part was that there was an SD card included in the kit that I always assume to contain the firmware source code. I did not touch it until the mechanical and electronics are ready. Indeed, it did contain the firmware but it also contained a PDF file with all the complete instruction for assembling the kit documented in it. Whew, I would have saved some time if I knew this file was there in the SD card.

The firmware included in the kit is the Marlin firmware. It's one of the firmare maintained in the RepRap community. The firmware is written in C, of course the printer is run by Arduino microcontroller unit (MCU). I flashed the firmware to the board and tested right away and of course it did not work perfectly. It printed way to high above the print bed. The extruder motor is not working, the fan is not working.




I went through the documentation of marlin and learned that I have to configure the firmware. I am putting a brain to a new body, I need to tell that brain about his new body. There was a quite OK documentation of the Marlin firmware configuration on the RepRap wiki. Every build is different, because of the way each person decides where to put the limit switches. This is why we need to tell the Marlin firmware the dimension of the printer, the kinematics of the printer and the components installed to the printer. Foe example I need to tell the firmware that my printbed is not heated so that the printer will not wait for the printer bed temperature sensor data before printing. After few hours of calibration and multiple test prints, I finally got it. I couldn't wait to see it print an actual object so I tested with a 3D design object that is a part of the printer. The vertical rollers.

3D Printing

3D printing is not easy, I knew this from the beginning and from watching videos of people 3D printing objects using a printer they built. It's not a simple press of a button and voila you have your physical object. 3D printing takes minutes hours and sometimes days depending on the size and quality of the print. My first print was a complete failure but that's normal.
First attemp
Second attempt





The second print was slightly better and the 3rd print was okay. It's then time to actually feel the true experience of 3D printing. Its the experience of touching a physical object with your hand in the real world that you have created in the virtual world with your mouse. This feeling is addictive, it makes you feel powerful. It makes you feel like you can create anything. It trigger the same part of the brain that is stimulated when writing a software. But the reality is not really like that. 3D printers have their limitations, especially this FDM type of printer. It cannot print overhangs, it has a limited print volume and cannot print bigger than that volume, it cannot just print any material, etc...

I have done 3D designs before in the university with Autocad. I have also taught a basic mechanical drafting course in the university using Autocad. But that was 11 years ago. When I checked for CAD software for 3D printing, there now lots of options unlike 11 years ago where you only have a handful. So I needed to make a choice on which software I should learn now. Because I think Autocad is just to expensive for a hobby. I messaged a friend in FB who used to do 3D designs for the Virtual World "SecondLife" to ask for his opinion. He suggested Blender because it's open source and it's full featured. But when checked out the software, it seems like there's a lot to learn, too powerfull for a just simple 3D designs and I don't have a lot of time to re-learn my 3D design skills. So I went through the community forums and learned about Autodesk's 123D Design. It's free, cloud-oriented 3D modeling application with basic features for 3D design/modeling. I found several YouTube videos about 123D design tutorials, I went through them and in 1 hour, I am designing 3D objects. The first thing I designed was a wireless charging dock for my Lumia 950 XL. It's not a very common phone so I'm sure I won't find any commercial products like what I am about to design.
It was cool. I finally experienced hold a thing in my hand that I designed in the virtual world. I couldn't stop printing and designing things after this. I created an iPhone dock and sound amplifier for my girlfriend. I enhanced my printer's performance by printing new parts like a support for the print bed, because I didn't like the glass sitting on top of the aluminum rail. I printed a filament spool holder so I could get rid of the wine bottle rack that was holding my spool.


I experimented on multi-part prints by designing object that are bigger than the print bed, print them part by part and designed them to be joined later after print. I experimented on watertight prints by configuring the slicer to print thicker walls and proving it by printing a self-watering plant pot. I experimented on airtight prints by printing a sopranino recorder flute that sounded very bad (I will print a better one tomorrow). It's fun and rewarding. 3D printers are for sure a must-have DIY tool for makers.

3D Printers

3D printers are CNC machines. CNC = Computer Numerical Control machines. I have already encountered quite a few CNC machines before such as CNC milling and CNC lathe machines in factories and machine shops . CNC machines understand sequence of instructions which it will translate to physic movements in a 3 dimensional space. They are not smart machines they simply execute a series of commands called GCodes of G language which is an ISO standard for controlling robots in the manufacturing floor. 3D printers are the same. This printers have no idea what kind of object they are actually making/printing. They are simply following a sequence of instructions to perform. So who does the intelligence of preparing such instructions to build an object?

The Slicer

It is called the Slicer program. There are many slicer applications out there and Slic3er and Cura are the commonly used ones I think. What these software do is literally slice your 3D object into thin layers of a fraction of a millimeter and figures out how to print such layer. Then the final output of these software is a binary file contain a complete set of instruction that the 3D printer needs to execute in order to print the object that was sliced.

3D Printing Problems and Solutions

One of the issues I encountered after a few prints, and is the most common problem in 3D printing is how to keep your printed object stick to the base. Some people use tapes and glues while others use different materials for the base print bed. My print bed is made of glass, I tried putting a tape of top of it but it's just not nice to put tape everytime and it did not solved my problem completely. My problem was that after few layers is printed, the corners begin to curl up as it cools down. It lifted the tape up as well and I ended up with a warped corners. My solution to this is a bit weird but works perfectly, thanks to the RepRap community. I now am printing directly to the glass without using any tapes. But before printing, I spray a thin layer of hairspray (something that contains vinyl). This will serve as a water-washable adhesive that will keep the printed object in place until the print is complete. It completely solved the warping problem, thanks to my girlfriend's hairspray. :)

Another problem I encountered was the warping of overhanging parts of the object. I noticed that the overhanging parts tends to bend down, because there are no objects supporting under them. This results in an ugly curly lines of plastic in the printed object. The solution was a $20 USB fan. When I placed a fan facing the printed object while it is being printed, it makes the curly overhang problem go away. This is because the fan cools down and hardens the plastic faster right after it is extruded out of the nozzle.

There are a bunch of small problems that I encountered, like the loose ball and socket joins in of the tie rod which I solved by tying up a rubber band between the two rods to reduce the vibration. The rubber band serves as a vibration damper or the shock absorber. It also resulted to slightly better prints as the backlash in the bearing was eliminated.

I'm sure there will be a lot more problem that I will discover, but that's normal. That's the good thing about having a machine that you build yourself, because it's hackable, you can easily modify the design and rebuild or fix the machine anytime without breaking any warranty. :P 

To conclude, here's a short video of the printer in action.


Wednesday, March 9, 2016

Raspberry Pi Hadoop Cluster


I am currently in the process of learning Hadoop architecture, administration and the MapReduce programming model. I started reading about Hadoop and took free online courses but there is something missing. I wanted to try out what I read or what I was told on those training. In some exercises in the training a VM was used as a single node Hadoop server. But for me it doesn’t make sense, so I tried out setting up more VM and configured them into a Hadoop cluster. But still the experience was not very satisfying because it lacks the touch of the hardware. I wasn’t really running a cluster but simply just a bunch of virtual machines connected together in a virtual network. So I thought “How about I build a cluster of cheap computers.” In fact, that’s what Hadoop was designed for, to run on a cluster of commodity hardware. I tried googling around about cheap cluster computer and found a few blogs and videos about guys who ran MPI and Hadoop on a mini cluster of Raspberry Pi boards. So I decided to build my own mini cluster of Raspberry Pis. After all, the best way to learn new things is to get your hand dirty.

There are a couple of Raspberry Pi boards laying around my desk at home. I used them in some experiments before. But I needed more, so I ordered 3 more of these boards. Raspberry Pi is a S$50 single board computer with ARM7 1Ghz  dual-core CPU, 1GB of RAM and a microSD slot for storage.





I also bought SD cards and, USB power cables, an 8-port network switch and a high-current USB power supply/charger. Luckily I was able to find all off them locally in the neighbourhood shops except for the Raspberry Pi which I ordered online and received the next day.

I started thinking about how to clump this boards together in a rack-like structure where it is easy to cable them up to a network switch. I found few ideas online about using some stand-off bolts and nuts and acrylic boards to stack them up together. The problem is I don’t have these materials so I started walking around the house to come up with ideas and to look for materials. The mounting holes in the Raspberry Pi are 2mm wide so I started looking for bolt and screws of this size but didn’t find any. Then I went to the laundry area where I found a wire-made clothes hanger. The wire core metal is around 2mm diameter covered with a PVC plastic insulator around 1 mm thick. I grabbed it and decided to build a mini rack out of it. I created a half round loop and literally stitched the boards together.


The network switch I bought is powered by a 5V power supply at 600mA so the USB power supply can actually power it.
I downloaded a Linux distro called Raspbian Jessie it is a lightweight variant of Debian linux intended for headless Raspberry Pi server. It’s a stripped down version of Raspbian Wheezy without the UI. I then updated it with latest libraries and installed Java 8 JDK.

I followed the steps by that was described in this blog but with some extra steps to configure a second interface card with a Wi-Fi dongle and voila. I now have a Hadoop cluster running.





I later bought a set of acrylic stackable case to make the rack more stable and look good. I stripped out the board of the cheap network switch (I bought online for $7 from china) and mounted it the one of the acrylic stackable case so it will look uniform. Now I am hadooping with this little beast. I later upgraded to Hadoop 2 and installed Apache spark for future Apache Spark experiments and adventures.

Popular