Saturday, November 25, 2017

robotic



Tuesday, 28 March 2017

HOW TO MAKE ROBOTIC ARM USING ARDUINO | Manipulator Part 1- Solidworks Design







Industrial arm or manipulator used for picking and dropping objects which reduce the men work in industry.
In this video, I described basic assembly or manipulator and basic motion study of robot.

3D model part:
(1)- base model with automatic vehicle
(2)- links
(3)- Gripper
(4)- Servo motors


Arduino code


#include<Servo.h>
Servo s1,s2,s3,s4,s5;
int p1=0;
int p2=1;
int p3=2;
int p4=3;
int p5=4;
int v1,v2,v3,v4,v5;
void setup() {
  s1 .attach(5);
  s2.attach(6);
  s3.attach(9);
  s4.attach(10);
  s5.attach(11);
  // put your setup code here, to run once:

}

void loop()
{
{
v1=analogRead(p1);
v1=map(v1,0,1023,0,255);
s1.write(v1);
delay(15);
}
{
v2=analogRead(p2);
v2=map(v2,0,1023,0,255);
s2.write(v2);
delay(15);
}
{
v3=analogRead(p3);
v3=map(v3,0,1023,0,255);
s3.write(v3);
delay(15);
}
{
v4=analogRead(p4);
v4=map(v4,0,1023,0,255);
s4.write(v4);
delay(15);
}
{
v5=analogRead(p5);
v5=map(v5,0,1023,0,255);// put your main code here, to run repeatedly:
s5.write(v5);
delay(15);
}
}

Saturday, 4 March 2017

HOW TO MAKE ROBOTIC SPIDER | ROBOTIC DIY | BEST ARDUINO PROJECT






Hello everyone, Today we learn how to make a robotic spider which is inspired by natural insects.
This is Arduino based project. this tutorial is about how to code Arduino for this type of insects and how to program ultrasonic sensor to detect the objects.

COMPONENT REQUIRED:
(1)- Arduino Pro mini
(2)- 6 Servo motors
(3)- Ultrasonic sensor
(4)- Spokes

ARDUINO CODE:

#include<Servo.h>  //include servo library
Servo s1,s2,s3,s4,s5,s6; // create 6 servo objects
int cu1=100, cu2=120, cu3=110, cu4=90, cu5=60, cu6=70; // set leg angle to parellel around 90 deg
const int trigPin = 13; // assign trig pin to 13
const int echoPin = 12; // assign echo pin to 12

// defines variables
long duration;
int distance;

void setup()
{
  s1.attach(5);  // sevo object attach to pwm pin of pro mini
  s2.attach(3);
  s3.attach(11);
  s4.attach(10);
  s5.attach(9);
  s6.attach(6);

pinMode(trigPin, OUTPUT); // set trig pin as a output
pinMode(echoPin, INPUT);  // set echopin as input pin

//initial pattern angle
 s1.write(cu1-40);
 delay(15);
 s2.write(cu2);
 delay(15);
 s3.write(cu3+50);
 delay(15);
 s4.write(cu4-50);
 delay(15);
 s5.write(cu5);
 delay(15);
 s6.write(cu6+40);
 delay(15);

 delay(3000);
 s1.write(cu1);
 delay(15);
 s2.write(cu2);
 delay(15);
 s3.write(cu3);
 delay(15);
 s4.write(cu4);
 delay(15);
 s5.write(cu5);
 delay(15);
 s6.write(cu6);
 delay(15);

 delay(3000);
}

void loop()
{
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH); // trig high to get a wave for 10 microsecond
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH); // estimate duration of pulse high
distance= duration*0.034/2;

if(distance< 10 && distance>0 ) // condition for check distance from ultrasonic sensor
{
Servo1(-40);
Servo6(40);
Servo2(-40);
Servo5(40);
Servo3(-40);
Servo4(40);
delay(5000);

s1.write(cu1);
 delay(10);
 s2.write(cu2);
 delay(10);
 s3.write(cu3);
 delay(10);
 s4.write(cu4);
 delay(10);
 s5.write(cu5);
 delay(10);
 s6.write(cu6);
 delay(10);

delay(1500);
}

else
{
Servo1(-40);
Servo6(40);
delay(100);
Servo2(-40);
Servo5(40);
delay(100);
Servo3(-40);
Servo4(40);
delay(100);

s1.attach(5);
s2.attach(3);
s3.attach(11);
s4.attach(10);
s5.attach(9);
s6.attach(6);
s1.write(cu1);
 delay(10);
 s2.write(cu2);
 delay(10);
 s3.write(cu3);
 delay(10);
 s4.write(cu4);
 delay(10);
 s5.write(cu5);
 delay(10);
 s6.write(cu6);
 delay(10);
delay(500);
}

}

// servo functoins

void Servo1(int val)
{
  s1.attach(5);
  s1.write(cu1+val);
  delay(100);
  s1.detach();
}
void Servo2(int val)
{
  s2.attach(3);
  s2.write(cu2+val);
  delay(100);
  s2.detach();
}

void Servo3(int val)
{
  s3.attach(11);
  s3.write(cu3+val);
  delay(100);
  s3.detach();
}

void Servo4(int val)
{
  s4.attach(10);
  s4.write(cu4+val);
  delay(100);
  s4.detach();
}

void Servo5(int val)
{
  s5.attach(9);
  s5.write(cu5+val);
  delay(100);
  s5.detach();
}

void Servo6(int val)
{
  s6.attach(6);
  s6.write(cu6+val);
  delay(100);
  s6.detach();
}

Thursday, 23 February 2017

Ultrasonic Sensor tutorial| ARDUINO





ULTRASONIC SENSOR TUTORIAL



This is Arduino based tutorial for ultrasonic sensor. in this video, I described how to connect ultrasonic sensor with Arduino also interface LCD with this.



Component required for tutorial

(1) Arduino microcontroller

(2) Ultrasonic sensor

(3) LCD



ciruit diagram is given in video.



Arduino Code for tutorial:



Ultrasonic sensor tutorial by IGENTECH



#include<LiquidCrystal.h> // include header file of lcd

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //assign pins of lcd

const int trigPin = 8; // assign trig pin to 8

const int echoPin = 7; // assign echo pin to 7

// defines variables

long duration;

int distance;





void setup()

{

  lcd.begin(16,2); // begin lcd

  lcd.print("UltrasonicSensor"); // print ultrasonic sensor on lcd

  lcd.setCursor(0,2);            // set cursor to second row of lcd

  lcd.print("   IGENTECH      "); // print igentech to second row

  delay(2000);



pinMode(trigPin, OUTPUT); // set trig pin as a output

pinMode(echoPin, INPUT);  // set echopin as input pin

}



void loop() {

lcd.clear(); // clear lcd screen

// clear trig

digitalWrite(trigPin, LOW);

delayMicroseconds(2);

digitalWrite(trigPin, HIGH); // trig high to get a wave for 10 microsecond

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH); // estimate duration of pulse high

distance= duration*0.034/2;   // calculate distance from duration

// print output in lcd

lcd.print("Distance in cm:");

lcd.setCursor(0,2);

lcd.print(distance);

delay(200);

}


Saturday, 18 February 2017

How to program An Arduino pro mini using Arduino





This is easy way to upload code in an Arduino Pro mini through any Arduino board. We make Arduino board as a programmer and then get flashed code in Arduino. This uses only tx and rx connection to upload the code.



Component required:

(1) Arduino pro mini

(2) any other Arduino board

(3) Jumper wires



pin connections



Arduino pro mini                              other Arduino

            Tx                                                  Tx

            Rx                                                  Rx

            Vcc                                                 5 v

             Gnd                                               Gnd

                                                                 Reset-Gnd


Thursday, 16 February 2017

HOW TO MAKE A MOBI CAM STAND WITH ARDUINO| CAM AND BT INTERFACE



This project is base on Arduino microcontroller. this video explain how to make a mobile camera stand using servos and drafter. we make a 4 leg camera stand which is controlled by Arduino using Bluetooth module and interface mobile cam with web browser using IP CAM software.

COMPONENT REQUIRED FOR PROJECT:
(1)- A drafter
(2)- two servo motors
(3)- Arduino pro mini microcontroller
(4)- Bluetooth HC05 module
(5)- bicycle spokes
(6)- bolt and screws

Software required for this project:

(1)- Arduino IDM
(2)- Proteus for circuit design
(3)- Bluetooth serial controller for android devices
(4)- IP CAM app for android

Arduino coding:

#include<Servo.h>
#include<SoftwareSerial.h>
#include <Wire.h>
Servo myservo1;
Servo myservo2;
SoftwareSerial myserial(10,11);// rx and tx
uint8_t temp = 'x';
int i = 0, l = 0;
unsigned int val1, val2, sin_wave[251], sin_wave1[251];

void setup() {
  Serial.begin(9600);
  myserial.begin(9600); // BT begin here
  while(!myserial)
  {
    ;
  }
Serial.println("welcom igen to camera stand");
myservo1.attach(5);           // servo tilt motion
myservo2.attach(6);           // servo pan motion


 for (int k = 623; k <= 873; k++)
  {
    float angle = TWO_PI * k / 1500;        //here 1500 is the max number of steps
    val2 = (sin(angle)) * (180);
    val1 = (sin(angle)) * (70);
    val2 += 89;
    val1 += 35;
    sin_wave[k - 623] = val1;
    sin_wave1[k - 623] = val2;
  }

  myservo1.write(180 - sin_wave[100]);
  myservo2.write(180 - sin_wave1[100]);
  i=129,l=129;                              //align head in middle
  }

void loop() {
  if(myserial.available()>0)           // checking for connection with BT
  {
    temp=myserial.read();
    Serial.print("you got serial data:   ");
    Serial.println(temp);
   }


if (int(temp)>=97)
{

switch(temp)
{
  case 's':                     // tilt down motion
   for (; (i <= 250 && (temp != 'q' || temp == 'w' )); i++)
            {
              myservo1.write(180 - sin_wave[i]);
              delay(10);
            }
            break;

   case 'w':                  // tilt up motion
            for (; (i >= 0 && (temp != 'q' || temp == 's')); i--)
            {
              myservo1.write(180 - sin_wave[i]);
              delay(10);
            }
            break;

    case 'a':                   // pan left motion
            for (; (l <= 250 && (temp != 'q' || temp == 'a')); l++)
            {
              myservo2.write(180 - sin_wave1[l]);
              delay(10);
            }
         
            break;
      case 'd':                   // pan right motion
            for (; (l >= 0 && (temp != 'q' || temp == 'd')); l--)
            {
              myservo2.write(180 - sin_wave1[l]);
              delay(10);
            }
            break;

      case 'v':                // moving pan to middle portion
             for (; (l <= 100 && (temp != 'q' )); l++)
                {
                  myservo1.write(180 - sin_wave1[l]);
                  delay(10);
                }

              for (; (l >= 100 && (temp != 'q' )); l--)
                {
                  myservo2.write(180 - sin_wave1[l]);
                  delay(10);
                }
            break;
}
}

else
{
  myservo1.write(int(temp));          // taking value from bt app
  delay(10);
}
}


page contents

Tuesday, 14 February 2017

��LED MATRIX (3X3) | ARDUINO PROJECT | DIY





This project is based on Arduino microcontroller with interfacing the led 3x3 matrix.

The component required for this project are follows:
(1) Arduino microcontroller (UNO)
(2) color led Red, Green, yellow
(3) jumper wires for connections
(4) resistors (1 k ohm)
(5) soldering iron for solder.
(6) Dot matrix pcb


Circuit diagram:

for circuit diagram please see given video.


working principle:

First we make a led matrix 3x3 cube using 9 Red, 9 Green , and 9 Yellow led. we arrange this by tow method first one by common anode and second one in by common Cathode. In this video i used common anode algorithm for controlling every led. we connect all the anode terminal in row of led patter or we can say in one layer and extract one terminal for Arduino. Other terminal of led connected in column way. this will give 9 connection in ground and 3 connection for every layer. these 12 wire are connected with Arduino. after that below given code was upload in Arduino.


Arduino Code:

int i=0;
void setup() {
  for (i=2; i<=13; i++)
  {
    pinMode(i, OUTPUT);// Assign pin 2 to 13 as output
  }

  }

void loop()
{
//this loop for assiging 8 pin of column to low and 3 layers to high
 for (i=1; i<=8; i++)
 {
  digitalWrite(11, HIGH);
  digitalWrite(12, HIGH);
  digitalWrite(13, HIGH);
  digitalWrite(i, HIGH);
  delay(500);
  digitalWrite(i,LOW);
  delay(500);
 }

 for (i=1; i<=8; i++)
 {
  digitalWrite(11, HIGH);
  digitalWrite(12, HIGH);
  digitalWrite(13, HIGH);
  digitalWrite(i, HIGH);
  delay(500);
  }

for (i=8; i>=1; i--)
 {
  digitalWrite(11, HIGH);
  digitalWrite(12, HIGH);
  digitalWrite(13, HIGH);
  digitalWrite(i, LOW);
  delay(500);
  }

for(i=1; i>=3; i++)
  {
    digitalWrite(i, LOW);
    delay(1000);
  }

}


No comments:

Post a Comment