Tracking a car like it were a computer mouse

optical-mouse-sensor-tracks-vehicle-motion

This is [Paul Mandel's] Ground-truth velocity sensor. That’s a fancy name for a device which tracks the movement of a vehicle by actually monitoring the ground its travelling over. This differs from simply measuring wheel rotation (which is how traditional odometers work) in that those systems are an indirect measurement of motion. For us the interesting part is the use of an ADNS-3080 single-chip optical mouse sensor on the left. It’s cheap, accurate, and only needs to be ruggedized before being strapped to the bottom of a car.

[Paul] designed a case that would protect the electronics and allow the sensor to mount on the uneven underbelly of a vehicle. The optical chip needs to be paired with a lens, and he went with one that cost about ten times as much as the sensor. Data is fed from the sensor to the main system controller using the PIC 18F2221. One little nugget that we learned from this project is to poll a register that always returns a default value as a sanity check. If you don’t get the expected value back it signals a communications problem, an important test for hardware going into the vibration-hell that is automotive technology.

Comments

  1. Akranis says:

    At first I thought they were going to drive a car around the block to surf the web, but this is cool too.

  2. Wire says:

    I wonder what he was trying to censor in all the photos….

    Looking at slide 5 gives you the most information. (his censor box is a little off compared to the rest. It looks like there is a SOT23 transistor on the back side (Q1) and potentially some logic on the top but only one net could be involved.

    Or is this another case where a buddy got a hold of his design and added some NSFW content just before it headed out for etch :)

    • Sven says:

      There is some text behind there too, i’m guessing an email address.

      • Justin says:

        His email and entire resume is at the bottom of that page. There’s a trace leaving pin 5 on the sensor going to the left, I’m guessing there’s a component there. In the datasheet pin 5 is the led control pin to drive the sensor’s light source.

    • BG says:

      They don’t hide it very well. Anyone remember the ‘redacted’ PDFs from a long while back wherein the redaction black boxes could simply be deleted or just wouldn’t render in time on a slow computer? Same thing here. It’s some text related to an overpriced speaker company. Censor your images – not your powerpoints or PDFs!

    • BG says:

      I just noticed the uncensored image on his front page:

      • Which uncovers this in the resume:
        Bose Corporation – Research Intern – Automotive suspensions
        “Built low-cost vehicular velocity sensor from COTS parts, allowing
        precise lateral drift measurements and smoother compensation.”

        So he was censoring it because it’s something being used at BOSE for suspension research ;)

  3. sm10sm20 says:

    “poll a register that always returns a default value as a sanity check”

    Awesome! Taking the time to implement checksums and the like would be a major buzz-kill for a smaller project like this, real neat trick.

  4. Centerfuge says:

    What are they blurring out in all the pictures, as well as screenshots of the layout?
    Some specific traces, a small chip, or just some text on the PCB?

  5. ben_K says:

    I was looking at using one of those mouse sensors for similar application. The problem seems to be that avago doesn’t make them easily available. I can’t find them on digikey, mouser, etc. Parallax has an eval board for about $25 – but the sensor should only be about $1-$2. Luckily I have a few old optical mice lying around with similar sensors, but it would be nice to find ONE sensor and work out the kinks for that one as opposed to hacking similar sensors from multiple mice.

    Anyone have any luck sourcing these?

  6. Travis says:

    Optical ground speed sensors have been tried before and their failing is *always* trying to keep the lens clear of mud and dust.

  7. soundman98 says:

    it’s openly-closed source!

  8. jdiwnab says:

    I tried something like this on an RC Car, that would skim over the ground. I used a cheap PS/2 Optical mouse. But the car would go much faster than the mouse would poll the sensor, so it would loose track of how far it went. As it was for a school project, I ended up turning the mouse over, and using the scroll wheel, which had lower resolution, but worked out better.

  9. Hack Man says:

    Dirt covering sensor?

  10. truebassb says:

    The problem is that it can’t be accurate under specific situations.

    For example if you drive on water covered road it isn’t going to pick anything.

    If you drive on a dirt road with dirt flying all over the downside of the vehicle it will pick nothing either as it wont be able to see anything even though the lens is kept clean.

    It should be at least laser based or based on Microwaves,etc,if the actual use would be under uncontrollable situations.

    • Dax says:

      There’s also the problem that mice sensors drift a lot.

      They’re supposed to be counting a certain number per inch, but that number actually depends on the exact distance to the surface, the surface quality, how many details of the surface the sensor picks up due to the texture, the amount of light, focus, etc.

      If you try it on a real computer mouse, move it back and forth a known distance between two stops, it doesn’t take very long till the cursor drifts off. If you apply that to a car, the calibration of the sensor is affected by things like how high the suspension rides.

      • Pilotgeek says:

        A large part of that is due to the acceleration curve provided by the OS or drivers.

        • Sven says:

          No, even with acceleration off, there is a huge drift.

        • Dax says:

          The depth of field of the camera is something like 1-2 millimeters at a distance of 5 mm from the lens and outside of that it just sees a blur with no trackable features. If you add a lens to correct the distance up to a meter but keep the original lens in between, it’s got a depth of field just 15 centimeters or about 6″. The ground must remain within three inches of the focal point or it can’t track anything.

          The feature tracker is also pretty naive. It just takes the picture, blows up the contrast and sees what moves. If you have a diagonal line going through the picture from up to down, like the edge of a curb or a patch in the road, it will interpret it as sideways motion. That’s why mousepads with advertisements or other sharp contrast figures on them are really annoying.

          • bandit, Albuquerque says:

            I happen to know the guy who designed the optics for the m$ mouse. His advice is to use a white piece of paper – best contrast, best surface features.

            I have a few of the ADNS-3090 chips and the datasheet. It takes a 30×30 picture (each pixel is 5 bits greyscale) and compares it with the previous picture. Pretty high-power image analysis – x, y, and rotation. You can read the image back – as a 30×50 so you get a bit of history.

            Not sure about the drift. No obvious reason. You would need to look directly at the chip registers to determine what is going on. Also, different surfaces.

  11. Nunya Bidness says:

    Good lord. That title.

    like != as though

  12. chris says:

    My Odyssey Of The Mind team is using this same idea, just on a smaller scale. We cut up and actual computer mouse and connected it to a arduino in our case, however.

  13. George Johnson says:

    And in the next post up, they (HAD) slam the PIC processor.

  14. Galane says:

    Lay out a grid in a parking lot, connect this rig to a USB port, use the horn button as the left mouse button.

  15. sebby says:

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

Follow

Get every new post delivered to your Inbox.

Join 96,756 other followers