RoadDash

2018 August 2
tags:
by barclay

Background


The adventure started when I wanted a roll and pitch indicator for my Jeep.  I couldn’t find one that worked for me.

  • The spring-based ones (like this) are way too springy, they bounce around like crazy when driving offroad, and are too sensitive to acceleration, deceleration, and cornering, even at slow speed.  They provide no useful information.

  • I tried looking for a marine-based one, like the gimbaled compasses that float in a viscous fluid and dampens the springiness of the previously mentioned solution, but no luck.

  • I looked at the TrailDash2, but it’s quite expensive, and it looks like it just gets pitch and roll from the orientation screen, which I knew I could do with some cheap parts.  And, I didn’t want to ECU-swap to get the extra features, which is really what the $500 is all about.

  • Phone-based apps have a variety of problems:

    • I tried a bunch, a they were too easy to accidentally reset the calibration, or automatically re-zero’d the calibration each launch (which makes it useless), and required a large amount of dash space for what is basically displaying two numbers.  I don’t need fancy icons and colors.

    • In addition, if I were to use a phone-based solution, I’d want a whole bunch of extra functionality, e.g., speed, altitude, temperature, etc.  Most modern phones don’t actually have built-in ambient temperature thermometers and barometers (at least, not that I could find in production after ~2014); they rely on the internet for that. I’d prefer something that doesn’t require a data connection, since I frequently don’t have that out in the wilderness.

    • But here’s the real deal killer:  I’d also like something mostly-permanently mounted.  I also don’t want to give up my phone for a clinometer, since it’s usually my mapping app, and that’s usually in and out of it’s cradle on a regular basis which means recalibrating — which means finding a level spot to park — every time I hope out to take pic.  So, this means adding a second phone to the dash.  This presents a problem, though: phones obviously have batteries in them, keeping them on the dash throughout the day, particularly in places like Anza Borrego or Mojave, you run the chance of exploding the lipo battery.  Not good — that almost happened to me back when I had an old phone (running Torque) mounted to my dash. One day I got in the car and it was swollen up like a balloon.

So, I decided to build my own.  This meant that I could add in a few features that I hadn’t seen elsewhere, like storing the minimum and maximum values for a couple things, or having the screen automatically turn on/off on movement.

Sensor Data/Display

  • GPS-based:

    • Speed: mph/kph, press to change

    • Latitude/Longitude: decimal

    • Fix quality: # satellites, xDOP quality

    • Heading (compass direction) and bearing (degrees)

    • Altitude:

      • ft/m, press to change

      • recent min/max, with reset button

  • Temperature

    • F/C, press to change

    • Recent min/max, with reset button

    • Color coded on extreme temperatures

  • Barometric display

    • Textual description

    • Graphical representation (icon)

    • 3h trend window, as per NOAA recommendations, ditto for magnitude (trend) deltas

  • Roll and Pitch

    • Max left/right roll and fwd/back pitch, with reset button

    • Ability to store current offsets to permanent storage (i.e., the roll/pitch offsets should be consistent across reboot)

    • A “steady” indicator (useful for letting the sensor settle before “storing offsets”)

    • Color coded for yellow/orange/red on extreme angles

Prerequisites

This build requires at least:

  • A novice to moderate level of working with arduino programming.  You shouldn’t have to know how to code, but you do need to know how to compile and upload code to an arduino-like board.
  • A soldering station:  soldering iron, solder, flux, wire, etc. A “helping hands” and breadboard will also be useful, but aren’t required if you’re creative/dexterous.

If you’d like to connect the wires the same way I did (everything is socketed so all parts are replaceable), you’ll also need a hot glue gun, or similar, to ensure the makeshift headers stay connected.  Alternatively, you could buy proper headers and crimp and solder your own pins, but I didn’t have the right sizes on hand, so I went the cheap route.

If you’re using my case design, the screw holes are not threaded, so that could benefit from a tap and die set (M3 0.5 pitch), and for installing screws/nuts in hard-to-reach places, a magnetic pickup tool is useful for getting nuts/screws into tight places.

Parts

Item

Qty

Est $ / each

Total

Link

Required

3.5″ Feather TFT

1

$39.95

$39.95

https://www.adafruit.com/product/3651

Teensy 3.2 + headers

1

$19.95

$19.95

https://www.adafruit.com/product/2756

Feather Adaptor

1

$5.95

$5.95

https://www.adafruit.com/product/3200

PJRC Prop Shield

1

$22.50

$22.50

https://www.adafruit.com/product/3085

GPS Breakout

1

$39.95

$39.95

https://www.adafruit.com/product/746

Female Headers

1

$2.95

$2.95

https://www.adafruit.com/product/598

Regular Headers

1

$2.95

$2.95

https://www.adafruit.com/product/2671

Long Headers

1

$3.00

$3.00

https://www.adafruit.com/product/400

Female-to-Female Jumpers, 3″

1

$3.95

$3.95

https://www.adafruit.com/product/794

Half-size Perma-proto

1

$4.50

$4.50

https://www.adafruit.com/product/1609

Required Total

$145.65

Note that there’s a handful of screws, nuts, wire options, etc., you can use, but that’s dependent on how you build your case.  I mostly just used what I had on hand. If you’d like to use the case I generated for my Jeep, it’s orientated around M2 and M3 screws, and printed on a Form 2 printer.  (You may have difficulty printing my model on a standard filament-based 3D printer, due to the overhang geometry.) In addition, the angle of my Jeep’s windshield is approximately 28 degrees from vertical, so unless your rig happens to have the same angle, you’ll probably need to design and build your own case in order for it to tuck back against the window nicely.

I also already had most of the headers, jumpers, and other miscellaneous assembly pieces, which means that links provided are just suggestions.  I can’t necessarily vouch them, but did keep them all from the same vendor to it’s easy to order all at once.

Assembly

If you’re not comfortable soldering, you may want to get a friend to do this for you.  The photos should demonstrate the basic layouts.

A few notes:

  • Note the back side of the permo-proto:  there’s some wires soldered on the underside to bridge the VCC and GND lines to the right pins.

  • Since the GPS breakout is supported on only one side by pins, I added some nylon standoffs between the perma-proto and the board on the other side, to make it more stable.  Nylon is better for the parts that touch the perma-proto, as metal standoffs and screws could bridge some traces on the perma-proto.

  • I drilled out some of the holes to enable a larger M3 sized nylon screw for attaching the whole board to the case.

  • This whole assembly could be made smaller if you wanted to directly attach all the wires, and use a thinner gauge.  But note that the IMU (orientation sensor on the Prop Shield), and GPS to a lesser extent, work best when oriented “flat” as shown.  I.e., make sure the top of the board are “up”; don’t mount them on the side of a case.

  • 28-30 gauge connecting wires will be easier to stuff into a case, since they’re more flexible, but the thicker gauge wires will be easier to create a makeshift cable header out of.

  • The set of connections is such that you end up with a weird multi-headed type of monster, and to enable the screen auto-off/on, you need to solder one of those directly to the back of the TFT.

I also made my “poor man’s headers”:  take the extra-long male header pins, and push the breakoff strip until it’s flush with whichever female headers you’re mating it with.  Plug each of the female jumper wires into the other side of the header strip (you may need to trip the male headers a bit to get the jumper wires to fit flush).  Pull the male header strip from the female headers, and use a hot glue gun to keep everything together.  This won’t keep you from forcefully pulling a wire from the header, but it will keep vibrations from rattling them lose.  Pro-tip:  only hot-glue one side, that side being the side away from the the components that the header will slot into.  If you hot glue both sides, it’s possible you won’t be able to insert the header.  It’s not pretty, but it works:

Code

You need the arduino development studio, as well as the teensy loader application.  After that, just download the code, open in arduino, select the teensy board and correct port, then program.

http://www.redgeek.net/public/RoadDashV2.0.tgz

“Manual”

Most things should be (mostly) self-evident.

For Speed, Altitude, and Temperature, long press to change units from imperial to metric.

For any of the “zero” buttons, long press to zero out the recording minimums/maximums.

To set “level” for the the device, long press the “Calibrate” button.  For best results, come to a complete stop, and wait for the steady (“level’) indicators to appear on the upper left and upper right sides of the roll and pitch, respectively.  The “level” icon is identical to the “steady” indicator pictured in the barometer trend position listed above.  After both the roll and pitch are “steady”, the IMU has settled, and you should long-press “Calibrate”.  You shouldn’t have to calibrate again unless you change the orientation (roll, pitch, or yaw) of where you’ve mounted the device.

Caveat Emptor

If this is going to sit semi-permanently/permanently mounted in your car, you’re going to have heat concerns.  PLA and ABS from home printers will almost certainly deform, I’d stay away from them unless you live in a cold environment.  Even the Shapeway’s “Professional Plastic” deformed on me after a hot day in the car, although that was only 1.5 to 2mm thick.  An attempt at a home-made wooden box (¼” thick ash) cracked under the thermal changes. Form 2’s standard resins appear to be holding up at 3mm widths.

In addition, you may have temporary, or permanent, component failure under high heat.  I know that the GPS portion occasionally gets wonky after sitting in a hot car all day.  So far, though, no permanent failures, but this is why I made everything socketed. In the event of a failure, I’ll replace that part and investigate adjusting the case.  I’m currently re-jiggering the case, so once I’ve completed that, I’ll post the STL for it.

As a final note, the TFT does include a micro SD slot, which could be used for GPS NMEA logging (and is written, but disabled, in the code), because I haven’t debugged it yet.   :/

Alternatives

I’m already working on the next rev, which should be about ~$40 cheaper, support better screen fonts, as well as wi-fi connectivity, auto GPX uploading, better data logging, and a built-in bluetooth credit card skimmer scanner.

No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS