Quad Bot Puppy

OddBot's picture
Pretends to be a puppy
AttachmentSize
Quadruped_Puppy1.zip4.99 KB
Quadruped_Puppy_NiMh.zip5.03 KB

This is my second puppy robot and the first to use a QuadBot kit. The robot is quite simple, just a pan / tilt kit mounted on a QuadBot chassis with DAGU's new Magician robot controller.

Assembly instructions can now be found on Make Projects.
http://makeprojects.com/Project/Playful-Puppy-Robot/1375/1

More detailed instructions are now avaiable on Instructables.
http://www.instructables.com/id/Playful-Puppy-Robot/

This is now a kit! The instruction manual can be downloaded from my product support site:
https://sites.google.com/site/daguproducts/home
The kit comes with a battery holder for NiMh AA batteries and modified sample code to suit the different center of gravity.

The first video is my son Shi Sen playing with the robot and trying to get it to shake hands with him. The second video is with the latest code and Shi Sen is trying to get the robot to walk on it's back legs. Since the robot is controlled by your hand gestures this takes a bit of practise.

This robot can be built with 6x NiMh AA batteries. As the batteries are heavier the balance changes a bit when standing on it's hind legs. I have added a second version of the code that compensates for this.

This robot is now being produced as a kit, no soldering required.
Keep an eye out for it in online stores.

The code is a combination of the Mr. General IR tracking code and the Quad Bot sample code with some "puppy personality" thrown in to entertain my son.  I did put a small vibrator on the tail but the weight is too small making it hard to tell that he's wagging his tail.

The attached code will follow an object, sit when there is nothing to follow and shake hands and/or lie down depending on your hand gesture. If you hold your hand above it's head it will try to stand on it's back legs and follow you. This uses about 5K of the 8K available on the ATmega8 so there is still plenty of room for more personality code to be added.

The Arduino servo library can handle up to 12 servos on most Arduino boards but this comes at a cost of disabling PWM on pins 9 and 10 which are used by the magician controller for the dual "H" bridges.

As I wanted one motor output to drive the vibrator motor on the tail I cheated by configuring that PWM pin as a servo and then adjusting the min and max pulse settings in the attach.servo() command allowing me to go well beyond the normal range used by servos with the maximum being aproximately a 50% duty cycle. More than that will damage the small motor as it is running on 7.4V.

As my servos are rated at 6V and my LiPo battery has a nominal voltage of 7.4V I had to drop the power a bit. Although the onboard regulator can handle 1.5A I found that my 10 servos were drawing up to 3A or more in some cases.

The magician board has a jumper to allow the servos to be powered by the battery directly and there is already a 3A reverse polarity protection diode in series that drops the voltage by about 0.7V when under a reasonable load. I replace the jumper with a second 3A diode to effectively give me 6V when the battery voltage is 7.4V.

You can download the instruction manual for the Magician controller from my support site:
https://sites.google.com/site/daguproducts/

I had originally tried powering this project from AAA NiMh batteries. This will work if you have good quality batteries but my cheap NiMh AAA batteries were struggling to put out more than 2.5A. I have gotten up to 6A from good quality AAA NiMh batteries.

Fortunately I had a 7.4V LiPo battery pack from an old project that was about the same size and with more than twice the capacity. My advice for anyone wanting to use a lot of servos is to forget about alkaline batteries and use either high quality NiMh or LiPo batteries.

I have marked this project as complete although there will probably be a few software and hardware modifications in the near future.

If you want to know more about the QuadBot chassis then you can download the manual from my support site:
https://sites.google.com/site/daguproducts/

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
... And my puppy do piss :-) :-) http://www.youtube.com/watch?v=YCxiC2MiPNo&feature=youtube_gdata_player Everyone enjoyed this function during the Easter holiday :-)
OddBot's picture

It is nice to see someone expanding on the robots personality.

OddBot's picture

Ok. That's strange. It looks as though it is correctly assembled. I would suggest downloading the latest code from my support site but now that you've changed things around that would only make things worse.

Some good news though. Currently the puppy is prone to stripping gears if the legs get caught up in something. We have produced a servo clutch kit to prevent this from happening.

You can see video here: http://www.youtube.com/watch?v=zEK1Dyx9nc0

This kit will be available soon and will extend the life of your puppy while you play with his code.

Hi all,
I complete this robot 2 days ago, and I played a bit with the sample code.
Some Issue:
- Originally I connected the vibrator motor to the indicated H bridge, but after a little time I see smoke on the magician board... the bridge now is broken. Yesterday I wired up the motor to the right H bridge and (after change it in the code) it works correctly.
- I also had some problem with the eyes... I had to invert L and R, and U and D, because for me, with the correct connection, the head goes reverse.
- I had to modificate also the code for the tricks... when I put my hand over the head, the puppy goes in shake hands mode, and when I put my hand down it try to jump... so I modified the code and now it seems to work correctly.

I have had some error? Why the servo for tilt seems to be inverted?

May I enable uart to see on Zterm the servo value printed out?

Thanks a lot... this is very interesting as project... I work every day on firmware for professional coffee machine... and play with this funny dog is really relaxing :-)

Dario 

OddBot's picture

If the tilt is inverted then you have not assembled the pan/tilt assembly correctly. The tilt servo can be mounted with the servo horn to the left or the right side. If you accidentally turned it around then even though the servo rotates in the same direction, the tilt direction is reversed.

You say the head turned the wrong way and you swapped the up/down, left/right wires to fix it? That is why the puppy shakes hands instead of jumping. Although up looks like up to you, it is down for the puppy. Please post a photo of your robot. I suspect you have his head on upside-down :-)

Hi, thanks for your repply.

Here I have these two photo:

I double checked all with the photos I found... for me it's all correct......

Let me know :-)

Hi,
yesterday I finished assembly my first robot... this funny puppy.
This evenyng I will load  the demo code and after the success of the first tests I will learn better the Arduino IDE.

My wish is to add a speaker to the robot. I see that I have a PWM pin free to use, but do you have some hint to give me about this?

Thanks a lot

Dario

Jezbot's picture

Well done! Very impressive bot. I have been building one of these and have come up against some problems. I'm using picaxe 40 with a maestro servo controller. I am struggling with getting the puppy to turn (rotate). What Servo movements do you use? ie. FRH hip forward, RLH knee up..... etc.

I would really appreciate any help as I have tried and failed.

 

OddBot's picture

You could download my code but it probably won't help much since you are using the picaxe. It is probably better if you follow these steps.

  1. Write your code so that all servo movent is based on a center position (usually 150 for picaxe) plus or minus a value. The magnitude of this value will determine how much the servo moves and the sign (positive or negative) will determine direction. I had one value that told the leg how much to lift or lower. Another for how much to travel forward/backward.
  2. Start by teaching your robot to walk forward. For a quadruped the simplest gait is to lift diagonally opposite legs, while those legs are in the air, move them forward, while the legs on the ground move backward. Lower the legs that are in the air and then repeat the pattern with the legs that were on the ground.
  3. Once you have the robot walking forward, it should be easy to work out how to modify your code so it will add or subtract the direction values depending on if you want to go forward or backward.
  4. Then modify your code further so that you can make the left and right sides change direction independantly allowing the robot to turn.

This is the process I use to develop all my walking gaits. The advange of having all servos values revolve around a center position is that you can then calibrate the servos center position without affecting the gait. You can also do other cool things such as changing how high or low the robot sits while it is walking by simply modifying the center values.

targetdg15's picture

Great page! Im also working on a dog-bot ( but IM new so it will be much more simple for learning sake) and I had a question, what is used to create the tail motion? is it a motor, servo or something else? Thanks!