Create an Inclinometer Using a Raspberry Pi

The latest gizmo that you can make using the cheap and easy Raspberry Pi is here courtesy of [Mark Williams]. He has hooked up an inertial measurement unit (IMU) to the Pi and built an inclinometer to use to measure the various angles of an off-road vehicle.

This particular guide goes through the setup of SDL to control the video output to a small screen. Then, a function is created to rotate the images based on input from the IMU so that the vehicle position can be shown graphically on the screen. Now, when your truck is about to roll over on a hill, you’ll get advance warning!

Of course, this whole project is predicated on installing the IMU and getting it up and running on the Raspberry Pi in the first place. [Mark] has you covered on a guide for setting that up as well. This delves into setting up the IMU over I2C to get it talking to the Raspberry Pi, and then converting the raw data from the IMU into data that is more usable. Be sure to check out [Mark]’s page for all of the code and details!

11 thoughts on “Create an Inclinometer Using a Raspberry Pi

    1. When your offroading in conditions where you need to consider inclination, your typically moving so slowly (1-3km/h) that you wont need to. This is for intermediate – high level stuff, not typically for a family on vacation.

    1. I know you can get a Bluetooth ODB-II adaptor, and the software for a PC or smartphone to use the adaptor to read the CAN bus for speed, engine RPM, and other sensors. Is the accelerometer data as easy to find and read as the speed and RPM data?
      For (older) vehicles which do not have a CAN bus, this project would work great.

    2. Not unless the ECM is already letting them out. My Jeep did not have any of that data on the CANBUS and my BMW X3 does not either. I tried polling every single PID including undocumented ones and no information was close to accelerometer data on either of those vehicles.

    3. In fairness Accelerometers are cheap as chips these days. Even if the car does have one it is going to save you $15-40? depending on the range of features you want with your accelerometer. Plus since it isn’t dependent on anything specific to the original hardware makeup of the car, the project is much better suited for other applications.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s