Show Posts
Pages: [1]
1  Using Arduino / Sensors / Re: NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.4 on: August 10, 2012, 12:53:38 am
my robot is working fine with just one single sonar and using that same old ping library
 all i did was calibrating the time of servo movement with the time taken by sonar to take a reading
Code:
digitalWrite(trigPin, LOW);                   // Set the trigger pin to low for 2uS
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);                  // Send a 10uS high to trigger ranging

  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);                   // Send pin low again
  int distance = pulseIn(echoPin, HIGH);        // Read in times pulse
  distance= distance/58;  // Calculate distance from time of pulse
  delay(10);                            // Wait 50mS before next ranging

Here's the video of robot
2  Community / Exhibition / Gallery / ROBOT WITH 6 BEHAVIOURS (WAR) on: August 05, 2012, 07:19:42 am
                                                           
W.A.R --- Wandering Autonomous robot is a socially interactive robot which shows different behaviours under different circumstances. The main behaviour of this robot are:

* Obstacle avoidance

* Light following

* Food seeking (Light source in this case)

* Prey & Predator behaviour

* S.O.C - State of charge monitoring

* Charging - through solar panel
                                           
1--- So here it is how its gonna work, initially when u gonna switch on this robot it will scan and mapp the arena with help of SONAR and servo then it starts wandering in the arena randomly while avoiding obstacles and walls of the arena. One good thing about this robot is that its very fast in its decision making as it does not stop and scan to decide which way to turn. Its mapping and scanning while its wandering.

2--It has 6 different movement and turning plans. It can move forward can also move backwards if the object is to near or a dynamic object start coming closer to it. It can take 90 degrees or 45 degrees turns on either side depending upon the position of the obstacle.

3--So while wandering its continously monitoring its state of charge to know its battery level which i have implemented using couple of resistances and voltage division rule. And measuring the voltege using analog pin of the arduino. Once that battery level drops below a point which i have set in programming. its priority changes and now it will start lookinf for its food which in my case is Light source.

4--- It will move towards the Light source while avoiding obstacles. so its kindda tricky algorithm have to keep shifting the priority as if an obstacle came in its way while searching the light source now first it has to avoid that obstacle and then conitnue its search.

5-- Once its close to the light source where its getting the maximum amount of intensity on its LDR its stop there and charge itself through solar panel until its battery level is up again.

For more videos of WAR
http://www.youtube.com/channel/UCj0WVfBLiiEyfeq6DKq8suQ?feature=mhee

http://letsmakerobots.com/node/33650

http://www.instructables.com/id/Robot-with-6-behaviours/

Semester Project
Mechatronics department U.E.T
University of Engineering & Technology, Lahore, Pakistan.
3  Community / Exhibition / Gallery / Wandering While avoiding Obstacles on: August 03, 2012, 04:42:02 am
 I have designed and programmed a robot which purpose is to wander in an arena while avoiding obstacles. The main task was that robot should be in continuously moving in the arena and it should avoid obstacles while moving.
  I have uploaded a link to that what i have achieved up to now.  Any kind of suggestions for improvement in its motion will be welcomed.




am using Arduino Uno, Srf04 Sonar and a servo.
4  Using Arduino / Audio / Detect sound using Mic !! on: July 11, 2012, 07:28:43 am
hi , i want to detect the sound using mic that whenever i speak or clap the led should be on or when i measure the sound intensity its value should change with louder sound. i hv a 2 pin simple mic..
please guide me i dont know where to start..
5  Using Arduino / Sensors / Re: srf04 ultrsonic sensor for obstacle avoidance on: June 14, 2012, 01:35:28 am
yes it is this one its beam angle is 40 degree , which i tested it cover the 40 degree at a distance of two feet or 70 cm.

in my project there is pre defined arena which is made up of wood now how can i cover the boundaries with metal foil

yes i can replace my obstacles with the metals ones rather than paper.
6  Using Arduino / Sensors / Re: srf04 ultrsonic sensor for obstacle avoidance on: June 14, 2012, 01:10:28 am
i have remove the other post i created , cuz i found this sensor category more relevant to my problem
7  Using Arduino / Sensors / srf04 ultrsonic sensor for obstacle avoidance on: June 14, 2012, 12:59:58 am
Hi i have been working on my final year project which is to avoid obstacles for that purpose am using srf04 sensor to detect objects.

problem:
*it works fine when object is in front of it but if i place the obstacle at some angle its not detecting it and my robot is hitting with that obstacle.

things i tried
* to cover the maximum angle i place my sonar over a servo and am nw continoulsy scanning 120 degree field twice in a second and sitll am having the same problem its not detect the object or walls when its moving at some angle.
8  Using Arduino / Programming Questions / Re: help in programming on: May 30, 2012, 02:46:29 am
sorry about that (o_o)
9  Using Arduino / Programming Questions / help in programming on: May 30, 2012, 02:13:47 am
Hi i am working on a project of obstacle avoidance using SRF04 sensor i need 10 different reading inside a loop.
but am getting error invalid type int[int] array subscript i have bolded the portion where am facing this problem.
thanks.


void loop()
{
 
 
  myservo.write(pos);
  delay(100);
  for(pos = 105; pos > 75; pos -=5)  // goes from 105 degrees to 75 degrees
  {                                  //                     in steps of 5 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
   
    digitalWrite(trigPin, LOW);                   // Set the trigger pin to low for 2uS
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);                  // Send a 10uS high to trigger ranging
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);      // Send pin low again
  int distance= pulseIn(echoPin, HIGH);        // Read in times pulse
  distance=distance/58;   // Calculate distance from time of pulse

 int DISTANCE;
  for (int a = 0; a < 6; a = a + 1)
{

  DISTANCE[a]= distance;       /// i want 5 reading of angle 105 , 100, 95, 90, 85, 80,75 to be stored in DISTANCE1, DISTANCE2 RESPECTIVELY
                    }


  delay(25);       // Wait 50mS before next ranging
    Serial.print("ANGLE ");
    Serial.print(pos);
    Serial.print(" = ");
  Serial.println(distance); 
 
}
Pages: [1]