4 ms·
Very cool. The Raspberry Pi is turning out to be a nice platform for little AI driven projects like this. It's not using machine learning, but I'm just now fi
by fpgaminer 8y ago
Very cool. The Raspberry Pi is turning out to be a nice platform for little AI driven projects like this.
It's not using machine learning, but I'm just now finishing up a Christmas present; a web accessible treat dispense with live video. I know those exist commercially, but it has been a fun project to build one anyway.
Terrible quality pictures:
https://imgur.com/a/nesMdhy https://imgur.com/a/nesMdhy
Raspberry Pi Zero W for the brains; Pimoroni speaker hat; cheap stepper motor and bridge; IR emitter and transistor create an IR break beam to detect when treats are dispensed; Raspberry Pi camera for live video feed; all controlled by a custom AppEngine deployment which provides a nice web interface for dispensing treats, viewing the video, and even uploading their own sounds which get played before the treats come out.
The most difficult thing has been the mechanical engineering; something I have little to no experience with. The whole CAD process took me a few weeks of working on and off. Then another two weeks of printing and iterating the parts. The main body itself is a 14 hour print even at high speed. I ended up using FreeCAD for the whole design. Not sure if that was a mistake or not. I like supporting open source software, but ... I have this terrible notion that something like Fusion360 would have made the whole process 10x faster... But it's all printed and working!
Since this is going as a gift to someone else, I also had to take a lot of time to make it easy to use; it couldn't just be a fiddly hack. So, for example, I got a nice setup procedure built into it for setting up wifi. You just hold the button on the back to put it into setup mode, and then show it a QR code on your phone with your Wifi network's details. And since there's a speaker, I'm using some text-to-speech to walk them through the setup. It turned out nice.
And using the magic of ffmpeg, I was able to get the Raspberry's camera feed into an HLS stream, which gets securely uploaded to the AppEngine server. So it's a live video, rather than still pictures or delayed video uploads. Was really happy when that got working. (I use hls.js to handle desktop browser compatibility. Works a treat. Also, FFMpeg is supposed to be able to upload the HLS stream itself to a server, but that was broken or something; had to use some Python to pipe it manually.)
Just putting the finishing touches on the frontend now. 4 days to go... wish me luck!
- andscoop 8y agoLove it, and about to dive into the world of 3d printing IoT devices myself. Currently in the process of choosing my modeling software, so your comments on freecad hit home. Would you do it in freecad again? I too want to support open source software and will accept ~2x speed reduction to do so, so I hope 10x is hyperbole, otherwise I need to reconisder. Unfortunately the community definitely seems more geared towards fusion360. My gut reaction is that in general they don't value the open source aspect of freecad, but maybe it is just subpar for now. Did you buy a 3d printer for this project? Don't have any source code available?
- fpgaminer 8y agoI haven't tried Fusion 360 yet, so I can't compare. For lack of any other options I would definitely use FreeCAD again. It wasn't a horrible experience. I love supporting open source. For example, the 3D printer I have is the Lulzbot Mini 2. The company behind it is ... aggressively open source, to put it mildly (_everything_ is open source. Even their manuals for factory assembly are online.). Which is why I went with FreeCAD initially. But I lost a lot of time to A) the awkward UI; and B) bugs. Having just now, the day before Christmas, finished wrapping the gift ... I wonder how much time I would have saved using a "professional" CAD solution. shrug Words of advice if you do go down the FreeCAD route; learn about dataplanes and shapebinder (check YouTube for tutorial videos). They are somewhat recent features. If you just look up FreeCAD tutorials you'll find a lot that tell you to bind sketches to faces. That's the old way of doing it and it can lead to a lot of problems. Dataplanes are the new way of doing it. And be careful in the sketcher. A number of times I've had it tell me a sketch is fully constrained, but I was scratching my head because I didn't think it was fully constrained. A day later I'll go back into that sketch and it'll have realized its mistake and moved the sketch around (had one failed print because of that bug). > Don't have any source code available? I'm thinking of writing a blog post about the whole project at some point, with all the documentation and such. Bit exhausted right now... Best of luck with your 3D printing!