Page 1 of 1

colour sensor reading I/O signals from a paper disk

Posted: 27 Jan 2011, 22:11
by finneykris
hi, i was wondering if its possible to code the LEGO NXT colour sensor so that it detects a hole punched in a paper disk and where they isn't a hole (read as I/0 signals ), the sensor has 3 diodes and can send out 3 IR beams, therefore the sensor will not move, only the disk and the two diodes can be programmed to read the disk. i would like to code this in robotC.

Re: colour sensor reading I/O signals from a paper disk

Posted: 27 Jan 2011, 23:12
by mattallen37
Yes it is possible to use punch tape or disks (or cards) to input information into the NXT (or just about any other processor). When I did something like that, I used light sensors (with the RCX, as it was before I had an NXT). If you intend to do it with the NXT, I would suggest using either a custom piece of hardware or RCX light sensors, so the sensing lines are close. Where did you hear that "the sensor has 3 diodes and can send out 3 IR beams"? No lego NXT color sensor that I know of has the ability to send out IR light, or has three diodes (Switching, Power, Zener, Schottky, light emitting, light sensing, or any other type). The normal lego NXT color sensor I suppose DOES have three LEDs, (which are diodes), but normally it is considered one, as all are in one package (RGB LED). The sensing part of the lego NXT color sensor is a single phototransistor.

BTW, what do you plan to use a punch disk for?

You should be able to program almost any NXT robot with RobotC.

Re: colour sensor reading I/O signals from a paper disk

Posted: 27 Jan 2011, 23:45
by finneykris
punching the disk because its how a CD works, it has pits and grooves, in my case they are holes in the disk which are the grooves which don't reflect the light back.

there's no pits that are raised from the disk surface.

i wont use the lego color sensor i have in that case then.

Re: colour sensor reading I/O signals from a paper disk

Posted: 28 Jan 2011, 02:12
by mattallen37
What do you plan to do with it, after you successfully get it set up and able to read the disk(s)? Will you use the disk to enter data? Determine behavior of a robot?

If you only need to read one hole at a time, the color sensor might be good, but it is very bulky and not set up for doing something like that.

BTW, how do you plan to punch the holes? Manually? or have you figured out a way to have a robot do it?

Re: colour sensor reading I/O signals from a paper disk

Posted: 29 Jan 2011, 01:42
by finneykris
holes punched manally, this project is to start simple and learn, its a cd drive in theory

how will the nxt know if the cd is in the drive? its only 1 sensor

the I/O signals will be read as either a dot on a certain place of the lcd screen or a sound

Re: colour sensor reading I/O signals from a paper disk

Posted: 29 Jan 2011, 02:54
by mattallen37
Yes, in theory, but a VERY basic one. Depends on the size of the disk, holes, and spacing, but you probably won't be able to do more than a couple bytes at the most.

That is totally up to the builder. I wouldn't think it would be to easy to do with any one sensor, even just trying to read it. I also would think it easier to do a card or tape, but a disk should certainly be possible.

Ok, so no specific plans yet.

Sure, but it will probably only be a few bytes at best, so there isn't much info you would be dealing with. Basically, you could store like a single, short word's worth of data, but of course it depends on the design.

A real CD can usually hold something like 700MB (700,000,000 bytes).

Re: colour sensor reading I/O signals from a paper disk

Posted: 16 Feb 2011, 22:37
by finneykris
i decided just to send the digitally encoded signal to the speaker as the radio frequency/ light from the color sensor is digital and it read back to the sensor then to the NXT

if the NXT color sensor cant do this then do you know of any affordable sensors that can give out IR light and receive it again?
the hole size is the same size as the beam, the sensor is as close to the disk as possible.

is there anything else i need to think about before buying the stuff and making it?

how many holes will i need and how far apart will they need to be, the sensor dosent move in this model so he holes need to be aligned with the beam.

Re: colour sensor reading I/O signals from a paper disk

Posted: 18 Feb 2011, 08:31
by timpattinson
You might want to check out the Hitechnic IRlink http://www.hitechnic.com/cgi-bin/commer ... ey=NIL1046 to communicate with IR
also, this may be interesting
http://www.nxtprograms.com/NXT2/checkou ... index.html

Re: colour sensor reading I/O signals from a paper disk

Posted: 18 Feb 2011, 08:41
by mattallen37
timpattinson wrote:You might want to check out the Hitechnic IRlink http://www.hitechnic.com/cgi-bin/commer ... ey=NIL1046 to communicate with IR...
The IR Link is not related to this. It is for communication with the RCX, trains, and PF.