ROBOTC.net forums
http://www.robotc.net/forums/

HiTechnic IR Seeker driver
http://www.robotc.net/forums/viewtopic.php?f=41&t=905
Page 2 of 3

Author:  mightor [ Sat Nov 15, 2008 5:10 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

A new release (0.3) has been uploaded to http://code.google.com/p/robotc-drivers/downloads/list, enjoy!

It fixes all the above mentioned problems and typos.

Regards,
Xander

Author:  andynalley [ Sat Dec 20, 2008 2:51 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

First of all I would like to say great job on the code. You really seem to know your stuff.

Ive been messing around with the NXT and robotc for about a year now, and now Im attempting to create a self parking robot that uses 2 L.E.D.'s and 2 ir seeker sensors.

Im curious to know how to get the seeker sensors to pick up and work out the exact frequancy of an l.e.d. source. Your code is helping but Im struggling to get my robot to identify what the frequancy for each led is by displaying there values (ont the NXT screen or on the computr screeen). If I could do that then I could begin to write a program that would allow the robot to navigate towards them.

Have you got any suggestions???

Cheers Andy

Author:  mightor [ Sat Dec 20, 2008 3:32 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

andynalley wrote:
First of all I would like to say great job on the code. You really seem to know your stuff.

Ive been messing around with the NXT and robotc for about a year now, and now Im attempting to create a self parking robot that uses 2 L.E.D.'s and 2 ir seeker sensors.

Im curious to know how to get the seeker sensors to pick up and work out the exact frequancy of an l.e.d. source. Your code is helping but Im struggling to get my robot to identify what the frequancy for each led is by displaying there values (ont the NXT screen or on the computr screeen). If I could do that then I could begin to write a program that would allow the robot to navigate towards them.

Have you got any suggestions???

Cheers Andy

Thanks for the compliment. I am not sure what you mean by frequency of the light. Are you intermittently blinking them? Is one blinking at, say, 10 Hz and the other at something like 20Hz? If this is the case then you could check the IR seekers at at least twice the fastest frequency, that's 40Hz, in this case. Then you should count the length of each pulse from the different LEDs. It is not unlike reading a wheel encoder :)

Regards,
Xander

Author:  andynalley [ Sat Dec 20, 2008 5:10 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

mightor wrote:
andynalley wrote:
First of all I would like to say great job on the code. You really seem to know your stuff.

Ive been messing around with the NXT and robotc for about a year now, and now Im attempting to create a self parking robot that uses 2 L.E.D.'s and 2 ir seeker sensors.

Im curious to know how to get the seeker sensors to pick up and work out the exact frequancy of an l.e.d. source. Your code is helping but Im struggling to get my robot to identify what the frequancy for each led is by displaying there values (ont the NXT screen or on the computr screeen). If I could do that then I could begin to write a program that would allow the robot to navigate towards them.

Have you got any suggestions???

Cheers Andy

Thanks for the compliment. I am not sure what you mean by frequency of the light. Are you intermittently blinking them? Is one blinking at, say, 10 Hz and the other at something like 20Hz? If this is the case then you could check the IR seekers at at least twice the fastest frequency, that's 40Hz, in this case. Then you should count the length of each pulse from the different LEDs. It is not unlike reading a wheel encoder :)

Regards,
Xander


Thats a good idea. Ive been trying to think of how to have two different signals coming from the LED's. I was thinking of something as simple different LED Brightness levels. But I need to work out how to read the LED light source using the nxt and ir seeker, so that I can then test different methods for defining the LED. Thats why I wandering If you could advise me on how to get the ir seeker to read the LED source (say from the robocup jr ball, which i got to test it). If I can see what type of readings the ir seeker picks up I can then work out how Im gonna differentiate netween them.

Cheers

Author:  mightor [ Sat Dec 20, 2008 5:26 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

[quote="andynalley"
Thats a good idea. Ive been trying to think of how to have two different signals coming from the LED's. I was thinking of something as simple different LED Brightness levels. But I need to work out how to read the LED light source using the nxt and ir seeker, so that I can then test different methods for defining the LED. Thats why I wandering If you could advise me on how to get the ir seeker to read the LED source (say from the robocup jr ball, which i got to test it). If I can see what type of readings the ir seeker picks up I can then work out how Im gonna differentiate netween them.

Cheers[/quote]
Brightness is also a dependent on distance, so how will you tell the difference between a dim LED close by and a bright LED that's far away? Pulsing the LEDs is by far the most fool-proof method to distinguish between different sources.
In the absence of actually owning one of these sensor I am going to have to guess that you just hold the ball in front of it and move it about and check the different readings as they come out of the sensor. The Robocup Jr ball doesn't blink at 10 or 20 Hz, as far as I am aware of so it is a constant source of IR light. It's basically an array of many IR LEDs. Did I not include a little test program with the driver?

Regards,
Xander

Author:  andynalley [ Sat Dec 20, 2008 5:54 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

mightor wrote:
[quote="andynalley"
Thats a good idea. Ive been trying to think of how to have two different signals coming from the LED's. I was thinking of something as simple different LED Brightness levels. But I need to work out how to read the LED light source using the nxt and ir seeker, so that I can then test different methods for defining the LED. Thats why I wandering If you could advise me on how to get the ir seeker to read the LED source (say from the robocup jr ball, which i got to test it). If I can see what type of readings the ir seeker picks up I can then work out how Im gonna differentiate netween them.

Cheers

Brightness is also a dependent on distance, so how will you tell the difference between a dim LED close by and a bright LED that's far away? Pulsing the LEDs is by far the most fool-proof method to distinguish between different sources.
In the absence of actually owning one of these sensor I am going to have to guess that you just hold the ball in front of it and move it about and check the different readings as they come out of the sensor. The Robocup Jr ball doesn't blink at 10 or 20 Hz, as far as I am aware of so it is a constant source of IR light. It's basically an array of many IR LEDs. Did I not include a little test program with the driver?

Regards,
Xander[/quote]

Yeh ya did include the test program. Ive been trying to use it for ages with the test ball but it doesnt do anything. Whats it meant to do??? Havent you specified it to respond to a certain Lumen, meaning that if my ball producing that Lumen it wont do anything???

cheers

Author:  mightor [ Sat Dec 20, 2008 5:58 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

No, the test program should just tell you the strength and direction of the light. I didn't test it, of course, as I don't have a sensor :) I think JamesD did test it though.

Regards,
Xander

Author:  andynalley [ Sat Dec 20, 2008 6:02 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

Ok, how would I set it up, so that using your driver I can call on the sensor using commands for the ultra sonic sensor. What would the robotc commands be for that???

Cheers

P.S. Sorry for hassling you so much but this is my final year project for uni.

Author:  mightor [ Sat Dec 20, 2008 6:25 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

You want to use my drivers to use the IR Seeker as an US sensor? You can't. You either use that sensor as a US sensor -or- you use my drivers and the API that comes with it.

You are not hassling me, if you were, I wouldn't be posting this right now :)

Regards,
Xander

Author:  andynalley [ Sat Dec 20, 2008 6:38 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

Ok no probs. Well Ive just slightly overcome my own stupidity and got your test program working. Is there any lumen value set in your driver software or is it litterally just drivers telling the nxt what type of data it should be picking up. If so, how would I define 2 ir sensors, one in port 1(s1) one in ort 2(s2). Would this work.

#pragma config(Sensor, S1, HTIRS, sensorI2CCustom)
#pragma config(Sensor, S2, HTIRS, sensorI2CCustom)

Cheers

Author:  mightor [ Sat Dec 20, 2008 6:43 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

andynalley wrote:
Ok no probs. Well Ive just slightly overcome my own stupidity and got your test program working. Is there any lumen value set in your driver software or is it litterally just drivers telling the nxt what type of data it should be picking up. If so, how would I define 2 ir sensors, one in port 1(s1) one in ort 2(s2). Would this work.

#pragma config(Sensor, S1, HTIRS, sensorI2CCustom)
#pragma config(Sensor, S2, HTIRS, sensorI2CCustom)

Cheers

No, it wouldn't. In your code, both sensors have the same name, HTIRS. I would suggest you change it to something like this:
Code:
#pragma config(Sensor, S1,     HTIRS1,               sensorI2CCustom)
#pragma config(Sensor, S2,     HTIRS2,               sensorI2CCustom)

I do no processing of any kind of the data. What you get is what the sensor provided the driver. I use standard I2C transactions to retrieve this data. There is no magic or transmogrification of any kind involved :) The data returned is not a unit like "lumens", it's just a relative strength value or a direction value, depending on what function is called.

Regards,
Xander

Author:  andynalley [ Sat Dec 20, 2008 6:48 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

Woops sorry that was me being a bit retarded. I meant to put HTIRS1 and 2. sorry for the confusion.

Now Ive got your test program running Im trying to adapt it to follow the flashing led from the ball. Any ideas???

Cheers

Author:  mightor [ Sat Dec 20, 2008 6:56 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

Hehe, without knowing what your robot looks like, how you're planning to "follow" the ball or lack of of details, I am not sure what you'd like me to tell you :)

I have ideas, but I doubt many of them are even remotely related to following an IR ball :)

So, start a new thread in the Projectsg forum, post some pics, goals of your project, etc and we can continue this conversation there. It's starting to become a little Off-Topic.

Regards,
Xander

Author:  andynalley [ Sat Dec 20, 2008 6:59 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

Ok will do mate. Thanks for all your help.

Andy

Author:  andynalley [ Sat Dec 20, 2008 7:36 pm ]
Post subject:  Re: HiTechnic IR Seeker driver

Sorry one more question. Do you know wether it is possible for the ir seeker sensor to define between colours. Say a red led and a green led.

Cheers Andy

Page 2 of 3 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/