Introduction: Moving Motor With Eye Tracking

About: Mechanic Enginer robotic AND science entusiasta

Currently, eye tracking sensors are more common in various areas but commercially they are more known for interactive games. This tutorial does not pretend to elaborate the sensors since it is very complex and due to its more and more common use the price has decreased, in this case the interesting thing would be to make use of the software to interact with relays that are able to turn on or off any mechanical-electrical device. In this case it was used to drive motors of a wheelchair.


1 -Computer with eye tracking system

1 -USB Relay Module

2 -40 amp automotive relay

2 -Gear motor 200 w ( whelchair motor)

2 -10 amp velocity controls

2 -pc 12-40 VDC 10 AMP Pulse width modulates motor speed control

1- 12 v battery

Step 1: Project Logic

Higher capacity relays are included and those of the card are just 10 amps and although the consumption of the motors is 10 amp with a current of 12 volts, this amperage can increase depending on the load weight of the motors. If you want to use another device that is not an motor and that consumes less than 10 amps, you can eliminate the cube relays.

Step 2: Analyzing the Relay Card

This type of cards has a USB input, voltage input, relays and their corresponding terminals

It also has a pre-programmed chip or microcontroller. In order to activate the relays, you must provide files that are the drivers, files with extension .dll that has the functions that the microcontroller performs, for example displaying the serial number of the card, activating relay 1, activating relay 2 and so on. These are the functions but whoever activates them for this must also have files with extension .exe that are the ones that invoke functions, there are programs for windows and programs for DOS window.

Every device has a only one serial number in this case we Use the application GuiApp_English.exe to get the serial number.

Step 3: Connecting and Identifying the Card

The card is connected to the computer via USB cable.

Select find the device, this part locates us automatically the connected device in this case the serial number is HW341 if you select open the device it will be ready to open any relay

At this time we must think which relay will start each motor, for this case relay 1 is for right motor, relay 2 is for left motor

Step 4: Computer and Sensors

The computer used in the project is a TOBII C series, this equipment is prepared with software and eye tracking sensors, this computer has more than 10 years of service, currently the smallest sensors in the form of a bar and can be placed in any computer, in the case of the operating system win 10 is also prepared with the drivers to control these sensors.

The sensors are calibrated by software for each user and detect the direction of the look so that they can be programmed to move the pointer of the computer as if it were moving a mouse and when blinking it is as if we click on the mouse.

Now if you open the relays program you can activate each of the relays, moving the pointer with your view, however the program window is not so big so even calibrating the sensors will be a bit difficult to operate the buttons, There are two options to solve this: 1.- Exercise the movement of the pointer with the eyes to obtain the desired precision 2.- Make a program with a bigger window that activates the specific functions for the relays, it would seem complicated but in visual basic it is not

Step 5: Connections

This diagram does not include the speed controller that would have to be placed between the motors and the last relays the 30 amp black ones

Step 6: Custom Program to Activate Functions

This screen was created in visual basic, it is very easy because you only put the drawings of the arrows and then you add the routine that you performed when you pressed the button, I had never programmed in visual basic and it took me a couple of hours to do it is very intuitive, what cost me a bit of work was to grab the functions directly, what I do is to invoke the program from the DOS window, that is, the button opens the program in DOS and runs the instruction.

Below the code for the buttons,

Public Class Form1

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim close As String close = "HW341 close 255"

System.Diagnostics.Process.Start("c:\carpeta de prueba\CommandApp_USBRelay", close) End Sub


Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles


Dim adelante As String forward = "HW341 open 255" /// the number 255 open all relays at same time

System.Diagnostics.Process.Start("c:\carpeta de prueba\CommandApp_USBRelay", forward) End Sub


Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles


Dim izquierda As String left = "HW341 open 01"

System.Diagnostics.Process.Start("c:\carpeta de prueba\CommandApp_USBRelay", left) End Sub

///if you want turn rigth you must on the left motor


Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles


Dim right As String right = "HW341 open 02"

System.Diagnostics.Process.Start("c:\carpeta de prueba\CommandApp_USBRelay", rigth) End Sub

End Class

The file DLL must to be in the same folder

Step 7: Starting to Work

Summary it seems simple but here only the components are explained and how they were connected, the design to be applied is another story, in this video it is shown in a wheelchair built with a school chair, it cost us some work because we make the base with tubular and wood and we adapted a dolly tire, when we did it the first time and assembled it all the tires did not reach the floor, we had to build a new base and finally it worked.

Later we made another device but to adapt to a common wheelchair but some adjustments are needed since being very close together the motors it is impossible to turn correctly

Step 8: Other File Pictures

Sensors Contest

Participated in the
Sensors Contest