Putting multiple lights in an NXT robot

Discussion specific to the intelligent brick, sensors, motors, and more.
ricardocrl
Posts: 117
Joined: 27 Dec 2010, 19:27

Putting multiple lights in an NXT robot

Post by ricardocrl »

Hello guys,

I have two questions:

1 - I would like to have several lights controlled by a single NXT unit. From what I know this is not so simple:
- Using multiple cable converters and place PF lights (not very powerful) in the outputs of the NXT
- Using color sensors in the NXT inputs
- Using a HiTechnic IRLink sensor and control 8 PF lights with one receiver and an external battery box

The first two option reduce a lot the outputs/inputs of the NXT for other proposes, sensors and motors. The third one requires more money, a lot of extra elements. It's not a fancy solution. Any suggestions?

2 - Can a color sensor be plugged in an NXT output just for LED usage?

Thanks a lot in advance,
Ricardo
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Putting multiple lights in an NXT robot

Post by mattallen37 »

First, DO NOT PLUG A COLOR SENSOR INTO THE MOTOR PORT! That goes for basically all sensors!

As far as a cheaper solution, I can think of many, but you will need to do some building with electronics.

I'll assume you are only talking about LEDs. Do you need brightness control? Color control? How many LEDs do you want to control?
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
pbenco
Posts: 71
Joined: 29 Sep 2010, 09:43
Contact:

Re: Putting multiple lights in an NXT robot

Post by pbenco »

Hello ricardocrl
You can use the color sensor as an RGB light, it's one genuine functionnality of the product, but plug it into sensor port por favor!

If you are confident in electronic soldering, you can do something like this:



you can find the complete description of the project here:
http://www.bartneck.de/wp-content/uploa ... anDijk.pdf

Other ways to light leds are available, but you can daisy chain this little gizmo, it's a very convenient way to add RGB controlable light to a project
Hope this help
pbenco.wordpress.com/
ricardocrl
Posts: 117
Joined: 27 Dec 2010, 19:27

Re: Putting multiple lights in an NXT robot

Post by ricardocrl »

@mattallen37, pbenco:
I know that a sensor is not supposed to be in the output. But maybe, if we know what we are doing, controlling carefully the voltage and amp. drawn in the output.

But I don't necessarily need LED with color control. Essentially I need some lights with turn off/on control. Let's say 8 at least. But I have another constraint. I don't want to use non-standard LEGO equipment. I want to keep the solution pure. :P


@pbenco
"por favor"? Está bem, obrigado. :P
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Putting multiple lights in an NXT robot

Post by mattallen37 »

No, Don't try it! all you stand to do is ruin the sensor, and maybe confuse/mess up the NXT as well. There is no way to control either the voltage or the current of the outputs, not to mention you would need IO 5 and 6, and I think the motor ports only allow for input on those pins (and probably not ADC either). Think of the concept as trying to interface a QWERTY computer keyboard to the speaker on a telephone, attempting to make the keyboard into the phone number-pad; it just won't work. I suppose that if you only connected four wires, and wrote your own FW, the HW might support it.

Well, if you just need On/Off, you should use a PCF8574. Each one has 8 IO's, so you could control 8 LED's independently. If you need more IO's, you could use more PCF8574's, or use a PICAXE or other U-Controller.

If you must keep it 100% Lego, you are looking at quite a price tag, not to mention a (big) pile a wires and other parts. The cheapest, all-Lego solution I can think of is extra NXTs (depending on your layout, probably 1 NXT can control 3, 4, or 7 LEDs). If you would be willing to go third-party, the HiTechnic IR Link (or mindsensors PFMate) and the PF IR receivers would probably be best.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
ricardocrl
Posts: 117
Joined: 27 Dec 2010, 19:27

Re: Putting multiple lights in an NXT robot

Post by ricardocrl »

mattallen37 wrote:No, Don't try it! all you stand to do is ruin the sensor, and maybe confuse/mess up the NXT as well. There is no way to control either the voltage or the current of the outputs, not to mention you would need IO 5 and 6, and I think the motor ports only allow for input on those pins (and probably not ADC either). Think of the concept as trying to interface a QWERTY computer keyboard to the speaker on a telephone, attempting to make the keyboard into the phone number-pad; it just won't work. I suppose that if you only connected four wires, and wrote your own FW, the HW might support it.
I took a look now to the pinout of the inputs and outputs and I see a little possibility. I just have some basics on electronics, so I'm completely not sure about this.
On both input and output ports, we have pin 4 with 4,3V which I imagine that is the one that powers the LED of the color sensor. Maybe it's not that simple, because the LED color needs to be controlled, probably by a small microcontroller.
Then, we would need a GND pin on the output compatible with the sensor layout. From what I read, in every sensor, the pin 2 and 3 are GND and they are phisically shorted on both NXT and sensor hardware. This goes against output pins, where we have power supply on pin 2 and GND on pin 3. This will cause a short-circuit.
But... (if we forget about the clean LEGO solution :-) and we remove the pin 2 from the end cable of the color sensor, then, we probably get the LED to work.
What do you think about this?

BTW, the color sensor schematic is not present in the Hardware Developer Kit that LEGO shares. I read here a post about that (https://sourceforge.net/apps/phpbb/mind ... c&start=10), without any official conclusions. Is there any news about that?
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Putting multiple lights in an NXT robot

Post by mattallen37 »

You could indeed power them from the 4.3v bus, but you are limited to 180ma (absolute max), and you need to share that with any other powered items (NXT motor encoders, and almost all sensors). You also wouldn't have control over them. If the NXT is on, the lights will be. It would be like connecting them to a separate power supply (battery back), you would'n have programmable control of them.

If you forget about staying completely Lego, then you should really consider using a PCF8574. It would cost less for the IC than it would for 4 wires (to cut).

As far as the lego color sensor, no, there is no public information that lego has released about it.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
ricardocrl
Posts: 117
Joined: 27 Dec 2010, 19:27

Re: Putting multiple lights in an NXT robot

Post by ricardocrl »

The limited 180mA wouldn't be a problem as it is used also when it is connected to an input port. But yes, that's true, I wouldn't have control over it.

I really need to keep to keep it LEGO. Than, some hitechnic sensor multiplexer for color sensors or the IRLink for PF lights will be preferable.
However, that's interesting to see that the LEGO color sensor alone is not available to buy, at S@H.

Thanks for the options and opinion! ;-)
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Putting multiple lights in an NXT robot

Post by mattallen37 »

If you don't need control, just connect them all to a single supply (motor output or battery box).

HiTechnic is not Lego. HiTechnic is certified by Lego, but still not Lego. I don't think the HT sensor multiplexer supports the Lego color sensor. You can buy the Lego color sensor at Lego Education FYI.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: Putting multiple lights in an NXT robot

Post by mightor »

I can assure you that the HiTechnic Sensor MUX does -not- support the LEGO colour sensor.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests