Sunday, September 13, 2015

Reflow soldering and Achandeino

A week ago I got a super cheap arduino kit from Akihabara's Aitendo: Achandeiino. The name is a Japanese joke meaning "I'm just fine with A-chan". The kit's circuit diagram is here. It comes with a few SMD components. And so, I thought it was about time to learn how to do reflow soldering.


After cleaning the pads where the SMD components were supposed to be mounted on, I applied a bit of flux to them. Then, I put a bit of leaded solder paste (XG-50) on each pad (I think I could have used a bit less solder paste) using a toothpick (you could also use a solder paste syringe with a tip in the range of 0.26~0.43 millimetres). During this step it's important that you follow safety procedures because lead can cause cancer. Keep your room ventilated (I used a fan near a big open window) and don't touch it with your fingers because you could end up eating it (be careful when you use the toothpick or use nitrile gloves). You can also buy lead-free paste but it requires higher temperatures to melt, and that could well be as hazardous. When you are done, place your SMD components onto the solder paste using tweezers. After using the solder paste, you should ideally conserve it at a low temperature, within 2~10 °C, or otherwise it will dry out in a few weeks. However, you need to get a small refrigerator for that (never use the one you use to store food because the solder paste can slowly release toxic fumes even at a low temperature).


The next step consists of reflowing the solder paste by heating it up according to what it's called a thermal profile. You can use many different tools for heating the solder paste: hot air, a modified toaster oven, or a hot plate for example. In my case, I used a Yamazen HG-1200 hot plate for several reasons: first it's cheap (~3000 yen in my case), second it has a glass lid very convenient for checking the state of the process, and what's more important it can heat over 230 Celsius degrees (essential for reflow soldering). Besides that, this Japanese fellow explains a few tricks on his website that he had to learn the hard way in order to use the Yamazen hot plate successfully for reflowing solder paste. The thermal profile I ended up using was:
  • Pre-heat at 160 °C for 10 minutes.
  • Place the PCB onto the hot plate.
  • Wait for a minute.
  • Change the temperature to 170 °C.
  • Check the temperature: when it reaches 170 °C, switch the hot plate off.
  • Wait 2 minutes (the hot plate's temperature keeps raising up to 180 °C for some reason).
  • Change the temperature to 210 °C.
  • Check the temperature: when it gets to 210 °C turn it off again.
  • Check the temperature: when it gets to 220 °C, wait for 40s (the hot plate will peak at about 230 °C).
  • Finally, open the glass lid and let it cool down. Once its cooled down you can clean it with isopropyl alcohol and cotton sticks (q-tips)
During the process, I kept an eye on the temperature of the hot plate through a cheap (2000~3000 yen in my case) but very well-made infrared thermometer from SainSonic. Also, since the leaded solder paste releases toxic fumes when heated, I did the whole thing on my balcony and only came close to the hot plate a few times, while holding my breath, to check the temperature.


After reflowing, I used a multi-meter to check for possible shorts. Fortunately, there weren't so I just continued soldering the rest of components by hand with my soldering iron (a hakko FX600). If you get shorts or "bridges" try fixing them with your soldering iron.


And this is the result. Next, you need to buy the ATMEGA328P-PU microcontroller either with or without bootloader, and a USB-Serial converter like this for loading your Arduino sketches.

Conclusions: reflow soldering is fun and easy once you have the appropriate tools. It is great for soldering little SMD components which are cheap and allow you to create high density boards.

Thursday, September 3, 2015

Disassembling a hair clipper

After several years of use, my electric hair clipper (a.k.a. trimmer) finally broke. For that reason, I decided to buy a new one. When I saw that the prices were actually quite cheap, I got interested about how manufacturers are cutting down on costs.


The body of my hair clipper consisted of just 2 pieces of plastic and a mechanical switch connected directly to the internal board. A detachable part (not shown in the picture) with two blades oscillates from side to side driven by the internal DC motor and a fancy spring. The electronics are as simple as it gets with just a classic AC->DC rectifier whose output is connected directly to a Mabuchi FK-290PY-051100 DC motor (100VDC, 6800RPM without load).


The motor has a cam attached that allows transforming rotary motion into linear motion for moving one of the two blades.


The board's circuit diagram is a classic that any electronics hobbyist should know. The input wave (mains electricity) is a SINE with 100V amplitude and a frequency of 50Hz (Tokyo). The 1MΩ resistor is used to increase the input impedance (ideally infinite). Then, a 100nF/125VAC ceramic capacitor is used to filter out noise from the mains signal. The result is rectified through a diode bridge (i.e.: a full-wave rectifier), and then smooth out with an electrolytic capacitor in parallel (a low pass filter). The output voltage is 98,88VDC instead of 100VDC because of the forward voltage (Vf≈0.56) of 2 diodes. In sum, here is the bill-of-materials (BOM):
  • Resistors: 1x1MΩ, 1x150Ω
  • Capacitors: 1x100nF (125VDC), 1x4.7μF (160VDC, electrolytic)
  • Diodes: 4x1N4004-TP (Vf=~0.56)
  • Motor: Mabuchi FK-290PY-051100 (~4 dollars)
  • Camshaft
  • Blades
  • Spring
  • Plastic body
  • Power cord
  • Others: size attachments, oil, brush..
  • PCB
Conclusions: making profit from selling an electric hair clipper at about 2000~4000 yen looks quite challenging to me, unless you sell enough of them so that you can average out the cost of the initial mold for the plastic body and attachments. There are lots of brands competing in the market with completely different plastic bodies. I wonder if all of them are selling enough to compensate those initial costs.

Friday, August 14, 2015

My first Blitz3D mini games

My first experience with programming games (actually, my first programming experience at all) was with DIV Games Studio, an awesome framework for making video games created by a Spanish company called Hammer technologies. At that time I also started learning about digital 3D modeling thanks to awesome magazines such as Jumping. I had the idea of making a 3D game, but unfortunately DIV Games Studio was designed mostly for 2D games. After some searching I found Blitz3D, a simple environment for game creation that supported 3D objects and seemed easy to program. With the help of a friendly IRC community, I managed to build my first demo games in no time.


Since Blitz3D recently went open source and can be downloaded from their site for free (instructions), I decided to recover those old games and put them on my github. Apart from a little game in Javascript, I haven't made any games since then. Lately, I've been experimenting with the popular Cocos2D platform and I hope I can get some time for Unity as well.

Thursday, August 13, 2015

My first marble machine

Marble machines are one of the best ways I know of for experimenting with mechanisms such as levers, pulleys, inclined planes, gears, or cams. The one in the following video is the first one I've built:


But let's start from the beginning. During last year's Maker faire I got surprised by the skills of Denha sensei at building his own complex marble machines.


After the Maker Faire, I spent hours admiring his creations and how he checks every detail in a methodical way. I came to the conclusion that a marble machine is usually made of some of the following components:

For my first marble machine I tried to make it simple. For that reason, I only used two common artifacts: a wheel elevator and an inclined plane. For finding the centre of the wheel, I used simple geometry. However, I had to drill a big hole for the bearing to fit in. That affected the accuracy of the centre. For that reason, I had to use a small spring that would automatically adjust the distance between the wheel and the motor's shaft (probably it would have been easier if I had used brass wire for the wheel's axis instead of a bearing). The inclined plane was made using a chisel. This is the list of materials I used:
  • Geared motor: MOT114A1B 6V 60RPM 12GA (Sengoku 1280yen)
  • Gear for the shaft of the motor (Sengoku) and a rubber cover (Ishikawa-neji)
  • Balls 7mm diameter (Tokyu hands)
  • A small spring (from a pen)
  • Brass wire 1mm diameter (Radio depaato in Akiba)
  • Wood (a home center and Daiso)
  • On/Off push switch (from an junk board)
  • 2*AA batteries with a case (Daiso and Akizuki denshi)
  • Aluminium plate (Yokyu hands)
  • Bearing (from an broken stepper motor)
This is a list of tools I used:
  • A precision hand drill
  • A precision wood saw
  • Dremel 4000 with various bits
  • Tweezers
  • Cable cutter
  • Long/round nose pliers
  • Tape
  • A universal vise
  • Chisels
  • Sand paper
Conclusions: I failed many times, but I also learned a lot during the process of building my own marble machine. Indeed it was harder than what I had expected. I will try to build upon these lessons learned, and make a better marble machine next time. You can check my notes for more details.