Thursday, December 8, 2016

How to run the LTspice circuit simulator on Linux

I often use LTspice for simulating my circuits or even organizing workshops. Unfortunately, LTspice is distributed as a Windows application. In this post, I'll explain you how to run LTspice on your Linux distribution using WineHQ.
 $ sudo dpkg --add-architecture i386   
 $ sudo add-apt-repository ppa:wine/wine-builds  
 $ ls /etc/apt/sources.list.d/  
   wine-wine-builds-trusty.list  
 $ sudo apt-get update  
 $ sudo apt-get install --install-recommends winehq-devel  
 $ mkdir WINE  
 $ echo "export WINEPREFIX=$HOME/WINE" >> $HOME/.bashrc  
 $ source $HOME/.bashrc  
First, you need to install Winehq using the instructions for your Linux distribution. The instructions above are for Ubuntu LTS 14.04 Trusty (64 bit). The folder WINE represents the Windows filesystem hierarchy (e.g. WINE/drive_c/ represents the C:/ folder in Windows).
 $ wine64 LTspiceXVII.exe  
Then, download LTspice from Linear Technology's homepage and execute the binary with wine64. Here I'm using the latest version XVII, but you can also install the version IV without problems.
 Menu > Wine > LTspiceXVII  
After the installation is complete you can use LTspice as in Windows. You can launch LTspice from the menu or from the generated Desktop icon. During the installation and execution of LTspice, WineHQ may need to download extra dependencies. Just click on yes and everything should go smoothly. If you are new to LTspice check out these slides and videos.

Thursday, December 1, 2016

Making your own PCB with the toner transfer technique

This is something that I had wanted to do for a very long time. There are several methods for making your own PCB. Out of them photolithography will probably give you the best results. However, toner transfer is one of the easiest and cheapest.


For my first toner transfer PCB, I used a Kicad project (a transistor checker) from the great Japanese electronics magazine Transistor Gijutsu (lit. transistor technology). I opened the project on Kicad with pcbnew and printed the B.Cu (Backside copper) layer on a photo paper (the one in the picture is popular among Japanese hobbyists) using a laser printer. Reflecting back, I should have also printed the drill holes (just mark the "real drill" checkbox when you print the B.Cu layer) and add a copper-pour ground plane to save Ferric Chloride. Then, using an iron at the lowest possible temperature I transferred the footprint from the paper to a copper board. You have to be patient here (it took me 12 minutes) and apply enough pressure.


Next, put the board in hot water and remove the paper slowly with your fingers. Don't worry about the ink, it won't come off from the copper plate.


Clean deeply using a multipurpose or window cleaner.


Check the tracks carefully. If you notice that some tracks are not completely black cover them with a water-resistant pen. In this case I used a very strong pen especially made for PCBs. However, I would recommend using a normal one because this one was too strong and it was hard to remove it later.


You can easily cut your copper plate with a P-cutter tool.


Next put some Ferric Chloride into a zip bag together with your board, and swing it slowly inside a bucket with hot water (makes the reaction faster). Make sure you always wear rubber gloves and goggles when you handle Ferric Chloride because it's a very dangerous material. You will see how the exposed copper is slowly consumed by the Ferric Chloride. Once the copper is gone take the board out of the bag. Don't leave it for too long or the Ferric Chloride will attack your tracks from both sides.


This is the result. Notice how the tracks are still covered with the ink from the laser printer which prevented the Ferric Chloride from reacting with the copper.


Now take that ink off with acetone or a nail polish remover.


Drill the holes with a hand drill. I am using Tamiya's fine pin vice with a 0.8mm bit from Proxon.


Next solder your components into the board. Here I'm using lead-free solder which requires higher temperatures than lead solder. If your components are fragile or you are not quick enough with your soldering iron use lead solder instead.


Once the board is soldered it's time for testing. A typical multimeter will emit a sound when it finds a short.


If you make a mistake such as connecting a component in the wrong way, you can use desoldering braid or wick. Make sure your soldering iron is at a high enough temperature. Check other desoldering techniques here.


If you are unlucky like me, you may need to debug further your circuit. In my case, I simulated the circuit on LTSpice and found out that there was a mistake in the footprint. I solved it by cutting a track with a normal cutter.


And there you go, the transistor checker board is now working!.


Finally, make sure that you neutralize the PH of the resulting liquid (copper chloride) with sodium carbonate to a value between 7.0 and 8.0 (use a PH testing paper). Then, solidify the solution with cement and dispose of it. Never put it down the drain because the residual copper ions left in the solution can damage your pipes and the environment.

My first diorama

This November I made my first diorama and presented it to the 8th 1/48 scale modellers contest organized by Tamiya's plastic model factory shop in Shinbashi.


After watching several documentaries I chose to make a winter scene with the famous T-34/67 Russian tank. I'll explain the process I followed below.


After assembling the T-34/76 (1), add a layer of oxide with acrylic colours, coat it with laquer varnish and then apply hair spray (2). Once the hair spray dries, apply the base acrylic colour (3). Soon after that, moisten the surface with water (4) to get a nice chipping effect (5).


Here is a more detailed view of the chipping effects on the upper hull and the turret.


For the base of the diorama I used a cheap plant saucer made of plastic. I created a basic shape using a polystyrene sheet, and on top of that I added a layer of air clay.


It's important to think about what you want to show in your diorama. It should be easy to understand what the characters are doing.


These small wooden tweezers glued to a stick made it easier for me to paint the figures.


To place the figures on the diorama you can attach a short piece of metal wire to the shoes and insert them into the air clay layer. The dirt on the lower hull, caterpillar and wheels was made by mixing plaster with pigments and enamel thinner.


I used real grass from the backyard. Just open a small hole and glue them with bond glue.


For the melted water I used Tamiya's transparent epoxy resin.


The snow is made with Tamiya's snow effect texture paint.


A total of 48 models were submitted. Out of them 15 models received a prize. Unfortunately mine didn't. Check previous contest winners here: 1, 2, 3, 4, 5, 6, 7.