Skip to the content
2 layers76.2 × 96.5 mmTeensy RV Leveling Helper v2, the printed circuit board in 3D

Teensy RV Leveling Helper v2

mjculross/Teensy-RV-Leveling-Helper21

RV LEveling Helper using Teensy 4.0 + BMA400 Triple Axis Accelerometer Breakout + ILI9341 Color 320x240 TFT Touchscreen display

Size
76.2 × 96.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
21
Nets
64
Pads
121
Tracks, vias
153, 0
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
23 Oct 2023
Updated
30 Jul 2024

Overview

Teensy RV Leveling Helper v2 is an open-source printed circuit board by mjculross, from the mjculross/Teensy-RV-Leveling-Helper repository on GitHub, published under the MIT licence. It is a 2-layer board of 76.2 × 96.5 mm with 21 parts on 64 nets, routed with 153 tracks and 0 vias.

It is built around the BMA400. Its parts include 5 resistors, 4 ICs, 2 transistors and 2 connectors. It belongs with the NXP (LPC, Kinetis, i.MX RT) boards of this library.

Main components

1

README

README.md

Teensy-RV-Leveling-Helper

Teensy RV Leveling Helper using Teensy 4.0 + BMA400 Triple Axis Accelerometer Breakout + ILI9341 Color 320x240 TFT Touchscreen display + NRF24L01 radio

TRLH - RV mode main screen

This project came about after we acquired a used RV motorhome & I quickly grew tired of the following process of attempting to level the RV:

  1. park the RV on a particular site
  2. look at the bubble level on the kitchen counter to determine "level or not"
  3. make/revise my best guess as to how many blocks are required on each wheel to attain "level"
  4. drive the RV up on the best guess number of blocks
  5. if the RV is "level", then you're DONE !!
  6. if the RV is not yet "level", then drive the RV down off of the best guess number of blocks
  7. goto 3) above & repeat several times (until either we're close enough, or I get fed up, whichever comes first)

Using the TRLH makes this process much more convenient & quick as follows:

  1. park your RV where you want it to ultimately rest for the duration of your stay
  2. apply power to the inside TRLH & place it on the kitchen counter inside the RV (which provides a non-moving reference plane for the entire RV)
  3. if you are using a second TRLH as a remote display, apply power to the remote TRLH (the two units will establish sync over the radio & the remote unit will ignore its own accelerometer data, and will instead perform all leveling calculations using the accelerometer data received from the inside TRLH over the NRF24L01 radio - NOTE: if you're not using the remote TRLH, the inside TRLH will still operate as a single unit)
  4. take note of the leveling solution displayed (indicating results of calculating how many inches to raise any of the wheels in order to bring the RV to a perfectly level position)
  5. back the RV away sufficiently to leave room to put the ramps into place
  6. build and place the required ramps (using 1" blocks) to raise the wheels as indicated
  7. drive the RV up onto the newly built leveling ramps
  8. verify that the TRLH now shows 0" for each wheel - LEVELING SUCCESS !! (Note that anything within 1" of level is sufficient for the comfort of the occupants, as well as for the equipment, primarily the refrigerator)
  9. sit back & enjoy a cold drink of your choice

This project incorporates the following:

HARDWARE:

text
  Teensy 4.0
     available from PJRC.com https://www.pjrc.com/teensy-4-0/

  ILI9341 Color 320x240 TFT Touchscreen display
     available from PJRC.com https://www.pjrc.com/store/display_ili9341_touch.html

  HiLetgo NRF24L01+ Wireless Transceiver Module 2.4GHz
     available from https://www.amazon.com/gp/product/B00LX47OCY

  BMA400 Triple Axis Accelerometer Breakout
     available from Sparkfun https://www.sparkfun.com/products/21208

  PowerBoost 1000 Charger - Rechargeable 5V Lipo USB Boost @ 1A - 1000C
     available from Adafruit https://www.adafruit.com/product/2465
     
  Lithium Ion Polymer Battery - 3.7v 2500mAh
     available from Adafruit https://www.adafruit.com/product/328

This project uses touchscreen input & color display to create a visual (graphical) indication of how many inches of leveling blocks are required to be put under each wheel of an RV to level it

This project uses the ILI9341_t3 library, which has been optimized for use with the Teensy TFT display, as well as the XPT2046_Touchscreen.h touchscreen library for that same display

This project (optionally) uses the NRF24L01 wireless transceiver module to allow two TRLH units to communicate, using one as the inside unit taking measurements, and the other as a remote display

This project specifically uses the SparkFun BMA400 support library (SparkFun_BMA400_Arduino_Library.h) which can be added using the Arduino IDE library manager.

This project allows & stores configurable wheel base (front to back wheels distance) from 60" to 255".

This project allows & stores configurable wheel distance (front wheels, left to right distance) from 60" to 84".

Internet reference (with equation derivation) for transforming accelerometer x,y,z vector data into pitch & roll angles:

text
  https://mwrona.com/posts/accel-roll-pitch/

The specific DPDT switch that I use for power control (& for which the 3D printed case is designed) is the Carling Technologies 62115929-0-0-V, available from digikey as part number 432-1252-ND (https://www.digikey.com/en/products/detail/carling-technologies/62115929-0-0-V/3025077).

An Adafruit microUSB panel mount extension cable Product ID 3258 (https://www.adafruit.com/product/3258) is mounted on the side wall of the case. The cable is split such that the USB 5VDC line connects to the USB input pin on the Adafruit PowerBoost 1000C to provide power & battery charging, while the remaining GROUND, D-, & D+ signals connect to the microUSB connector on the Teensy to allow (re)programming without opening the case.

This project implements the following:

text
  1) read the XYZ vector from the BMA400 triple axis accelerometer breakout
  2) use the XYZ vector to calculate PITCH and ROLL values for the current plane of the RV/trailer orientation
  3) use the calculated PITCH and ROLL values to determine the highest wheel/point (which will not require any blocks)
  4) use the calculated PITCH and ROLL values to determine the number of inches of blocks required for the remaining wheels/points to achieve "level"
  5) update the display with the current results once per second (& average all values otherwise)
  6) repeat

UPDATE NOTES for version 1.6 dated 07/20/2024 @0635:

Updated TRAILER MODE such that is now indicates LOWER or RAISE values up to 24" for the hitch, and RAISE values up to 12" for the wheels.

UPDATE NOTES for version 1.4 dated 04/05/2024 @1335:

Now, two units can be used & they talk to each other using NRF24L01 wireless modules. The first unit powered on will assume that it is the "INSIDE" unit (which is actually reading its onboard BMA400 accelerometer & displaying the leveling recommendations from the calculated pitch & roll). The second unit will assume that it is the "OUTSIDE" unit (which is ignoring its onboard BMA400, and is instead displaying the leveling recommendations calculated using the pitch & roll data received over the NRF24L01 wireless link from the "INSIDE" unit). This way, leveling can be achieved without the need for running back & forth between inside (to look at the Teensy-RV-Leveling-Helper) & outside (to make adjustments). Any unit can also be used by itself...it does not have to have a partner to work. The latest firmware also automatically detects the lack of the NRF24L01 module & operates successfully without the radio as a standalone unit.

EASTER EGG: If you hold down on the battery status display box for 5-seconds, the unit will change from RV LEVELING MODE to LED COLOR CONTROLLER MODE. In this mode, with a WS2812B LED strip powered from the 5VDC supply & common ground with the Teensy, tie the data line to PIN 8 & the RV Leveling Helper can also be used to create custom LED patterns, with the ability to control the mode (MARQUIS, CYCLE, FADE, CROSSFADE, ZIPPER, & RANDOM), the brightness, the radio power level (for using another unit as a remote control), the radio channel (to put the LED COLOR CONTROLLER MODE on a different radio channel from the RV LEVELING MODE to minimize interference between them). Up to ten different custom patterns can be stored in EEPROM for quick recall. Each pattern can be from two to thirty-two LEDs in length. Each LED can be set to any of over sixteen million colors. You can also customize the speed for each pattern individually, as well as the direction of movement (FORWARD / REVERSE). An RV Leveling Helper which is being operated in LED COLOR CONTROLLER MODE need not have the TFT Color Touchscreen installed/connected. By shorting PIN 10 on the Teensy to ground, an RV Leveling Helper unit can be forced into LED COLOR CONTROLLER MODE (specifically for the case where you have an RV Leveling helper unit that does not have a display connected by which to change between the two modes, essentially making it a dedicated, stand-alone LED COLOR CONTROLLER). For the RV Leveling Helper with a TFT Color Touchscreen installed/connected and operting in the LED COLOR CONTROLLER MODE, holding down on the battery display box for 5-seconds will change it back to RV LEVELING MODE. So, you now have two-controllers-in-one with this new capability.

RV LEVELING CONTROLLER OPERATIONAL MODE:

This project can be switched between the following primary modes of operation:

  • RV mode (four points of balance/leveling = four wheels)
  • Trailer mode (three points of balance/leveling = two wheels and the hitch)
  • Bubble mode (traditional 2-D bubble level)

MECHANICAL ASSEMBLY & CALIBRATION:

For information on mechanical assembly and/or calibration, see the "readme" file in the "photos" folder.

ORDERING INFO:

The compact PCB is available from OshPark here: https://oshpark.com/projects/CN9rpz97/order

CONTACT INFO:

If you have any questions, suggestions for improvement, and most especially any bug reports, please contact me at kd5rxt@arrl.net

Parts

21
QtyValueFootprintReferences
22K2Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR4, R5
11MResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR1
122KResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR3
12N3904Package_TO_SOT_THT:TO-92_InlineQ1
12N3906Package_TO_SOT_THT:TO-92_InlineQ2
1470KResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR2
1BATT-aMountingHole:MountingHole_2.7mmH1
1BATT-bMountingHole:MountingHole_2.7mmH2
1BATT-cMountingHole:MountingHole_2.7mmH3
1BATT-dMountingHole:MountingHole_2.7mmH4
1BMA400MJC:BMA400U3
1DISABLE SWConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2
1PCB-aMountingHole:MountingHole_2.7mm_M2.5_Pad_TopBottomH5
1PCB-bMountingHole:MountingHole_2.7mm_M2.5_Pad_TopBottomH6
1PCB-cMountingHole:MountingHole_2.7mm_M2.5_Pad_TopBottomH7
1PCB-dMountingHole:MountingHole_2.7mm_M2.5_Pad_TopBottomH8
1Powerboost1000CMJC:PowerBoost1000CU1
1Teensy ILI9341MJC:ILI9341U4
1Teensy4.0teensy:Teensy40U2
1USB VINConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ1

Similar boards

  • 4 layers45 × 41 mmOsw, the printed circuit board in 3D

    Osw

    Open-Smartwatch/open-smartwatch-gps

    Hardware design files for the GPS version of the open-smartwatch

    70 parts243GPL-3.0
  • 4 layers83 × 109 mmD4 small pcb panel, the printed circuit board in 3D

    D4 small pcb panel

    unsurv/unsurv-offline

    Offline portable GNSS device based on the ESP32

    522 parts72
  • 2 layers38.1 × 3.8 mmShio, the printed circuit board in 3D

    Shio

    uw-x/clearbuds-hw

    Errata: The design contains some errors that can be addressed in future revisions. The errors do not affect function, but do affect robustness. 1. Add 0.1uF decoupling capacitor to PDM mic (ICS-41350) Vcc. 2.

    86 parts17
  • 8 layers42.2 × 67.2 mmOBC PCB, the printed circuit board in 3D

    OBC PCB

    timohueser/OpenBikeComputer

    Open source Bikecomputer with a focus on exploration and adventure.

    186 parts11GPL-3.0
  • 2 layers44.1 × 51 mmPicowalker-32, the printed circuit board in 3D

    Picowalker-32

    mamba2410/picowalker-32

    PCB + firmware for Pokewalker-like device

    50 parts9
  • 4 layers25.4 × 25.4 mmInt bluetooth, the printed circuit board in 3D

    Int bluetooth

    TUDSSL/FreeBie

    To compile FreeBie runtime we used the GNU Arm Embedded Toolchain (9.3.1) and CMake (3.19.1) to build the project. To program the MCU we used the J-Link debug probe with the accompanying J-Link software.

    85 parts6MIT
  • 4 layers32.7 × 7.6 mmOsw spy, the printed circuit board in 3D

    Osw spy

    akinbender/open-smartwatch-spy

    Spy edition of the open-smartwatch by @uvwxy

    61 parts5GPL-3.0

Questions

How big is the Teensy RV Leveling Helper v2 PCB?

It measures 76.2 × 96.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Teensy RV Leveling Helper v2 use?

21 parts, built around the BMA400. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Teensy RV Leveling Helper v2 KiCad files?

From the mjculross/Teensy-RV-Leveling-Helper repository on GitHub, at the commit this page was made from: the board is KiCAD 7.0/Teensy-RV-Leveling-Helper-v2-20231130/Teensy-RV-Leveling-Helper-v2.kicad_pcb and its schematic KiCAD 7.0/Teensy-RV-Leveling-Helper-v2-20231130/Teensy-RV-Leveling-Helper-v2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Teensy RV Leveling Helper v2 design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).