[HN Gopher] The overengineered solution to my pigeon problem
       ___________________________________________________________________
        
       The overengineered solution to my pigeon problem
        
       Author : maxmunzel
       Score  : 208 points
       Date   : 2022-05-14 14:00 UTC (1 days ago)
        
 (HTM) web link (maxnagy.com)
 (TXT) w3m dump (maxnagy.com)
        
       | aenis wrote:
       | 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.
        
         | ww520 wrote:
         | That's an awesome setup. Curious how do you triangulate using
         | the video from a camera.
        
           | aenis wrote:
           | 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.
        
           | dsr_ wrote:
           | 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.
        
       | yeldarb wrote:
       | 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
        
         | maxmunzel wrote:
         | Cool project!
        
       | 93po wrote:
       | 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
        
         | ramraj07 wrote:
        
       | rglullis wrote:
       | 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.
        
         | geoduck14 wrote:
         | This is cool alright, but can I program a Rasberry Pi to spray
         | it?
        
         | andai wrote:
         | 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?
        
           | Conlectus wrote:
           | 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/
        
           | MontyCarloHall wrote:
           | 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/
        
         | realo wrote:
         | 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.
        
           | michaelcampbell wrote:
           | 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.
        
           | imperistan wrote:
           | I was under the impression that birds have no sphincter so
           | they can't control when they poop. Is this not true?
        
             | geoduck14 wrote:
             | Some birds do, some don't.
             | 
             | Source: my pet duck didn't have a sphincter.
             | 
             | Pro tip: don't get a pet duck
        
             | MerelyMortal wrote:
             | Wouldn't it then always slowly leak out rather than become
             | one big glop?
        
       | [deleted]
        
       | logophobia wrote:
       | 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!).
        
         | maxmunzel wrote:
         | Thanks for the hint!
        
         | catlifeonmars wrote:
         | 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?
        
           | maxmunzel wrote:
           | 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.
        
             | catlifeonmars wrote:
             | Oh nice, I hadn't thought of that.
        
       | Terry_Roll wrote:
       | When do you get a house with a garden and mount this on a radio
       | controlled car chasing cats, asking for a friend?
        
       | swayvil wrote:
       | 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)
        
       | gbolcer wrote:
       | 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.
        
         | finnh wrote:
         | 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?"
        
       | maxmunzel wrote:
       | 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
        
         | neopallium wrote:
         | 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).
        
           | lostlogin wrote:
           | 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.
        
           | darkerside wrote:
           | Also works great for keeping kids off your lawn
        
         | amelius wrote:
         | Did you see:
         | 
         | https://www.youtube.com/watch?v=uIbkLjjlMV8
        
           | maxmunzel wrote:
           | Actually not, but it looks similar (minus the network
           | insanity)
        
         | maccard wrote:
         | What happens when you sit on the balcony?
        
         | gus_massa wrote:
         | Are you going to add a second camera?
        
           | maxmunzel wrote:
           | 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.
        
             | gus_massa wrote:
             | 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?
        
               | maxmunzel wrote:
               | 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 ;)
        
         | jandeboevrie wrote:
         | So how do you aim the water gun? I see no servo motors? Or is
         | it more like a wide spray nozzle?
        
           | maxmunzel wrote:
           | I don't aim it at all at the moment. The pigeons mostly land
           | directly behind the railings, as documented by their...
           | presents ;)
        
       | oneeyedpigeon wrote:
       | > [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.
        
         | goldenkey wrote:
         | 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...
        
           | honopu wrote:
           | 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.
        
             | goldenkey wrote:
             | 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.
        
         | maccard wrote:
         | 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.
        
           | oneeyedpigeon wrote:
           | Would you believe, I actually forgot my username while making
           | that comment?!
        
             | nickkell wrote:
             | Sounds like you're still working through the trauma
             | unconsciously.
        
               | [deleted]
        
       | mnem wrote:
       | 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.
        
         | rglullis wrote:
         | 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.
        
       | RobertRoberts wrote:
       | At a very high end hotel with a very large veranda, they ran what
       | looked like clear fishing line horizontally.
        
       | widea wrote:
       | I use tie wraps spaced about 10-15 cm apart. Works 100%.
        
       | haraball wrote:
       | 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/
        
       | magnusss wrote:
       | 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
        
       | forgotmypw17 wrote:
       | 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.
        
         | picture wrote:
         | 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.
        
       | robofanatic wrote:
       | Would love to see the demo
        
       | hahajk wrote:
       | "After a quick burst of manic energy during exam phase..."
       | 
       | It's amazing what humans are capable of achieving while avoiding
       | doing something else.
        
         | montenegrohugo wrote:
         | I call it productive procrastination
         | 
         | Amazing phenomenon.
        
           | [deleted]
        
           | supertofu wrote:
           | This phenomenon is the only reason my house is clean.
        
       | ihaveajob wrote:
       | 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.
        
         | michaelcampbell wrote:
         | 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.
        
         | oblak wrote:
         | Squirrels eat nectarines/peaches? Maybe I should hit wikipedia
         | more often and check out things that "everyone knows"
        
           | t-3 wrote:
           | Squirrels are just tree rats. They'll eat _anything_. I 'm
           | more sueprised that nets are effective than their choice of
           | food.
        
         | swayvil wrote:
         | Could one invest in hawks, owls or snakes?
        
           | meristem wrote:
           | 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.
        
         | kordlessagain wrote:
         | You might like this:
         | https://docs.vizycam.com/doku.php?id=wiki:birdfeeder_app
        
         | kretaceous wrote:
         | I can't currently link to it but this reminded me of that Mark
         | Rober series of videos about squirrels.
        
       | klausjensen wrote:
       | That is absolutely ridiculous. I love it.
        
       | chrissnell wrote:
       | Tom Lehrer solved this one years ago:
       | 
       | https://m.youtube.com/watch?v=yhuMLpdnOjY
        
       | severino wrote:
       | 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
        
         | secondcoming wrote:
         | Why would you want this? They'll crap everywhere. If you have
         | neighbours they may not appreciate it either.
        
           | severino wrote:
           | 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.
        
         | oblak wrote:
         | 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.
        
           | severino wrote:
           | 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.
        
             | alexander-litty wrote:
             | 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.
        
             | oblak wrote:
             | Maybe seagulls drive everything else away. Can't think of
             | anything else, provided there are trees and bushes around.
        
         | rglullis wrote:
         | Do you do the same with city rats? Both are carriers of a huge
         | amount of diseases.
        
         | rkuska wrote:
         | 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.
        
           | usrusr wrote:
           | 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)
        
       | Maursault wrote:
       | 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.
        
         | LeoPanthera wrote:
         | 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.
        
         | Markoff wrote:
         | 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
        
       | amitport wrote:
       | Hmm... This is actually not a bad idea. Like seriously, some
       | people will pay for it IMO. It might actually be a viable
       | product.
        
       | nullc wrote:
       | 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.
        
         | everybodyknows wrote:
         | Any particular motion sensor? Low voltage?
        
           | nullc wrote:
           | 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. :)
        
       ___________________________________________________________________
       (page generated 2022-05-15 23:00 UTC)