The tinniest Arduino quadruped robot.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
I get a lot of questions about how long can those tiny robots go on a single battery charge. And I never know what to say, because it depends on what they are doing and the calculations are difficult. So I decided to try and see.
I've set the pure-arduino one, with 180mAh battery, to walk around the table leg in circles at full speed (which is actually pretty slow, with its tiny short legs), and waited until the battery overcharge protection kicked it.
Took exactly 20 minutes -- which is what I gave as a guesstimate to the people before.
I also noticed one nice thing in the process. The robot kept on walking around that table leg, and repeated the same circle for those 20 minutes, without spiraling away in any direction, as I expected it to. This means that whatever inaccuracies it has in its measurements, leg inverse kinematics calculations and mechanical skewing of legs, they are all relatively constant and repeatable. That bodes well for implementing navigation for it.
Now I need to make a similar test with the VoCore version, with video streaming running. The VoCore can suck up to 300mA, but that one has a 350mAh battery, so maybe the time will be similar...
UPDATE: 21 minutes with low-resolution streaming, walking in circles.
So, it seems to be a good decision to use the working gait code from Arduino, and just send high-level commands over the serial to it. At least it gave me a working robot.
Below you can see it exploring my room with its webcam. It's a little dark under the table, and my screen's refresh rate interferes with the camera, but it feels almost like Doom.
I finally got to rebuilding the VoCore version of pKubik using the new printed circuit board. On the photo, starting from the top, you can see:
I also compiled a new OpenWRT image for it, and made sure everything works as it did before. So now I am where I was a week ago, except with a sturdier and more modular construction.
I also have the gait implementation I wrote for the Arduino-only version, and I'm tempted to drop the Micropython version. Instead just accept commands for the Arduino-controlled gait on the serial, and echo those through ssh from the VoCore.
Oh, I also finally found a good source of rubber for the feet. Old-school bicycle valves used pieces of a small rubber hose. You can still buy them in bike shops today, and they make excellent feet for the robots.
So I worked a little bit on the gait of the minimal version, and also added a piezo buzzer and some sounds (after a while I made it start up muted, the sounds need to be explicitly enabled with the remote, as they are quite annoying). You can also turn while walking and rotate in place, adjust the height of the robot and the spread of its legs, etc.
So here's the minimal version of the robot -- only the servos, an Arduino and an IR sensor for control with a TV remote. The gait still needs a little bit of tweaking (and I didn't adjust the trims on the servos), but it still walks pretty well. I also need to add rotation.
This can be used as is, bascially a remote-controlled toy, or you can attach various things to the Arduino (both the serial and the I²C pins are free) to control it in a little bit more intelligent way (like the VoCore + webcam version that I started with). In particular, I'm looking forward to getting that OpenMV board to put it on this thing.
The progress on this guy has been kind of slow, and mostly in software. The current status is that I have the video streaming from camera to the web browser working, and I resolved the issue with noise on the serial line that made it impossible for the robot to walk properly (it turned out to be some kernel logs still being output to the serial). There still seems to be some problem either with the leg inverse kinematics, or the walking algorithm, as the legs move a little strange -- this requires further investigation.
I also have no idea for the control scheme. Right now I just start the micropython script from the command line over ssh, but it would be nice to be able to control the robot interactively, possibly through the web page that includes the streamed video. There is a socket library in micropython, so I could just listen for commands on some port, but from JavaScript I can only do HTTP or websocket communication... I need to think about it some more.
As for the twin brother, I'm trying to program it entirely in Arduino, so that it's the cheapest quadruped robot around. If that works, I will add a basic "laser tag" gun to it and try to talk some friends into making their own version, so that we can have a cheap version of the Mech Warfare battles. It will probably be a separate project, though.
And here it is, an assembled robot, using once of the PCBs. This one only has the Arduino and an IR receiver, no VoCore. I will make a simple remote controlled toy out of it. The vertical board is a battery charger.
The PCBs that I ordered from Dirty PCBs just arrived, and they are beautiful! I got 11 of them, and I'm going to try one right away.
The whole robot building thing is supposed to be a learning experience. So after fumbling with the wires and prototype boards for a while, I decided it's time to try and design an printed circuit board for the robot. The advantage, apart from much better handling the tiny 1.27mm spacing, would be that it could also double as a base for the robot.
After trying my skills with a number of available PCB-designing software (Egale and KiCad, among others), I finally decided to use... Fritzing. Maybe it's not as advanced as the others, but at least has user interface from this millennium, and can generate Gerber files without too much hassle. It's also the only one where I found how to place elements on the board and connect them first, and then create the schematic -- which is much better if I have a choice for using multiple pins for the same thing, and can choose the closest one. It also already came with an Arduino Pro Mini footprint.
The board is pretty simple, it's just has a place to put your Arduino in, and sockets for the servos. There is also room for a big capacitor, a power switch, a battery voltage monitoring circuit, and an optional IR receiver. It can then use just the Arduino for some simple behaviors, or have something smarter (like the VoCore) connected through the UART or I²C.
Finally, I got the streaming from camera to work! Look:
The video is rotated by 90° and quite slow, but that's details that I can handle. The trick was to use an older version of mjpeg-streamer that doesn't segfault in YUV mode.
I also worked on the physical body of the robot a little bit. Instead of a transparent piece of plastic with everything glued to it, I now have a prototype board with a bunch of sockets and all the wires connecting them. The VoCore, Arduino, camera and battery just plug into that. And the PCB is exactly the right size to serve as a lid for a transparent plastic box. I just have to shave a couple of mm off the top of the camera module...
Solder all the electronic components, except for the capacitor, onto the printed circuit board. Make sure to make the right connections: the servo plugs should go with the yellow wire towards inside, and the brown towards outside, and the IR sensor may have a completely different order of legs than on the board, you might need to bend the wires a little to get them in the right order.
Set all the servos to the zero position (in the middle of their movement range). Then attach the single-arm horn at 90°. You will need six servos with the horn in one direction, and six servos with the opposite. Fasten the horns with the smallest screws (make sure you un-power the servo before you do that).
Put the legs together. You will need two right legs, and two left ones, that are their mirror images. Use the bigger screws to screw the servo arms together. Use glue to attach the double-armed horn and to bind the two servos.
Create an account to leave a comment. Already have an account? Log In.
That was actually the plan -- well, not a phone app per se, but a webapp that would also work on a phone or a tablet. But I failed to get the mjpg-stream work with any of the camera modules that I had, and now I'm thinking about using something else for the brains than VoCore, or any other single board computer. Preferably something that doesn't have an operating system on it and doesn't take 15 seconds just to boot. Maybe an ESP8266? That seems to be all the rage these days.
Ideally, I would want to use OpenMV (http://hackaday.io/project/1313-openmv), but they are not selling the boards anymore.
how bout this camera?
www.dhgate.com/product/300-000-pixels-free-drive-usb-camera-module/209088264.html
Looks very nice, but a little bit too expensive. The laptop camera modules I tried were $2 a piece :)
I've got one on the way - My goal is to be as small as possible. Hence stomaching the price - You can get them for $17 buut then its $22 shipping on top - lol. It is USB, Mjpeg, & says it works with Linux UVC too so it should work with the vocore... (? hopefully) I am also eying up the openmv project - apparently a new kickstarter will be up soon. I'm trying to make the smallest possible robot webcam over wifi. But am only going to use two - three servos for movement. No where near as complex as your design, which I think is awesome btw. When every mm counts, it still seems to me that the vocore, with arduino cntrld servos may be the smallest option for me still. What do you think?
Two of the modules I tried were UVC and they worked on vocore -- just no MJPEG, so no streaming. But I could take snapshots, so they worked. For the third I had to build a custom kernel module, but it worked too. I think it should work, the only thing I'm not sure of is whether VoCore has enough CPU power to stream it all fluently.
As for alternatives to VoCore, I've heard there are some ARM microcontrollers with USB support out there, but I have no idea how you would make a driver for a camera for such a thing. Another way is to go the OpenMV way and connect your CMOS sensor directly to your microcontroller... But both of them are rather advanced.
What I personally hate about using VoCore for a robot is that I get a full operating system that I have to take care of, configure, and deploy my application to. Also 15s booting time. A microcontroller has the advantage of working almost instantly.
Yeah, i'm worried about the VoCore speed too. I'd be happy with 160x120 and good frame rates tbh. Not sure if that will be doable with teh camera - it goes down to 320x240 only... Have you seen any videos of people using the VoCore successfully as a means of streaming mjpeg? Thanks for the replies btw :)
No, I haven't seen any video streaming yet, VoCore is a pretty new thing and there are very few projects using it. Hopefully it will improve with time.
Ill give it a go and post results up here. Thanks for all the advice - gd luck with the project :)
Thank you. If it works well, maybe I will get it too after all. I can see it sells for $13 a piece if you order 100 ;)
You may be interested in this: http://forum.vocore.io/viewtopic.php?f=2&t=82&sid=bd540854a84ea7b2b75ce1bca828ebc2&start=10#p700
Heya - so I got the camera - and it works like a dream :) 640 x 480 - very sharp! 30 fps no problem - as good as skype tbh.. I'm really chuffed - would recommend that camera... right, next I need to control some servos over wifi? Got any tips?
Congrats on the camera. As you can see, I got mine to work too!
The pwm kernel module for VoCore is really one big hack -- I didn't even try it. Instead I made a simple servo controller out of an Arduino Pro Mini clone, and I send it servo positions over serial. That's how this robot works. I currently have some problems with noise on the serial line -- didn't find out yet if it's software or electronics problem -- but I'm sure it's still easier than pwm on vocore's gpio pins directly.
- yeah - saw that after I wrote this - wicked mate :)
I may get quite a few of the ones I got (vid camera), cos as you say they get a lot cheaper in bulk, and tbh, they are perfect for vocore users.. same height 25mm but slimmer 15mm and pretty much work out of the box, if i'm honest... Happy to get a few in to make em cheaper if there's enough interest. Will post pics on project once ive got more than just vocore connected to a camera - lol... Now, i'm getting my head round pro mini through serial to vocore.. :) thnxs again for your help and suggestions.. Your project is shaping up great.
Become a member to follow this project and never miss any updates
By using our website and services, you expressly agree to the placement of our performance, functionality, and advertising cookies. Learn More
Do you think you could stream video to an android app?, maybe even control it via an app? if so how would you do it?