Controlling multiple LEDs individually with NXT question

Discussion specific to the intelligent brick, sensors, motors, and more.
Post Reply
wilykat
Posts: 3
Joined: 11 May 2012, 00:41

Controlling multiple LEDs individually with NXT question

Post by wilykat »

I wanted to be able to control 7 or 8 LEDs individually with NXT but a search of this turned up only a $50 device: http://www.hitechnic.com/cgi-bin/commer ... ey=SPR2010

Is there something cheaper? Or maybe cut up a spare NXT cable and use motor wire to control a multiplexer directly for handling LEDs? I'd like suggestion on this. If doing it from motor port would work, I'd need better understanding of the output. It seems the 2 output are H/L for forward, L/H for reverse, H/H for braking, and floating for motor off mode?
wilykat
Posts: 3
Joined: 11 May 2012, 00:41

Re: Controlling multiple LEDs individually with NXT question

Post by wilykat »

I wanted to add I also have older RCX brick 1.5 that could be pressed in service but I have no way to program it as all of my computers are 64 bits Windows, no serial port, and as I understand the USB tower doesn't work with 64 bits OS. If RCX is better for LED, how would I communicate bvetween RCX and NCX brick I am using for the main code?
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Controlling multiple LEDs individually with NXT question

Post by hassenplug »

wilykat wrote:I wanted to be able to control 7 or 8 LEDs individually with NXT but a search of this turned up only a $50 device: http://www.hitechnic.com/cgi-bin/commer ... ey=SPR2010

Is there something cheaper? Or maybe cut up a spare NXT cable and use motor wire to control a multiplexer directly for handling LEDs? I'd like suggestion on this. If doing it from motor port would work, I'd need better understanding of the output. It seems the 2 output are H/L for forward, L/H for reverse, H/H for braking, and floating for motor off mode?
One idea is to use LEDs. If you connect an LED the same way you would connect a motor, it would turn ON when you drive the motor one direction (like forward) and turn OFF when you drive it the other direction.

Then, you could connect a second LED backwards, to the same motor port. If you want both LEDs on, set the port to switch between forward & backward.

That may be the easiest way to connect six LEDs to one NXT.

What exactly are you trying to do with the LEDs?

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Controlling multiple LEDs individually with NXT question

Post by mattallen37 »

If you don't need PWM (brightness) control, then I suggest using a PCF8574. Mindsensors sells a nice NXT friendly prototyping board, but you could even use the IC directly on a breadboard. The IC itself costs about $2, and you also need the 2 pullup resistors and a way to connect to the NXT (like a cut cable), so altogether maybe $5 (plus breadboard and wire).
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
dimasterooo
Posts: 135
Joined: 29 Apr 2011, 21:53
Contact:

Re: Controlling multiple LEDs individually with NXT question

Post by dimasterooo »

How about Mindsensor's magic wand? It seems like the perfect solution:

http://www.mindsensors.com/index.php?mo ... AGE_id=120

Plus, you can get it as a kit, so you don't even have to solder the LEDs into the device -- they could be on longer cables if you wanted them to be, and, they're all individually controllable.
- Leon Overweel (aka. dimastero/ dimasterooo)

My blog: http://www.leonoverweel.com
Twitter: http://twitter.com/LayOn_OverWhale
wilykat
Posts: 3
Joined: 11 May 2012, 00:41

Re: Controlling multiple LEDs individually with NXT question

Post by wilykat »

No PWM, it's straight on and off.

I wanted to build Stargate ring with the light up chevrons. It would light up each LED in sequence in between motor driving the ring. I already have the script for motor running in random direction for random time. I can easily add one block (motor output or sensor input) to light up the next LED, and then after the gate is done "dialing" and pauses for about 15 seconds, it reset LED to all off.

I thought about using LM3914 and some type of analog device between NXT and LM3914 to drive the chip's input, making the input voltage ramp so LM3914's output would go from 0 to 7 LED.

The magic wand might do the trick! Demo video of the heart looks closest to what I wanted as long as it can go all off instantly and not one LED at a time.

Unless you got a better idea?
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Controlling multiple LEDs individually with NXT question

Post by h-g-t »

These are ready to run and quite cheap - http://www.futurlec.com/Mini_PCF8574.shtml

The on-board resistors are only 10k so you might need to add a couple of external resistors.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Controlling multiple LEDs individually with NXT question

Post by hassenplug »

If you're looking for an "all-LEGO" solution, you may think about something like this:
http://www.youtube.com/watch?v=12fcCekUF2Y

You could mechanically connect them to the ring, so the ring has areas or gaps that push or release the button on the light to turn it on/off as the ring is actually moving.

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
ggrinton
Posts: 16
Joined: 24 Feb 2012, 12:18

Re: Controlling multiple LEDs individually with NXT question

Post by ggrinton »

You might want to take a look at the Texas Instruments LaunchPad, maybe in combination with the Sensor Building Kit mentioned above. You could program one of the TI chips that come with the LaunchPad and load it onto the Sensor Kit to provide the interfacing to the NXT. I have not done this (yet) but it looks a reasonably straightforward exercise. I got my Launchpad in 6 days to Australia, post paid, so the price is certainly right!
aswin0
Posts: 201
Joined: 29 Sep 2010, 06:58

Re: Controlling multiple LEDs individually with NXT question

Post by aswin0 »

Dexter Industries will start selling dLights in the near future. A dLight is an all color led that you can program to any color. You can daisy chain up to four dLights on a single sensor port. They can be driven individually and groupwise. See my blog for a prototype in action.
A dLight might be too much for your current project. On the other hand, changing colors might give a really cool spaceship.
My blog: nxttime.wordpress.com
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests