ARDUINO PROJECT
DIY ARDUINO
Monday, 7 May 2018
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);
}
Tuesday, 21 February 2017
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
Subscribe to:
Posts (Atom)