colour sensor reading I/O signals from a paper disk

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
finneykris
Posts: 24
Joined: 20 Oct 2010, 16:20

colour sensor reading I/O signals from a paper disk

Post 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.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

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

Post 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.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
finneykris
Posts: 24
Joined: 20 Oct 2010, 16:20

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

Post 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.
Last edited by finneykris on 16 Feb 2011, 22:43, edited 2 times in total.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

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

Post 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?
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
finneykris
Posts: 24
Joined: 20 Oct 2010, 16:20

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

Post 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
Last edited by finneykris on 29 Jan 2011, 03:00, edited 1 time in total.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

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

Post 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).
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
finneykris
Posts: 24
Joined: 20 Oct 2010, 16:20

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

Post 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.
timpattinson
Posts: 224
Joined: 30 Oct 2010, 04:10
Location: 127.0.0.1
Contact:

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

Post 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
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

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

Post 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.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests