IR or Ultrasonic sensors?

Hi, we have a large black dog and he sleeps wherever and whenever the mood takes him and tripping over him in darkened passageways is a daily event.

Currently I am using two night lights with PIR sensors but they are quite large as they are pointing at each end of the passage and stick out from the wall outlet about 6". The dog, often bumps them just enough to lose pin-contact in the outlet.

I'd like to build something a little more compact and wondering if I should use the PIR or Ultrasonic to detect approaching fall-victims. :slight_smile:

The PIR seems to activate from 3 to 7 Meters, but I need activation at around 1-foot or so. Coming from a well lit room, it needs to see the victim in the first two feet max and throw some light.

Would Ultrasonic be better for this or what?

Thanks

A standard HC-SR04 Ultrasonic Range finder would do the job. Tons of tutorials and examples for using it.
Hook it up any Arduino.

How about simply using a higher outlet, that the dog can't reach?

PIR is I think the most sensible for this project. Simple and efficient. No Arduino needed. Just have the output light up an LED (or through a transistor a few). That's probably exactly what your existing solution is doing.