An Unconventional But a Successful Job Interview at the Imperial College London

I would like to share with you a true story of my job interview at the Imperial College London. Yes, the world renowned Imperial College London. This was the year 2010. I applied for a position of researcher at the Imperial College London.

By sharing this, I hope to inspire the engineers particularly from Gujarat and India who at times, like me, have felt inferior, while even thinking to compete with other engineers from IITs, MITs, Cambridges, Oxfords, Standfords, Imperial Colleges, of the world. By reading this article you have read and understood the Disclaimer.


Picture 1491

I went to the Imperial College London to give the interview and carried with me the Voice Activated Power Sockets Home Automation system (described in detail here ) that I had designed and developed at home, thinking I might get an opportunity to demonstrate what I do and could do.

First I was asked to present my previous research work to the panel of academics and professors. The presentation and personal interview went ok. At the end of the interview, while the interview panel was wrapping up, I approached the chief interviewer, the professor, and asked him if he had a few minutes as I wanted to demonstrate to him something that I had developed. The professor agreed to give me a few minutes. So very quickly I dug into my rucksack and brought out my voice activated home automation system. I then powered up everything and issued a speech command “Lights ON” and the connected bulb lit up. Then I commanded the system “Lights Off” and the bulb switched off.

After seeing this, the professor became very interested in my work and my abilities to make things. I informed him that I have been playing with electronic circuits since I was a child. I have been very fond of making electronic circuits and “making things happen”. The professor replied, “I understand, since you like to make things, I would like to offer you a challenge and if you accept the challenge then we will leave this interview aside and the outcome of your interview will be decided based on how you perform in the challenge”.

I was confident in myself and my knowledge and skills so I accepted the challenge without knowing what it was going to be. The professor then disclosed the challenge to me and said, it would be to design an electronic system that would measure and log velocities of two wheels mounted on an axle at each of its ends without physically touching the wheels (i.e. non-contact). I was given 3 weeks by the professor to make such a system and demonstrate it to him. The professor offered me to pay all the expenses.

I went home and thought about the challenge. Before starting to work on the challenge I emailed the professor with the specification of the challenge to confirm with him whether I understood the challenge correctly.

This is what I wrote:

“Just to clarify if I have understood your challenge clearly, so please let me put it into words.

There are two wheels which are mounted on an axle and they move in straight line without steering ability. I should make a non-contact electronic sensing device which would measure each wheel’s velocity separately. This will enable the calculation of velocity difference when the wheel axle assembly moves around a corner where one wheel moves slowly compared to the other.

Typically, cars are front wheel steered and rear wheels are fixed and move in straight line. Around corners, car’s rear wheels move with different velocity to each other.“

In his reply the professor agreed and also informed me that I should make the system such that it can make the real-time contact-less sensing with a good way of logging or real-time wireless transfer of the data.

I then started working on the challenge. The important thing in the challenge was to find out a non-contact way to measure the velocity of the wheel. The thought immediately came to my mind was that I needed an encoder however the professor wanted to test my knowledge of Electronics and I wanted to demonstrate my skills so I decided to design and develop my own encoder with a separate optical or magnetic sensor. At the same time, I quickly offered the first solution using bicycle computers.

Then I bought a test platform, a remote controlled monster truck to test my system on it. I designed and developed two optical sensors (one for each wheel) that worked on pulse generation and counting, from scratch. I interfaced the sensors with a micro-controller board. I developed the firmware that logged the velocity data of two wheels into its EEPROM data memory. I also developed a PC based driver that communicated with the micro-controller board over a USB interface and downloaded the logged data on a press of a single button. All of these things I completed it in my free time  at night and on a weekend at home in just few days.

I went back to the Imperial College London to demonstrate the system. After reaching there, I took my laptop and the remote control monster truck. I powered the system and drove the monster truck on the floor of the professor’s office. The professor measured the distance roughly and timed the movement of the truck with his watch. The professor also stopped the truck with his foot to generate varying velocity data. Then I downloaded all the stored velocity data into my laptop and gave the data to the professor in a memory stick. The professor plotted a graph out of the data and the graph clearly showed the velocity and the variation in the velocity correctly as he had roughly estimated it to be.

The professor was very impressed with everything and offered me the position. Unfortunately due to few critical reasons I could not accept the position.

If Your Dare to Dream You Can Achieve It

Share Button

My First Quad-Copter





Sharing with you the first flight of the first quad-copter that I ever built from scratch at my home lab in my garage.



Share Button

Voice Activated Power Sockets

Yet another voice controlled home automation system!


Voice Activated Power Sockets

As shown in the picture, the system can control any electrical appliance, by turning ON or OFF, that is connected into the electrical socket. The system does this using bespoke voice commands. The system uses a micro-controller board (PIC or Arduino) and a PC/Laptop with the Microsoft Windows Operating System.

This project was featured on the front page of

And was short-listed in the quarter finals of the Hackaday-2014 competition

I always wanted to make a system that worked on my voice commands. I started working on this project to realize my dream to be able to control gadgets/appliances with my voice commands. I made this project at home from my electronics laboratory in my garage and in my holiday time and on weekends.

Step 1: Project Theme: ! (Re-Inventing the Wheel)

I strongly believe in not “re-inventing the wheel” therefore most of the components that I have used are off-the-shelf (Hw/Sw both). This enables anybody to create this project very quickly without requiring in depth technical knowledge about electronic circuits and without worrying about the complexity of speech recognition.

This project is more of an innovation hobby project. The components that I required to build a basic speech recognition based home automation system were a speech recognition software, a PC or an embedded computer with an internal or external microphone to run the speech recognition software, an electronic circuit to control the power to an electrical appliance or a gadget.

Step 2: System Design

System Design
System Design

The way this automation system is designed and works is as shown in the figure. When a voice command (any voice command that I like) is uttered, it is recognized by a speech recognition software running on a PC with a microphone. The speech recognition software then invokes a ‘C’ program, i.e. Serial port driver, that sends a command over to the PC serial port to which a micro-controller board is interfaced. The micro-controller on the board runs a firmware that receives the command from the serial port and interprets it. The micro-controller then toggles an output pin which drives a transistor which in turn drives a relay. The relay then controls any appliance that is connected to it. The figure shows the complete system design.

Step 3: Finding the Right Speech Recognition System

The very first thing that I required was a speech recognition system that would allow me implement my own commands and train my voice on the same commands. In other words I wanted the functionality where the system would accept my own customized voice commands and upon recognizing the commands the system would then run an executable or a program that I have implemented. While I was looking for such system on the internet, I stumbled upon a PC based speech recognition system called “TAZTI”. I selected this software as the speech recognition front end is because it satisfied the main two requirements: firstly it allows the user to create their own custom voice commands and secondly the system allows user to run their own program or executable upon recognizing these commands. There are quite a few other useful features in the Tazti speech recognition software (can be obtained from their website ). Older versions of the software were freeware but the current versions are paid however they do provide a trial version for 15 days.

Step 4: Interfacing with the PC

Interfacing with the PC
Interfacing with the PC

The second thing that I needed was a way to interface an electrical appliance with the PC using possibly the parallel or the serial or the USB port . So when a voice command is recognized in the PC a program would be executed which then sent a control command to the interfacing circuit to activate or de-activate a relay that controlled the electrical appliance or the gadget. I chose to use an off-the-shelf PIC micro-controller board that also had a relay and a serial port interface on the same board. You could use any such micro-controller board for an example Arduino.

While looking for such micro-controller board I came across PIC-MT a development board for 28 pin PIC microcontroller from Olimex (can be obtained from their website ). This board comes with a Serial/RS232 interface which can directly be connected to a PC serial port and an on-board circuit with a relay. All the details about the board such as schematic/circuit diagram and user manual etc are available from their website. I used PIC 16F876A for my prototype and implemented the firmware for the micro-controller in ‘C’. I have also used the PIC boot loader and downloader software from Sparkfun (from ). The boot loader allowed me to download the firmware in hex in to the program memory of the micro-controller over the serial port of the PC without requiring a proper PIC programmer and the special board socket for PIC programmers. Also this was carried out while keeping the micro-controller in the chip socket on the board, i.e. ICSP (In Circuit Serial Programming). Although I did have to program the boot loader for the very first time using the PIC programmer (PIC Start Plus or similar) into the micro-controller.

Step 5: PC Serial Driver/Client Program

I implemented a simple ‘C’ program (essentially a Serial/RS232 driver and a client program) for the PC which would send a control command over to the serial port to the PIC board whenever this program is executed. The PIC serial server program would then listen to the commands arriving on the serial port and upon recognizing a control command it would perform a task(s) such as turning ON the relay or turning OFF the relay.

The attached ‘C’ Serial/RS232 driver/client program sends command word 27 to the PIC board. I programed the voice command to be “TV ON”. This code has been successfully tested on Windows XP. For the voice command “TV OFF” the command word was 28. This ‘C’ program is in older style, shown here as an example, more modern Win32 user mode driver program could easily be written using Windows API for accessing serial port.


Step 6: PIC Firmware (Serial Port Server Program)

PIC Firmware (Serial Port Server Program)
PIC Firmware (Serial Port Server Program)

The firmware is essentially a server program running on the board, which listens to commands arriving via the serial port from the PC and executes the commands i.e. Toggle a port pin and drive a relay. You could make the controller carry out anything you like.

I would like to show the part of the PIC-16F876A firmware that receives the command from the PC over the serial port and toggles a pin which then turns the relay ON or OFF. The following code has been extracted from a larger working firmware program so it has not been tested in its isolated form.


Step 7: PIC Board

Since the PIC-MT board has many other features, If you would like to make your own PIC micro-controller board to carry out just the above functionality all you require is following, you will need a PIC programmer to program your PIC:

1) PIC16F876A

2) A crystal oscillator: 20MHz

3) 2 Capacitors: 22pF

4) 1 Transistor to drive the relay

5) 1 Relay

6) 5V supply to the PIC controller.

This can be achieved using a dedicated power supply such as wall adapter or make your own using the 7805 regulator Integrated Circuit.

7) A way to interface with the PC serial port. There are several ways to achieve this, for more details on how to implement the following please use your favorite search engine:

(7.1) MAX232 Serial Driver/Receiver Integrated Circuit

(7.2) FTDI- FT232R USB to UART Integrated Circuit

(7.3) A USB dongle that converts USB to Serial and provides you with an emulated Serial port.

(7.4) A two transistor level converter circuit for directly interfacing with the PC serial port.

Similarly you may choose to use an Arduino board instead.

Step 8: Even Safer Design (Paranoid Safety Level!)

Additionally in order to make the design even safer (with respect to dealing with the 230V AC supply) I added a second relay. The reason is that if I had used the on-board relay full 230V AC would be arriving on the relay terminals on the board. Instead a second relay is driven using the relay that is on the board. As you can see in the images the on-board relay is orange in color whereas the second relay is separate to the board and has Red tape over it. So whenever the relay on the board is driven it provides supply to the external relay turning the second relay ON or OFF.

Step 9: Going Wireless!

The main idea is to make the interfacing between the computer and the micro-controller board wireless. It is important to know that there are quite a lot of very cheap different types of off-the-shelf wireless modules available. Many of these modules provide simple serial communication protocol the RS232 over a wireless protocol. For an example, such Bluetooth module can provide serial communication over Bluetooth protocol. Similarly modules providing Serial communication protocol over Wifi and RF are also available. Let’s take an example of Bluetooth protocol for making the home automation system wireless.

1) For the micro-controller board: You can get one of the Bluetooth modules with Serial interface and connect the RX, TX and GND pins to the micro-controller serial interface pins. You need to take care of the voltage levels while interfacing with the micro-controller or a micro-controller board, most of these wireless modules can work with 5 or 3.3V.

2) For a PC you could use a Bluetooth-USB dongle that emulates serial port over Bluetooth. This means when you connect the dongle to your PC, it will show up as a Serial/COM port. Then it is quite simple, you can use the same ‘C’ application and same speech recognition software as mentioned in this project to send command to the Bluetooth dongle via the emulated COM port thus making this home automation system wireless. Very simple.

I leave it upto you to find out various ways to control this home automation system with countless Bluetooth enabled devices.

Step 10: General List of Components

The following is a general list of components, just to give you an idea to what is required.

1 × Windows PC/Laptop with Internal/External Microphone

1 × Serial – RS232 cable

1 × Olimex PIC-MT, 28 pin PIC or similar micro-controller development board with onboard relay & serial port

Alternatively an Arduino board with a shield having 230V Relay.

1 × 12V DC power supply to power the micro-controller board

1 × Tazti or similar speech recognition software

1 × AC – 230 V power socket with cable (to interface with the relay)

1 × AC – 230 V power plug with cable (to interface with relay)

Share Button

A Simple Batteryless Bluetooth Upgrade (Hack) for Your Media Player


I would like to share with you how I managed to provide Bluetooth capability to my relatively old home cinema system.

Step 1: Requirements


1) One of the main requirements is not to have a rechargeable solution because it becomes annoying when you need to recharge frequently.

2) A cheap Bluetooth audio receiver with a male Universal Serial Bus (USB) port, a stereo (3.5mm female) audio output port and without a battery (as shown in the image). Such receivers are available for 2£-3£ on some of the popular e-commerce websites. If you buy one of those rechargeable one then you will have to keep recharging them.

3) I own a relatively older DVD 5.1 home-cinema music system. This system does not have wireless capability. So I have been thinking to provide it with some form of wireless capability for an example, Bluetooth.

It is important to note here that the system has and is required to have:

a) a female USB port (this interfaces with USB sticks and can play songs from it). This port is to be used to supply power to the receiver without this the receiver will have to be powered externally.

b) a 3.5 mm standard stereo audio input

4) A stereo (3.5 mm) male to male cable. Normally this is shipped with the receiver.

Step 2: Simple Setup




The main idea here is to supply the necessary power to the receiver from the system’s USB port and obtain the audio output from the receiver and provide it to the stereo input of the system.

The USB port of the system accepted USB-sticks and could play songs from it. This means the USB port (system) will try to access the data pins of any USB device plugged to the port. This can create a problem and also hang the system if the USB device is not a storage device such as USB-stick or pen-drive. This is because such older systems with USB capabilities could not access any other non-storage USB devices.

Also, I observed that my system froze when I plugged the receiver into its USB port. So I opened the USB Bluetooth audio receiver to check whether there were connections made to the Bluetooth chip from the data pins of the USB port on the Printed Circuit Board (PCB) of the receiver and I was right. So as shown in the images, I cut the middle two tracks which are the USB data signals, on the PCB of the receiver with a pen knife.

Step 3: How to connect various bits


Now, plug in your Bluetooth audio receiver into the USB port of the system. So this will provide the necessary power supply to the receiver. Then plug in one end of the Stereo 3.5mm male to male cable into the output of the receiver and the other end into the input of your system. This is to pipe the audio from the output of the receiver into the input of your media player.

The system has now Bluetooth capability. You should be able to play songs directly from any Bluetooth enabled device such as your smartphone or a tablet to the media player system.

Step 4: Other Applications

Please note, this solution can be deployed to any such media system, for an example your car’s audio player and enjoy Bluetooth capability without the hassle of charging.

Also, if your system does not have a female USB port then you can supply the power to the receiver from an external USB power supply or buy a Bluetooth audio receiver that has rechargeable battery in it.

Share Button