Simple obstacle avoidance Robot

 

SUMMARY:

This project is about a simple obstacle avoiding robot using INTEL EDISON.Robotics is an exciting and fun hobby that has become very affordable in recent years.Lets do it.

 PARTS LIST:

  • Cardboard.
  • Battery.
  • Ball bearing for front roller.
  • 2 servo motors.
  • 2 matching wheels.
  • Intel Edison with Arduino breakout board.
  • Breadboard.
  • Ultrasonic Range sensor – HC-SR04.
  • Capacitors (220uF).
  • Jumper Wires,rubber bands,Glues, etc…               

 

  • IMG_0667

 

STEPS TO BE FOLLOWED:

STEP 1: CHASSIS.

We chose a simple cardboard based chassis with the servos attached to it with the help of rubber bands. Make it convenient for your use.
The above choices work as long as your rover is roving over smooth surfaces. Attach the front ball bearing in front of the cardboard.

Set front wheel ball bearing:IMG_0729

Attach single servo motor:

IMG_0726

Attach both servo motors:

IMG_0671

our chassis is ready.

STEP 2: ARDUINO BOARD WITH INTEL EDISON.

Configure your arduino board with intel edison.Look at this link to configure ( https://software.intel.com/en-us/iot/library/edison-getting-started).
Make sure your serial communiction and port are fixed. Check out your arduino board with intel edison by loading a simple program to your board.

IMG_0656

Lets check out our board with simple blinking led.

IMG_0674

STEP 3: BATTERY AND BOARD.

Mount this battery using battery holder and board then later secure it to the chassis using rubber bands – surprisingly this works pretty well
(remember this is planned on using this on smooth surfaces only – adjust the attach according to your plans).
We have to use 6 AA battery holder in order to hold six batteries (based on motors you can use your batteries).

STEP 4: ARDUINO PINS.

These are the ARDUINO PINS which it is attached for this project.
You can set the pins on your own.

Ultrasonic Range Sensor (HC-SR04) ECHO                    9

Ultrasonic Range Sensor (HC-SR04) TRIG                    10

Servo signal (left)                                                                   5

Servo signal (right)                                                                 6

STEP 5: ULTRASONIC RANGE SENSOR (HC-SR04).

First of all check  Ultrasonic Range Sensor (HC-SR04) by using a simple arduino code.
Connect the ultra sonic sensor using some jumper wires.

IMG_0723

Here we have checked our ultra sonic sensor using simple program.

IMG_0725

By checking in serial port of arduino uno we can have a clear thought that it is working . Ultrasonic sensor  shows the distance of the object in front of it. Here in our code distance is calculated in centimeter.

Below image shows the distance calculated by ultrasonic sensor in serial port (cm).

file2

STEP 6: SERVO MOTOR CONNECTIONS

The wiring needed for connecting the servo cable — 3 pin connection coming out from the servo – red (vcc), black(ground) and in my case yellow(signal).
The picture (Servo wiring 1) shows the 220uF capacitor connected between vcc/ground – this is needed for each servo in order to avoid the brownout issues.
Since we are using the same battery source to power the servos and the board.
on sudden rover turn of directions, there can be spikes of current draw which can cause the board to recycle if we don’t provide a sizeable capacitor (220uF works just fine in our case).
The pictures show wiring for 1 servo without the servo cable attached (Servo wiring 1) with the servo cable attached (Servo wiring 2) and then both the servo cables attached.

IMG_0731

STEP 7: CODING AND TESTING

Apply the code and test it.

#include<Servo.h>
#define trigpin 10 // Trigger pin
#define echopin 9 // echo pin

Servo servoLeft;
Servo servoRight;

int forward = 180;
int backward = 0;

void setup() {
Serial.begin(9600);
servoLeft.attach(5);
servoRight.attach(6);

pinMode(trigpin, OUTPUT);
pinMode(echopin, INPUT);

}

void loop ()
{
int duration, distance;
servoRight.write(forward);
servoLeft.write(forward);

digitalWrite(trigpin, HIGH);
delayMicroseconds(1000);
digitalWrite(trigpin, LOW);
duration = pulseIn(echopin, HIGH);

distance = ( duration / 2) / 29.1;

delay(1000);
if (distance >= 10)
{
Serial.print(distance);
Serial.println(” cm”);
}
else
{
Serial.println(“danger”);
servoLeft.write(90);
servoRight.write(90);
delay(1000);

servoLeft.write(backward);
servoRight.write(forward);
delay(5000);
servoLeft.write(forward);
servoRight.write(forward);

}

}
Now we have done. 
Here is our simple obstacle avoiding robot using intel edison.

IMG_0651

This is about simple moving Robot using intel edison.

Advertisements

TEMPERATURE SENSOR TO CONTROL A MOTOR USING INTEL EDISON

SUMMARY:

This project is simple just by using temperature sensor LM35 with arduino to control a DC fan(motor) and LED with respect to the temperature.

COMPONENTS NEEDED:

1. INTEL EDISON
2. Temperature Sensor LM35
3. 1K Resistor
4. Diode 1N4007
5. Dc Motor
6. NPN transistor BC547
7. A voltage source with 12Volts
8. LED
9. hook up wires
10. optional : voltage source socket

STEPS TO BE FOLLOWED:
Step 1: ARDUINO BOARD WITH INTEL EDISON

Configure your arduino board with intel edison.Look at this link to configure ( https://software.intel.com/en-us/iot/library/edison-getting-started ).

Make sure your serial communiction and port are fixed. Check out your arduino board with intel edison by loading a simple program to your board.
IMG_0677

Step 2: BREADBOARD CONNECTION

The NPN transistor BC547 here as a buffer to isolate the first circuit which is the connection to the arduino through the resistor and the other one with the fan(motor).

An inverted PN-junction parallel to the fan to prevent moving current in the opposite direction and make damage to the arduino kit.

Below image shows some of components:

IMG_20160524_164251

step 3: CIRCUIT DIAGRAM

CIRCUIT DIAGRAM
Step 4: VOLTAGE SOURCE

It is important to put in consideration that the input voltage for the temp sensor is 5v from the arduino.

12volt voltage given to the motor or fan must be from an external voltage source.

In this case we connect all the GND together weather the GND of the arduino and the external voltage source.

 

Step 5: TEMPERATURE SENSOR LM35

It’s a transducer. It converts temperature into equivalent electrical signal. Its output voltage increases linearly with increase in temperature.

The LM35 datasheet specifies that this ICs are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature.

The output voltage of the sensor is fed to the A/D channel of the arduino.

Several temperature ranges was set in the code to vary the motor speed based on the level of temperature sensed.

Step 6: DC MOTOR

Take a normal dc motor and connect to pin 9 of arduino and ground it.

IMG_20160519_134633

 
Step 7: CODING AND EXECUTION:

float temp;
int tempPin = 0;
int tempMin = 25;
int tempMax = 32;
int led = 8;
int fan = 9;
int fanSpeed = 0;
void setup()

{
pinMode(led, OUTPUT);
pinMode(tempPin, INPUT);
Serial.begin(9600);

}

void loop()

{

temp = analogRead(tempPin);

temp = temp * 0.48828125;

Serial.print(“TEMPRATURE = “);

Serial.print(temp);

Serial.print(“*C”);

Serial.println();

delay(1000);

if(temp > tempMax)
{
digitalWrite(led, HIGH);
fanSpeed = map(temp, tempMin, tempMax, 32, 255);
analogWrite(fan, fanSpeed);
}
else
{
digitalWrite(led, LOW);
fanSpeed = 0;
digitalWrite(fan, LOW);
}

}

IMG_20160524_131404

Here is the video

INTEL EDISON DISTANCE SENSOR

SUMMARY:

This  project will measure distance using ultrasonic sensor,simple led and the serial monitor will show how far the distance is, and the buzzer will buzz depend on the distance.This project can be implemented also with Arduino UNO.

PARTS LIST:

  1. Intel Edison
  2. HC SR04 Ultrasonic Sensor
  3. LED
  4. Piezzo Buzzer
  5. Breadboard
  6. Jumper wires

IMG_20160512_203318.jpg

Step 1: configure arduino board with intel edsion:

Configure your arduino board with intel edison.Look at this link to configure                     ( https://software.intel.com/en-us/iot/library/edison-getting-started ).
Make sure your serial communiction and port are fixed. Check out  arduino board with intel edison by loading a simple program to your board.
This is how we connect arduino board with intel edsion.

 

IMG_0674

Step 2: PIN SELECTION

So first of all we need to assemble the ultrasonic sensor (HC SR04 ), buzzer and led to the Intel Edison’s GPIO.

The arrangement are 

Ultrasonic Sensor :

Trigger : Pin : 10
Echo : Pin 11

Buzzer : Pin 6

Actually there is 4 pins in Ultrasonic Sensor , the last pin is Vcc, we have to connect it to 5v pin on Intel Edison.

STEP 3: PIEZO BUZZER

Buzzer haas two pins Vcc and gnd. we have to give signal to buzzer through arduino board so connect the Vcc to pin 6 of arduino board.

 

20160512_214012.jpg
STEP 4: ULTRASONIC RANGE SENSOR (HC-SR04)

First of all check your Ultrasonic Range Sensor (HC-SR04) by using a simple arduino code.
Connect the ultra sonic sensor using some jumper wires.

IMG_0723

connect all the parts with arduino intel edison board as like below:
20160512_210216.jpg

Step 5: Coding Section:

Open up Arduino IDE which has a Intel Edison board in the board select menu.

Make sure port is connected correctly.

Screenshot (2)

Use this code in arduino uno:
#define trigPin 10 // Define the trigger pin for the Ultrasonic Sensor
#define echoPin 11 // Define the echo pin for the Ultrasonic Sensor
#define buzzer 6 // Define Buzzer Pin
void setup() {
Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}

void loop() {
long distance, duration;
int sound;

digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration / 2) / 29.1;

sound = (140 + (distance/2));

if (distance > 20 || distance <= 0)
{
Serial.println(“Out of range”);
noTone(buzzer);
}
else
{
Serial.print(distance);
Serial.println(” cm”);
tone(buzzer, sound);
}
}

This is the final step of the project, a Testing phase.
Just get some paper and try to measure the distance we want in front of the Ultrasonic Sensor.
The buzzer will buzz with a different note when the distance is change and led will on.

Here is the video

PEDOMETER USING INTEL EDISON

 

 

SUMMARY:

Pedometer is used to monitor the steps of human, dogs or anyother we wish to use.This shows how to make a pedometer that counts a person’s steps. It uses a Xadow – Edison 

Board, Xadow – OLED 0.96”, Xadow – 3-Axis Accelerometer and Xadow – Buzzer. The   OLED screen will display the step-counts.

PARTS:

  • Xadow-Expansion Board
  • Xadow-Programmer
  • Xadow-OLED 0.96″
  • Xadow-3-Axis Accelerometer
  • Xadow-Buzzer
  • USB cable
  • BatteryIMG_20160429_102354

 

STEP1: Software Installation:

In this case we are going to use arduino software to code intel edison.Refer this ( https://software.intel.com/en-us/iot/library/edison-getting-started ).

STEP2: Xadow – Wearable kit:Xadow wearable kit has following boards which makes us to do more on intel edison.

Xadow – Edison 1
Xadow – 3 Axis Accelerometer 1
Xadow – Edison Programmer 1
Xadow – Barometer BMP 180 1
Xadow – Edison SD 1
Battery 1
Xadow – Q Touch Sensor 1
Digital RGB LED Flexi-Strip 1
Xadow – NFC 1
Power cable White 5
Xadow – Breakout 3
Power cable Red 5
Xadow – Buzzer 1
Power cable Yellow 5
Xadow – Vibration Motor 1
FFC cable package 1
Xadow – OLED 1
Color printed Tutorial 1

Step3:Connections

Pay attention to the unfilled corner, all the modules’ unfilled corner point to the same direction.
The Xadow modules’s double sides can connect two modules by FFC since that xadow can cascade its modules as long as posible like a watch or a necklace, so suitable for wearable prototying.
1.Inset Intel Edison onto Xadow-Edison through the rectangular connectors.

IMG_20160429_102133
2.Connect the Edison-Programmer board with a FFC and plug two USB cables,the little switch on Edison-Programmer board should be turned to the Device side.

IMG_20160429_102750

3.Connect Xadow modules with FFC

IMG_20160429_103051
4.Check whether the Xadow – OLED is working or not by uploading a simple program into edison board.

20160223_135312

5.After uploading program into it, unplug the USB cables and the programmer, plug the Li-Po battery so that the kit can be moveable.

Below file is the pedometer code.

pedometercode

IMG_20160429_103138

 

Untitled

Here is the video  of complete  project.