6 ms·
Why do you use two separate pis for it?
by subleq 7y ago
Why do you use two separate pis for it?
- yellowapple 7y agoI'd imagine the processing power required to detect whether or not a video feed contains a cat doesn't jive well with sharing a CPU with something presumably-realtime-sensitive like driving a motor to open a door.
- jonaswi 7y agoYou are exactly right. Before I "optimised" the image recognition the whole detection part was running on a Mac Mini. I also like to "separate concerns". The Pi that is handling the door opening runs Alpine with a read-only file system so whenever there is a power outage or whatever it boots into a known good state. The image processing part is behind a big UPS and is running with a writable file system.
- nicoburns 7y agoSeems like the door opening Pi would be a good candidate for an esp8266 or an esp32 (if you were looking to save costs and/or have fun playing with a more limited environment)
- jonaswi 7y agoThanks for the tips! I will order a esp8266 and check it out.
- c22 7y agoUnless you love soldering wires to tiny little smt pads I'd recommend looking for one of the "development boards" based on the 8266 (or as others have pointed out in this thread the bigger, faster, stronger, esp32). Not only will you get some through-hole connections to some subset of the pins, but you'll also get an onboard power supply and probably a usb port for programming so you can get right to cooking.
- jonaswi 7y agoThanks! Will do some research and then try to order the right one.
- c22 7y agoYou're welcome! You might also be interested in MicroPython (if you write python) which runs pretty solid on esp32 and has a lot of batteries included. You can almost forget you're running on a micro.
- jonaswi 7y agoDo you by chance have a link to a good development kit for the esp32? I checked and I'm a bit overwhelmed by the amount of different components one can get.
- mabcat 7y agoOne that I like is commonly branded TTGO, a search for "esp32 ttgo" or "esp32 oled battery" will turn up some options. This is a link to the exact one I bought since you asked: https://www.ebay.com.au/itm/283082902927 https://www.ebay.com.au/itm/283082902927 (not actually branded TTGO, it's a clone) Why you might like it: - it has an OLED screen on the board for debugging and status output - it has a battery holder and charging circuitry for an 18650 on the back of the board for portable powering/"UPS" - it breaks out all the GPIO lines onto pins Why you might not like it: - like many esp32 dev boards it's slightly too fat to go straight into a standard breadboard. You have to join two breadboards to get access to both rows of pins.
- c22 7y agoLately I've been playing with the Olimex esp32-poe [0]. It supports being powered over ethernet or lipo battery (or micro usb) and includes an SD card slot. If your application uses the ethernet, though, be sure to develop using a non-poe switch (or else power from the ethernet interface can leak over the usb programming interface and damage your laptop.) [0] https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-sou...
- bigiain 7y agoesp8266 means wifi, and also means you don't have the whole linux TLS ecosystem to play with. I'd be somewhat cautious about using an esp8266 (as much as I like them) to unlock my front door...
- penagwin 7y agoWhy would you be cautious? Not saying there's no downsides, but if anything I consider it to be an "upside" that the device is simpler. Now I don't need to worry about linux, or making sure it's a read only filesystem with an image all setup, etc. I look at it this way: If you want a remote device that measures or controls just one or two things, but does very little if any calculations - use a esp8366/32 (or anything with low power requirements). If you need to process data (video stream), or do other calculations, potentially while controlling many different sensors/things - you'll likely want a raspberrpi/similar
- bigiain 7y agoI want locks on my doors. If you can come up with a reasonably secure way to get an ESP8862 to unlock your door that I can't sniff from across the street with a pringles can hooked up to a wifi dongle running in promiscuous mode (perhaps with a pile of off board AWS to crack your WPA key), I'd be interested in checking it out. I'm not saying it can't be done. But for _me_, I'd prefer to piggy back on all the battle tested tools available in linux like OpenSSL rather that pretend I can write bulletproof crypto code for the constrained resources available on the esp. And I'd prefer to run my unlock signals over wires rather than over a radio. I'm cautious like that.
- c22 7y agoPreshared one time pad would be pretty simple. But just because it has wifi, doesn't mean you have to use it. The chip is bristling with io so running real wires is always an option (and hey, you probably have to power it by wires anyway). There's definitely something to be said for not having the surface area of some hobbiest-grade linux distro on your door locks also. I'd like to perform a "security update" on my door locks just about never. Anyway, the esp32 has a tls stack which is adequate if you want to go that way. Lately there are a handful of boards on the market that pair the esp32 with a PoE chip that are becoming my goto for little "iot" projects.