Shop OBEX P1 Docs P2 Docs Learn Events
hundreds of proximity sensors — Parallax Forums

hundreds of proximity sensors

UweUwe Posts: 18
edited 2009-08-11 17:18 in Accessories
For a larger art installation I need to design an industrial strength system which detects cars on a stretch of road, about half a mile long, and indicates their position by switching on a linear array of LED's or what have you in a remote location (100 feet away). We will have between 500 and 1000 sensors.

In its simplest incarnation you could have a sensor ( I am thinking about ultrasonic proximity sensors) with its power supply, a relay and the indicator (LED or similar).

500 times!

I have used a stamp for simple switching operations in the past and at least I could save myself the trouble of installing 500 relays if I was to use a number of stamps and use their switching capability. And maybe there are further savings. Suggestions are welcome

Uwe

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-08-07 01:58
    What kind of budget do you have for this project, Uwe? Are you watching only a single lane of cars, or more than one? What does the response time need to be?

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 8/7/2009 2:03:54 AM GMT
  • UweUwe Posts: 18
    edited 2009-08-07 02:15
    I am only watching a single lane. The proximity sensors I looked at will only detect up to a few feet. We have to make sure that vehicles cannot not, as a rule, drive sofar to one side that they can avoid detection.
    The response time ought to be fairly quick, between what the vehicle does on the input side and what the "observer " sees on the output side ought to be only a fraction of a second.
    Don't worry about the budget yet...

    Uwe
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-08-07 03:03
    I think one of the more economical solutions I'd look at is acquiring 21 Propeller Proto boards ($23.99 @ 20+). Equip each with an RS422 transceiver and daisy-chain them together. Each transceiver will receive data from the upstream boards, add its own data, and forward everything downstream. Each of 20 boards will handle 25 prox detectors, so the boards will be about 90 meters apart — no problem for RS422. The 21st board will receive all the data and, using multiplexing, drive the 500 LEDs. If you don't want to multiplex the display, a bank of 63 75HC595s could also work, possibly augmented by drive transistors, depending on the LEDs' load current requirements. Instead of (or in addition to) LEDs, the 21st ProtoBoard could also drive a video display.

    -Phil

    Addendum: It's very possible that you could save money by doubling the number of Proto boards. This could about halve the amount of copper wire you need to run to the individual prox detectors. I'm not sure how the costs balance out, but I know wire has gotten really expensive.

    Post Edited (Phil Pilgrim (PhiPi)) : 8/7/2009 3:11:05 AM GMT
  • UweUwe Posts: 18
    edited 2009-08-07 10:12
    Thank you Phil,
    So far I am far more concerned with reliability than with money.
    The original idea, hundreds of sensors and hundreds of relays does not have much elegance in the design, but is straightforwards and if one relay dies I lost one sensor function. In your design, if I understand it properly, the last computer would be crucial, it dies and everything dies.
    Nevertheless I am intrigued, its just that I am not up and running on this technology, I would definitely need help implementing it.
    And design it for low maintenance with redundancies.

    Uwe
  • kwinnkwinn Posts: 8,697
    edited 2009-08-07 15:28
    Uwe, interesting project. I think you will probably find the sensors will be the most frequent point of failure, not the microcontroller or communications. Short of running each sensor individually to the monitoring station (a lot of wiring) I see no way around having to multiplex the signals and send them over a serial link of some kind.

    There are alternative sensors. You could use a video camera or linear sensor to cover a section of road, or coils of wire laid flat on the road surface. The camera/linear sensor would probably be the most economical of the two. It also has the advantage of being some distance from the road, so is less likely to be damaged.

    Phil's suggestion of having several props is an excellent approach for dealing with individual sensors, however I would suggest using the 422/485 transceivers in a looped bus configuration rather than a daisy chain. That way the failure of one micro or a break in the cable between micro's would not affect the rest of the system.
  • UweUwe Posts: 18
    edited 2009-08-07 16:05
    Anything we attempt to do with the road and road surface becomes a major issue with the DOT.
    Having sensors on the side of the road creates less trouble.

    I looked at the ultrasonic ping sensors Parallax offers, that could work in principle (they seem not to be totally water proof and heavy duty).
    I could use a few of those per Stamp and have each stamp also deal with the output (ultimately I will have to switch a low voltage low current device like 24V @ 0.2A)
    That would basically be a "low elegance" system, but something I do understand myself mostly.
    Multiplexing maybe much smarter, I just have no experience with it.

    Uwe
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-08-07 16:30
    kwinn,

    The reason I didn't suggest a bus configuration for the comms is due to the total distance involved (1 mile). RS422/485 maxes out at 4000 feet.

    An alternative to RS422 might be XBee modules configured master/slave. I'm not sure how fast they would be, but at least there wouldn't be a communication cable lying beside the road.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 8/7/2009 4:35:58 PM GMT
  • TimmooreTimmoore Posts: 1,031
    edited 2009-08-07 16:49
    maxbotics have a couple of water resistance ultrasonic sensors - http://www.maxbotix.com/MB7060__XL-MaxSonar-WR1.html.
  • kwinnkwinn Posts: 8,697
    edited 2009-08-07 18:19
    There are a lot of ways to approach this project, and several types of sensors that could be used. Both the approach and sensor used would be determined by what you seek to accomplish and the budget constraints. All of the sensors I am aware of that could be used for this application have some advantages and disadvantages.

    Does this have to track vehicles traveling in both directions?

    How precisely does it have to track vehicle position?

    Does it need to account for every vehicle, or would slightly less than 100% be ok?

    For instance, if you had 2 sensors close together (~6-8 feet) at the entrance to the array of sensors you could have the rest of the sensors spaced further apart and estimate location based on entry speed and elapsed time to go from one sensor to the next. This would reduce the number of sensors needed to about one every 20 or 30 feet, and the software could compensate for a bad sensor by estimating position until it reaches the next working sensor.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-08-07 21:28
    Uwe,

    Will all the cars be moving? IOW, if each sensor were able to detect motion within a restricted field-of-view, but not a stopped car, would that be adequate?

    -Phil
  • UweUwe Posts: 18
    edited 2009-08-08 03:56
    Just to answer some questions that came up.

    It will be a one way street and I will also detect stopped cars, or coke bottles that have been thrown out of a window that landed in front of one of the sensors.
    I hope to be able to detect every vehicle, but this is not a science project, it's for an art project, therefore nobodies head will be rolling if it misses a car, even though I don't understand why that should happen.

    I think the sensors I saw can detect a vehicle within a few inches, and that would be enough for us.

    I am thinking about a sensor every foot, evenly spaced over several hundred feet.

    Uwe
  • SRLMSRLM Posts: 5,045
    edited 2009-08-08 04:26
    A few more questions:

    1.Is the road straight or does it have curves (and if so, what is the longest straight distance?
    2.Can multiple vehicles be in the area at once (and if so, how many? Traffic jam many?)
    3.Can you string a wire above the road (at a reasonable height to allow vehicles to pass underneath)?
    4.What sort of setting is it? Urban? Rural? Natural?

    To summarize what we know:
    A) The purpose of the project is to mimic in real time the travel of a vehicle with a series of LEDs
    B) The length of the course is 1/2 mile, the LEDs are offset by 100 feet
    C) The road is a single lane, one way
    D) Budget is not an issue
    E) System must be as reliable as possible (at the expense of elegance and $, if need be)
    F) Modification of the road surface is not allowed
  • kwinnkwinn Posts: 8,697
    edited 2009-08-08 09:01
    To summarize your requirements based on your answers to my questions:

    You are looking at covering half a mile with sensors every foot for a total of 2640 sensors. This is overkill imho. A sensor every 10 feet would probably be adequate since most vehicles are longer than that, and at most one every 5 feet would cover almost every vehicle on the road. That would be a total of 528 sensors ( 1 every 5 feet ).

    I would suggest :

    If a prop or micro with similar I/O capacity were used to connect to groups of 24 sensors then you would require 22 props, and each prop would have 8 pins left for other uses. The props could communicate over a looped bus using RS422 or RS485 with a csma/cd protocol with error correction and fault detection, and provide a very reliable system.

    Post Edited (kwinn) : 8/8/2009 9:06:42 AM GMT
  • UweUwe Posts: 18
    edited 2009-08-08 10:13
    SRLM said...
    A few more questions:

    1.Is the road straight or does it have curves (and if so, what is the longest straight distance?
    2.Can multiple vehicles be in the area at once (and if so, how many? Traffic jam many?)
    3.Can you string a wire above the road (at a reasonable height to allow vehicles to pass underneath)?
    4.What sort of setting is it? Urban? Rural? Natural?

    To summarize what we know:
    A) The purpose of the project is to mimic in real time the travel of a vehicle with a series of LEDs
    B) The length of the course is 1/2 mile, the LEDs are offset by 100 feet
    C) The road is a single lane, one way
    D) Budget is not an issue
    E) System must be as reliable as possible (at the expense of elegance and $, if need be)
    F) Modification of the road surface is not allowed


    To answer your 4 questions above:
    1. unknown, but probably a bend in the road
    2. yes, there could be a jam, multiple vehicles, bumper to bumper
    3. probably possible to have a wire above
    4. urban inner city setting
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-08-08 15:37
    If the sensors are a foot apart, that rules out ultrasonics unless they can be coordinated somehow. Otherwise they will interfere with each other. I'm with kwinn, though, when he says a one-foot spacing would be overkill.

    Your specs seem to have changed from 500 sensors in a half mile stretch of highway to the same nmber in a few hundred feet of city street. Now you've got curious (and possibly larcenous) pedestrians thrown into the mix.

    -Phil
  • UweUwe Posts: 18
    edited 2009-08-08 17:52
    Phil Pilgrim (PhiPi) said...
    If the sensors are a foot apart, that rules out ultrasonics unless they can be coordinated somehow. Otherwise they will interfere with each other. I'm with kwinn, though, when he says a one-foot spacing would be overkill.

    Your specs seem to have changed from 500 sensors in a half mile stretch of highway to the same nmber in a few hundred feet of city street. Now you've got curious (and possibly larcenous) pedestrians thrown into the mix.

    -Phil

    Phil, you are probably right, the spacing of these sensors could be too close. I don't know what would happen if the signal transmitted by one sensor is reflected back into another close-by sensor, this is something to think about and to experiment with.

    My specs are a first attempt, details may change, but I think once we can reliably cover 50 feet of roadway driveway, we can cover 500 feet.
    The roadway we are talking about will have no pedestrians in any number, think of it as an onramp to a parking garage.

    Uwe
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-08-08 18:49
    Uwe said...
    think of it as an onramp to a parking garage
    A 500-foot onramp? It must be one of those spiral things. This wouldn't be an art installation at an airport by any chance would it? Sea-Tac maybe?

    -Phil
  • RevAaronRevAaron Posts: 30
    edited 2009-08-11 17:18
    Forgive me if someone already asked... What about another kind of of sensor? It seems that there'd be something more suited to this application- cheaper and more reliable. That is, Departments of Transportation have been doing data acquisition on roads for decades- average speeds, mass loads, car counts, etc.

    Recently, we had such a sensor on the road I take to work that they were using to determine whether or not it'd be worth their while to put a highway patrolman out there to ticket those over the speed limit. Visually, it's just a thin black cable. I know they make such sensors that are built around fiber optics and conductive foam. There are other cheaper ways to build such a sensor, but more research would have to be done.
Sign In or Register to comment.