New from HiTechnic: Angle and Magnetic Sensors
Posted: 29 Sep 2010, 05:01
First of all... hooray to John, Steve, Brian, and Xander for getting this forum started. Way to go, guys!
Secondly, full disclosure, I work for HiTechnic but I am posting here not so much to promote our products but rather to give some inside and technical information as a service to the readers of this forum.
HiTechnic has recently released two new sensors that I think will be interesting to many of you. One is the Angle sensor, which was the topic of some discussion a few months ago, and the other is the Magnetic Sensor.
The Angle sensor has very low friction and is a big improvement over using an NXT motor just as an encoder. Unlike the motor, there is no gear slop (there are no gears!) and very precise degree resolution. If you move the sensor one degree, it will register one degree of movement. The sensor gives you three pieces of data, angle (0-359 in degrees), accumulated angle (signed 32 bit value, also in degrees), and RPM (basically a signed angular velocity value in rotations per minute).
One feature that I think you guys will like is that the zero position of the angle can be calibrated and the zero position is actually burned into EEPROM memory of the sensor. That means if you power-cycle the sensor it will still know its 0-359 degree position. You won't have to worry about manually setting the start position or going through some initial calibration code which is what I usually end up doing with my creations.
The other sensor is the Magnetic sensor. This is actually a fairly simple sensor that I think has the potential for some interesting uses. It is basically a single axis magnetometer. When exposed to a magnetic field so that the magnetic field lines from north pole to south pole pass through the sensor vertically top to bottom, then you will get a positive value. If you reverse the magnetic field you get a negative value. If the magnetic field lines pass through the sensor at an angle then you will get a value that corresponds to the vertical component of the angle through the sensor. That means you can actually put a magnet right up to the sensor and get a zero value because the field lines are perpendicular to the sensor.
The obvious use of this sensor is for finding hidden magnets. I think some interesting things to try here are to place the magnets in different orientations to get more information. Another use I think would be interesting is to use it as a non-contact encoder. For example you can place a magnet on a rotating wheel and detect when it passes the sensor. Another possibility is to mount a magnet to movable arm and then locating the Magnetic sensor such that its value changes in proportion to the movement of the arm. With some experimenting you should be able create a no-contact encoder that gives a fairly high resolution value corresponding to the angle.
BTW, the Magnetic sensor is an analog sensor and is similar to programming the Gyro sensor. In order to get an accurate zero value an offset needs to be determined which is then used to bias the value.
So what will you use these for? I would love to hear some ideas.
You can get more information, as well as NXC sample code, from the product pages on http://www.hitechnic.com.
Gus
Secondly, full disclosure, I work for HiTechnic but I am posting here not so much to promote our products but rather to give some inside and technical information as a service to the readers of this forum.
HiTechnic has recently released two new sensors that I think will be interesting to many of you. One is the Angle sensor, which was the topic of some discussion a few months ago, and the other is the Magnetic Sensor.
The Angle sensor has very low friction and is a big improvement over using an NXT motor just as an encoder. Unlike the motor, there is no gear slop (there are no gears!) and very precise degree resolution. If you move the sensor one degree, it will register one degree of movement. The sensor gives you three pieces of data, angle (0-359 in degrees), accumulated angle (signed 32 bit value, also in degrees), and RPM (basically a signed angular velocity value in rotations per minute).
One feature that I think you guys will like is that the zero position of the angle can be calibrated and the zero position is actually burned into EEPROM memory of the sensor. That means if you power-cycle the sensor it will still know its 0-359 degree position. You won't have to worry about manually setting the start position or going through some initial calibration code which is what I usually end up doing with my creations.
The other sensor is the Magnetic sensor. This is actually a fairly simple sensor that I think has the potential for some interesting uses. It is basically a single axis magnetometer. When exposed to a magnetic field so that the magnetic field lines from north pole to south pole pass through the sensor vertically top to bottom, then you will get a positive value. If you reverse the magnetic field you get a negative value. If the magnetic field lines pass through the sensor at an angle then you will get a value that corresponds to the vertical component of the angle through the sensor. That means you can actually put a magnet right up to the sensor and get a zero value because the field lines are perpendicular to the sensor.
The obvious use of this sensor is for finding hidden magnets. I think some interesting things to try here are to place the magnets in different orientations to get more information. Another use I think would be interesting is to use it as a non-contact encoder. For example you can place a magnet on a rotating wheel and detect when it passes the sensor. Another possibility is to mount a magnet to movable arm and then locating the Magnetic sensor such that its value changes in proportion to the movement of the arm. With some experimenting you should be able create a no-contact encoder that gives a fairly high resolution value corresponding to the angle.
BTW, the Magnetic sensor is an analog sensor and is similar to programming the Gyro sensor. In order to get an accurate zero value an offset needs to be determined which is then used to bias the value.
So what will you use these for? I would love to hear some ideas.
You can get more information, as well as NXC sample code, from the product pages on http://www.hitechnic.com.
Gus