Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Build your own hackable automated cat feeder for $20 (nachonachoman.svbtle.com)
157 points by pweissbrod on Dec 28, 2016 | hide | past | favorite | 95 comments


Friends don't let friends use Arduinos. Please use a Wemos D1 Mini, which costs $3, has WiFi, runs your Arduino code almost unmodified, and is amazing.


Please recommend the real product (ESP8266) so the guy can choose a dev board, they are plenty, all with different options.

And for those who dont know ESP32 came out erlier this year and has much better specs, power consumption, Bluetooth, etc. You'll want that.


This is like the difference between a bare Atmega and an arduino.

The wemos has a programmer on it, a USB port, etc. It is based on the ESP, but it is a lot more than just an ESP.


If you search ESP8266 you'll find boards like that too, from more suppliers and in more form factors.


I don't think someone who's using an Arduino will want to go to the bare MCU directly, and WeMos is the best breakout, so why recommend anything else?


NodeMCU is a contender for best ESP breakout too. It's good to know alternatives.


What do you like about it? I have a few, but I don't like how many redundant/unusable pins it has and how big it is.

I generally find it better to recommend one thing to new people than to inundate them with options that they can't differentiate between and that, ultimately, won't matter to them. If you don't know what you want to get, what service am I doing you by showing you many different options that are more or less the same, and which you don't know enough to choose between?


Here is a nice article about dev board comparisons.

http://frightanic.com/iot/comparison-of-esp8266-nodemcu-deve...

wemos has a smaller form factor, but lacks breakout, has the ch34 and is headless so maybe not suitable for beginners like i think of the nodemcu.

edit: also I'd like to add that the nodemcu and sparkfun thing already have a esp32 upgrade available where the wemos has not.

But hey, just my opinion.


Again, personal preference. I like the nodemcu better. Then there is sparkfun thing, adafruit huzzah, wio with groove, etc.

You'll want one of the boards listed on this webpage: http://esp32.net

$3 or $15 really doesn't matter here.


> Please use a Wemos D1 Mini

It's actually the ESP8266 chip inside that you're after. It runs Arduino code, although you must tell your IDE you're targeting an ESP8266 (it has special libraries for wifi use, etc...).

ESP8266's come on many boards, including the bare-boned ESP-01 [1], which is even cheaper at $1.53 per each.

The only problem with ESP8266's, is they are very power hungry, requiring 500mA-1A for doing wifi related things. Although, when not using WiFi, you can shut down the antenna and save on power consumption.

[1] https://www.aliexpress.com/item/ESP8266-Serial-Esp-01-WIFI-W...


>It's actually the ESP8266 chip inside that you're after.

No, it isn't, just like most arduino users aren't actually "after" the Atmega328p.


> No, it isn't, just like most arduino users aren't actually "after" the Atmega328p.

Every one of the boards we're discussing has an ESP8266... the specific board itself doesn't matter really. You found the chip you need, now you just find the board that has the features you want.

In the case of the arduino, there's a plethora of microcontrollers they can have, ATmega328p being only one of them.

The microcontroller on the arduino dictates it's maximum capabilities - for example, ATmega328p only has one set of hardware serial TX/RX pins, whereas the ATmega2560 has two sets.

In the case of boards/modules built using the ESP8266, the board/module dictates the maximum capabilities. It either exposes GPIO ports or it does not, some boards build in power regulators or battery connectors, or other nice-to-have-features that do not exist in the ESP8266 chip itself. It's the same chip under the hood.

So, yes, in this case, it is indeed the ESP8266 chip you're after.


>So, yes, in this case, it is indeed the ESP8266 chip you're after.

No, it isn't. You're after a chip with wifi, that you can program using the arduino IDE, that has a programmer on it, and that has the pins broken out.

The thing people want here is the Atmos D1, which uses a ESP8266 to cover some of those wants, and itself to cover more of them.

When I am buying, for instance, a bean (basically an arduino variant with a BLE radio on it), I am not buying an AVR.

Bluntly: I spend about 100% of my time working from a hackerspace, and a good chunk of that time is spent teaching people to program microcontrollers. The D1 is by far the best ESP8266-based board I have seen so far. THAT is the thing that people have been wanting, the ESP part of it is irrelevant to people. They want something that does the things I outlined. The ESP just happens to do half of them. If tomorrow, wemos swapped that chip out for an identical one, people would STILL want the D1, and wouldn't be missing the ESP at all.


D1 mini and nodemcu. Hands down. So cheap and easy to use.


I'm not sure what you're arguing about. You're saying exactly the same thing, just another way.

> You're after a chip with wifi, that you can program using the arduino IDE, that has a programmer on it, and that has the pins broken out.

That would be an ESP8266... no? The ESP8266 is everything you just listed as a requirement - it literally checks every box you laid out. Now you just pick a board in the form factor you need for your project, and has any additional features you need/want.

> The D1 is by far the best ESP8266-based board I have seen so far.

You just said it again right there. The D1 just happens to be the packaging the ESP8266 is wrapped in.

> When I am buying, for instance, a bean (basically an arduino variant with a BLE radio on it), I am not buying an AVR

Except that you are! The bean is powered by an ATMega! The 328p to be exact!

> If tomorrow, wemos swapped that chip out for an identical one, people would STILL want the D1

Probably not, since any other chip is unlikely to have as much community support and integrate so seamlessly into existing arduino IDE's.

People don't want a wemos or D1, most people don't even know they exist! People want an arduino with wifi that doesn't cost $99 and isn't in a clunky shield form factor. They get that with an ESP8266 wrapped up in one of the hundred different board options, of which, the D1 is but one.

Heck, you can even get an ESP-01 (ESP8266 chip with only basic functionality exposed) for less than $2, and add wifi to an Arduino Uno, or any other device with serial capability.

> Bluntly: I spend about 100% of my time working from a hackerspace, and a good chunk of that time is spent teaching people to program microcontrollers

Perhaps you should spend some time teaching people about what they are really working with. They don't need an arduino to build their project, they need a microcontroller, and the ATmega328p happens to be very cheap, easy, and accessible for even complete beginners. You're kind of doing people a disservice by leaving the arduino as a magic black box.


>Perhaps you should spend some time teaching people about what they are really working with.

Oh FFS.

Look, if you give the overwhelming majority of people this: https://www.aliexpress.com/item/5pcs-lot-ESP8266-Wifi-Chip-w...

They aren't going to make anything.

If you give them this: https://www.aliexpress.com/item/1PCS-ESP-12F-ESP-12E-upgrade...

They are going to have a bad day because it doesn't have a programmer built onto it.

If you give somebody this:

https://www.aliexpress.com/item/WEMOS-D1-mini-Pro-16M-bytes-...

They are going to install the arduino IDE, hook it to a USB cable, and make something.

Are you technically pedantically and absolutely pointlessly correct that the ESP8266 chip is the important part of this to SOME people? Yes. But the people who are taking a bare chip in a freaking QFN package and building something around it, who have the equipment to mount it to a board, are not reading "$20 DIY cat feeder" articles, nor would they be in any way confused by somebody telling somebody to buy a prototyping board in an arduino-form-factor.

Your "point" here is one that is completely irrelevant to anybody who would be reading it.


Nobody said buy a raw chip and give it to a newbie. You've stuffed a straw man just to further your point.

The ESP8266 is in every ESP8266 based board. Your favorite ESP8266 based board just happens to be the D1 that comes with extra bells and whistles, such as a USB port.

The point I originally made, that apparently started your tirade, was that the ESP8266 is the common chip that provides the capability people are looking for.

They don't need to buy a D1 to get that capability, they can buy _ANY_ board with an ESP8266 inside! So long as it has an ESP8266 inside, they get the community support, IDE support, and WiFi support. If they want/need it, they can also get GPIO and directly program the ESP8266 inside, but that is _NOT_ required. You can plug any ESP8266-based board into another microcontroller and get WiFi connectivity through the serial pins.

You've found the chip - now you just find the board. How do you not understand that?

With that said, I feel this could go on forever... so... we're done.


To agree with the GP, I've had dozens of people come up to me and ask me for a recommendation on what to buy "to make things with hardware". That's literally their description, and how much they know about the subject. The answer to that is "the WeMos D1 mini"

Not once has someone asked me "what are various boards I can use if I want to program the ESP8266?". Literally zero times have I met someone who would know what to pick between all the different options and didn't know the term to search for on eBay.


Thank god, this guy should not be teaching anybody, anything.


1A? Do you have a source for that? It could have an impact for a project I'm working on.

Most documentation I've seen seems to state a typical max draw of <250mA (for instance, http://bbs.espressif.com/viewtopic.php?t=133) -- I guess there will be some spikes, but I was never aware of anything approaching 1A.


Here's a graph of current consumption of an esp8266, which I measured with a 2 ohm resistor between my power supply and an rt9013 regulator https://imgur.com/a/c30mL (At one point I de-soldered the status LEDs from the module - I can't remember if this was before or after that)

There are several spikes approaching 500mA - and you might see even higher current consumption if you're further from your wifi AP, or if you have extra components, a different voltage regulator, or different capacitors.

Many beginners only have a basic multimeter (if that) so they might have a hard time diagnosing problems caused by spikes in current consumption. So I think it's good for beginners to get at least a 500mA power supply, even though the average on state current consumption only hovers around 70mA.


The 1A figure might be more of a precaution - can't find anything "official" from Espressif (ESP8266 manufacturer), although most people on forums seem to agree 500mA is as low as you want to go. Seems you can expect ~250-300mA to be normal when using wifi.

Anecdotally, I've experienced reliability issues when running off 500mA, but that could just be my setup + accessories.

It's funny how it works - last time I went down the rabbit hole on the tail end of a late night session, everything pointed at 1A being considered "safe", and anything lower was "iffy".

If you put the chip into any of the Deep Sleep modes, power consumption goes way down to just a few mA's, making battery operation much easier.

http://www.esp8266.com/viewtopic.php?p=57788#p57788


I use a PSU with an ammeter and it shows around 250mA in everyday use.


Also has an NTP library that's simple to use so you won't need a ridiculous 1960's mechanical wall timer to time your modern micro board.


Glad I'm not the only wemos fan here. I like the original D1 better, though, since it fits all of the shields build for arduino (like the screw shield, which I've been putting on everything lately).

Wouldn't recommend it is a straight replacement, though, since it uses 3v logic, instead of 5v. A lot of stuff wants to see 5v, so you'd need a logic level shifter to use the wemos stuff as a drop in replacement for the arduino.

Only one analog pin, also.


Thanks! I had no idea about this. Will use it in the future


Or you could buy Arduino Nano which costs ~€2.5-3, fine it doesn't come with WiFi, but it also comes with analog inputs which the Wemos one seems to be missing. So it depends on what you want (also ESP8266 costs about same as the Arduino Nano)


I found the sparkfun ESP boards to be really easy and simple to hack with. Here's the feeder & water system I built along with source codes https://youtu.be/RoIAb3Ymk2M


What would a friend recommend someone using a SparkFun Thing? Any good replacements (it has a JST battery connector, among other features.)


The Sparkfun Thing is basically the same... they all have the ESP8266 at the core, the only difference between the various boards are board features (such as the battery connector) and how many GPIO ports of the ESP8266 chip they expose.


Thanks! Basically I built a prototype on the Thing and am hoping to find a board that I can use to replace it wholesale without too many adjustments.


Here's a few decent breakdowns of the various boards and features[1][2][3].

With the ESP8266 chip, you have a lot of board options!

[1] https://www.losant.com/blog/top-6-esp8266-modules

[2] https://openhomeautomation.net/choose-esp8266-module/

[3] http://www.esp8266.com/wiki/doku.php?id=esp8266-module-famil...


That it's sold on AliExpress is also amazing.


Yep! Here's a convenience link, for anyone who wants to buy one or five:

https://www.aliexpress.com/item/D1-mini-Mini-NodeMcu-4M-byte...


Reminds me of this recent HN post on cat-proofing a cat feeding machine: https://news.ycombinator.com/item?id=13230904 http://quinndunki.com/blondihacks/?p=3023

And the older one on making Monkey the cat hunt for his dinner: https://news.ycombinator.com/item?id=10021268 http://benjaminmillam.com/cat-geek/monkey-the-cat-hunts-for-...


From what I've read / discussed with animal nutritionists, you want to feed your cats pure protein wet food. They get more water from wet food than they do from drinking water. Plus you avoid a ton of crappy things they put in a bunch of dry foods.

I feed mine Wellness Core and they love it.


If you want to go down that route; feeding them raw and making their cat food would be for the best. However there is nothing wrong with dry food supplemented with other food.

We all have limitations on the amount of time we can spend with our loved ones (animals included). Making sure they are fed is very important, but sometimes you can't be around when they need their food.

This seems exactly like the best solution to the individuals problem.


I had a lot of success switching a cat to a wet diet. It cleared up many health issues for her. Dry food is their junk food.


> I had a lot of success switching a cat to a wet diet. It cleared up many health issues for her. Dry food is their junk food.

Her is the keyword here.

Castrated male cats (cats are almost always castrated here) generally get FLUTD.

We got a special diet for him.

And we CBA with separating them for food. That's just not practical.

So, she'll also eat his diet food.

We occasionally give them some different food like our leftover herring. But that is very salty for them. Its a treat, but not healthy.


what about their teeth ? I've heard, at least for dogs, that the crunchy dry food helps keep their teeth healthy


thats an old wives tale. And if my cats teeth are any indication, a dry diet didn't prevent any problems

Granted, there's no proof that wet is better, there's just a ton of anecdotal evidence that dry food leads to dehydration and kidney issues. I had to switch entirely to wet due to diabetes. Surprisingly, fancy feast classic is one of the most recommended foods.


Take them in for their regular vet visits.


My cat is completely blind, making her an ideal test subject for a homemade cat feeder, but she also doesn't overeat, so I just leave three days' worth of cat food in her bowl and she eats a bit every so often.


I'm surprised to see this is the only comment mentioning leaving a bowl of food out 24/7. This is how it's done at every shelter I have volunteered at (and how I do it at home) - the cats should always have access to water and some form of food. The wet (canned) food is what you have to be more careful with because the cats will compete for it.


Yep. We tried this before making the automated feeder. Gave it a 2-week trial period. The initial reaction was surprise and delight with the abundance of food. Initially they decided to eat 3-4X what I normally feed them twice a day. I was hoping once the initial party tapered down they would get sensible. Two weeks in I had 2 happy tigers and two very sluggish fat sad tigers that did pretty much nothing but eat and poop. And Oh man the litter boxes were a nightmare. I needed to clean them 3x day to keep up. I never figured out a way to get _all_ tigers to be responsible with open buffet policy.


It depends if they went hungry at some time in their life.


Some cats will pig out, even if food is regularly available and not scarce. You don't want to overfeed them. This gets way more complicated as the number of cats increase.


Cats will also fight over dry food. Source: have two cats who like to steal each others' food (dry or wet) and bash each other regularly... and occasionally I'm the victim of full paw bashing in the morning, when they're hungry.

Sadly OP solution wouldn't help me because they 'd just kick the food under thr sofa where it can rot...


food hockey!


I guess it depends on your animal's feeding habits. My dogs don't overeat, so we just leave the food out and refill it when needed. Dry food, that is. For wet food, they'd just about fight over it.


If given as much food as he wants, my cat gets really fat (I am talking 25 pounds fat). I have to control his food intake.


Whoa, 12 kg?! That's either Garfield level of fat, or you've got a massive Coon/Norwegian Forest megacat...


He is a Siamese... he is back down to 13 pounds or so, with some diet changes and portion control.


Good to hear your cat has managed to avoid hepatic lipidosis during weight loss!


What is the code trying to do?

Sweep left (food starts falling), wait on average 90 sec (food gone?), sweep right, wait 85ms.

Then does it stop, or repeat the loop (until the outlet timer turns it off)?


I think left is closed. So it starts by issuing the close command, waiting a random amount of time, opening, delaying 85ms, then restarting the loop by closing.

The random sleep seems unusual, though -- I would have normally done delay(random(1802) 1000) -- is this a particular idiom with a benefit I don't know about?


So the intent is an 85 ms burst of food, every couple of minutes -- that makes more sense.

The initial "close" threw me. Is the door initially open? Or are we just jamming it shut and stressing the servo?


I assumed it was some kind of fail safe... Always start the loop in the closed position. In case the Arduino got reset mid cycle...


I wonder how often power shuts off during the delay(85 ms) time window. Statistically maybe a 1 out of 1000 chance.

Probably more likely to shut off while opening/closing the door -- in those 2 loops (2 out of 1000?). Assuming an average main loop of ~85 seconds.

Kitty jackpot!


It repeats the loop from the top


I would love to build more devices but the thought of installation always bothers me. I always hate having to hang things on a wall. It requires either finding a stud that is close by or using a crappy dry wall screw or molly screw.

I'm particularly unlucky because I live in an ancient house so studs are never ever close by and all the walls are plaster so that means 1 inch hole with a molly screw (with chips of plaster and dust and follow up vacuum job... god forbid you ever take the thing down because now you have to patch the hole back up).

There has to be better solutions to attach things to the wall (and yeah I have done the whole velcro command strip thing as well).


If you had real drywall, an alternative to a toggle or molly screw would be to drywall anchors; there are two types.

One type is fairly common (and might be able to be used with plaster - maybe) which has a plastic insert you install into a drilled hole, then when you thread the screw into it, it expands to wedge itself in the hole. IIRC, the largest of these can hold about 30-50 lbs in drywall (probably less in plaster).

The second type uses a large threaded insert; the hole you drill for this is typically larger than the screw which threads into it, but the anchor can hold much more weight (up to 150 lbs per anchor in drywall). I don't think they can be used in plaster, though, as they are meant to thread into the drywall.

I've used both successfully for a number of projects in my house; I have an entire wall (about 12 x 8 feet) of bookshelves (using shelving standards and melamine shelving) held up by the threaded anchors (hundreds of pounds of books). I have used the expanding anchors for heavy items like large pictures and mirrors, among other items.

The major downside with any of these anchors, though, just like molly or toggle bolts they leave larger holes which need to be filled if you move the item. Hence, you typically only use them for items which will rarely, if ever, be moved.


For drywall, for lighter weights, let's say pictures, mirrors, not book shelves, there are actually self-drilling and self-threading anchors, you don't need a drill, only a power screwdriver, there are both metal and nylon ones:

http://www.colfert.com/Public/img/catalogo/products/zoom/img...

https://admin.abc.sm/upload/1115/catalogodinamico/prodotti/H...


You don't expand on the problems you had with the strips, but that's my go-to option and except for the occasional loss of paint on removal, they work fine. Have you tried the non-velco versions? They might be more appropriate for your needs.


The humidity seems to be the killer to the strips. They work for a while and then eventually fail.


Have you tried 3M Command Adhesive hooks? As long as you clean the surface with rubbing alcohol, they can hold a lot of weight (a couple of the medium-sized ones would suffice for this cat feeder, I think).


Seconded on 3M Command Adhesives, and if humidity is a problem, there are water-resistant ones meant for the bath that work quite well.


I bet you could find a used speaker stand that would provide a nice object to attach to.


Is foraging actually natural? Don't cats kill their meal, leaving it all in the same place?

Sounds more like an excuse I'd give my wife for why I solved the tampering problem by introducing a mess problem.


Actually making cats employ more hand/eye coordination to get their food is considered a healthier alternative to just laying it in a bowl. For example: https://www.google.com/search?q=cat+challenge+bowl&ie=utf-8&...


Makes sense. Pulling the nutrients out of a rodent carcass would take considerably more effort and paw eye coordination than just eating kibble from a bowl.

I was more focused on the "foraging" concept with regard to cats. I don't think cats forage.


In nature, the cat would wonder and "forage" to find prey to eat.

Years ago we rescued a barn cat, she would wonder all over the area to find food (few mi radius): birds, mice, etc.


Yeah. I guess now I'm just being pedantic on foraging vs. hunting. =)

Barn cats are so cool! Little murderfloofs with their instincts well intact.


Cats will get cat acne if you don't clean their food dish... or force them to eat off of the floor.


Interesting, I had never heard of that. Here's some more info on it:

https://en.wikipedia.org/wiki/Feline_acne#Causes


(Shameless plug)

CleverPet Hubs work with cats, too! https://www.youtube.com/watch?v=lzXwrXEkmHM

Also, there have been rumors that the Hubs will be user-hackable in short order. And they use Particle Photons in any case ...


OP said he got "sticker shock" from shopping for automated cat feeders, but... how? The link he posted shows plenty that are $30. And the really well-reviewed gravity feed ones are $60 at most.


Yeah that was lazy work on my part. These pet feeders are quite reasonably priced. But i was looking for something with programmability. I still want to feed my tigers breakfast. I just want them to be OK with me sleeping in. So the compromise is to have something that disperses very small amounts of dry food at unpredictable intervals to keep them entertained and have a light appetizer while dad gets another 45 mins sleep. The feeders capable of doing that level of configurability started at $150 and they were quite impressive but I personally felt compelled to make something fully programmable for the way my house works. But youve got a good point here so I will update the link.

EDIT: the link I was talking about was thhis: http://www.super-feeder.com/ It is very cool if money is not an object to you


If only he had another less creepy pet name for his cats.

"Eat it up! Eat it ALLL up my little Tigers!"


Sorry I creeped you out man. My cat strongly prefers the word tiger as his reference. I think is cousin is an ocelot or something


OP here. As my friends have pointed out this wont work so well if you have a dog :(


Well, it won't work with cats either, it will take anything between one nanosecond and 15 seconds to rip open the thingy after having taken it out of the wall (high as you might hang it). Compare with this recent post (the OP there maybe overdid it a tad bit, still...):

https://news.ycombinator.com/item?id=13230904


I went through a similar process in 2003 with two cats that begged incessantly for food. I had to bolt the feeders (of different manufacture and style) down to a sheet of melamine and add thin metal shielding at the front to prevent the cats from reaching up the chute to the auger, but IMO Furiosa's feeder is grossly over-engineered due to leaping from various half-baked initial anchoring attempts directly to a doomsday device. In any case, our collected experiences suggest that cat feeder manufacturers do not adequately field test their devices.


Yep, or maybe we have smarter or more persistent cats.

Anecdotally, once I had two cats that I "trained" to use a catdoor I had just installed.

Cat #1 learned to use it in like three times I guided him thought the thingy. Cat #2 simply couldn't grasp the idea and after like 100 attempts I gave up.

Later I heard "boom, boom, boom, boom, boom, tlatlac!", cat #2 never learned to use the catdoor "properly", or maybe he had some vision defect, cannot really say, but he got that it was a way in so it simply went head in on the whole door (from left to right in 15 cm steps) until he got through the cat door.

One way or the other, he got in.


One of our cats thought velocity was key when entering through a catflap. He'd use most of the garden as a runway, hitting the door at full speed with a BLAM! that could wake you up at night.


"IMO Furiosa's feeder is grossly over-engineered"

I think that was half the point.


Interesting enough my most troublesome tigers are curiously scared of heights. They dont jump very high so it is not a problem for my household. I do appreciate many cats will have more ninja skills than mine in which case it may indeed cost more than $20 to secure your tiger food


Hope it doesn't kill your cat. Doesn't seem like something I'd want to "hack".


Dropping dry food on the ground stands little chance of killing tigers.

In the event of a malfunction and all the food is dropped I believe the tigers will actually throw a party.

In the event the tigers die from overeating then I am a terrible tiger dad and they die a happy death.

I do not know how to hack a tiger per se but I like tigers. Which is why I built this. So I dont see myself intentionally putting them in any form of danger.


I don't really see how it could kill the cat. I guess maybe if it fell off the wall and landed on one but since it's mostly light plastic and tape, I doubt it would hurt the cat much if he/she failed to dodge the falling device.

If you're worried about starvation, the article mentioned that this was only for the morning meal, so that the cats won't drag their human out of bed. If it malfunctions and doesn't turn on, I suspect the cats would fall back to dragging their human out of bed. This isn't for long term "away" feeding - the human will know it malfunctioned long before the cats are in any danger of starvation.


Can you not tell from the title that this is a feeder for a hackable automated cat.


I prefer to drop the food in their bowl instead of on the ground. Less messy.


[flagged]


Thanks for your contribution! You've totally changed my outlook on life. Next post will be on how to build an automated cat killer for $20. Happy holidays!


Please don't start pet flamewars. Or any other flamewars, but especially pet flamewars.


Humans even more so.




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

Search: