Post your NXJ projects, project ideas, etc here!
Moderators: 99jonathan, roger, imaqine
I'm planning to make a Lego dynamometer for testing the utility of various methods of lego propulsion. For this a volt meter would be handy. How easy would it be, from a hardware and software perspective, to detect the voltage and/or current across two wires on a sensor port?
- Advanced Member
- Posts: 158
- Joined: Fri Jan 04, 2008 1:38 am
The book "Extreme NXT" explains how to construct a voltage sensor. You connect a 10k resistor to Pin 1 and measure the voltage between the other end of the resistor and Pin 2. Pin 1 is the white wire and Pin 2 the black on a standard NXT connector wire. This measures voltages between -5 and +5 volts. You can read the voltage using the SensorPort readRawValue method. A value of 0 is -5v and 1024 is +5v.
You can construct a volt meter that measures between -15 and +15v with a 15k and a 30k resistor.
- leJOS Team Member
- Posts: 909
- Joined: Mon Feb 05, 2007 1:27 pm
Return to NXJ Projects
Who is online
Users browsing this forum: No registered users and 1 guest