New from HiTechnic: Angle and Magnetic Sensors

Discussion specific to the intelligent brick, sensors, motors, and more.
gusjansson
Posts: 18
Joined: 28 Sep 2010, 23:57

New from HiTechnic: Angle and Magnetic Sensors

Post by gusjansson »

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
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: New from HiTechnic: Angle and Magnetic Sensors

Post by mightor »

I had no idea the HT Angle sensor was out yet! I have the driver ready for it but left it out of the current version of the suite. I will create a 1.7 version of this suite later today.

Regards,
Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
linmix
Posts: 19
Joined: 29 Sep 2010, 09:17

Re: New from HiTechnic: Angle and Magnetic Sensors

Post by linmix »

It occurs to me that you could use the magnetic sensor as a rotation sensor without physical connection.

You might also use it to help a robot dock more precisely when other references (like colour) are difficult to implement.
sqiddster
Posts: 25
Joined: 29 Sep 2010, 10:17

Re: New from HiTechnic: Angle and Magnetic Sensors

Post by sqiddster »

Does this 'angle sensor' function essentially the same as a rotation sensor? Can it rotate more than 360 degrees?
Personally, I think that the standard NXT sensor form here doesn't do it for me, much like the touch sensor. Are you guys even allowed to use a different casing? (an 'axle through' design would be nice :D )

Thanks, sqiddster
Keep on brickin'
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

Re: New from HiTechnic: Angle and Magnetic Sensors

Post by schodet »

I also find the angle sensor package not very easy to use. It would be easier if axle hole was aligned with montage holes. Power functions mounting are really good for example.

On pictures, it looks like the axle hole is not aligned on the sensor center is it right?

Do you use an optic or magnetic encoder?
nxtreme
Posts: 246
Joined: 29 Sep 2010, 03:53
Location: 192.168.1.2

Re: New from HiTechnic: Angle and Magnetic Sensors

Post by nxtreme »

sqiddster wrote:Does this 'angle sensor' function essentially the same as a rotation sensor? Can it rotate more than 360 degrees?
Yes, it is made to rotate continually, otherwise the RPM feature would be rather lame :) and not useful at all. It does function pretty much the same as the sensor in the NXT motors, just has more options. I had a question about the EEPROM position storage feature. Since the sensor has continuous rotation its not like there's a potentiometer in there, just a encoder of sorts. So, if the axle gets turned while the sensor is not powered will it lose its position or something like that? Just wondering.
One King to rule them all, One King to find them,
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
gusjansson
Posts: 18
Joined: 28 Sep 2010, 23:57

Re: New from HiTechnic: Angle and Magnetic Sensors

Post by gusjansson »

The sensor packaging is really not bad or difficult to work with. The axle hole is centered on the end cap which is exactly two units higher than the level of mounting holes on the bottom of the sensor.

Here is one simple way to get mounting holes lined up with the input axle:
Sample mounting of Angle Sensor
Sample mounting of Angle Sensor
AngleSensorMount.jpg (22.9 KiB) Viewed 24627 times
I understand the desire for a through hole but that would not work given the internal design of the sensor without adding significant cost to the design and production. The sensor uses, to answer another question, a magnetic encoder. The magnet portion of the encoder is mounted directly on the end of the axle shaft, deep within the sensor. A through hole design would not work with this encoder unless a complicated gearing mechanism was used. Something like that would add cost and potential for gear slop.

Regarding the calibrated zero position, what gets saved in EEPROM is the position of the encoder that is defined as zero. Once calibrated, the zero position of the axle will be in the same place even if you turn the axle when it is not powered. So there is no problem turning the axle and somehow loosing the calibration. In other words, if the Angle sensor is currently giving you 90 degrees, you turn it off (unplug it even) turn it 10 more degrees, turn it back on, and you will get 100 degrees from the sensor.

It is actually very interesting how this encoder works. The axle shaft basically has a magnet at the end. The sensor element, positioned just beyond the end of the shaft, is a two axis magnetometer. The angle of the magnet gets split into two component vectors and then the sensor performs essentially an atan2 function to calculate the angle.

One additional note regarding the use of a magnetic encoder... if you are also using a Compass sensor, make sure it is mounted well away from the Angle sensor... otherwise you more likely to pick up the position of the axle then the angle to the North pole.

Hope this answers the questions posted so far.

Gus
Last edited by gusjansson on 29 Sep 2010, 17:17, edited 1 time in total.
doc222
Posts: 117
Joined: 29 Sep 2010, 03:02
Contact:

Re: New from HiTechnic: Angle and Magnetic Sensors

Post by doc222 »

What is the Max. rpm it is able to handle?

Looks nice as well, the ability to have the axle through would have beeen nice but as you state its not that hard to "hang it" under the axle and gear too and if it keeps the cost down that is a HUGE pluss.

Doc
"Anyone who has never made a mistake has never tried anything new."
Albert Einstein
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: New from HiTechnic: Angle and Magnetic Sensors

Post by HaWe »

yes, an "axle through" design (like the old rcx rotation sensor) would have been much easier to use.
(plus some extra mounting holes around the input hole in the middle....)
gusjansson
Posts: 18
Joined: 28 Sep 2010, 23:57

Re: New from HiTechnic: Angle and Magnetic Sensors

Post by gusjansson »

What is the Max. rpm it is able to handle?
Officially the RPM range is -1000 to 1000 RPM though I have tested this well beyond that range. Gearing it up a couple of times I was able to get RPM readings beyond 6000RPM without any reason to suspect that it is not accurate.

Note: HiTechnic does not warrant this device for rotations beyond 1000 RPM. Rotating the axle shaft beyond 1000 RPM may damage the delicate bearing surfaces since these are all plastic against plastic parts. If you have a high rpm axle that needs to be monitored then you should gear it down to a suitable rotation rate before connecting to the sensor.

Gus
Last edited by gusjansson on 30 Sep 2010, 21:55, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests