I want to create a system that will detect illegal parking. I will place the sensor s to specific locations and when a car parks there the system will send a message to local authorities. My question is if a PIR is the suitable sensor for this project.

thanks in advance.

  • probably not - because people walking would trigger it Feb 16, 2019 at 3:44
  • i think that it is a suitable sensor ..... some testing would be required to make sure that it is actually suitable for the specific application .....a question remains whether the local authorities would act on the message received
    – jsotola
    Feb 16, 2019 at 5:52
  • really thank you for the quick response and help. Do you think that propably ultrasonic sensor would be a better choice or a Laser tripwire?..
    – user54032
    Feb 16, 2019 at 10:40
  • I'm assuming it will be communicating wirelessly. YellowBrick used to have transmitters under the parking spot. They would send a signal (to a satellite) every minute. But when there was a car parked on top, the signal would be blocked by the car. So they would know there's a car based on the missing signal.
    – Gerben
    Feb 16, 2019 at 10:57
  • 1
    Another option would be machine vision: hackaday.com/2019/02/04/…
    – Gerben
    Feb 16, 2019 at 10:57

1 Answer 1


Don't get discouraged, there are many ways to do this, but I would rate a PIR as being one of the worst options because even a bird or a squirrel could set it off. Plus, once the car has stopped you can't detect it's presence anymore with a PIR sensor, it has to be moving. I would recommend either using something like a webcam and OpenCV for this or if you're set on using an Arduino and physical sensors, multiple laser or multiple ultrasonic sensors placed 5-10 feet apart so that they both have to trip at once for positive detection of a vehicle instead of something else. You're going to have to spend some time experimenting and tuning. If you want something very reliable and you own the place, you could always do what the public street works does and cut a loop into the pavement and install a large steel cable and use inductance, but that may be overkill. ;)

Some other ideas:

  • Paint a pattern on the ground using high contrast paint and detect when the pattern is completely covered. Maybe there is something you can do with IR reflective paint and use a camera with no IR filter, this way you could make a pattern invisible to the eyes.

  • A carbon monoxide detector - Detects dinosaur powered vehicles, but is nice to the environmentally conscious.

About a decade ago now I created my own parking detection using a Raspberry Pi and a webcam and some Perl code I wrote (non-opencv). I basically just detected the shadow contrast under the car and it worked very well. Originally I tried detecting red colors in the tail lights, but this was more troublesome due to other lighting in the environment. Especially at night. In my case, I didn't have direct access to set up physical sensors and lasers would have been too intrusive, so visual analysis made sense.

Not the answer you're looking for? Browse other questions tagged or ask your own question.