xemoterp
Posts: 4
Joined: Thu Mar 17, 2016 12:57 am

RPI and IMU for automatic leveling of a camper

Fri Feb 16, 2018 8:16 pm

I created two versions of an auto-level control for our 40 foot 5th wheel camper. The idea is to use the Raspberry Pi to detect whether the camper is level or not and to allow the camper to automatically level itself. There are limitations to how I am doing this due to the fact I use a cheap RF keyfob controlled by a relay board to activate the camper's 4 independent leveling feet. I wrote python code and used FLASK to generate the web interface. I also used Javascript to display the UI.

For the hardware, I use GPIO to control one of 4 relays that ultimately connect the keyfob push buttons - this sends the proper signals to the camper's 12VDC leveling control (I have the 12VDC keyfob receiver mounted inside of the camper's manual control box).

The first iteration uses a RPI 2, a RPI Sense Hat (for the IMU and display of level), a usb wifi dongle and a separate portable WiFi access point to provide the user web interface for controlling the auto-leveling of the camper.

Youtube video: https://www.youtube.com/watch?v=vOFq5evArE0

The second iteration uses a RPI Zero W and a tiny IMU to do all of the above. I turn the RPI Zero W into a WiFi access point providing the user web interface on any connected wireless device web browser.

Youtube video: https://www.youtube.com/watch?v=aCiFrJ4rooo

Enjoy!

scotty101
Posts: 2849
Joined: Fri Jun 08, 2012 6:03 pm

Re: RPI and IMU for automatic leveling of a camper

Fri Feb 16, 2018 8:19 pm

Amazing project! Really well executed and brilliant use of a pi. You should be on the cover of the MagPi!
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

xemoterp
Posts: 4
Joined: Thu Mar 17, 2016 12:57 am

Re: RPI and IMU for automatic leveling of a camper

Fri Feb 16, 2018 8:24 pm

Thanks! I have thought about writing an instruct-able with the details of what I did .... just have not taken the time to do it yet.

range4200
Posts: 1
Joined: Mon May 14, 2018 9:54 am

Re: RPI and IMU for automatic leveling of a camper

Mon May 14, 2018 9:58 am

Hi, I found your self leveling system great.
I´m from germany and I will build this for my camper too.

Can you give me mor information about the IMU and your program?

Steve

Return to “Other projects”

Who is online

Users browsing this forum: No registered users and 7 guests