Page 1 of 1

using potentiometers in a circuit with the NXT

Posted: 20 Oct 2010, 16:26
by finneykris
if i made a circuit which has 2 lego PF bulb bricks and 2 PF switches in parallel and had a potentiometer controlling the resistance how would i wire it all up, i don't think lego make a T cable where they's a cable which comes off of another cable in a T configuration.
all i know is that they's either the NXT RJ12 male and female or 4 stud male and female connections as far as lego is concerned
also can the NXT control the resistance using its oscillator or amp

if not bulbs ,resistors and LED's

also where would GND or - be plugged into?

Re: using potentiometers in a circuit with the NXT

Posted: 20 Oct 2010, 17:04
by mattallen37
Please give more details about what you are trying to do. Are you wanting to have two sets of lego PF lights in parallel, and be able to control the brightness manually? How do you want it powered?

Re: using potentiometers in a circuit with the NXT

Posted: 20 Oct 2010, 17:18
by finneykris
mattallen37 wrote:Please give more details about what you are trying to do. Are you wanting to have two sets of lego PF lights in parallel, and be able to control the brightness manually? How do you want it powered?
i would probably power it using the NXT battery and i want to control the resistance using the pot

Re: using potentiometers in a circuit with the NXT

Posted: 20 Oct 2010, 17:33
by mattallen37
Does the brightness need to be manually, externally adjustable? Could you just connect the lights to a motor port, and use PWM for the brightness control?

Edit: actually, if you have an open motor port, could you just have the PWM controlled by an analog sensor on a sensor port, in this case a potentiometer? This would only require that you cut one NXT cable to connect the POT, and the rest of the connections, you could use adapters for.

Re: using potentiometers in a circuit with the NXT

Posted: 20 Oct 2010, 17:44
by finneykris
ok i might not use a potentiometer and i don't want to cut a lego cable

the higher the resistance the higher the voltage

Re: using potentiometers in a circuit with the NXT

Posted: 20 Oct 2010, 18:36
by mattallen37
If you're not willing to cut a cable, how then did you expect to build this in the first place?

Once you decide that cutting a cable worth $1.43 is okay, then wire a potentiometer between pin 1 and pins 2+3. Plug the cable into a SENSOR port. You probably want a POT that is at least 10K. Read the RAW value (1023-0) in the program, and base the PWM (0-100) on that value. Depending on the desired application, you may need to invert the values. Connect the PF lights as you would normally (to a MOTOR port).

Re: using potentiometers in a circuit with the NXT

Posted: 20 Oct 2010, 18:42
by finneykris
im just going to plug the lights straight into the 2 ports and change the pwm's

Re: using potentiometers in a circuit with the NXT

Posted: 20 Oct 2010, 19:26
by mattallen37
Why not use one port? Do you need it to be a differential?

Re: using potentiometers in a circuit with the NXT

Posted: 23 Oct 2010, 16:12
by finneykris
differential

Re: using potentiometers in a circuit with the NXT

Posted: 26 Oct 2010, 22:49
by fuzzball27
Cutting cables only gives more possibilities. :ugeek: