Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Game Playing Robotic Hand

By Sumayya Mehfooz, Hina Iftikhar and Saad Abdullah June 20, 2014

 

In 21st century the field of robotics have emerged very quickly and continues to bringing new technological advances to many sectors of society.With the belief that it’s only a matter of time before the robots rise and replace all humans. The robots are not only being used in automotive and medical industries for doing work but now it is also used for entertainment purpose such as games.

This  project is inspired from Kuka Robot one of the fastest robot on earth specialized in table tennis manufactured in Germany and flappy bird one of the game which was automated and played by image processing phenomena. In this project, the game “Racing Moto” one of the popular mobile app is automated by robotic hand.

Prototype of Arduino based Mobile Game Console

Fig. 1: Prototype of Arduino based Mobile Game Console

 

WORKING:

Racing moto is a game in which there are 3 lanes and cars or obstacles can come in any of the lane. To avoid the bike from hitting the obstacle it is necessary to tilt it at any particular angle. Robotic hand plays this game by help of servo motor which is programmed to rotate and change  its position whenever it senses the presence of an obstacle. For this project reader should have knowledge of how to start with arduino .

 

The sensors used for this purpose are phototransistors. Phototransistor switches on and off whenever light intensity changes. Light intensity is different when  there is no obstacle under the sensor and different when obstacle is present. This change in intensities can be  observed on the analog channels of arduino uno.  These values or change in intensities are used to keep the hand in motion means when rotation is required it will rotate at particular angle. Three LED’s are also used which somehow plays an important part in this project. These LED’s will glow when the obstacle will be under the phototransistors and will help to find out whether the values that are selected to detect the presence of obstacle are correct or not.

Circuit Diagram and image of Photo Transistor Circuit used in Game Console

Fig. 2: Circuit Diagram and image of Photo Transistor Circuit used in Game Console

Steps

STEP1:

Next step is to make the circuit on Vero board i.e. one end of 15k? resistor is placed with the collector of phototransistor while the other end of resistor is supplied with 5 volts power supply and the emitter of the transistor is grounded. The analog pin of arduino is placed at the junction between collector and resistor. Three circuits in same configuration is made.

 In the circuit given below Q1, Q2  and Q3 are the phototransistors and A0,A1 and A2 are the analog input pins of arduinouno from which the values will be observed. 

Circuit Diagram and Image of LED Circuit used in Game Console

Fig. 3: Circuit Diagram and Image of LED Circuit used in Game Console

STEP2:

Once the values are selected, to check and satisfy that the values are either correct or not means whether the values are differentiating between the presence and absence of obstacle or not. For this reason three LED’s are placed in the circuit. They will glow each time the intensity crosses the threshold range.

The three LEDs one for each lane are connected to the digital output pins of arduino (i.e. digital pins 7, 8 and 9). They will glow ‘ON’ when sensor will detect the presence of cars and will remain ‘OFF’ when no car present.

Here in this figure, LED (D3) attached with digital pin 9 is ‘ON’ which indicates that the car is detected at analog pin A2 (further explained in next step).  

STEP3:

Image of cardboard made mobile holder for Game Console

Fig. 4: Image of cardboard made mobile holder for Game Console

The analog pins (A0,A1,A2) and digital pins(7,8,9) are related with each other in such a manner that the instance at which the car will be right under the sensor, the analog pin (A0)  will cross its set threshold range which means the LED at pin 7 will GLOW at that time else remains OFF. Similarly A1 and A2 are linked with pins 8 and 9 respectively.

STEP4:

Image of Arduino based Game Console Circuit

Fig. 5: Image of Arduino based Game Console Circuit

In Racing Moto, the direction of the bike is controlled by tilting the cell phone. This can be done by robotic hand which consists of servo motor. This motor is programmed to tilt the hand at desired angle. The mobile phone is placed in the base (any material can be used as base). Here a box is used which is made same as that the size of the mobile with small roof so that the Vero board (sensor circuit) can be mounted on the mobile. This box is placed on the gripper of the robotic hand.

Components Used

COMPONENTS

Arduino Uno :

Arduino is a single-board microcontroller,  intended to make the application of interactive objects or environments more accessible. The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller.

Typical Image of Arduino Uno

Fig. 6: Typical Image of Arduino Uno

Resistor:

A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. Resistors act to reduce current flow, and, at the same time, act to lower voltage levels within circuits. Resistors may have fixed resistances or variable resistances, such as those found in thermistors,  trimmers, photoresistors, piezoresistors and potentiometers.

Resistors are common elements of electrical networks and electronic circuits and are ubiquitous in electronic equipment.

Typical Image of Resistors

Fig. 7: Typical Image of Resistors

Phototransistor:

A semiconductor device that is highly sensitive to light. Photonic transistors are used in switching and amplifying applications, and they can conduct current in either direction .

They are the transistors that regulates current or switches it on and off based on the intensity of the light it is exposed to rather than an external electric signal.

Typical Image of Phototransistors

Fig. 8: Typical Image of Phototransistors

Robotic Hand:

A robotic hand is a type of mechanical hand, usually programmable, with similar functions to a human hand. The arm may be the sum total of the mechanism or may be part of a more complex robot. The links of such a manipulator are connected by joints allowing rotational motion (such as in an articulated robot)

Typical Image of Robotic Hand

Fig. 9: Typical Image of Robotic Hand

The robotic hand delivers fast, accurate, and repeatable movement. The robot features:

·         Wrist  motion

·         Functional gripper

·         Wrist rotate

PCB Design

PCB Layout of Arduino Circuit controlling Robotic Hand

Fig. 10: PCB Layout of Arduino Circuit controlling Robotic Hand

 

Project Source Code

###



#include <Servo.h>
Servo myservo;                 // create servo object to control a servo
int led1=8,led2=9,led3=10 ;
void setup()
{
Serial.begin(9600);         // initialize serial communication at 9600 bits per second
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
pinMode(led3,OUTPUT);
myservo.attach(6);          // attaches the servo on pin 6 to the servo object
   }
void loop()
{
int sensorValue1 = analogRead(A0);    // read the input on analog pin 0:
int sensorValue2 = analogRead(A1);    // read the input on analog pin 1:
int sensorValue3 = analogRead(A2);    // read the input on analog pin 2:
  // print out the value 
Serial.println(sensorValue1);
Serial.println(sensorValue2);
Serial.println(sensorValue3);
Serial.println(" ");
if(sensorValue1>1013||sensorValue1<=981)          // threshold values for cars
digitalWrite(led1,HIGH);                                     // led will glow when intensity crosses the                                                                                       threshold range.
if(sensorValue1<=1013 &&sensorValue1>981)      // threshold values for road
digitalWrite(led1,LOW);                                    // led will remain off in between this range.
if(sensorValue2>=988||sensorValue2<929)          // threshold values for cars
digitalWrite(led2,HIGH);
if(sensorValue2<988&&sensorValue2>=929)           // threshold values for road
digitalWrite(led2,LOW);
if(sensorValue3>=983||sensorValue3<=904)          // threshold values for cars
digitalWrite(led3,HIGH);
if(sensorValue3<983&&sensorValue3>904)             // threshold values for road  
digitalWrite(led3,LOW);
delay(5);                                                           // delay in between reads for stability
// motor will be at 90 when there is no car.
if((sensorValue1<=1013 &&sensorValue1>=981)&&(sensorValue2<988&&sensorValue2>=929)&& (sensorValue3<983&&sensorValue3>904))
{
myservo.write(90);
  }
// motor will be at 90 when car is in 1st lane
if((sensorValue1>1013||sensorValue1<=981)&&(sensorValue2<988&&sensorValue2>=929)&&(sensorValue3<983&&sensorValue3>904))
{
myservo.write(90);
delay(200);
}
// motor will be at 83 when car is in 2nd lane.
if((sensorValue1<=1013 &&sensorValue1>981)&&(sensorValue2>=988||sensorValue2<929)&&(sensorValue3<983&&sensorValue3>904))
{
myservo.write(83);
delay(200);
}
// motor will be at 90 when car is in 3rd lane.
if((sensorValue1<=1013 &&sensorValue1>981)&&(sensorValue2<988&&sensorValue2>=929)&&(sensorValue3>=983||sensorValue3<=904))
{
myservo.write(90);
delay(200);
}
// motor will be at 97 when cars are in 1st and 2nd lane.
if((sensorValue1>1013||sensorValue1<981)&&(sensorValue2>=988||sensorValue2<929)&&(sensorValue3<983&&sensorValue3>904))
{
myservo.write(97);
delay(200);
}
// motor will be at 83 when cars are in 2nd and 3rd lane.
if((sensorValue1<=1013 &&sensorValue1>981)&&(sensorValue2>=988||sensorValue2<929)&&(sensorValue3>=983||sensorValue3<=904))
{
myservo.write(83);
delay(200);
}
// motor will be at 90 when cars are in 1st and 3rd lane.
if((sensorValue1>1013 ||sensorValue1<=981)&&(sensorValue2<988&&sensorValue2>=929)&&(sensorValue3>=983||sensorValue3<=904))
{
myservo.write(90);
delay(200);
}
}

###

 


Circuit Diagrams

Circuit-Diagram-Arduino-Based-Robotic-Hand-Controller-Mobile-Game-Console

Project Video


Filed Under: Electronic Projects
Tagged With: Arduino, Arduino Uno, Phototransistor, Robotic Hand
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Right Half Plane Zero
  • dc-dc converter in series
  • Single ended measuring ports and balanced antenna
  • Thermal modelling of repetitive power pulse
  • Permittivity and Permealibility in CST

RSS Electro-Tech-Online.com Discussions

  • Fun with AI and swordfish basic
  • Microinverters and storeage batteries?
  • FFC connector white
  • Is AI making embedded software developers more productive?
  • Can I make two inputs from one??

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe