Page 4 of 4

Re: Omni-wheel balancing robot

Posted: 18 Jan 2011, 01:27
by stryker001
Other cool things to do: Use an ultrasonic sensor to measure sound level, and using a light sensor to measure color.
I understand the second idea (I read about it in the "10 one-kit wonders" book where you build an M&M sorter). But how do you do the first? Also, does it measure audible sounds or ultrasonic sounds when you use it like so? Also, is this in NXC or NXT-G?

Re: Omni-wheel balancing robot

Posted: 18 Jan 2011, 04:02
by mattallen37
He was being sarcastic, as as you seemed to be.
stryker001 wrote:The "secret" is to use the Accelerometer as a tilt sensor, not an acceleration sensor.
hassenplug wrote:Other cool things to do: Use an ultrasonic sensor to measure sound level, and using a light sensor to measure color.
Of course you can't use the Accelerometer to only measure tilt, just as much as you can't use the ultrasonic sensor to measure sound level, or a light sensor to measure color. If I understand correctly, he was using those two as examples of how silly your statement was (but not in a way to put you down).

Re: Omni-wheel balancing robot

Posted: 18 Jan 2011, 06:08
by muntoo
mattallen37 wrote:...or a light sensor to measure color.
Actually, you can (inaccurately, of course). Different wavelengths an' stuff.

Sorry 'bout this, but this awesome reference just occurred to me. If you want, you can ignore the spoiler (which only 1% of those who read this post will actually do):
There is a art, or rather a knack to balancing a robot with only an accelerometer. The knack lies in learning how to make it throw itself at the ground and miss. (The actual quote is a lot funnier; Perhaps someone can improve this?)

Re: Omni-wheel balancing robot

Posted: 18 Jan 2011, 08:41
by mattallen37
There is no way to "different wavelengths" (assuming you mean "differentiate") using the standard NXT light sensor (or standard color sensor). There is only one returned value by the sensor, and it is in relation to the brightness compared to the responsive wavelength of the phototransistor. If you knew the EXACT brightness that the sensor was "seeing", I suppose you could port the response curve into a program, and determine the wavelength, but IMO that would be insane to try to do.

The Lego sensors on the market that I know of that can actually tell the difference between light colors, are the Mindsensors camera, and the HiTechnic color sensor V2 (note that v1 and v2 use totally different technology, and only v2 will work). Neither of those are a spectrometer though, and both are only set up for the visible spectrum.

Re: Omni-wheel balancing robot

Posted: 18 Jan 2011, 11:15
by hergipotter
Surely the light sensor would return different values for e.g. yellow and red, as red is "darker" then yellow. So i assume that you could use the light sensor as color sensor in some easy ways, perhaps a brick sorter, where the surrounding light is always the same or something like this...

Re: Omni-wheel balancing robot

Posted: 18 Jan 2011, 21:52
by mattallen37
But it is also more sensitive to red light than to yellow, that is why you would have to program in the response curve and have a very stable light supply. If you had control over the environment, you could use it to distinguish colors, but not really differentiate wavelengths.

Re: Omni-wheel balancing robot

Posted: 19 Jan 2011, 07:49
by hergipotter
For a simple Bricksorter, you could at first calibrate each color for the specific environment by holding the brick in front of the sensor and measure the value.
If you then read a value that is within a small interval of the calibration value, then it's likely this color.

Re: Omni-wheel balancing robot

Posted: 19 Jan 2011, 08:29
by mattallen37
I agree, using a proper software and hardware mix, you could probably distinguish between some of the lego colors.

Re: Omni-wheel balancing robot

Posted: 19 Jan 2011, 16:08
by stryker001
stryker001 wrote:We have, in fact, ran into a few problems...
A recent one being that BricxCC is not compiling anymore. Anyone else having that problem?

Re: Omni-wheel balancing robot

Posted: 19 Jan 2011, 16:27
by mightor
I am locking this topic, it's gone so far off topic it's not even funny. If Aswin feels like having it reopened, he's free to contact me.

- Xander