Tuesday, May 3, 2016

3D-Printed Electronic Drum Pads (Drum triggers)

Source files available in GitHub: https://github.com/briggs007/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 heads from 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.

Here's my first few tests of the this restored drum kit. Please excuse my drumming skills. I am just an amateur sound engineer, the dude who records/produces music from his home studio for fun.

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

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.


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.


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.


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.

Sunday, August 3, 2014

Smart Socket : A small step to "Internet of Things"

It was a long weekend and I did not have anything planned. I was on a "couch potato" mode watching 4 movies in a row. It was very unproductive and I was just sitting upright in my bed with a pitcher of water and a sack of chips when the sun sets and it got dark. I needed to turn on the lights in the living room and few lights in the kitchen but i didn't want to stand up. I wished I could just do that with an app on my phone. So after finishing the 4th movie. I jumped into my computer and started searching about such ideas. The first interesting thing that i found was the Wemo, a home automation product by Belkin. They featured a product that is very similar to what I need. They feature of main socket that can be turned ON and OFF from the internet. I then encountered the phrase "Internet of Things" which refers to the technology behind internet connected devices. They are not limited to home but are also getting attention from factories and manufacturers now. I read an article that predicted the market of "Internet of Things" to grow to 17 billion in 4 to 5 years from now.

The Inner Geek Kicks In

Instead of buying that product, why not make my own? I know exactly how they work, I have the skills required to build such electronic hardware and I have more than enough of the software programming skill required for this. Who knows, this could be a potential business in the future. What I needed was the materials, so i searched for tiny micro-controller chips and board with built-it WiFi modules. I have couple of Raspberry Pi development boards but I needed something very small that can fit inside a light switch or inside a mains socket (convenience outlet). This search has lead me to the "Electric Imp". It is a very tiny micro controller with built-in WiFi package inside an SD card form factor. The chips is cloud-enabled. You write the firmware in the cloud and you control and monitor it from the cloud. It is hardwired to communicate to the Electric Imp's cloud platform and services. This make it easier to play around with.

I ordered 2 of the little devil (the Imp card's logo is a little devil) online. They shipped it and deliver to me from New York. Since I have not done electronics for a long while, I don't currently own the required basic tools like a soldering iron with me. So I also ordered a set of tools which included a bread board and generic PCB, soldering iron, etc online from a local provider, element14.com. I also ordered the materials required for the project in the same online store. The orders arrived after 2 days.

Basic tool set including a multimeter.
Power Supply

Yesterday, I finally had some time to put things together to develop a proof of concept prototype that can fit inside a switch box and or a mains junction box. I started out by figuring out where to get a power supply that will generate 5 Volts that is enough to power the Imp's board and the relay coils at the same time. Then i turned my eyes on an unused USB cellphone charger plug that I got from a neighborhood shop for $4. The plug generates 5V at 1A which is more than enough and it quite small. So I took it apart and remove the main board from the plug housing.

The cheap USB cellphone charger.

The Imps 

The Imp cards and the April basic development boards.
The first thing I did after receiving this little devils was to run a very simple program so I took the breadboard and started assembling a simple circuit with a single RGB LED. I made the LED controllable from the web through REST web service. I was able to change the color from red to green to blue. I could also command led to turn on or off or blink at a specified frequency. The experiment was enough to tell that this little thing is awesome. The thing has also built-in Analog to Digital converters that you can use to read analog signals such as temperature, pressure, etc. It can also provide analog output signals through PWM to control analog things such as servo motors. You can read more about it from here -> http://www.electricimp.com/product/

The cloud-based IDE looks like this. The source code is written in Squirrel programming language. In the future Electric IMP is going to migrate to Erlang.

The programming model is purely asynchronous. The communication between the agent and the device is event-driven. It feel like writing nodeJS application.
Switching Circuit

Time to replace the LED with a relay. To be able to control high current load such as an light bulb or AC or a fan, you need to channel the signal from the Imps output pin to control a relay or a MOSFET (a power transistor) which in turn will control the actual high-current load. I decided to use relays over MOSFETs as they are cheaper.

Imp development board soldered on top or a PCB fitted with a relay, terminal blocks and the salvaged power supply (the vertical board).
The image above shows the assembled product. The power supply board is positioned vertically so that they will fit inside the convenience outlet backing box.

I used a relay driver chip to drive the relay. Unfortunately, I bought the chip in a wrong packaging. I got the very small surface-mount type which is very difficult to solder with a regular iron and this board. But I managed to do it by soldering the chip from the back of the board and simply separating the Vcc and Ground pins. Then I used the rest of the pins in parallel as one switching channel since I only needed one channel anyway.

The relay driver chip partially soldered.
After many year without practice, I think my soldering skills was not that bad. ;)


The very first test did not really work quite well. After few debugging, I figured out that I connected the relay's common pin wrongly. It turns out that I misunderstood the relay driver chips datasheet so I went back to it and reconnected the relay in the right way (positive-common, not negative-common). I was to excited to see it worked that I did not even ready the data sheet well.

Finally, using the same code I wrote for the RGB LED experiment, from a web service, I told the IMP to blink the LED and I hear the relay ticking. It means the electro-mechanical l contact is moving back and forth from ON to OFF position. This means that the board is ready to go inside the box.

Fitting Together

Because of earlier careful planning, fitting the board inside the box was easy. It's a tight fit but it works. I used a couple of terminal blocks where I can easily connect and disconnect the load and source sides of the electrical circuitry. This way I can take away the board and use it somewhere else whenever I need it.


In Production

I created a small mobile website using ASP.NET MVC4 and deployed it to my existing Windows Azure web space. After 4 straight hours of working on the electronics and the Squirrel (the imp's programming language) source code and the small mobile website. Time to package the product and use it in a the real world. Here a small demo I did to show that it works.


With a total cost of S$45 including the Imp card, I now can control any appliances plugged in to this socket/outlet from anywhere around the world. In a mass produced production version, this production cost can be reduced to less than $10 per unit and the size of the board of the final product can be reduced to up to only 10 % of the size of this prototype. If the product sells at 20$ each, that sound like business eh?

Next up, a universal remote control that can be controlled over the internet.

Back to Blogging

It has been almost three years since the last time I created a blog article and more than four years since I've written an interesting one. I blame Facebook for this. So many things happened to my life. I changed and learned a lot. 

Four years ago, while I was living in Manila, my company sent me to the United Kingdom. It was one of the memorable experience of that chapter of my life. I learned about so many things. So many to mention here but to cut it short. It had opened my eyes to more possibilities and opportunities. I lived in Manchester City for almost 2 months and went for weekend strolls to London, England and Edinburgh, Scotland. It was an amazing experience for a young man from a poor tropical country in Asia who has never left the country before.

Walking the streets of Edinburgh, Scotland with Friends.
I met new friends and shared the experience. I really cherish those moments. The experience has also inspired me to work harder and dream bigger.

A year after the trip, I decided to quit my job to move to Singapore for a better opportunity. I have now gained to confidence leave the country and work elsewhere. I got a software engineering job in a French investment bank which I am still working in until Today. So far, so good. There good and bad times as usual. 

I now live in Singapore and I have traveled a lot since then. I went to neighboring Malaysia and to islands of Indonesia. I have been to Hanoi in Vietnam which was a interesting trip. One thing i learned through all those Asian trips is that the Philippines is quite disconnected form the rest of the Southeast Asian countries. I can the close relationship of Singapore to Malaysia and Malaysia to Indonesia and Thailand. They exchange goods, food and manpower. What I am saying is that it is so easy to find a Thai food or an Indonesian food in Malaysia. It's not like that in the Philippines. It's easier to find American good than Asian ones.

Anyways, I have also been to quite a few countries in Europe. Thanks to my current company for opening that window of opportunity for me. My current company sent me to Paris, France for a business trip last year. I stayed their for almost a month and did a side trip to Amsterdam, Netherlands and Brussels, Belgium. The business trip was successful and that I went back their earlier this year. This time, the side trip was to Rome, Italy where I was surprised by the number of Filipinos living there. I have tasted the best Ilocano (region in the Philippines) food in Rome.

It did not stop there, on June I went back to Europe for a personal trip with my girlfriend (If you knew me personally, I know what you're thinking). We went to quite a few cities in Europe. We went to Paris, Barcelona, Rome, Venice and Prague in Czech Republic. That short trip was amazing! I get to spend lots of quality time with my special someone in the most Romantic cities in the world.

In Rialto bridge, Venice, Italy.
Now decided to make this blog entry a few days ago when I also decided to start feeding my creativity again and start writing those creation in a blog. Since, I have not written for quite a while, I decided to write a short summary before getting back to writing techie stuff.