Hand Assembling SMD Circuit Boards

At litehouse.io, we recently got our 1st prototype board. We decided to do hand assembly of the SMD circuit board instead of sending it to the fab!

This is my 1st circuit board assembly. Soldering the SMD components can be really daunting. But if you have proper tools and resources in hand, it is not all that bad.

Here is how our soldering area looks like


Soldering in progress …


Without further ado, lets list down the necessary tools and resources used to complete the hand assembly of the SMD circuit board.

X-Tronic Hot Air Rework & Soldering Station: This (or any other brand you like) is a keeper. The kit is a collection of a bunch of necessary tools that you will need. So instead of ordering them separately, you can save $$$ on this package.

Solder tip cleaner: More useful than the traditional spongy cleaner that comes with the soldering station.

Vacuum Pickup Station: Extremely useful for pick&place of the tiny resistors, capacitors etc. Although my 0603 size resistors were too small for the smallest vacuum suction tip that this kit has. It sucked up 3 of the resistor and I still can’t find them! So I ended up using the tweezer for the resistors (painful). I need to find smaller tip for vacuum suction.

Flux Paste: This is your best friend!

Wipers: Needed to cleanup after soldering.

Flux Brushes: Needed to cleanup after soldering.

How to SMD Soldering
Soldering QFN Components
How to use Vacuum Pickup Tool

My begineer soldering kits
Soldering Station
Helping Hand
Desoldering pump

Bluetooth Low Energy: Read-Write to Sensor Network from Raspberry Pi

In this tutorial, I am using a RedBearLab Bluetooth Low Energy (BLE) shield connected to Arduino UNO to demonstrate the BLE communication from Raspberry Pi.

  • Install hard-float Raspberryian OS using this link.
  • Install Bluez using step 1, 2, 3 of this link.
  • I used CSR 4.0 dongle in the Raspberry Pi for BLE connection.
  • Make sure you have gatttool in the path using
    $which gatttool
    If it is not in the path, copy it from bluez/bluez-5.11/attrib
    $cp bluez/bluez-5.11/attrib/gatttool /usr/local/bin/
  • Check if the Bluetooth dongle is up and running
    ~/bluez/bluez-5.11 $ tools/hciconfig
    If not (you will see DOWN written in the result), use below command to get it up
    ~/bluez/bluez-5.11 $ tools/hciconfig hci0 up
  • Now scan for BLE devices. The command below might continue scanning forever, so type CTRL+C when you have the device address
    $ sudo hcitool lescan
    Assume you get the BLE device address xx:xx:xx:xx:xx:xx
  • Now connect with the device using gatttool
    $ sudo gatttool -b xx:xx:xx:xx:xx:xx -t random –interactive
    You might not need to use -t random. Also if you get device busy error, remove the dongle and reconnect it.  You will see an interactive prompt. Type connect like below
    [xx:xx:xx:xx:xx:xx][LE]> connect
    Attempting to connect to xx:xx:xx:xx:xx:xx
    Connection successful

Once it is connected, we want to write to a LED to turn in ON/OFF, and read the sensor data. We are using FSR as the sensor in this example. We will use gatttool to do the read & write.

Before we begin, we need to understand how this works fundamentally. You can go ahead and read this book or any other good tutorial that I am not aware of. But basically, you need to have some code on your Arduino that sets up a profile in the nRF8001 component on your RedBearLab shield that defines “pipes” which is the link between a characteristic exposed by the radio and a function from which you can read data or to which you can send data.

I am using SimpleControl sketch from RedBearLab as the code that runs on Arduino.  To do read-write, we need to know which address to write and what value to write.

Find the Address to Read & Write: 
I look at RedBearLab’s Android source code to figure out the TX, RX address.  In the RBLGattAttribute.java, you will see

public static String BLE_SHIELD_TX = “713d0003-503e-4c75-ba94-3148f18d941e”;
public static String BLE_SHIELD_RX = “713d0002-503e-4c75-ba94-3148f18d941e”;

Now, if you type below in the gatttool interactive prompt, you can figure our the address (handle) of those TX, RX

[xx:xx:xx:xx:xx:xx][LE]> char-desc
handle: 0x000b, uuid: 713d0003-503e-4c75-ba94-3148f18d941e
handle: 0x000c, uuid: 2803
handle: 0x000d, uuid: 713d0002-503e-4c75-ba94-3148f18d941e
handle: 0x000e, uuid: 2902

So you basically see that the handle of TX, RX are 0x000b and 0x000d respectively.

How to Turn ON/OFF the LED:
From the SimpleControl.java, you can see that you need to write 010100 to the TX handle to turn the LED ON and 010000 to turn it OFF.

digitalOutBtn.setOnCheckedChangeListener(new OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
             byte buf[] = new byte[] { (byte) 0x01, (byte) 0x00, (byte) 0x00 };
             if (isChecked == true)
                  buf[1] = 0x01;
                  buf[1] = 0x00;

Now type below to turn the LED ON
[xx:xx:xx:xx:xx:xx][LE]>char-write-cmd 0x000b 010100

To Read Analog Data: 
Similarly from the SimpleControl.java, you can see that you need to write A00100 to the handle 0x000b to enable the analog reading capability through the RedBearLab shield. You also need to enable listening to the 0x000e handle. The 0x000e is the handle of the Client Characteristic Configuration (CCC) uuid 2902. You can find this 0x000e handle by typing char-read-uuid 2902 in the gatttool interactive prompt.

[xx:xx:xx:xx:xx:xx][LE]>char-write-cmd 0x000b A00100
[xx:xx:xx:xx:xx:xx][LE]>char-write-req 0x000e 0100 –listen

You will see sensor values in coming the the RX handle (0x000d)
Notification handle = 0x000d value: 0b 00 c0
Notification handle = 0x000d value: 0b 00 d0
Notification handle = 0x000d value: 0b 00 e4
Notification handle = 0x000d value: 0b 00 f0


Web controlled Robot

We developed a web controlled robot. Using pusher, developed a desktop client that tells the robot to move forward, backward, turn left and right. We used Cherokey 4WD kit to build the robot. An Arduino Uno (thanks to the Make Robot Hacks Session), a Wifi/Wifly shield were connected to the kit that receives the control signals from the web. Based on the control signals, the motor controller is instructed to move. Here is a video.

The Perfect Pour

This weekend, I joined Silicon Chef Hardware Hackathon. Our team (VeronicaStephanieJudithYan & Me) created a smart beer cozy! An Arduino based project that can detect how well you are pouring and prevents you from spilling the beer. We used a 3-axis Accelerometer to detect the tilt angel. Messages are displayed in the LCD screen to signal you whether you are pouring too fast or too slow. And guess what? We won an Arduino project book as the prize! The code is in github.