Watch on YouTube: https://www.youtube.com/watch?v=U18HZzuAbFg
I Built A Robot Dog To Guard My Studio - SunFounder PiDog Review
Introduction
The SunFounder PiDog is a robot kit built around a Raspberry Pi. This old dog has plenty of new tricks up its sleeve, including a face tracking camera, accelerometer, touch sensor, ultrasonic range finders, directional sound tracking and a lot more! So let’s build one and it through its paces.
Script
Like any self respecting geek there’s one thing that I’ve had an unhealthy obsession with since an early age - robots. I bloody love ‘em. And when Sony’s Aibo robot dog was released when I was 15 years old I thought it was the coolest thing ever. But, being 15, I couldn’t afford to spend thousands on a robotic pet.
In fact I couldn’t even afford a Furby and - perhaps thankfully in hindsight - my parents wouldn’t buy one for me either.
Of course, plenty of variations on the robot pet concept have come and gone over the years - some cheap and nasty and some less so, with our old friend the Aibo still going strong after 25 years - and still being well out of my price range.
But first, let’s address the non-robotic elephant in the room. If you’ve been following my channel for a while you’ll know that it’s unusual for me to do sponsored videos - I’m not in this for the fame and fortune and free stuff - and that’s certainly not for a lack of offers. In fact every week I’ll get multiple emails offering to send me all sorts of tat, ranging from powerbanks to wallets to PCB fabrication services to dodgy software serial numbers and most recently an LED makeup case of all things.
So when an email about a robot dog kit landed in my inbox a few weeks back - with no contractual strings attached whatsoever - they just wanted to send it to me for free and see what I thought - I thought, why not?
So this is the SunFounder PiDog. It’s a do it yourself kit that’s powered by a Raspberry Pi - it comes with a built-in rechargeable battery, a surprisingly impressive array of sensors and outputs, and the software that runs it is all written in Python and open source under the GPL v2 so you can modify it to your heart’s content.
It’s also quite cute for a pile of wires and metal and plastic. Well, I think so.
So who’s the target audience for this thing? Could you build it with your kids to teach them a bit about engineering and coding or is this strictly a grown up toy? And most importantly, is it any good?
Let’s find out.
Of course, this is a kit, so step one is to build the thing - and to build the thing first we need to unbox the thing. As you can see from the box, there’s also some kind of app available for Apple and Android devices, so we’ll need to check that out too, and we can see that it comes with a 7.4V 2000mAh battery for a claimed 90-120 minutes of battery life, and that requires a 5V 2A charger, which isn’t included and also comes with a bit of a caveat which I’ll soon discover.
Oh, and it’s made of aluminium! So that’s nice.
So the first thing is this really nice big printed manual, which has very detailed step by step assembly instructions. There’s also a video guide which I decided to completely ignore and by and large the instructions did serve me very well, as you’ll see.
You’ll have to supply your own Raspberry Pi with 3 and 4 being supported, as well as the lower cost Zero W. I happen to have a spare Pi 4 here, so that’s what I’ll be using.
I was pleased to see that the boxes were individually numbered, which I thought I’d work my way through in order - kind of like building LEGO - but it turns out that isn’t the case. Oh well, at least I have a nice big table to build this on.
The first box contains the structural bits - laser cut acrylic parts and the aluminium structure of the PiDog itself, which all seems nicely machined with no sharp edges and no obvious manufacturing issues.
Box number 2 is stuffed to the gills full of servos, screws, standoffs, washers, all of the sensor modules including a camera, the robot HAT that makes it all work, a directional audio module, and some more that we’ll take a closer look at soon, and bags and bags of these servo arm thingies.
The third box contains the cables, a little set of rather cheap and cheerful feeling tools, a velcro pad which I’ll soon discover is for attaching the battery - and indeed, the battery pack itself.
So let’s get this stuff somewhat organised - ie thrown into rough piles - and get on with the build.
The first step is to attach the directional sound module to what will be the back - this has 3 microphones on it - and then the Pi to that and the robot HAT to that, using the supplied screws and standoffs. I’m using the included tools here just to see what they’re like and they’re sufficient to get the job done - I didn’t run into any problems with them during the build and no other tools were required to put it together.
One thing that I really want to stress is that a lot of these parts are plastic, so be really careful not to overtighten the screws and strip anything. There are a few spares of each part though, so if you break something - which I definitely didn’t do - ahem - it’s not the end of the world.
You’ll see that I’ve also plugged a ribbon cable in for the camera module here as per the instructions, which we’ll have to revisit for reasons that will become apparent later on. I’d suggest maybe leaving this out if you’re following along at home.
Anyway, I don’t want to reinvent the wheel - you can check out the build manual and video in the links below - but I’ll sum up the major steps and my thoughts here.
The ribbon cable for the microphone module needs to come out of the side so be mindful of that - I must have missed that somehow - but not a huge problem to move it over at this stage.
Now the Pi, directional sound module, robot HAT, battery, and one servo - which will be the tail - are all united, we have the bare minimum here so the next step is to install the software.
There are two ways to do this - you can either plug a keyboard and a screen into the Pi and configure it that way, or do it over SSH like I did. If you want to go that route you’ll need to preconfigure some things in the Raspberry Pi Imager when you create the SD card, but it’s all covered. Again, the instructions are pretty detailed here and copying and pasting the commands goes without a hitch.
This is the first time you’ll be zeroing one of the servos too, and it’s important to do this as you go along so they don’t try to ping into position the first time you power the thing up and get jammed or burnt out or whatever.
I did run into one issue - I thought I might have a faulty battery or robot HAT, but it turns out that the couple of newer USB-C PD chargers I tried just didn’t get on with this thing. So I dug out an older phone charger and a USB A-C cable and that sorted it.
So just something to bear in mind.
The battery arrived completely dead - or as dead as a Li-ion can be - but thankfully the HAT can charge the battery and run everything else at the same time, so I don’t have to wait for that to charge up.
Anyway, onwards with the build and the next thing is the legs, which were quite fiddly, and the kit comes with stickers to temporarily mark the left and right legs while putting them together as they’re mirror images of each other, of course.
There are 2 servos per leg for the upper and lower parts and the screws for these are absolutely tiny, so definitely some adult supervision required if you’re building this with the kiddos.
I thought the feet were particularly clever - just some laser cut acrylic that bolts to either side of the legs using some plastic rivets - although I did find myself pondering at this point whether some rubber end caps might help on slippery surfaces, and - spoiler alert - I found out later on that this would indeed be the case, so I’ll have to see if I can come up with a solution for that.
I did obsess a bit about getting all of the servos lined up perfectly but it turns out there’s another calibration step at the end, so as long as they’re within a mm or so I wouldn’t stress about it too much.
So the next job is to start assembling the sides of the body, some servo arms to install here with some more of those tiny self tapping screws, again being careful not to overtighten, and then we can attach the legs to those, and I think this is where it’s kind of starting to look a bit animal-like. Kind of.
Again, we need to run the script to zero the servos - and this isn’t disturbing at all. Nope.
There’s a cool Knight Rider style RGB LED sweepy thing on the front and that goes on next, and that plugs into the IMU - which is basically an accelerometer to you and me. I don’t think they’re linked in any way though, the RGB lights and accelerometer work completely independently of each other as you might expect - so I think it’s just to keep the wiring a bit tidier.
It’s at this point we put together the acrylic stand, which is used for calibrating as well as displaying the PiDog. In this case it stops us putting any undue strain on the leg servos during the rest of the build process.
Next up is the head and I did find this part particularly fiddly - there are 3 servos in here that control the yaw, pitch and roll of the head itself, and everything has to go together in a very specific order with those tiny screws and some quite fragile plastic rivets.
Thank goodness for the magic of editing.
The included camera module goes in the PiDog’s nose, and allows for some really cool stuff like motion tracking, which I’ll demo shortly. It’s actually surprisingly good quality and like all of the other bits here, manufactured by SunFounder itself specifically for these kits.
Oh, and remember how I mentioned that camera ribbon cable earlier? Yeah, this is why it wasn’t actually needed. I’m not sure why there are different options here, maybe they use a few different camera modules depending on what’s available and the connectors are slightly different?
Anyway, we’ll deal with that in a second, because next up are the ultrasonic range finders, which kind of act as the dog’s ears. Well, if the dog was a bat. But hey, we can’t rely on vision alone.
“My vision is augmented”
I like the way that they’ve mounted them so they look like the dog’s eyes, it’s very cute once the whole thing is put together.
The final sensor to be fitted is a touch sensor so you can pet your new… Pet… And it will respond accordingly. Well, as long as the code’s there to handle it.
So just a couple of final bits of trim to tidy everything up - and be sure to pay attention to the manual here on where to run the wires - I ended up doing a bit of corrective veterinary surgery after the fact - speaking of which I had to take the Pi out again to swap that camera cable over as well - which wasn’t my fault.
It’s fiddly - which I think is rapidly becoming our word of the day - but it’s fine.
The final step is to hook up the wires from the head sensors to the robot HAT, and it’s looking like we’re good to go!
I must say, I do love the look of this thing, and the build process was a lot more involved than I was expecting, which is very much a good thing. Lots of nuts and bolts and metal and electronics, rather than preassembled modules that just snap together. I did very much enjoy building this if nothing else, and hopefully that’s just the beginning of the fun.
But there’s one more step which is - more calibration! There’s another acrylic tool for this and a Python script which is all pretty self explanatory, running through each of the legs in turn to make sure that the servos are properly aligned. I’d suggest keeping this tool in a safe place as I’m not sure whether this process is something that might need to be repeated periodically, but it’s easy enough to do and only takes a minute.
I’m sure the roboticists in the audience would prefer some better feedback like extra switches and positional sensors, but I can see why they went down this route to keep costs and complexity down.
Now, believe it or not I’m a developer in my day job and I’ve never actually written any code on this channel because - well - that’s a bit too much like actual work - and I’m not going to break that tradition today. But I should at least run through some of the demo scripts to see what this puppy can do so let’s take a look at those.
The first example script is called “wake up” and runs the PiDog through a rather cute series of movements meant to replicate a real dog waking up and stretching. This is the point where I discovered that the PiDog works best on a surface with some friction - like carpet or my rubbery soldering mat here, so if your house has hard floors that’s definitely something to bear in mind. Like I mentioned earlier - maybe some rubber feet would help in that case?
There’s a function demonstration script that has a load of built-in movements and sounds that you can trigger, which are great for putting the servos through their paces but also, if you’re looking to put your own scripts together it’s a great thing to pick apart to see all of the potential movements.
There’s a patrol script…
PiDog can do push-ups…
And even use its internal accelerometer to keep its balance, a bit like one of those weird military Boston Dynamics dog robot things…
One of my favourite scripts is the face tracking demo which uses the directional microphone module and the Pi camera, and you can even connect a web browser to a URL and see the raw output from the camera in realtime.
Oh, and it can use this same technology to chase a red ball around, if you have one. I didn’t, and it’s a shame that one isn’t included, but I did manage to find a suitable substitute. This is a retro computing channel after all.
As mentioned earlier, there’s an app, this is the Android version but it’s also available on iOS devices, and it’s just a case of running a Python script and connecting to a webserver running on the Pi, and that allows you to control the PiDog remotely over WiFi, including seeing the live output from the camera. I imagine with some creative port forwarding or a VPN you could even control this over the internet without too much trouble.
And there’s a load of other stuff on the website that I haven’t even touched on, including a surprisingly detailed set of programming documentation that covers how to move the various body parts, read inputs from the sensors, use the audio output and pretty much everything you could want to do. It’s not a step-by-step set of tutorials which would have been nice to see - especially for kids - and you’ll definitely need some programming experience to be able to cobble something together - or a parent with those skills to talk them through it, of course.
The other thing to bear in mind is the price of course - at the time of recording the PiDog is $179.99 on the SunFounder website - same on Amazon US or £155 on Amazon UK - and that doesn’t include the Raspberry Pi, SD card, or charger so it is indeed an expensive toy.
Now, the question is, would I have spent that much of my own money to buy this?
It’s a tough one. I think the kit generally is very well thought out and all of the parts seem well designed and high quality, but I appreciate that it is a lot of money.
If you’re not a dog person, SunFounder does sell some other robot kits that are a bit more wallet friendly. Also maybe bear in mind that the PiDog is one of their newest offerings and items in their store do often go on sale at a good discount, so it might be worth keeping an eye out and seeing if you can grab one a bit cheaper if you have your heart set on it.
Looking at it purely as a box of parts and an entry point into the world of robotics it’s pretty solid - remember you get that robot HAT with 2 built in motor drivers, audio output, onboard battery management, a load of ADC and PWM inputs, 12 servos, and indeed all of those sensor modules including a pretty decent camera module - and there are plenty of tutorials on SunFounder’s website to help get to grips with it all if you want to use all of this as a basis for other projects.
I mean, I suppose the PiDog is less than 1/10 the price of that Sony Aibo that I always dreamed of, and it’s also completely open for modification and hacking.
I did very much enjoy the build process - I’m generally one of those people who prefers tinkering with stuff over actually using it - hence this channel - and if I weren’t doing it to camera and taking notes I’m sure it would have been even more fun over the course of a few evenings in front of the TV, like a good LEGO set or Airfix model.
So that’s that really. I just wanted to reiterate that I had no contractual obligation to make this video or any of the things I’ve said in it, I’m not looking to get more free stuff out of them or anyone else, and I just found it really interesting and thought you might too. No money has changed hands but this was sent to me for free and the best part is that I get to keep it either way.
Joking aside, I’ve tried to show the PiDog as honestly as I can here - I think it’s the least I could do and if I genuinely thought it was rubbish then I wouldn’t be stood here now telling you about it, so that has to count for something, right?
If nothing else, it was worth it just for the YouTube thumbnail.
Big thanks to my channel supporters over on Patreon, Ko-Fi and of course my YouTube channel members for all your support over the years, and of course big thanks to you for watching. Normal retro computing and gaming service shall resume shortly.
Original Video Links
Support the channel!
Patreon: https://www.patreon.com/ctrlaltrees
Become a Member: https://www.youtube.com/channel/UCe7aGwKsc40TYqDJfjggeKg/join
Ko-Fi: https://ko-fi.com/ctrlaltrees
Relevant Links:
Amazon Affiliate Link: https://geni.us/s1mA5X
Buy From SunFounder: https://www.sunfounder.com/products/sunfounder-pidog-robot-dog-kit-for-raspberry-pi?variant=44489851404523
Documentation: https://docs.sunfounder.com/projects/pidog/en/latest/index.html
More Info: https://pidog.sunfounder.com
If you liked this video please consider subscribing to ctrl.alt.rees on YouTube!