Pages

Popular Posts

Thursday, December 21, 2017

Image processing for Tennis

The research is based on Tennis and to help umpires to get correct decisions or automate umpires' decisions using image processing.
The most important task of this research is to track the tennis ball.
Two sample videos were taken (Not an actual tennis ground).
  1. Top video (To identify ball is inside or outside.)
  2. Surface video (To identify the ball when the ball touches the ground.)
Each and every single frame is processed as below.

`frameLength` is the number of frames.

while(k < frameLength)  
   k=k+1;  
   aFrame = read(sufCam, k);  
   I1 =rgb2gray(aFrame);  
   J=im2double(I1);  
   H1=medfilt2(J,[3,3]);  
   i1=imadjust(H1);  
   ia =i1 >0.98;  
   H0 = read(topCam, k);  
   axes(handles.axes1);  
   imshow(H0);  
   axes(handles.axes2);  
   imshow(H1);  
     [Label,total] = bwlabel(ia,4);  
     for i=1:total  
       if(sum(sum(Label==i)) < 200 )  
         Label(Label==i)=0;  
       end  
     end  
     Sdata1 = regionprops(Label,'all');  
     Un=unique(Label);  
     my_max=0.0;  
     for i=2:numel(Un)  
     Roundness=(4*pi*Sdata1(Un(i)).Area)/Sdata1(Un(i)).Perimeter.^2;  
     my_max=max(my_max,Roundness);  
       if(Roundness==my_max)  
         ele=Un(i);  
       end  
     end  
     cen=Sdata1(ele).Centroid;  
     if(k>1 && posy > cen(1,2))  
       disp(k);  
       disp(cen(1,2));  
       k=nFrames;  
       %imshow(H1);  
       axes(handles.axes2);  
       imshow(H1);  
       hold on;  
       plot(cen(1,1),cen(1,2),'rx');
               g=rgb2gray(H0);  
               j=im2double(g);  
               k=medfilt2(j,[3,3]);  
               i2=imadjust(k);  
               ib =i2 >0.7;  
               [Label,total] = bwlabel(ib,4);  
               for i=1:total  
                 if(sum(sum(Label==i)) < 200 )  
                   Label(Label==i)=0;  
                 end  
               end  
               Sdata = regionprops(Label,'all');  
               Un=unique(Label);  
               my_max=0.0;  
               for i=2:numel(Un)  
               Roundness=(4*pi*Sdata(Un(i)).Area)/Sdata(Un(i)).Perimeter.^2;  
               my_max=max(my_max,Roundness);  
                 if(Roundness==my_max)  
                   ele=Un(i);  
                 end  
               end  
               cen2=Sdata(ele).Centroid;
               axes(handles.axes1);  
               imshow(H0);  
               hold on  
               plot(cen2(1,1),cen2(1,2),'rx');  
               disp(cen2(1,1));  
               disp(cen2(1,2));  
               textLabel = sprintf('X value = %f', cen2(1,1));  
               set(handles.text5, 'String', textLabel);  
               textLabel = sprintf('Y value = %f', cen2(1,2));  
               set(handles.text6, 'String', textLabel); 
               global border holdt;  
               border = str2double(get(handles.edit1,'string'));  
                % check whether ball inside or not                
               if(cen2(1,2) < border && holdt ==1)  
                 set(handles.text9, 'String', 'IN');  
               end  
               if(cen2(1,2) < border && holdt ==0)  
                 set(handles.text9, 'String', 'OUT');  
               end  
               if(cen2(1,2) > border && holdt ==0)  
                 set(handles.text9, 'String', 'IN');  
               end  
               if(cen2(1,2) > border && holdt ==1)  
                 set(handles.text9, 'String', 'OUT');  
               end
     end 
     posy = cen(1,2);  
     textLabel = sprintf('Y value = %f', cen(1,2));  
     set(handles.text4, 'String', textLabel);  
     disp(cen(1,2));  
     %disp(cen(1,2));  
 end

Demonstration with MATLAB GUIs
The red cross indicates that the ball was detected.

Wednesday, June 14, 2017

Power Management System For Mobile Application

This was designed for an IOT application with more advanced features. A battery cell can be attached to the circuit. The supported cell chemistry of the system is Li +. Battery cell capacity can be measured using a fuel gauge and it has an I2C interface that can be read using MCU or SOC.

The POWER ON RESET is a key feature of this system. It prevents malfunctioning MCU or SOC.
Active power path management is used in these circuits (BQ24195)

The schematic of the Power Managements circuit is shown below.
Schematic Design
Tool: Altium Designer
Technical Specs:
  1. Current Rating: 2A
  2. POR.
  3. I2C (To measure cell capacity).
  4. Voltage output: 3.3V and 1.8V (constant) .
  5. Active Power Path Management.
  6. Input voltage: 5V
Example Layout (Altium Designer)


Tuesday, May 30, 2017

TI ISO5852s IGBT, MOSFET Gate Driver

For Hardware Prototypes
  • The eagle libraries for Texas Instrument ISO5852s-q1 (datasheet) IGBT, MOSFET Gate Driver IC can be download here. (with breakout board connector)
  • The breakout board can be downloaded here( .sch file.brd file  )


Breakout board and Connector


Tuesday, March 14, 2017

Three Phase Inverter Design

This is an Arduino based Three Phase Inverter. Schematic and the PCB layout are shown below.

Schematic
PCB layout


For more information & design files comment below.

Tuesday, March 7, 2017

MOSFET Gate Driver Circuit

The MOSFET gate driver is a power amplifier that is used to control the voltage between the Gate and Source (Vgs) and Gate Current. The MOSFET has a depletion region. According to the size of the depletion region, the MOSFET behaves like in its ON state or its OFF state. The size of the depletion region depends on the number of charges gathered in the Gate terminal. Therefore the MOSFET forms a capacitor which is called a Gate Capacitor.
Therefore transistor takes a certain time to switch from non-conducting mode to conducting mode. So the MOSFET subject to a considerably higher voltage and higher current.  It causes to generate heat in the transistor and  be enough to destroy the transistor (Desaturation fault)
The transition time of the MOSFET which related to the transition between conducting mode and conducting mode can be reduced by using higher Gate Current (Switching Current).
The Gate Driver can be used to control the gate current. Apart from that isolation between the high voltage side and the low voltage is also done by it.
The following gate driver circuit is designed by using TLP250 (datasheet) for IRFP250 MOSFETs (datasheet). There are no any fault detection techniques.
Schematic
Components
  • U1 -TLP250
  • IC1-LM7815T
  • B1-KBU8B (datasheet
  • R1-120
  • R2-10 1W
  • R3-1k
  • R4-1k
  • C1-470uF 50V
  • C2-Optional
  • C3-0.1uF
  • LED1-Red 3mm
The PCB layout of the gate driver is shown below and it's designed according to the recommended layouts.
PCB Layout
If this is used for a three-phase inverter, separate 4 transformers must be needed to power-up the gate drivers. Low Side (the side which belongs to the negative bus bar) MOSFETs can be powered using one transformer. The other three are used for high side MOSFETs separately.
Eagle Schematic can be downloaded here  and PCB layout can be downloaded here