Shop OBEX P1 Docs P2 Docs Learn Events
Axle Dectection Card — Parallax Forums

Axle Dectection Card

sdiluccasdilucca Posts: 2
edited 2009-05-05 20:46 in General Discussion
Gents,

I am interested in creating a card that calculates and reports vehicle axle direction. I currently have sensors embedded on the road. A sensor is comprised of four strips. The forward moving vehicle will first activate Strip#1, then Strip#2, then Strip#3, and then Strip#4. The strips will deactivate in the same sequence as the car continues to travel. I want to detect and report axle direction based on the sequence in which the strips are activated/deactivated. For example... the sequence of 1_ON, 2_ON, 3_ON, 4_ON, 1_OFF, 2_OFF, 3_OFF, 4_OFF should report a Forward axle. And the sequence of 4_ON, 3_ON, 2_ON, 1_ON, 4_OFF, 3_OFF, 2_OFF, 1_OFF should report a Reverse axle. I want to report the axle direction via Serial (Db9). What Parallax product(s) do you recommend? Let me know if you have questions.

Thanks in advance,
sdilucca

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2009-05-05 19:07
    · You only need two sensors.

    Google 'Quadrature Encoder" to read about the process.

    · I've attached a·Stamp program that is written to work with encoders.

    · Once the program calculates the direction bit, its easy to send the data out the serial port.



     
    


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
  • sdiluccasdilucca Posts: 2
    edited 2009-05-05 20:29
    I googled 'Quadrature Encoder' and it seems to me that this device needs to be connected to a shaft. Is this correct?... I think I need to explain my needs better. My application is toll collection. My end goal is to know how many axles are going through the point of collection. My sensors can't be on the vehicles. They are on the road itself and that is something I can't change.

    Thanks again!
  • stamptrolstamptrol Posts: 1,731
    edited 2009-05-05 20:46
    The concept of quadrature encoding works regardless of how the two pulses are obtained.

    I'm assuming stationary sensors that operate as the vehicle passes over them. As you described in your original post, the order which they come on determines direction.

    Basically "if A comes on before B, thats forward". If B comes on before A, thats reverse".

    Program I attached does that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
Sign In or Register to comment.