Controlling Power Functons LEDs

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: 99jonathan, roger, imaqine

Controlling Power Functons LEDs

Postby Atr » Tue Jan 11, 2011 8:43 pm

I'm trying to control those LEDs and I have found out that PF LEDs are always on (but barely light, approximately 10% power) if NXT is on. I can light them up fully (100% power) using for example SensorPort.S1.setPowerType(1) method, but I can't turn them off fully, only to those 10%.

Is there a way to disable current on a sensor port or something?
Atr
New User
 
Posts: 9
Joined: Sat Oct 11, 2008 8:02 pm
Location: Poland

Postby s.frings » Thu Jan 20, 2011 10:13 am

So your LED's are obviously connected to Pin1 of the sensor port. There is a 10k Ohm Pull-up resistor inside the NXT which prevents you from switching the LED's really off.

You can fix the problem by putting a resistor in parallel to the Led's. I assume, that 6,8k Ohm would work fine.

Or you can use a motor port instead.
s.frings
Active User
 
Posts: 131
Joined: Tue Jul 20, 2010 2:01 pm

Postby Atr » Sun Jan 23, 2011 9:07 pm

Thanks for the info about resistor. I want to use pure Lego in my creations so I'll have to live with those barely lighting LEDs :)
Atr
New User
 
Posts: 9
Joined: Sat Oct 11, 2008 8:02 pm
Location: Poland


Return to NXJ Hardware

Who is online

Users browsing this forum: Google [Bot] and 1 guest

more stuff