Sensor to detect rats and mice

I'm looking for a sensor idea to detect rats and mouses in a room (at the floor).
Any hints?

sorry, can't resist :-). a cat?



Maybe you can use a PIR sensor/ Laser transmitter and reciever but that will also detect humans. @LarryD gave you a good solution.

on Arduino SE there was a question on how to detect an elephant. one recommendation was a weight sensor

1 Like

The plural of mouse is mice. So I took the liberty of changing the title.

You might try a Raspberry Pi processor and a camera. You keep the last image you took and subtract it from the last image on a pixel by pixel basis. The result is the change or delta of the image. You then count up all the delta pixels and when this reaches some threshold determined by experiment you trigger he action you want.

Or you could use a time if flight distance sensor to see if anything comes within range. An ultrasonic sensor would tend to scare the rodents away from your sensor.

Thanxs a lot!! Larry D wins the first prize!! :rofl:
Second: Sorry, Jurai, but also a good one!

Ps: I'm looking for a sensor for boats conserved over the winter, so cats and cheese traps are not possible. I'm not a big fan of PIR sensors because direct sunlight can fool them but PIR mounted on floor level is probably the best solution.

PS: Grumpy Mike: Thx for the mice correction, i'm not english native as you can read in my posts.. ;=)

With Machine Learning an ArduinoBLE or a ESP32, and TensorFlow Lite a mouse can be detected..

but how do you train it?

Give it cheese every time it recognizes an ESP32 or a Pi.

Cover the ESP32 with cheese. Put ESP32 onto trap. Wait.

I am sure the Google TenserFlow store will have rat Tensors.

OP didn't mention any trap. What happens when a mouse or rat is detected? Trap door opens under it?

No kidding, I have actually used LarryD's solution, connected to a BeagleBone, to tell me when the trap caught a mouse.

So, I can assure everyone that it works in production :slight_smile:

Sounds silly, but I leave a peanut on the floor in my garage and this works great as a mouse detector in that if it is still there I know there are no mice about.
When it has gone I use an esp32-cam with motion sensing to find out what it is
i.e. GitHub - alanesq/CameraWifiMotion: Motion detecting security camera using a cheap ESP32-cam camera module

An infra red beam may be a reliable way to detect them?

I don't recall if its even appropriate, but look into microwave sensors.
Knowing the layout of the boat, can you place a few interrupt beam sensors in strategic locations?

I have a question. Most boats I see stored over the winter are "wrapped" in heatshrink. Can the meeces** get past the wrap?

**According to Tom of Tom and Jerry fame.

If you can't use a cat or a trap, what good does it do you to detect mice?

In my experience, mice are pretty much everywhere(*), and you can safely assume that they are around.

(*) with some exceptions, like near the N and S pole in the dead of winter, top of Mt. Everest, etc.

Google suggests this may be a way to detect them: " Mice have the capability of vocalize across a broad range of frequencies that extend from as low as the human-audible range (when we hear squeaks) to well into the ultrasound range, above the limit of human hearing (20,000 cycles per second (hertz) = 20 kHz).".


@jremington Not in my house :slight_smile:

You can use these :

Laser Transmitter and Receiver.

Whenever the laser line breaks you can get alerted.

I don't know if Laser can scare away mice.


Trail cam?

They are in the walls. Even if you have a cat. Trust me.