SHOP FOR
Lego Mindstorms NXT Angle Sensor

Description of product

Description

Measure axle rotation position and rotation speed with the HiTechnic Angle Sensor. The Angle Sensor enables you to measure three rotation
properties
Absolute Angle – the rotation position of a rotating axle from 0 – 359 degrees with 1 degree accuracy
Accumulated angle - the accumulated number of degrees an axle has rotated
Rotation Speed - the speed of the axle rotation in RPM (revolutions per minute)
With its very low friction mechanism, the HiTechnic Angle Sensor is ideal for building models where accurate measurement of rotation properties of an axle is key. Perfect for building a distance measuring wheel or a weather station wind vane.
 
The HiTechnic Angle Sensor connects to a standard LEGO Technic cross axle and measures three rotation propertied of an axle. These are
  • Absolute Angle: the rotation angle of an axle from 0 degrees to 359 degrees, accurate to 1 degree.
  • Accumulated Angle: the accumulated multiple rotation angle measured since the last reset function was performed.
  • Revolutions per Minute (RPM): the current estimate of rotation rate from 1 RPM up to 1,000 RPM.
  • The Angle sensor is ideal for building into complex models where monitoring the shaft angle or location and / or the speed of rotation is desired.
Programming
 
Mindstorms NXT-G
 
Angle Sensor Block
 
Image of block
 
Image of block
 
This block measures three rotation propertied of an axle. These are
 
  • Absolute Angle: the rotation angle of an axle from 0 degrees to 359 degrees.
  • Accumulated Angle: the accumulated multiple rotation angle measured since the last reset function was performed.
  • Revolutions per Minute (RPM): the current estimate of rotation rate from 1 RPM up to 1,000 RPM.
  • Using data wires, it can send out the current angle of rotation and a logic signal (true/false) based on whether the current heading falls inside or outside a trigger range.
 
A trigger range consists of upper and lower limit values in a range of numbers where a change in the reading results in the condition of being either inside or outside the range. For example, you might program your robot to rotate an axle to a set position so you could set the trigger range to be from 179 to 182. As long as your robot rotates the axel to a point between these two numbers, the condition will be true.
 
Specify the trigger points by using the slider or by typing the values into the input boxes. To specify the portion of the axle angle range (inside or outside the trigger range) that will generate the “true” signal, use the pull-down menu. The “true” portion of the range will be in color; the “false” portion will be gray.
 
The default setting for the Angle sensor block is for angles that are greater than 90 degrees and less than 270 degrees to generate a “true” signal. The compare function above the range allows you to switch the “true” portion of the range to be either inside or outside the range selected.
 
You must drag at least one output data wire from this block's data hub to another block for any information to be sent.
 
Display Settings
 
Image of block
 
Image of block
 
  1. The number shows which of your NXT's ports are connected to the Angle sensor. You can change this number in the configuration panel if you need to.
  2. The block's data hub will open automatically when the block is placed in the work area. At least one data wire must be dragged from the block's output plug to another block's data hub. The trigger range and other features can be set dynamically by connecting an input data wire. (See the Data Hub section below for more information.)

Configuring the Angle Sensor Block

Image of configuration panel

 

Image of configuration panel

The sensor may be connected directly to an NXT sensor port or via the HiTechnic Sensor Multiplexer (MUX). When configuring the sensor via the multiplexer, there are two port selections to make. The first is the NXT to MUX connection and the second, the MUX to SENSOR connection.

Connecting Directly to the NXT
 
When connecting the sensor directly to the NXT, choose the port the sensor is connected to.
 
 
Connecting via the HiTechnic Sensor Multiplexer
 
To connect the sensor via the multiplexer, click the right arrow symbol  to display the port options.
 
 
 
Click the check box to select that the sensor will be connected vial the MUX. Configure the MUX to Sensor connection by selecting the MUX port (1 - 4) that is connected to the sensor.
 
Click on the right arrow symbol again,  to display the NXT to MUX port selection.
 
 
Select the NXT port that is connected to the Sensor Multiplexer.
 
Configuring Action and Compare
 
Select Read to read the output values from the sensor.
 
Select Calibrate to set the current axle position to the 0 degree position.
 
Select Reset to reset the accumulated count to 0.
 
If you choose the Compare function Inside Range above the slider, the block will be triggered when the angle is between the two trigger values; select Outside Range to trigger the block when the heading is outside the two trigger values. Use the slider to set the trigger values or type them directly into the input boxes (0–359).
 
Angle Sensor block Data Hub plugs
 
Image of block
 
You must click on the Data Hub to open it as shown.
 
Image of block
 
  1. This plug wires the number for which of your NXT's ports are connected to the compass sensor.
  2. This plug wires the Angle output.
  3. This plug wires the RPM output.
  4. This plug wires the Accumulated angle output.
  5. This plug wires the Action input, 0 = Read, 1 = Calibrate, 2 = Reset.
  6. This plug wires the Range selection for inside/outside range function, 0 = Inside Range, 1 = Outside Range.
  7. This plug wires the lower range limit number for the Inside/Outside compare function.
  8. This plug wires the upper range limit number for the Inside/Outside compare function.
  9. This plug outputs the Inside/Outside logical value.
  10. This plug is set to true if the sensor is connected via the HiTechnic sensor multiplexer.
  11. this plug wires the number of the multiplexer port connected to the sensor .