Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Emergency! Need Help With Ir Sensors (http://www.chiefdelphi.com/forums/showthread.php?t=25461)

magical hands 16-02-2004 21:10

Emergency! Need Help With Ir Sensors
 
Hi! guys I only have 7 more days and I am not even done with my IR sensors.
* The problem I am having is Using navigate.c whenever i put navigate.c in my robot it doesn't work unless i connect the motors to PWM 3&4 and. Once I am done connecting the motors to PWM 3&4 the robot goes crazy it just goes everywhere and it doesn't move it's servon motors and doesn't detect beacon.

* When I put my Motors on PWM 13 & 15 the robot doesn't move at all it doesn't perform any movement all it does is just straightens up the sensors and that's it. The programm gives the command "MOVE TO CENTRE" but it doesn't perform the action.

* Does anyone know why I am having this troubles please help me? I am pretty much furustrated and if you want to contact me my msn is jigarjuhi@yahoo.ca and that's my e-mail so it's 2 in 1. Please help me! :ahh: :confused: :(

Ryan Cumings 16-02-2004 21:21

Re: Emergency! Need Help With Ir Sensors
 
Quote:

Originally Posted by magical hands
Hi! guys I only have 7 more days and I am not even done with my IR sensors.
* The problem I am having is Using navigate.c whenever i put navigate.c in my robot it doesn't work unless i connect the motors to PWM 3&4 and. Once I am done connecting the motors to PWM 3&4 the robot goes crazy it just goes everywhere and it doesn't move it's servon motors and doesn't detect beacon.

* When I put my Motors on PWM 13 & 15 the robot doesn't move at all it doesn't perform any movement all it does is just straightens up the sensors and that's it. The programm gives the command "MOVE TO CENTRE" but it doesn't perform the action.

* Does anyone know why I am having this troubles please help me? I am pretty much furustrated and if you want to contact me my msn is jigarjuhi@yahoo.ca and that's my e-mail so it's 2 in 1. Please help me! :ahh: :confused: :(

Ok, here goes,
What pwm's are you plugging the servos into?
Made sure that the cable orientation is correct the IR's, servos, motors, PWMs?
I'm loading up the navigate code right now!!

deltacoder1020 16-02-2004 21:40

Re: Emergency! Need Help With Ir Sensors
 
of course it doesn't move when you plug the motors into pwms 13 and 15 - navigate doesn't output to those pwms.

if it's moving crazily when you plug them in to pwms 03 and 04 (the correct ones), then you probably need to adjust the values in the program to suit your sensors, as well as make sure the servos are hooked up correctly.

magical hands 16-02-2004 22:18

Re: Emergency! Need Help With Ir Sensors
 
Quote:

Originally Posted by Ryan Cumings
Ok, here goes,
What pwm's are you plugging the servos into?
Made sure that the cable orientation is correct the IR's, servos, motors, PWMs?
I'm loading up the navigate code right now!!

I am currently using PWM 1 and PWm 2 for servo motors
I use the IR's in Digital I/O 1,2,3,4 and motors into PWM 13 and 15.

Ryan Cumings 16-02-2004 22:30

Re: Emergency! Need Help With Ir Sensors
 
As delta pointed out, 3 and 4 are the correct ones (how did you come up with 13 and 15?). I would just recomend leaving them unplugged or blocking up the robot to see how it acts through the debug port.

Mark McLeod 16-02-2004 22:36

Re: Emergency! Need Help With Ir Sensors
 
Quote:

Originally Posted by magical hands
I am currently using PWM 1 and PWm 2 for servo motors
I use the IR's in Digital I/O 1,2,3,4 and motors into PWM 13 and 15.

I believe the IR sensors belong on digital 1&2 and digital 4&5.
Verify by looking at the comments in the header of the receiver.c file.

The motors go on pwm3 & 4
The servos go on pwm1 & 2
Verify by looking at the code in navigate.h

rswsmay 16-02-2004 22:46

Re: Emergency! Need Help With Ir Sensors
 
Are you utilizing PWM 13 and PWM 15 because you are using a tank drive system?

deltacoder1020 17-02-2004 00:07

Re: Emergency! Need Help With Ir Sensors
 
13 and 15 would probably come from the code for single-joystick navigation in the default program.

magical hands 17-02-2004 23:45

Re: Emergency! Need Help With Ir Sensors
 
for some reason after connection the motors to pwm 3 and 4 the robot just goes crazy it just sought of goes everywhere bashing everything. Anyone knows why?

deltacoder1020 18-02-2004 00:28

Re: Emergency! Need Help With Ir Sensors
 
are your motor polarities correct? if one were backwards, the robot would turn when it thinks it's going forward, and go forward or back when it thinks it's turning... this would cause some really strange behavior.

Mark McLeod 18-02-2004 08:07

Re: Emergency! Need Help With Ir Sensors
 
Quote:

Originally Posted by magical hands
for some reason after connection the motors to pwm 3 and 4 the robot just goes crazy it just sought of goes everywhere bashing everything. Anyone knows why?

I'd put it up on blocks and check the status of the IR sensor tracking.
Call the tracker alone without the navigate and print out the tracker status:
Tracker_Data[left].Status, Tracker_Data[right].Status

Also observe how the servos behave.
Does it hold on the beacon or look all over the room?

After you're sure the tracker/beacon combo are working correctly, then move on to debugging the navigator code.

thoughtful 18-02-2004 12:14

Re: Emergency! Need Help With Ir Sensors
 
Hey,
is there a way to see if the IR / optical sensors work, i mena for the beacon you just get a camera, what is the way to c if the IR sensors are working. And whts the shipping time, if any of you have ordered new IR sensors..

Mark McLeod 18-02-2004 12:29

Re: Emergency! Need Help With Ir Sensors
 
Quote:

Originally Posted by thoughtful
Hey,
is there a way to see if the IR / optical sensors work, i mena for the beacon you just get a camera, what is the way to c if the IR sensors are working. And whts the shipping time, if any of you have ordered new IR sensors..

There are several easy methods.

- You can just check the IR receiver buffers, see Kevin's FAQ or other posts for what to look at and how to interpret the data.

- You can disconnect the servos and printf the Tracker_Data[left].Status & Tracker_Data[right].Status, i.e., the tracker states are:
NONE_IN_VIEW 0
RIGHT_IN_VIEW 1
LEFT_IN_VIEW 2
BOTH_IN_VIEW 3

- Using a regular digital input printf the value of the sensor. In the presence of the beacon or a compatable IR source like a TV remote you will see a mixture of 1's & 0's. Bad sensors show all 1's or all 0's.

For shipping you can order overnight of course. 1st class TX to NY was a couple of days (Friday to Tuesday over a holiday).

danielkitchener 19-02-2004 01:11

Re: Emergency! Need Help With Ir Sensors
 
We also had similar problems with our robot going crazy with the tracking code...but then we realized our IR sensors weren't plugged in. But FYI, i think servos are supposed to plug in to PWMs 3 and 4. Your robot was going crazy because the pwm values were switching back and forth because the program thought they were servos and was sweeping the field with them... :rolleyes:

thoughtful 19-02-2004 01:16

Re: Emergency! Need Help With Ir Sensors
 
i had tht hunch dont know if it is true, but can you please point out where the motors will go than..i mean drive motors

deltacoder1020 19-02-2004 11:53

Re: Emergency! Need Help With Ir Sensors
 
no, the motors should be going on 3 and 4 if using the navigate code:

Code:

// Which pwms are our tracker servoes and drive motors?  It
// is nice to only have to change this in one place.
#define left_servo pwm01
#define right_servo pwm02
#define left_drive pwm03
#define right_drive pwm04


thoughtful 19-02-2004 23:34

Re: Emergency! Need Help With Ir Sensors
 
yes, today our programming guys figured that out, though we still having problems locating the beacon, though we hope we fix it.

Now this might be off topic but anyone got a working version of Copycat this year? :)


All times are GMT -5. The time now is 00:04.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi