Page 1 of 1
Controlling multiple LEDs individually with NXT question
Posted: 11 May 2012, 00:50
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?
Re: Controlling multiple LEDs individually with NXT question
Posted: 11 May 2012, 00:53
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?
Re: Controlling multiple LEDs individually with NXT question
Posted: 11 May 2012, 01:18
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
Re: Controlling multiple LEDs individually with NXT question
Posted: 11 May 2012, 01:49
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).
Re: Controlling multiple LEDs individually with NXT question
Posted: 11 May 2012, 02:51
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.
Re: Controlling multiple LEDs individually with NXT question
Posted: 11 May 2012, 03:00
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?
Re: Controlling multiple LEDs individually with NXT question
Posted: 11 May 2012, 07:41
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.
Re: Controlling multiple LEDs individually with NXT question
Posted: 11 May 2012, 13:02
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
Re: Controlling multiple LEDs individually with NXT question
Posted: 15 May 2012, 13:02
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!
Re: Controlling multiple LEDs individually with NXT question
Posted: 16 May 2012, 08:43
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.