Hacker News new | past | comments | ask | show | jobs | submit login
The overengineered solution to my pigeon problem (maxnagy.com)
261 points by maxmunzel on May 15, 2022 | hide | past | favorite | 102 comments



> [Spikes] work IFF you buy the right ones AND put them absolutely everywhere AND are careful to actually mount them correctly AND you don’t plan to use the area covered yourself at all AND you don’t even want to look at its disgraced looks. So it is completely pointless for a balcony.

They can also be horrifically cruel. I've seen a pigeon die after getting impaled on those kinds of spikes and it was a traumatic experience for me, let alone the poor bird. I really appreciate your attempts to solve this problem without resorting to inflicting pain, or worse.


I don't often comment on usernames but I feel like you're just trying to make sure you don't lose your other eye.


Would you believe, I actually forgot my username while making that comment?!


Sounds like you’re still working through the trauma unconsciously.


I use these plastic spikes. [1] Not even sure if you can call them spikes, moreso just protrusions. They aren't sharp at all so they don't impale the pigeon, only stop it from roosting. They work really well because the pigeons just aren't comfortable sitting on them.

I agree with you about sharp metal spikes. Those are really terrible and I feel bad for any bird that gets injured by those.

[1] https://www.amazon.com/Bird-X-Plastic-Polycarbonate-Spikes-A...


These spikes are in a nook above the office at work. They help hold the bird nest there perfectly, and actually seem to make nesting easier. I could see them keeping away large birds, but for their intended use case, they just made it easier for nests to be put where they otherwise might not stay.

That said, I don't mind it, watching the birds is fun.


That's pretty funny. For me, they work pretty good against the pigeons. Honestly, if it were sparrows or some other type of bird making a nest in them, I don't know if I would care too much. Pigeons are pretty large and make big poops.


Did something similar. My wife was upset about the flying rats defecating on her flower pots on the terrace. Those birds are stationary (generally) and slow so I managed to iterate a solution that (a) used a 3w green laser mounted on a webcam with servos and (b) later used a static laser with a mirror that was mounted on a set of servos. I used a stationary 4k webcam. I mapped the whole terrace so I didn't need to use stereoscopic vision. When a bird was detected (i sampled images at 1fps and built a custom model for pigeons, it was generally ok at avoiding other birds, but not perfect), i'd triagulate its position and light it up for 100ms. I used a similar contraption as the OP to cut the power. The pigeons would react by flying away, even when hit from behind or underneath. I used a series of experiments before settling on 3w. 1w was not enough.

It solved the problem for good. Its not a perfect solution, obviously: i had to implement a master override which stopped it when terrace doors were open, also it only fired at horizon or below since I didnt want to accidentally light up a plane (there is an airport 5km from where I live). We dont have kids, and rarelh entertain guests, so I didnt need to implement additional safety Measures. Lastly, it was running on a pretty beefy pc and was consuming around 60w constantly.

We fixed the problem for good by moving out. If i had to do it again, I'd try with water pistols, way safer than laser.


3w laser sounds terrifying in itself. Firing it autonomously even more so. Have you made some calculation of how long would direct eye-hit need to last to cause blindness, and how long for a bounced light from bright diffuse object? My guess would be way less than 100ms for direct hit, but I am not sure even diffused reflection would be safe at such power levels.


Nope, I assumed any exposure to the light would cause blindness. The way it operated was it would stop if anyone was at the terrace (as indicated by the door lock being in a closed position, something one could do only from the inside). But yeah, it was a product of frustration, not rational thinking. I'd certainly consider it stupid if someone else described it to me now.


That’s an awesome setup. Curious how do you triangulate using the video from a camera.


If you aren't moving your position and you have a topographic map of your territory, and you have a line-of-sight weapon that doesn't need wind or range adjustments... then you don't really need to know where your target is in 3 coordinates, you only need 2.

I would expect that ambient lighting changes are harder to compensate for when selecting targets.

It is, however, terribly irresponsible to do this, since temporary reflectors like water puddles or a misplaced water glass can be inadvertently weaponized.

For small areas, an overhead water sprinkler would be much, much safer and not need aiming at all.


Yeah, I agree - this was an unsafe system. We lived in a secluded space, and that surely helped prevent accidents, but i'd not set it up like this again even if I lived alone.

As others suggested, a water cannon would be safer (not entirely sure about a sprinkler - in my experience with pidgeons they do seem able to get used to all but most unpleasant defences). Also, an auto-firing high pressure, precise water cannon would be a cool side project :->


That was done on the cheap; there is a finite number of spots the pidgeons used to occupy. Pigeons also have a relatively fixed height when stationary. The camera was in a fixed position. I mapped the area the camera was observing manually: railing, base of the terrace, etc. I was contemplating using two cameras but the cheap setup worked nearly flawlessly when it comes to triangulation.


You better not be anywhere near a residential neighborhood. Posts like this remind of of the annoying necessity of regulating what can be sold to retail consumers.


“After a quick burst of manic energy during exam phase…”

It’s amazing what humans are capable of achieving while avoiding doing something else.


I call it productive procrastination

Amazing phenomenon.


This phenomenon is the only reason my house is clean.


Hi HN! I commented about this project of mine a month ago [0] and decided to write a more in depth blog post about it.

Feel free to ask any questions :)

[0] https://news.ycombinator.com/item?id=31024099


What happens when you sit on the balcony?


I love this project! In the spirit of sharing ideas, I would have probably done this full analog. I’d set up a rudimentary analog break beam detector (like what they use to detect if a garage door is cleared to close) beaming across the balcony, and if so, trigger the relay to shoot the gun!


I'm curious, can you share a scan of that police leaflet please?


So how do you aim the water gun? I see no servo motors? Or is it more like a wide spray nozzle?


I don’t aim it at all at the moment. The pigeons mostly land directly behind the railings, as documented by their… presents ;)


A motion activated sprinkler could work too. Or buy a motion detector and have it activate plant water sprayers (the kind used for automatic watering of potted plants).


A cheap solenoid will work with garden watering systems and connections. I made an irrigation system that I added to Home Assistant and it’s great.

https://www.bunnings.co.nz/pope-25mm-solenoid-valve-with-flo...

You can get attachments that allow all sorts of jets, drips and spray patterns.

It would probably plug in nicely in place of the water gun. However drilling through the wall and messing with the plumbing isn’t for everyone.


Also works great for keeping kids off your lawn



Actually not, but it looks similar (minus the network insanity)


Are you going to add a second camera?


Interesting question! The geometry of my balcony kind of restricts the number of places that observe the pigeons without spying on my neighbors. Therefore I’m not sure where else I could put another camera.

I’m thinking about a auto-aiming gun for the next iteration, though.


One in each corner of the window of the balcony?

Just add two microphones and try to integrate the sound and video for extra style points?


I wanted to add video recording in the future to gain some lol-points. But to be honest, the still images of the pigeons + my imagination had me jumping like a child in excitement already ;)


I built something similar using the same internals of a battery operated water gun. I 3d printed a 360 turret enclosure, stuck it on a stepper motor. However mine was manually controlled via my phone. I used it to break up cat fights in the middle of the night


If you want the low-tech solution, here is a recipe that definitely resolved it for me:

- One big spoon of cinnamon

- One big spoon of chilli peppers

- Half a bottle of cheap, cleaning vinegar

Spray it in all the places that the pigeons want to land. I am doing that once a week and it is enough to keep them away. If you clean your whole balcony with it, you might be able to go through most of the spring - when I think they really get annoying because they are looking for a place to make a nest.


This is interesting, I was under the impression that chili peppers specifically evolved (spiciness) to be edible by birds but not mammals. Maybe that's an adaptation specific to tropical birds?


You are correct; birds are not sensitive to capsaicin [0]. Seems this is specifically confirmed for pigeons [1].

Perhaps the cinnamon or vinegar are the true repellents?

[0] https://pubmed.ncbi.nlm.nih.gov/11853675/

[1] https://pubmed.ncbi.nlm.nih.gov/3797018/


Adding on: Though there is no consensus, I believe that is now the less-popular theory for the origin of spiciness. It seems instead to be a form of pesticide and fungicide.

Evidence for this is that pepper varieties tend to be spicier in wetter environments, where the biological resources spent on producing capsaicin to fight fungus are more valuable than preserving them in case of drought.

Source: https://sitn.hms.harvard.edu/flash/2012/issue131b/


Another low tech solution:

feed them occasionally on your balcony… birds are smart and they will not poo in their food plate.

Cooked pasta works well, nothing will be left when they leave.


Hard disagree, or our pigeons are especially daft. (To be fair, ours are wild Mourning Doves), but they crap all over the food and water receptacles we have out for a variety of birds.


I was under the impression that birds have no sphincter so they can't control when they poop. Is this not true?


Some birds do, some don't.

Source: my pet duck didn't have a sphincter.

Pro tip: don't get a pet duck


Wouldn't it then always slowly leak out rather than become one big glop?


This is cool alright, but can I program a Rasberry Pi to spray it?


No water? Just mix in vinegar?


Consider using background subtraction for this: https://docs.opencv.org/4.x/d1/dc5/tutorial_background_subtr...

Will make things a little more robust (and overengineered!).


I’m curious, could you somehow make the background model adaptive by averaging a rolling window of camera frames to use as the background model in this?


This is pretty much what I’m doing. Except that I’m using an exponential moving average so I don’t have to mess with windowing.


Oh nice, I hadn’t thought of that.


Thanks for the hint!


I've been daydreaming about something like this for my squirrel problem. The damn things nearly leave me without nectarines unless I install a cumbersome, unsightly net over the tree.



Not sure this will work but for our birdseed we've had good luck with that super hot pepper oil. Less than a teaspoon of it in a (1/2 gallon?) sized container of birdseed, shaken for 30s-1m to get it distributed has kept the squirrels and raccoons off of it. Couple times and they don't even bother.

Doesn't bother the birds, but mammal tongues light right up.


I can't currently link to it but this reminded me of that Mark Rober series of videos about squirrels.


Could one invest in hawks, owls or snakes?


Hawks and owls require multi-year effort in Falconry licensing (at least in the US).

First 2 years under a sponsor--you can get a very specific hawk or falcon (which hawk or falcon is geographically dependent) After 2 years & sponsor approving it-- you are now a general falconer. Have fun with other raptors, including owls. OTOH.... Wild Owls: excellent pest control.


Squirrels eat nectarines/peaches? Maybe I should hit wikipedia more often and check out things that "everyone knows"


Squirrels are just tree rats. They'll eat anything. I'm more sueprised that nets are effective than their choice of food.


Tom Lehrer solved this one years ago:

https://m.youtube.com/watch?v=yhuMLpdnOjY


This is funny. I've tried to make pigeons come into my terrace to feed them and allow them to nest with no success at all. Yet other people struggle to keep them out of their balconies :D


I once found pigeon nest behind my window with 3 eggs in it. I didn't have the heart to destroy the nest. Little did I know about what filth I will have to clean up once they take off. Also, they left behind some very tiny beetles that I battled with for few weeks to come. They were so tiny they managed to squeeze in through the window's sealing.

This year I found an egg again. I threw it away.


Surprisingly little excrement before hatching, compared to what comes after. And even that is less ugly than what happens when the magpie gets the chick before it gets too big. My current approach is allowing them to breed but sterilizing the eggs with a quick round of cooking. I feel sorry for them when they are close to giving up (how much conflict between hope and growing doubt fits into a pigeon head?), but just removing the eggs will lead to a another attempt and sometimes I'm away for long enough to allow them to get from zero to hatching

(that's how I learned about the magpie situation, was away long enough to have an entire laying-hatching sequence after leaving when freshly sterilized, I suspect they gave up early, magpie discovered and took the abandoned eggs, remembered the spot and came back to the chicks after the next breeding attempt - pure speculation but the schedule would just fit my absence)


Why would you want this? They'll crap everywhere. If you have neighbours they may not appreciate it either.


I always felt curiosity about pigeons, specially homing pigeons and pigeon racing. Where I live, there is not much interest in pigeon racing, but there are quite a few pigeons and doves. Considering I have no neighbours nearby and there is plenty of space here in the outside, I tried to attract them but I failed so far.


Do you do the same with city rats? Both are carriers of a huge amount of diseases.


Have you tried providing food? All you need is raw seeds, no salt!

There are all kinds of small and big birds that visit our balcony, especially in what passes for winter these days.


Yes, I left seeds, bread and other stuff pigeons and other small birds may eat, and also provided some kind of shelter, but the only visits we have here -no matter if I provide food or not- are seagulls, which I'm not interested in.


If you’re not already, try using nutritious food formulated specifically for pigeons or doves.

Seed-heavy diets, even if formulated for pigeons, are very fatty and may not make them feel great after eating. And bread is basically junk food for birds! So if you try a more nutritious blend of food made for them specifically, they may really enjoy it and come back for more.

Plus I imagine gulls won’t bother with their tiny food.


Maybe seagulls drive everything else away. Can't think of anything else, provided there are trees and bushes around.


Not as much fun to build and deploy, but equally effective is pigeon-repellent adhesive. It prevents the birds from landing on treated surfaces and is not too unsightly.

https://www.nixalite.com/product/4-the-birds-gel-repellent


Deer devouring flowers. Off the shelf solution. Motion activated sprayers attached to hose. Worked great, but.

1. Looked like crap. Scifi minitowers in my yard. Hoses stretched here and there. 2. Randomly activating at night. Not loud but quite audible, and disturbing. 3. Occasionally zapped people, skunks, cats.

So I sold them to a friend (they aren't cheap)


Any interest in over engineering it a bit more? We did something similar to spook rabbits[1] in a garden using a computer vision model to detect them (vs your masked motion sensor). Looks like lots of users have shared pigeon detection datasets[2] that could make a good starting point.

[1] https://blog.roboflow.com/rabbit-deterrence-system/

[2] https://universe.roboflow.com/search?q=Pigeon&t=subject


Cool project!


I hope that at least one person pauses to consider the pigeons' close relation to us on the family tree of life, the fact that they have feelings and personalities and can experience joy and pain.


That doesn't mean humans can't hate them for shitting everywhere, however. These solutions discussed here aren't fatal or invasive. The birds don't die and they're free to leave.


Do you shit?


Yup, but not everywhere


You don't shit plastic into the landfills and exhaust into the air and microplastics into the river and literal poop into the ocean?


The most effective solution I found for pigeons (although I haven't built this so can't compare...) is feeding them at regular times. It doesn't even have to be a lot. They're smart enough to know I come out around 0830 to give them some seed, and then they fly away for the rest of the day because no more food is coming. Sometimes when new babies appear, it takes a couple of weeks for them to copy the pattern though.


If you live in an urban area, please don't do this. Pigeons are pests. They carry diseases. Their shit is toxic and can cause serious respiratory issues.


I’d love to have an overenginnered (or not!) solution for the starlings in my neighborhood. Their horrible screechy calls drive me mad. But the fact that it’s sound and not poop that’s the motivation probably makes it a more difficult problem to solve, since it relies on both sound (to find where the demonspawn is) and vision (to not hit some random screechy kid).

Starlings can sing melodic songs too, and I don’t mind those, but what I hear most often are their screeches. They are literally doing it right now outside my window. I wonder if it’s a territorial ”song” that I’m hearing more often than Europeans do since they’re an invasive species in the US, or if this particular call is a learned behavior from the population in my city.

The only theoretical solution that I’ve come up with so far is something that listens for the offending sound pattern, verifies that it’s also a “small dark bird” via camera, and then chases it off a water gun or laser or pocket nuke or stern words or whatever. All of that tech is beyond me, but I’ve definitely fantasized about it ever since they showed up here a few years back.


Cool project! A simple solution that worked for my balcony and window sills was to leave a few cm of reflective tape [1] in some strategic places.

[1]: https://www.amazon.de/-/en/gp/product/B073W7VR6L/


Had to solve this problem at two separate places and boy was it a journey. The pigeons ignored everything, even the spikes; we later found one sitting in nest built directly atop of them, looking all cozy (place was unoccupied at that time). What actually worked was two things: a net and a cat. The net broke once after some strong winds, so needed maintenance, but otherwise works okay, albeit the ugliness factor. The cat solution was a bit unintentional thanks to ... lets say involuntary adoption, but he takes care of problem with flying stars. The pigeons even seem to have started avoiding the place. This is on the fifth floor as well and he thankfully did not manage to yeet over the railing yet, though I wouldn't be surprised given how enthusiastic he is. We did weave a mesh through the railing in a measly attempt to reduce this risk.


IIRC, homing pigeons use infrasound (sound waves below 20 Hz) to navigate, so it may be worth trying them instead of ultrasound in the hope common pigeons too would be sensitive to them. That would require some power and a bigger transducer (namely a subwoofer); still a lot better than having to deal with their excrement.


Anyone notice how few birds there are nowadays? Used to see them all the time. I live in a bird sanctuary. I see the same 25 birds every day. Used to be thousands. Maybe insects have collapsed. Maybe it's just us. I wish we could stop killing things.


nope, I see mostly magpies around my house all the time here in Prague literally any time (they must like my neighborhood, seems they took over all other birds), often also pigeons, rarely other birds, can't say I don't like being in company of one of the smartest animals on this planet, shame dunno how to make friends with them

but yeah it's extremely rare for me to see sparrows unlike my childhood in small hometown 25-30 years ago, might be because of size of town


We have a very large yard and lots of trees so I started putting up bird feeders.

Now we have more birds than I've ever seen.

They're still out there.


Where I live, 200ya they wrote about how large flocks of geese would literally darken the sky. There most certainly are far less birds than there were 200ya, but even 30 years ago there were still, you know, flocks of birds. Flock of birds now is like single digits. I have lived here, rural, since 2018, and there's hardly any birds. Amazingly, I saw a gathering of blue heron not long ago, about of dozen adults. That's insane numbers. But wait... there should be thousands of them. Get out of here with your, "they're still out there." Yeah, a few, I guess.


I hate spikes and nets. Have seen some pigeons die slowly and rot in them. It was horrible and would have kicked someone's ass if I knew who installed them.


Here's a solution implemented by a friend a couple of years ago. It detects pigeons and shoos them away by waving a stick with ribbons: https://towardsdatascience.com/how-to-use-deep-learning-to-s...


I've been looking at some automated way to scare coyotes out of my yard almost every night at 3am. It drives the dog nuts.


Ouch! I hope they aren't howling too. Coyotes howling is one of nature's crazier sounds. The first time I heard it, from a distance, I was all kinds of confused. "Is there a mad hobos-on-meth tea party going on over the next hill? Are they coming for me? Will it be fun?"


"Plastic crows Pigeons get used to them"

When i lived in a small appartment with a baclony i was advised to get a (small) statue of an owl to get rid of pigeons. I bought one at our local el-cheapo market and it seemed to do the job. Didn't monitor it though, becuase i didn't care that much.


At a very high end hotel with a very large veranda, they ran what looked like clear fishing line horizontally.


You can just buy off the shelf a ordinary lawn sprinkler controlled by a motion sensor. Though maybe the total amount of water might be undesirable on a balcony.

I found them quite effective at supplementing a fence to keep deer out of areas they shouldn't be in.


Any particular motion sensor? Low voltage?


The ones I use and have seen use PIR, and are battery powered. The batteries last a long time esp. if it isn't triggered often.

The biggest limitation I've found is that it takes a bit of soldering iron adventure if you want to have a remote disable switch. :)


Would love to see the demo


I use tie wraps spaced about 10-15 cm apart. Works 100%.


When do you get a house with a garden and mount this on a radio controlled car chasing cats, asking for a friend?


That is absolutely ridiculous. I love it.


Hmm... This is actually not a bad idea. Like seriously, some people will pay for it IMO. It might actually be a viable product.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: