Remote Dog Treat Dispenser

A few weeks ago, Ajax our dog started having separation anxiety issues—he would cry bloody murder when we left him alone in the apartment. We crate trained him when he was 6 months old with our remote dog treat dispenser. Since then, when we leave him alone, he’s been quiet and usually just fall asleep. That is, until a few weeks ago.

Separation anxiety is a tricky thing to train, because you can’t there in person to correct the dog’s behavior. The bad behavior starts precisely because you are not there. It’s one of the top complaints among dog owners, and is the second most common reason for owners giving up or euthanizing their dogs [source].

We looked at bringing back out our old treat dispenser, but it was clunky. The old version had to connect to a laptop, and the treat container was a plastic cup held together by scotch tape and paperclips. It also didn’t come with a nanny cam so we had to use Ustream, which while free, had ads and a 30 sec delay.

And thus Treaty v2 was born.

I cobbled together this device, which streams video and audio in almost-real time (the audio has a 10 sec delay). I can use this to monitor the dog and dispense treat when he’s shows good behavior.

This connects to a web interface I use to monitor and treat the dog. Well technically, the Raspberry Pi serves a page with a button that controls the dispenser’s motor. I can watch/listen to what’s happen and dispense a treat by clicking a button. This is helpful when I’m out and about, want to check on Ajax and more importantly reward him when he’s being calm and quiet. That’s right. It’s called Bad Wolf

The Modeling

The upper compartment contains the treats. You put treats between the fans, and the fan-like arm twists and scoots the treats along until it drops into the crate. The bottom compartment contains the stepper motor, which turns the fan when I click the “Give Treat” button.

Modeled in Blender. Who says you can’t use Blender to design mechanical parts?

This mechanism works well because you can use it with a variety of different types of treats. Many dispensers (e.g. gumball machines) one works with certain geometries. We tested it with biscuits, dried fish flakes, and even leftover steak. Kudos to Aaron for thinking of this idea.

The hardware & webpage setup

For controlling the dispenser, I used a Raspberry Pi and followed Adafruit’s Stepper Motor Tutorial. For streaming video and audio, I also used the RaspBaby setup, which installs mjpg-streamer for video and darkice running on icecast for audio. For the camera and mic, I just used an old Logitech webcam I had lying around. To serve the webpage, I set up nginx on the Raspberry Pi.

What’s next

We’ve used this for a few times and it looks like Ajax is starting to show some improvements. Besides doggy improvements, there are also a few device improvements I’d like to work on for v3.

  1. I want to get more real time audio stream. It’s very important to treat the dog right after his good behavior, so it’s important the audio is as realtime as possible. Right now it has about a 10 sec delay.
  2. I want to put everything in one (small) box. As you can see the breadboard is quite bulky and there are a lot of wires swooping this way and that. Maybe I’ll try to design a PCB, or maybe I’ll use Adafruit’s solderable breadboard with Pi Cobbler. In any case, the Raspberry Pi, wires, and treat dispenser (the cylindrical thin) should all be contained in one (probably 3d printed) case.
  3. Right now the treats sometimes hits Ajax on the head when it drops from the container. Eek! Maybe I’ll make an attachable bowl or something that catches the treats. He can eat from the bowl instead of getting whacked by bits of steak.

In the meanwhile, Ajax can just stand back a little and look forward to some tasty treats!

discuss

Why I use and recommend Blender

When I need to model a 3d part or work with another designer’s files, I almost always turn to Blender. I use it in my spare time to design 3d printed household parts. I use it at work when working with more organic designs and jewelry products for MixeeLabs. If you just want to simply extrude a logo or image, there are other tools. But if you want to model more complex shapes, I recommend checking out Blender.

Blender may seem like an odd choice because it isn’t really built around product design or 3d printing. Its main use case is for 3d animation. However, I’ve used many different packages, and I always go back to Blender.

Now, I am not a professional 3d modeler. I’ve worked with 3d printing since 2010, and learned a lot about 3d modeling as a result. Blender has often been criticized as not being easy to learn, but based on my own experience starting from scratch, I think it’s actually a very manageable modeling package.

Blender is free and works across platforms

Blender works in Linux, Mac, and Windows

People with different budgets and different operating systems often ask me to recommend modeling software. I want to recommend something that will work with their operating system, and operates in their price range.

This flexibility and cross compatibility also makes it easy for me to work with different designers, because Blender is able to import and export basically all the different file types. We developed the Mixee Labs plugin for Blender because it doesn’t require designers to switch operating systems to run our software, or shell out thousands of dollars for new modeling software.

Last, it is one of the few modeling programs that work (well) on Macs. Some of the most popular packages (e.g. SolidWorks) are only available for Windows. Others provide only buggy versions for Macs. Blender works just as well on my Mac as it did on my old Windows machine—I can’t say the same about Excel.

Spacebar Search

Using the spacebar to find the “scale to volume” feature

Blender is chock-full of features, which are powerful but can be overwhelming for beginners. This is a common criticism for why Blender is not beginner friendly. The Spacebar Search is an elegant way to make features more accessible without reducing the feature set for advanced users.

You press the spacebar and search for features by name. This is perfect for when I can’t remember the hotkeys or what feature is on which toolbar. As a bonus, through using the Spacebar Search, I learned the hotkeys for my most commonly used features. It ended up as a nice educational tool as well.

I use it for precision modeling, organic models, texture mapping, and sculpting

Organic and mechanical modeling

One of my favorite things about working with Blender is that I can use the software regardless of what type of modeling I need. Many packages focus on certain type of modeling—architects and jewelry designers would use very different modeling software. Blender certainly has its focuses (3d animation), but I’ve found it adaptable to all my modeling needs.

Blender’s strength is in artistic/organic modeling—characters, figurines, sculptures. So, it has great mesh modeling and texture mapping tools. Many CAD packages don’t have great tools for adding textures for color 3d printing. In addition to mesh modeling, Blender also has a sculpting engine for those who modify models as one would do with clay.

As for precise mechanical parts, this is Blender’s weakest area, but it is good enough for me. I can measure distance and wall thickness. I can resize parts to specific measurements (albeit sometimes there’s a little addition and subtraction involved). For me, the bottleneck is more on 3d printers' ability to print with accuracy than in the model file’s accuracy.

(Rudimentary) 3D Printing Tools

When modeling, there’s the Ruler/Protractor Tool to help you measure wall thickness. This is important when you are optimizing for both cost, time, and structural strength.

There’s also a 3d Printing Toolbox—an addon that calculates volume, surface area, and overhangs. This is necessary for estimating cost and print-time.

That said, my Blender files often need little fixes before sending them to the printer. However, there are programs like MeshLab and NetFabb that help fix your files. Also, if you use a service like Shapeways, they will fix your files automatically before it goes to print.

Active community, fast development

Blender Conference 2012 Image courtesy of BlenderNation

Blender has an amazing and active community. This means there are lots of people to help troubleshoot, write tutorials, and develop new features. This is one of the first things I look for. In lieu of corporate support hotlines and dedicated support teams, strong communities help you navigate the ins and outs.

This doesn’t just apply to features—the UI is improving as well. Blender gets a lot of slack for having a bad UI. Blender 2.5 (IMO) greatly improved on the UI, and now there’s even a dedicated team to further refine the UI.

Nothing is perfect, Blender is no exception

Of course, I always want more.

I would love better tools for parametric modeling. I would also love integration with fast slicers and OctoPrint.

I would love to aggregate all the tools I most commonly use into one toolbar (with nice icons) and then hide the other parts of the UI I don’t use. Yes, I know you can do this with Python scripting… but… Python scripting.

Currently, it is the best package out there for my needs. If you are interested in getting started, I highly recommend BlenderCookie’s Getting Started Tutorial Series. It’s a six-part series that goes from how to download Blender, to making your first animation.


Thanks to Aaron Barnet for giving me feedback on drafts of this post

discuss

Why 2048 is addicting? What next?

Over the past few weeks, a game called 2048 has hit the scene. In a short time, there's been many spin offs and variations of the game. It has become some sort of "a thing" in the dev community. It even has its own XKCD--that's when you know it's made it big. This is why I think it has gained so much traction.

1. Fine line between thinking and button mashing

2048 is an addicting game because it occupies this powerful and difficult to find space. It's brainless enough to where you can play for hours on end without putting in much effort, but not brainless enough to where it's boring. You use your brain just enough to feel like you are working hard at something, but you aren't actually working hard so it's all good.

2. Little achievements, one at a time. Sometimes.

When you play 2048, you can sense that you are making progress towards the goal. Numbers combine to make higher numbers, maybe there's even some fun sound effect (I don't know, I mute all my games). The achievements come often, but at random time intervals. You may get a small combo pretty often, but the big combos are more sporadic. Random level ups keep us going. It's the same theory they use in slot machines (you win a little often, but you win at random).

3. Open source >> developer meme

The developer made this open source, so other developers are riffing. Some developer made a version in sed, an AI version, and of course the Doctor Who version. It's a meme based on meatier derivatives. It's not just slapping some funny text onto a picture (well, with the exception of the Doctor Who version).

4. HTML5/Javascript as Game Engines

You don't have to muck through Game Libraries and C++ to tweak and modify this code. You just need to to know HTML and Javascript. And guess what, shittons of people in today's world know HTML and Javascript! It is one of the foundation of modern web design.

5. Building off of shoulders of giants

Surprise, surprise. This game is not original. It is based on 1024 which is based on Threes. And that's perfectly ok. You can recreate something that's better in some way, but not original in all the ways. The gameplay isn't original, but 2048 had a more modern "webby" looking design than the previous versions, it's open sourced and hack-friend, and it uses a web-friendly platform. That said, the tweaks to the gameplay were pretty spot-on. When compared with its predecessor, 2048 brought more button-mashing into the mix and nudged it closer to the sweet spot.


So, what else can we rebuild, tweak? People don't change--they like the same mechanics, but design aesthetics and technology changes. I wonder what else has great mechanics, but needs a more modern facelift. I wonder what games lend themselves to being tweaked, with a platform more tweakable--perhaps--than HTML/JavaScript.

discuss

3D Printing as a Software Problem

A few weeks ago, two articles in 3d printing caught my eye. Both writers talked about how they wish their 3d printer was better. Upon closer read, I realized that a lot of their points were related to the software used to power 3d printers, not feedback around the actual 3d printers.

Eduardas Afanasjevas write about 3 ways to make Ultimaker better. The interesting thing is that all of his suggestions is based around software improvements, not necessarily machine improvements. It’s about how to slice files smartly and model validation--software.

The next day, I saw an article in Slate about the new Solidoodle 4. The article complained about a few different issues with his Solidoodle, but again, a lot of his gripes had to do with software, not with the actual machine itself (though to be fair, a lot of problems were with hardware). Most importantly, he made a comment about the lack of files available online to print--quality model repositories are software products.

Another need that I personally have is for the toolchain to be simplified. Currently, I find base files on Thingiverse, tweak or model from scratch in Blender, fix files with NetFabb, slice with Simplify3D, and send files to printer with OctoPrint. I would love to combine all of the above into one product. And all of the above are all software.

There are a lot of new 3d printer companies cropping up--most of them make 3d printers. And don't get me wrong, there's a lot of improvements that need to happen with the hardware (mostly around reliability). But given the amount of issues that are software related, I am a bit surprised I haven't seen as many 3d printing companies focused around software.

It makes me wonder about opportunities here for Mixee Labs to get involved, and what that would look like. Right now, we focus more on making creators or product templates for industrial printers, but perhaps we can apply our knowledge to the world of desktop printing as well.

discuss

The world goes round and round

When I was younger, I remember some old guy told me that fashion was cyclical. The same styles come back, fade out, and come back again. He said, as you grow old you see these trends cycling through. I don’t consider myself that old, but I guess I am old enough to observe a cycle in the way we produce online content.

When I was in high school, blogs like LiveJournal and Xanga were the way my friends and I produced online content. People posted about their lives, read each other’s blogs, commented. I even met some of my future classmates through our college’s pre-frosh LiveJournal community.

Then sometime during college, that all stopped. Rather than creating original content, we substituted in quick actions. We liked on Facebook, retweeted on Twitter, and reblogged on Tumblr. There was this one button content “creation” phenomena.

We are swinging back. People have gotten tired of the quickie content creation. They yearn for meatier content. I think that is driving the explosion in new blogging sites focused on writing. Whitespaces, no distraction, markdown… anything to make it easy to write meaningful content. I am looking at Ghost, Svbtle, and Medium.

Perhaps to invent the next step is to look back. Revamp some of those crazy ideas of 1990s like web rings and LiveJournal communities, but with a Web 2.0 spin—minimalism, flat design, maybe something with Node.js or Firebase or whatever is the hip new thing on Hacker News.

After all, some of those PowerPoint animations that we made fun of are revamping into jQuery $.fadeIn(). iPhone apps now zoom in and out just like my high school PowerPoints once did. The past comes back. Maybe it disguises itself with a sunglass-mustache-combo, but it does come back.

discuss

Outside my 3d printed bubble

I went to MIT this weekend for Healthcare’s Grand H@ckfest—and we got first prize! I brought my 3d printer so we can print an physical prototype, and so we did. We designed, hacked, and 3d printed a new medical device in 24 hours.

I figured at a place like MIT, most (if not all) have already seen, hacked apart, rebuilt 3d printers. I figured my 3d printer would be just another random piece of technology strewn about in the hallways.

I was dead wrong. The 3d printer was a hit!

We had a constant stream of people walking by our table to ask about 3d printing, take photos, or just gawk at the machine. While printing late night in my host’s dorm room, her hallmates kept poking their heads in to check out the 3d printer. In Brooklyn, people turned their heads to check out my cute puppy. Here, people turned their heads to check out my 3d printer.

This was a good reminder that I live in a 3d printed bubble. People in this bubble spend our time dealing with nozzle clogs, loose wires, buggy CAD software, supply chain, business tax accounting (yes, it’s that time of the year). It’s easy for the wonder of 3d printing to get lost in this day the day.

One student said to me, “you have such an amazing life.” I did a double take. When I think of 3d printing in my day to day business, I think of the sales tax preparation coming up, the retail channel contracts to finalize, the material QA issues to sift through—not so amazing stuff.

It’s good to step out of my bubble. It renews wonder. It sheds new perspective. It validates or invalidates assumptions. I’m glad I had the opportunity to do that this weekend. I’m glad it reminded me to step out of my bubble more often.

discuss

A printer for the hackers

The trend today in 3d printing is hitting it big with the consumers. With everyday people. Printer companies are making their printers more and more sleek. The idea of the "one button" push and print is ingrained into many marketing campaigns.

Is that the right strategy?

I've been mucking around with the Raspberry Pi today. I am playing around with it, setting up the wifi module, the camera. I have had to fiddle around with it in the same ways I have to fiddle with a desktop 3d printer. I tweaked this setting, I plugged it in, took the plug out, tweaked that setting, rinse and repeat. But it didn't bother me as much. Because, the Raspberry Pi is a toy for the hackers, it's a toy that comes with the expectation that you have to tweak, Google, and following all sorts of tutorials to get it working.

I think setting that expectation is important, and might be a better strategy for 3d printing. I'm not saying we shouldn't try to get consumers to experience 3d printing, but rather tell the story of "making and hacking," rather than the story of "push and play." It's a more honest story, and I think in some sense a more rewarding story.

When you hand somebody a block of clay, the expectation is that they will work to better their craft. It's not a story of push and play. But the work and the learning to become a better sculptor is just as rewarding, if not more rewarding, than the end result.

I wonder if it should be the same for 3d printing.

discuss

What it looks like to build a 3D Printer

Most 3d printers are still hand assembled. The hands might belong to factory workers, or oftentimes, they belong to the end user. Most 3d printer companies sells kits that you then assemble. I've actually never done this before, so I found this video quite amusing. It's a timelaspe of a 30 hour printer assembly project. From unboxing to first print.

In my experience, many of the problems that people run across stem from this manual assembly process. Manual assembly leads to more room for error--a slightly off potentiometer, a wiggly thermistor registering inaccurate temperature readings, axis belts not taught. Those are just some of few issues that I've personally ran across.

I am not a "hardware person," so I don't know how far we are from having 3d printers assembled by machines (more appropriate, no?), with soldered or enclosed parts that don't wiggle out of place. Of course, it also means the end machine is less hackable, which means the standard of quality has to be magnitudes higher. There is nothing more frustrating than working with a broken machine that I can't tweak.

discuss