1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Custom IMU sensor, part 2

Discussion specific to the intelligent brick, sensors, motors, and more.

Custom IMU sensor, part 2

Postby aswin0 » 03 Feb 2011, 14:19

Hi all,

I finished building my IMU sensor and I wanted to share my experience with the sensor. My experiences with building it are in a different post.

To house my sensor I used the (never used) sound sensor. I cut a prototype board so that I could slide it in the ridges that are on the inside of the housing. This keeps my sensor in the right direction. On the board I mounted the IMU and the voltage regulator. I had some trouble to to get the large LDO voltage regulator and the caps in, but in the end it worked. I even found some space to add the blinkM to the sensor. It might well be the most versatile NXT sensor around, it has a temperature sensor, 3 gyros, 3 accelerometers and a all color LED :-). So far the good news.

The accelerometer is quite good, although its resolution is limited to 4mg. The range is -16g to 16g. It has a small offset, too small to be corrected by the sensor itself. Funny (?) thing is the offset changes with the rate I query the sensor.

The gyro has a very small bias, for a lot of implementations one wouldn't need to correct for it (but I do). It doesn't work well with the higher baud rates robotc offers, so I have to query it using 9.6Kb. That is a disappointment and also a bit strange as it supports fast mode I2C.

(Both the accl offset issue and the gyro I2C issue make me think that my power supply needs improvement)

The blinkM is a lot of fun. I can advise it to everyone. It is not hard to connect to the NXT and it appeals to a lot of people, to my kids at least. I had to make a police robot with sirens and flashlights, and so I did. But the blinkM proves itself as a handy debugging tool for dynamic robots as well. To give an example. I wanted to know how fast the gyro drifts in a dynamic environment, not while standing still. I made a program that fires the blinkM bright red when having a specific attitude. I then placed my NXT and the sensor on my Technics turn table. In the beginning the blinkM fired when the NXT was facing straight to me, but I could see it drift away slowly. I didn't dive deeper into this as there is a lot of work to do with my new sensor.

Combining the three different devices into one obviously has an advantage, you need just one sensor port. There are also disadvantages to sharing the sensor port. The first is that the different devices need to share the limited band width (it takes about 20 msec to query bot the gyro and accelerometer). Another thing is that you need to write one routine to query both. I started out with separate routines for each of the sensors but I found out that the routines collided around the sensor port, this might be robotC specific though.

All in all. I'm rather content but I think there is still some room for improvement.

foto.JPG
foto.JPG (50.56 KiB) Viewed 102 times
Last edited by aswin0 on 03 Feb 2011, 21:52, edited 1 time in total.
My blog: nxttime.wordpress.com
User avatar
aswin0
 
Posts: 201
Joined: 29 Sep 2010, 06:58

Re: Custo IMU sensor, part 2

Postby gloomyandy » 03 Feb 2011, 14:44

Hi Aswin,
Is the temperature sensor mounted as part of one of the other sensors? It would be interesting to compare drift/bias against temperature of the device. It may be that your correlation with the rate you sample things is actually caused by a temperature rise (rather than power supply issue). So can you remember what it was you wanted to do when you started along this long road! All sounds like good fun though...

Andy
User avatar
gloomyandy
 
Posts: 320
Joined: 29 Sep 2010, 05:03

Re: Custo IMU sensor, part 2

Postby aswin0 » 03 Feb 2011, 15:18

Yes, the temperature sensor is part of the gyro. Not of the accelerometer that has the correlation between sample rate and bias. The rise in bias is instantly so I don't think it is temperature correlated.

Yes, I do know what was the purpose of the sensor in the start. It is to make a balancing robot. One that can balance on top of a ball. It needs to balance in two dimensions, that is why I needed the 3d sensor. But as always the math proves to be more difficult than I anticipated. I need to translate angular rate of the robot to angular rate in a fixed frame (world coordinates) to be able to calculate it's attitude. When the robot is tilted the two are not the same.
My blog: nxttime.wordpress.com
User avatar
aswin0
 
Posts: 201
Joined: 29 Sep 2010, 06:58

Re: Custo IMU sensor, part 2

Postby mattallen37 » 03 Feb 2011, 21:03

Wow, great job. I am glad you got this thing working finally, and it looks really good. Thanks for posting the results.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
User avatar
mattallen37
 
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA

Re: Custom IMU sensor, part 2

Postby aswin0 » 25 Feb 2011, 09:50

The sensor at work


My blog: nxttime.wordpress.com
User avatar
aswin0
 
Posts: 201
Joined: 29 Sep 2010, 06:58


Return to Mindstorms Hardware

Who is online

Users browsing this forum: No registered users and 1 guest