Hello,
I need your help to find out how to tackle this idea I have. Currently for my recent project I have one free motor port.
And I have: - 1 Computer fan (Spins with the power of 3 AA Batteries)
- 2 normal LED's
- 1 red LED
- 1 green LED
So my idea: connecting the components above to my NXT with 1 port. So yes, I guess I'll be able to calculate the right Power output and needed resistors for the LED's. Yet here is my concern:
What happens when the power level of the NXT drops? I know the Servo motors turn slower yet will the LED's still light up and the fan still turn when the minimum power supply are 3 AA batteries?
Another question would be if I could put a wait period between every light up of the individual LEDs? Should be possible but what components would I require?
If you familiar with this, could you please tell me how you would work this out (since this is my first time developing an external device for my NXT).
Thank you. I would want the fan to turn at a constant speed and at the same time having the LEDs flash in a certain sequence (if this is possible - requiring a certain component that I am unfamiliar with). Would these resistors work if I have a 100% power output (75%,50%) - outputting the same results?
You might have to use a relay on the NXT motor port to switch all this on using an external battery to avoid drawing too much power from the NXT port.
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.
So you just want the fan to run with one speed? You just want On/Off control over it?
You could use a 555 and 4017 to control up to 10 LEDs in sequence (no need for the NXT).
I think what you want is a PCF8574 though. It has 8 GPIO's that you could use to control LEDs, motors, or whatever else. The NXT uses the I2C interface of the sensor port to communicate with it. You could have program control of the LEDs that way. It is a great IC. You can do all the timing and whatnot with the NXT program (instead of analog/logic circuits). Mindsensors sells a decent looking PCF8574 kit. I don't have it, but it looks really good. I just use the IC's themselves, on breadboards.
If you want to get even more advanced than just circuits, you could get into PICAXE's (basic programmable ICs). They can do some pretty nifty stuff with the NXT.
mattallen37 wrote:If you want to get even more advanced than just circuits, you could get into PICAXE's (basic programmable ICs). They can do some pretty nifty stuff with the NXT.
Yup, me and Matt are on a mission to rule the world with a NXT brick and a handful of Picaxe microcontrollers. So far we haven't even needed muntoo's help!
Seriously now, you could probably set something up using just a couple of diodes and a NXT cable cut in half. Use the information on this page. You could run the fan and switch the LEDs on and off with the setup mentioned. Or, like Matt says, you could buy a PCF8574 to get individual LED control, as well as motor control.
One King to rule them all, One King to find them,
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.