New IMU Library for Arduino- RTIMULib

Obtaining orientation angles can be a challenge! RTIMULib may make things easier.
Obtaining orientation angles can be a challenge. RTIMULib may make things easier.

My blog traffic shows that a lot of the visitors are looking for information on IMUs (Inertial Measurement Units) like the MPU-6050.  Understanding how to use IMUs and access the data they provide can be daunting.  However, I just came across a new Arduino library for getting IMU data that looks like it will make things simpler.  Written by a company named Richards-Tech, the library is called RTIMULib, and can be found at https://github.com/richards-tech/RTIMULib-Arduino.

What’s incredibly awesome, and more or less unique about this library is that it comes with well-documented sample programs.

Read more

The “Halfway” – A Self-Balancing Scooter

Ready to take the "Halfway" for a test drive. Bike helmet essential for safety.
Ready to test drive the “Halfway”. Bike helmet essential for safety.

This latest project is the longest and most complicated so far.  Over the last several months I’ve been working to put together a Segway-like self-balancing scooter, aka the “Halfway”.  Many people have written up and posted similar projects online.  Google “DIY self balancing scooter” to see some examples.  Other people’s work provided a lot of inspiration and help during the design and execution of the Halfway scooter.  If you’d like to see how it turned out, skip to the end of this blog post for a video of the Halfway in action.

This particular project was appealing to me because it utilized elements from my earlier blog posts, such as obtaining angle data from an IMU and integrating a Wii nunchuck with an Arduino.  I also got to learn some new skills, including welding metal, CAD with Google Sketchup and programming with PID control loops.

Read more

Gyroscopes and Accelerometers on a Chip

 

The interior of a 3-D MEMS Gyroscope Sensor is intricate and tiny (the width of this structure is only about 800 micrometers).
The interior of a 3-D MEMS Gyroscope Sensor is intricate and tiny (this structure is only about 0.08 cm wide).

My last two blog entries discussed demonstrations of gyroscopes and angular momentum conservation at our school’s science fair. One of the demonstrations I put together takes a look at how really small gyroscopic sensors, such as those in many smart phones, video game remotes or quad-copters provide information about their changing orientations. This information can be used as feedback for self-balancing (e.g. a two-wheeled scooter), navigation or as input to other applications like video games.

I didn’t want to sacrifice my smart phone for this experiment. Fortunately, chips containing gyroscopic sensors are relatively cheap. In reading up on gyroscopic chips, I found that orientation data from gyroscope sensors is prone to drift significantly over time, so gyroscopic sensors are frequently combined with additional sensors, such as accelerometers or magnetometers to correct for this effect. This combination of sensors is frequently referred to as an IMU, or “Inertial Measurement Unit”, and it is used in  airplanes, spacecraft, GPS navigators (for use when GPS signals are unavailable) and other devices.  The number of of sensor inputs in an IMU are referred to as “DOF” (Degrees of Freedom), so a chip with a 3-axis gyroscope and a 3-axis accelerometer would be a 6-DOF IMU.

Read more

Fun with Angular Momentum

Demonstrating the conservation of angular momentum with a bicycle wheel and rotating stool.
A young experimenter demonstrating conservation of angular momentum with a bicycle wheel and rotating stool.

Last weekend my children’s school had a science fair which they called “STEAM Day”, for Science, Technology, Engineering, Arts and Math. It turned out to be a engaging and dynamic event, with lots of great demonstrations and activities for the children, ranging from kindergarten to 8th grade.

I volunteered to run an activity demonstrating angular momentum conservation, which was titled “You Spin me Round”. Our primary demonstration used a large gyroscope made from a bicycle wheel with two handles, like this one here. I (and my oldest son, who was my assistant) would spin up the bicycle wheel, and carefully hand it to a child who was sitting on a stool that was free to rotate. We then told the child to tilt the bicycle wheel to the right or the left. They were usually surprised to find that the spinning wheel “resisted” this change, and that they would start to rotate in the direction in which they turned the wheel! One tip I would recommend for anybody else trying this experiment – it was tremendously helpful to have work gloves for use in spinning up the bicycle wheel. After several hours, the palm of my hand was bruised and sore!

The children were too young to understand a detailed explanation of angular momentum conservation using torque and angular momentum vectors, 

Read more