Post your NXJ projects, project ideas, etc here!
Moderators: roger, 99jonathan, imaqine
by pEhrlich » Thu Jun 26, 2008 2:25 am
Hi
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?
--Peter
-

pEhrlich
- Advanced Member
-
- Posts: 157
- Joined: Fri Jan 04, 2008 1:38 am
by lawrie » Thu Jun 26, 2008 9:34 pm
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.
-
lawrie
- leJOS Team Member
-
- Posts: 677
- Joined: Mon Feb 05, 2007 1:27 pm
Return to NXJ Projects
Who is online
Users browsing this forum: No registered users and 0 guests