Can't convert angular velocity to angular position with an Eowave 2D gyrometer.

Roald Baudoux's icon

Hello,

I have a 2D gyrometer from Eoweve connected to an Eobody 2 and I want to translate the speed into a angular position delta added to a base position.

The sensor is a bit strange because at rest the value sent is not exactly in the center of the range. Hence velocity ranges aren't the same size in both directions.

Therefore, I use peak to find the maximum value, then I capture the value at rest. Then, with two split objects I split the range into three parts :
- lower range: rotation in one direction ;
- center range (more than one value because of the jitter): rest ;
- upper range: rotation in opposite direction.

Afterwards, I scale all the resulting values then I use an accum object to convert velocity into angular position.

The problem: values are drifting. If I rotate the sensor in one direction, then back to its previous position, I don't go back to previous position value.

What's wrong with my patcher ?

Max Patch
Copy patch and select New From Clipboard in Max.

Roald Baudoux

Roald Baudoux's icon

I figured out there was one error in scaling and added a modulo because it's angular position so here is the updated version.

Max Patch
Copy patch and select New From Clipboard in Max.

However my main problem is still not solved.

Tj Shredder's icon

I am not sure if there is anything wrong with your patch.
I would expect, that there is a drift. The method will accumulate any errors out of its principle, there is no absolute measurement of the angle or position...
All technologies I know of would add an absolute sensor, to recalibrate. A wiimote for example can use the infrared sensors to recalibrate...

Stefan

Roald Baudoux's icon

I understand that recalibration is necessary, but in the case of the Wiimote I don't get how an infrared can recalibrate a gyrometer...

Also, how often should recalibration occur ?

Zachary Seldess's icon

I'd recommend a 2D or 3D compass sensor instead of a gyrometer, if you want to eliminate the need for recalibration. I've used the Honeywell HMC6343 in installations, works very well: http://www.sparkfun.com/products/8951

Connect to an Arduino, Xbee for wireless, etc...

best,
Zachary

Tj Shredder's icon

Wow, more than three times the price of a wiimote, and thats just the chip...

Zachary Seldess's icon

Does the Wiimote have a magnetic field sensor now (or maybe it always did)? If so, that's definitely a cheaper option.

Just trying to offering some helpful input. If size is an issue, and if you don't want to deal with recalibration, then you need something like a compass sensor.

Some of the cheaper iThings these days may have compass sensors too, so that could be an option.

best,
Zachary

Tj Shredder's icon

No, it does not have a magnetic field sensor, but it can recalibrate itself with the infrared camera...

Zachary Seldess's icon

Right, so do it that way if you like, and if you don't want to recalibrate, or the form factor doesn't work for you, look for a magnetic field sensor solution that fits your budget...