Saturday, February 16, 2013

How to Build a HUD for your Car

Hello all, this is the Car Heads-Up Display (HUD) Version 1.0: Researched, constructed, and installed in approximately a month on a 2004 Toyota Highlander.  This is what it looks like in action:

Overview

HUDs are built-in on some modern luxury cars, but if you not lucky enough to have one, here's how to make your own, DIY-style. My model uses the car's OBD-II port to connect to an Arduino microcontroller, which is programmed to display the car's speed on a 7-segment display.  A fresnel lens is used to optically collimate the display, which is projected onto a piece of combiner glass. The difference between this and most third-party HUDs is:
  • Optically Collimated - This means the display is focused at infinity, so the driver does not need to refocus his eyes from the road.  The display looks like it is floating in space right where the road is.  Most third-party HUDs are not collimated.
  • Utilizes a Combiner Glass - This specially-coated piece of glass allows for virtually seamless viewing of the outside road simultaneous with the display, as opposed to cheap "reflective films."
Here is the full setup:
Overview of the setup

Shopping List

  • Arduino Uno - $20
  • OBD-II cable - $50 - This one comes with an Arduino library, so it's easy to program with
  • 7-Segment Display - $13
  • Arduino Protoshield - $10 - to easily mount the display on top of the Arduino (this is optional, you can just use perfboard instead)
  • Power switch - $0.50 - really cheap and makes it easier to turn the power on/off instead of unplugging the wires every time
  • Large Fresnel Lens - $1.80 - It really doesn't matter which one you buy as long as its at least ~220mm long
  • Teleprompter Glass - $15 - Get the 7" by 4" custom size
  • 4 Suction Cups - $3 ($1.50/pack of three) - You can use any suction cups you want, just make sure they can hold the glass safely (these are rated for 3lbs)
  • Total Cost: $113.30

Supplies Needed

  • Soldering Equipment
  • Hookup Wire
  • Lots of Cardboard
  • Duct Tape
  • Pliers

Prerequisites

  • Some Soldering Experience
  • Some Arduino Experience Suggested

Building

Step 1: Solder the Circuit

Connection labels on the protoshield
Solder these connections onto the protoshield to be mounted on the Arduino:
  • OBD:
    • Yellow wire to D0
    • Blue wire to D1
    • Red wire to 5V
    • Black wire to GND (through the power switch if you have one)
  • Display:
    • VCC to 5V
    • GND to GND
    • RX to D6

    Step 2: Upload the Code

    Go here and download the code, then open it with the Arduino program, connect your Arduino to your computer, and upload the code.

    Step 3: Build the Arduino Holder

    Pick a place in your car to build the holder for your Arduino.  Keep in mind that it should be about 10 inches away from the lens, and it should be out of the way of your hands and legs when you drive.
    I built my holder into an existing compartment below the steering wheel
    Duct tape and cardboard are extremely cheap materials to use, and they hold up pretty well. Next, put the Arduino on top and connect it to the OBD wires.  I soldered headers onto my protoshield for easy connection with the OBD wires.
    The fully-soldered protoshield mounted on top of the Arduino

    Step 4: Mount the Combiner Glass

    Bend the hooks of the suction cups to cradle the glass like this:
    Angle the glass until you can see the reflection of the display, then tweak the suction cup hooks to hold the glass in that position.
    If the suction cups hooks aren't long enough, just cut out a segment of a wire clothes hanger and bend it around the suction cup.
    After you finish, you might want to pull on the glass a little bit to make sure the suction cups will hold.

    Step 5: Mount the Lens

    The fresnel lens is very flimsy by itself, so I recommend taping some support around the edge.  You can use cardboard, popsicle sticks, or anything you find around the house.  Wooden kabob sticks worked well for me.

    Now that the lens is nice and sturdy, you need to figure out the exact position the lens should be in to collimate the display.  This can be tricky to get exactly, but you're looking for when the display is the most magnified without being blurry.  I found this the easiest way to do it:

    Look through the combiner glass and through your windshield at an object far away (let's say a tree).  Notice how when you focus on that tree, the display splits into two images because your eyes are no longer focused on it.  Now place the lens right over the Arduino and then slowly move the lens up towards the combiner.  Still focusing on the tree, you should see the two images of the display gradually get closer to each other.  When the two images meet, stop moving the lens and mark its position.  That means that the display is now focused at the same location as the tree.
    Light beams showing how collimation works
    Now build a holder with cardboard and duct tape to hold the lens in that exact position.
    When in doubt, more duct tape
    The lens will probably be bigger than you need, so just use scissors to trim off some of the edges where it's not needed.

    Congrats!

    You now have a working heads-up display.  Go for a test drive to see how well it works, and email me at abnormalbill@gmail.com with questions or comments.

      23 comments:

      1. Great info! Could I use an LCD backlight device in place of your Audrino board and have it focused at infinity?

        ReplyDelete
        Replies
        1. I did try using a little cheap LCD 16x2 character display, but it was difficult to get it to reflect well off the combiner. You can certainly try it, but I've had better luck with LED displays.

          Delete
        2. Hi Bill...
          One question...the combiner glass...is it safe for automobile?...for example..what happens in case of an accident...I wouldn't like the glass to act as a sharp projectile....
          Are there options for more automobile friendly glasses?..plastic combiners..
          Any comments...

          Delete
        3. In terms of safety, the suction cups are very secure but the wire hooks are not as secure. The glass rattles a tiny bit when driving around sharp corners and such, which could turn into a long-term safety hazard.

          Admittedly, I didn't really think about safety when I constructed the glass mount, and my suction cup hook design could definitely be improved. I will say I am working on a HUD version 2.0 with a different design, so I will give some thought into long-term safety when designing the new combiner mount.

          I'll do some research into making the combiner glass more safe if it breaks, although I suspect that will increase the price significantly. As for plastic combiners, if they exist I don't think they would have the optical quality needed for this project.

          Thanks for your feedback!
          -Bill

          Delete
      2. How did you power the arduino itself? From the car?

        ReplyDelete
        Replies
        1. Yeah, the OBD cable I used (http://www.arduinodev.com/hardware/obd-kit/) came with a VCC/GND cable so I draw power directly from the car. It works even when the car is off, which is why I had to get a power switch.

          Delete
        2. I don't know where you pulled your power from (where ever you did hopefully you used a fuse) but find your self one a fuse tap http://4x4icon.com/crossfire/pioneer_tuner/buss_fuse_tap.jpg

          and use a multimeter to find a a fuse in your fuse panel that comes on and off with your key, (usually one labled radio will work) stay away from airbag fuses!

          Delete
      3. Inspired I ordered a bluetooth obd device to connect to android torque app. I was wondering if a cheap real HUD setup could be developed connected with an android device. That ways we could project navigation on the screen too.

        ReplyDelete
        Replies
        1. If you already have an OBD cable and display (your android phone), then that's the bulk on the money right there. Just buy the Glass combiner and a lens and you'll have a true HUD

          Delete
      4. Hi! From where is the setup reading the mph?

        ReplyDelete
        Replies
        1. The speed data is coming from the OBD-II cable.

          Delete
      5. Bill,
        Do you think a Pico projector could be made to work. I was thinking of burying the projector in the dash pointing up at the windshield and using the glass as the "screen" to redirect image at the viewer. ?
        Matt Bode

        ReplyDelete
        Replies
        1. Hey Matt, early on in this project I looked at Pico projectors, but rejected them because of the cost. I am not sure how a projector would look on the glass combiner I used, especially when it's angled at a 45 degree angle, but you can certainly try it out. I am interested if you find more information on this!
          -Bill

          Delete
      6. Your project has been included in the article: “20 Arduino projects of 2013″ – http://www.nudatech.com/blog/20-arduino-projects-of-2013/

        ReplyDelete
      7. Would it be possible to use a cell phone as a projector instead of the 7 segment display (say for a GPS app) or do the complex LCD screen colors affect collimation?

        ReplyDelete
        Replies
        1. It's certainly possible, but you would have to make sure that the cell phone screen is mirrored (some apps can probably do that), and your lens would have to be A LOT bigger. I have not delved into using my smartphone because I already have trouble setting up the lens for a small 7-segment display.

          -Bill

          Delete
      8. wow... really cool invention. is it really not hard to solder those wires? can I use any kind of display?

        ReplyDelete
        Replies
        1. This was my first soldering project. It wasn't terribly hard, but it took a little while to get used to. As you can see, my soldering job doesn't look pretty, but it still works.

          You can try any display you want, but keep it very small if you want the optics to work.

          Delete
      9. Finally someones idea I can follow to get an HUD focused to inifinity!

        ReplyDelete
      10. wow... really cool invention! What is the relation of lens focal lenght to its distance from display. Can I use my cellphone as projector with proper focussed lens with minimal distance?

        ReplyDelete
        Replies
        1. The distance from the display has to be equal to the lens's focal length in order for it to be focused at infinity. You can use your cellphone, but it's hard to find lenses with a small enough focal length and minimal aberration without spending a fortune

          Delete