Patient Monitoring Smart Wheelchair


proportion of diabled population


type of disability


rural vs urban


market analysis


The modes selected are :

  • Voice control mode
  • Gesture control mode
  • Joystick control mode


Here is a short video of the completed project.

The bill of materials is as follows.





GUI controlled bot

Well in this post I’ll be covering how to create a GUI for controlling a bot using MATLAB. Now this concept can be readily extended to various other stuff. As after learning alphabets one can make words and sentences and essays so can one make various applications using basics. So let’s start, shall we?

To begin with you need to read this post on creating GUI because I’ll be assuming you have read that. So we know how to make buttons now. So this tutorial will focus on using this GUI along with serial class of MATLAB.

Serial Communication in MATLAB

Well we all know man is a social animal. We need someone or the other to communicate with others. We may use words or gestures or expressions etc. Similarly MATLAB needs to communicate with the outside world to get data in order to manipulate the data and send the processed result back. The way to communicate is via RS232 protocol.

There is a serial class in MATLAB that lets you to create objects and manipulate its properties.


obj = serial(‘port’)

Here port is the COM name and obj is the object name. You can change the baud rate and other properties like number of party bits and stop bits etc. I won’t be covering that in this post. If you have further interest you may refer to their website.

Now that we have a object for the serial COM port we need to open that port for serial communication. Now the syntax for the same is as follows.


This will open the COM port for communication. Similarly there is fclose(obj) that will close the port.

Now that we know how to open and close the port might as well learn how to write data to the port.


Here obj is the object created and data is 1 byte data that you want to send/write on the port.

For example :


Well that takes care of the serial part that is required for our task. Remember that internet is a universe of knowledge and you can travel it to unravel new mysteries whenever you like.

Now many of you out there who are programmers are already aware of the concept of global and local variables. We’ll require this concept as well. For creating a global object just type global keyword before the object. Now whenever you want to access the global version of the variable just type global before the object or variable.

Now in the GUI code you need to create a global object, open the port. Then the logic we’ll be using for making this GUI work is as follows:

1) Write code in the button callback function to send a specific character. For example send ‘W’ for forward and so on.

2) Now the controller comes into picture wherein you have to receive the character and take some action depending on the character received.

So basically you need to use the UART module of your controller whether it be msp430 or PIC or 51 or arduino or atmel or and processor for that matter. The logic is simple if you are using embedded c or assembly language you can write a simple ISR that will check the character received serially and send some data to port pins that will drive the motor via the motor driver.

I think this much explanation is enough. If you have any queries you can always mail me or comment, I’ll get back to you as soon as possible.


 * serial_reception.c
 *  Created on: 30-Mar-2014
 *      Author: MANPREET
 *     Website:

#include <msp430g2553.h>
#include "serial.h"

void main(void)
	WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
	uart_init(); // Refer the UART post for the functions
	P1OUT = 0;
	 IE2 |= UCA0RXIE;     // Enable USCI_A0 RX interrupt

#pragma vector=USCIAB0RX_VECTOR
__interrupt void USCI0RX_ISR(void)
 if(UCA0RXBUF=='W' | UCA0RXBUF == 'w')
	 P1OUT |= BIT3|BIT5;
	 P1OUT &= ~(BIT4|BIT6);// Send 1010 for forward
 if(UCA0RXBUF=='S' | UCA0RXBUF == 's')
	 P1OUT |= BIT4|BIT6;
	 P1OUT &= ~(BIT3|BIT5);// Send 0101 for backward
 if(UCA0RXBUF=='A' | UCA0RXBUF == 'a')
	 P1OUT |= BIT4|BIT5;
	 P1OUT &= ~(BIT3|BIT6);// Send 0110 for left
 if(UCA0RXBUF=='D' | UCA0RXBUF == 'd')
	 P1OUT |= BIT3|BIT6;
	 P1OUT &= ~(BIT4|BIT5);// Send 1001 for right
 if(UCA0RXBUF=='F' | UCA0RXBUF == 'f')
	 P1OUT &= ~(BIT3|BIT6|BIT4|BIT5);// Send 1001 for right

MATLAB Code link:




Note :

The connections are obvious if you read the code. You have to use a driver like L293d of l298. If you face any difficulties doing this feel free to contact me. I’m happy to help.

Introduction to creating GUI using MATLAB

In this post I’ll be talking about MathWorks MATLAB software and how one can create GUI’s using the software. This GUI creation has been made really simple in MATLAB.


MATLAB® is a high-level language and interactive environment for numerical computation, visualization, and programming. Using MATLAB, you can analyse data, develop algorithms, and create models and applications. The language, tools, and built-in math functions enable you to explore multiple approaches and reach a solution faster than with spread sheets or traditional programming languages, such as C/C++ or Java. You can use MATLAB for a range of applications, including signal processing and communications, image and video processing, control systems, test and measurement, computational finance, and computational biology. More than a million engineers and scientists in industry and academia use MATLAB, the language of technical computing.

This paragraph is what is given on their website. So MATLAB is a very versatile software. One can use it for many applications. We learnt MATLAB as a part of our curriculum. We learnt how to make graphs, make simple programs, analyse LTI systems using MATLAB. But recently I learnt how to make GUI using MATLAB because my project needed this. So here I am sharing my knowledge with you all.


GUI stands for a graphical user interface. This is nothing but a graphical utility that is used to make the life of a common user easier. A graphical user interface takes inputs as mouse clicks and others. Let me give you an example. Those of you who are familiar with present day LINUX operating system have seen the windows/apple like interface. But earlier there used to be a command prompt like terminal in LINUX. Here one had to type in list of commands for performing any task. So if you want to see the calendar you needed to type in the command related to the same. But now there is a GUI available for it. Behind the scene there is extensive coding done so that the user does not have to be a coder in order to use the system. So this was an example of GUI’s making our life easier.

Now let us discuss the scope of GUI’s in our micro controller based projects. There is a huge scope for GUI’s here. For example you can make a GUI that could have just two buttons one Red LED and the other Green LED. You could program it in such a way that whenever you pressed this button the corresponding LED on Launchpad will glow. This is just a simple example you can take this to the next levels by making real time graphs using MATLAB. For example there is a sensor that is collecting data and sending it serially to your computer. You can plot real time graphs of that data and do manipulations on that data. This is the signal processing part. This can be easily done using MATLAB.

Steps for creating a GUI

Step 1: Open MATLAB

Step 2 : New—> Graphical User Interface

Step 3 : Select blank GUI

Step 4 : Create your own GUI using the palette available on the left hand side (for more details view the video tutorial.)

Step 5 : Save the file as ‘.fig’. After this step the ‘.m’ file of your GUI will automatically open in front of you.


For more details refer the documentation provided in MATLAB and