Penny

       Hello LMR, this is Penny the 3 servo hexapod. Penny is not just a very cheap way to build a hexapod but a very cheap way to build a robot, period. I actually based this robot off of a bot named Stomper that I had found here earlier on LMR.

 


 

DESIGN:

     I really liked how the mechanics of Stomper worked and seemed like a fairly simple design, so I fired up SketchUp and started designing parts. After a while I had something that I thought would work and it was off to the printer. All the parts for penny are in the .zip file at the top of this post. I've included the SketchUp source files as well as the .stl files that can be sent directly to a 3D printer. If you want to modify any of the pieces, I recommend changing the SketchUp files and then building new .stl files from there.

 

 

 

 


 

CONSTRUCTION:

      The goal of this project was to make a robot that could be built for a very small amount of money and still be "worth building". The total cost of this whole project was just under $10 USD. If you were to buy all the parts separately (Special THANKS! to DFRobot who sent me the CheapDuino as a contest winner) it would still be under $15 USD. All the parts took about 3 hours to print and when they were done it was just a matter of a few minutes to run a drill bit through the holes to make sure all the pieces were smooth.

 

 

 

 

 


 

ELECTRONICS:

     The CheapDuino is a great board if you don't have a lot of space and want to keep your project as small as possible. As you can see by the pic, the entire board is about the size of my thumbnail. The ATMega8 has plenty of power for this robot and the (4) AAA NiMH batteries powered it directly quite well. The board doesn't have a voltage regulator, so you have to be careful with the power supply that you feed it. The 4 NiMH batteries that I'm using are just slightly above 5v when fully charged and have a total capacity of 850 mAh. Although it only has 6 pins broken out (3 digital PWM, and 3 analog, it is still quite useful for a handful of projects, including small robots like this, for the same price as a raw AVR microcontroller without any of its support hardware (PCB, crystal, caps, resistors, ect...).

 

 

     Without any mounting holes, I found it easiest to make a sort of undershield that the board could connect to for the sensor and servo hookups that were needed.To make the undershield board, I needed to keep everything as low as possible so the the center legs would have enough clearance. I put the servo header on one side (on the left side in the picture to the left.) and the IR sensor header on the other. I also added a small 2 pin header for connecting the battery to the SPST slide switch. To minimize wires on the bot, I clipped the servo wires to the length I needed and put all the signal wires to a single 3-pin connector, then I tied all the grounds together, and all the power leads together and ran those to a 2-pin connector. So basically I have all three servos wired to a 5 pin connector which plugs into the main board. The right side has the connections for powering the IR LEDs, triggering the transistors that help light them, and 2 pins for reading the data from the left and right "eyes". The white connector on the top of the CheapDuino is for connecting a 10-pin 0.5mm pitch FFC (Flexible Flat Cable), which is like a micro ribbon cable, to a small breakout board that was included for programming. 5 boards, 2 cables, and the programming breakout board for programming cost about $20 USD, so it is really the cheapest Arduino you can buy right now. I used a MEGA1280 with the ISP sketch loaded to program it, and for some reason I had to burn the bootloader first each time I uploaded a new sketch. This might be the version or Arduino I'm using or something similar as I've not heard of any on else having this issue. Aside from that it worked great.

 

     The bottom didn't turn out as well as it could have, but it works and there are no shorts. The hardest part was trying to find room for everything. I did end up putting a few resistors and a transistor directly in the head to save a little room on the perf board. If I did it over, I'd probably just try to get it all to fit, as I'm not sure how long it will be before a lead snaps off one of the components from not being mounted "properly". Knowing my luck, it is bound to happen.

 

 

 

 

 

       Here is the schematic for the IR LED and the corresponding sensors. I took OddBots' lead with one of his IR circuits and adapted it for my own use. The circuits are quite similar besides some differences in the resistor values. I had some IR LEDs that could take 100mA continuous or 200mA peak, so I opted to drive them with more current. I made the schematic with Cadsoft's Eagle PCB Software and you can download it for free to make circuits and gerber files to have a PCB professionally made if you felt inclined to do so. It has a bit of a learning curve, but what doesn't, really? I didn't include the connections for the servos since they are pretty straight forward. For each servo I ran the signal wire to a digital pin, and powered them directly from the battery (after the power switch, of course). I didn't even add any caps and everything seems to work fine without them.... so far.

              (click on image to enlarge)

 


 

CODE:

There is a link at the top of the page where you can download the Arduino Sketch that was used for Penny. Keep in mind the Cheapduino has only 6 pins, so the programming is very basic with lots of room for improvement. Although it was most likely unnecessary, I commented almost every line of code since LMR is growing rapidly and many of the new people are new to Arduino as well. If you are one of those people I will recommend you check out ChickenParmi's excellent Arduino Tutorials to get a better understanding of what everything means. I make no claims to being a programmer! 

 

 


 

 

EXTRA PICS:

        Putting the bot together was fairly simple since I had already built it once in SketchUp (see the attached .zip file at the top of the page for the file with the complete assembled robot as well), so I knew how everything should fit. Here are some pics of the finished bot as it ended up.

Thanks for checking this out. If you have any questions, comments or suggestions, please leave a message in the section below.

Avoids obstacles via IR

  • Actuators / output devices: (3) 9g micro servos
  • Control method: autonomous
  • CPU: atMega8
  • Operating system: Arduino
  • Power source: (4) AAA NiMH rechargables
  • Programming language: Arduino
  • Sensors / input devices: Left and right IR sensors
  • Target environment: indoors

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/penny

Excellent! First time see

Excellent! First time see that cheapduino in action! Nice works.

Thanks, proto! I was

Thanks, proto! I was considering posting a BOM. Maybe I’ll have to do that. The hard part was getting the electronics to fit, but that’s easy street for you. :stuck_out_tongue:

And I don’t know what happened at the top of the post. I had it all pretty, then I added the video where I was told to and the server stuck it right in the middle of everything. :confused:

Love it!!

This robot is awesome! ive been wanting to make something similar but dont have a 3d printer… I like how it fits in your hand.

Imagine swarms of these running around the house!

Nice!

Yes, this is very nice! Thanks for sharing.

** Epic! What would be**

 

 Epic!  What would be the biggest  --duino you could fit on Penny ?

 I’ve got an Arduino Uno and I doubt it’ll fit without me having to enlarge the whole thing.

 Which reminds me, where did you get the 3D printing done?

 

Thanks. The biggest "duino"

Thanks. The biggest “duino” that would “most easilly” fit in the bots’ current state would likely be the pro-mini. Although if you went with a Li-po battery that fits where the electronics currently are, you could probably get an UNO to fit underneath where the AAA battery holder is on the bottom of the bot. If you made the bottom of the chassis a few mm narrower, the headers of the UNO would even be exposed along both sides. BTW, I have a 3D printer so I just had to go the den :wink:

Love any bot that moves diferent

Loved it

Just downloaded SketchUp Viewer to read your files, but can’t seem to get the dimensions of the pieces.

I don’t own a 3d printer so I’m thinking about doing a different, simpler version of yours by molding, cutting and shaping some Polymorph. I think I can do it all with a box cuter and a Dremel, except the chassis because of all the steaking out parts that I’ll try to ignore :slight_smile:

I’m think about doing it with an Arduino UNO, and some LiPo batteries

Questions:

Could you tell me the dimensions of the pieces?

What is the benefit of using IR sensors to range distances instead of Ultra sounds?

 Best Regards

Wauw!!

Jerz what a great project you have there.

I must say I dont have 10% of your skills regarding mechanical drawing / designing.

Today I went to my local FabLab here in netherlands, www.protospace.nl and was able to print 4 of the 9 parts (damn that takes long…). Only problem: the chassis part has a very thin/flimsy right “flap” to mount the servo’s in. It already broke when I removed the creation from the bottom of the printer using a thin knife. So now I am totally frustrated with Sketchup, a piece of software I am unable to master. Could you please please adapt the Chassis design to make the Servo mounting part the same as the solid counterpart at the opposite side? What I mean is the trapezium shaped part of the servo mounting breaks very easily. 

The clone is coming!

Hey JerZ

I’ve cloned your Penny! Work in progress, there will be a twin in a couple of weeks!

|x

Thank you, glad you like

Thank you, glad you like it.

If you scale the file of the assembled robot inside sketchup so that the chassis is 50mm x 110mm you should be good to go. I made all the pieces individual components, so you can just pull it apart in that file to have a look at the pieces individually. Looking forward to your creation. Sorry about the delay.

All the best

-Jeremy

Thanks for the kind words, I

Thanks for the kind words, I have been busy with family and work so I’ve been slow to get back to you.

Those parts look really good. Glad you got the piece that was giving you trouble, printed. Can’t wait to see your robot finished, it might look like a big fire-ant. Very cool.

All the best,

-Jeremy

How could I miss that cool

How could I miss that cool robot. It’s awesome to build a hexapod with the Cheapduino. That’s a nice design, with just three servos you will still habe some pins free for other stuff. Thumbs up!!!

1 Like

nice to hear from the maker

Hi Jerz

Nice to hear from you, no problem we all are busy sometimes!

Cloning penny is in the progress. I rebuilt the cheapduino, I made a schematic and PCB containing an ATMEGA8 and cloned the cheapduino. I also put on the board the 2 IR sensor circuits (they have to be extended to the front of the robot with wires), all servo connectors, a switch, on LED and an ISP port. I found out how to get the HEX file from your arduino sketch since I use my own AVRISP programmer and AVRstudio.

If all is finished and all is working I will post photo’s and I will share the pcb+gerbers with you all. I got a very cheap address in china which fabricates for 15 dollar 10x PCB size 10x10cm max and dual layer. Very very cheap. Only they make 10, not 1 or 5. For that price doesnt matter. Total is 15 bucks!! I can even send some of you a pcb if you are interested and pay me the shipment cost.

Thingiverse

By the way Jerz you really got me interested in 3D printing. I’m starting to master sketchup myself and am currently drawing my own / first 3D printed robot (with tracks).


Did you know about Thingiverse.

Its the coolest thing, free models for all without even logging in!

I’m going to build my own robotic arm based on 3d printed parts and cheap 9G servo’s http://www.thingiverse.com/thing:34829

Penny PCB V1.0 testing

Hi Jerz and others,

As I mentioned some weeks ago, I designed a PCB for JerZ’s cool robot. It incorporates the cheapduino (its just an atmega8) as well as all the sensors and circuitry. I just got the PCB’s from China and put on the ATMEGA8.

I was able to put the HEX file in (I dont use Arduino so I figured out how to get the HEX file and program with AVRstudio and the Atmel AVRISP programmer). It’s alive! The timing of the servo pulses is wrong though…

–>question for JerZ: what is the crystal frequency I can not find it and what board did you choose in the Arduino environment? Maybe I compiled it wrong.

Here’s a picture, update will follow in some days/weeks!

20140130_203714.jpg

Can you help me with an Arduino problem

Hi JerZ

As you read some weeks ago I was going to clone Penny. Well right now I am, and I am stuck.

For some reason the IR leds do not pulse they are just on all the time. I found in your code you use millis() to determine the number of mS passed. Did you include a special lib or something? It does not work…

Mechanically speaking I got my Penny clone working. I used an Atmega8A on my own designed PCB. That all seems to work except for the LED pulsing. I changed to another pin (A0 I made A1) but this didnt help.

Unfortunately the Arduino code has an ERROR…

Hi all, hi Jerz Penny got me puzzled for many hours. I could not get the IR leds to pulse. It was not my goal to get my hands dirty on the Arduino code, I wanted to use the code of Jerz and leave it. But it has an error… I am quite puzzled how this could work for Jerz robot, @jerz: are you sure your leds are pulsing and not ON constantly? The problem is within pulseController(), the solution I included also. 1. PulseController() makes the IR leds high when the first IF is TRUE 2. In the IF it assigns PulseOnTimer = currMillis; 3. Now the second IF is evaluated, first statment digitalRead(IRLEDPin)==HIGH is now TRUE 4. But the second : currMillis – PulseOnTimer > IRPulse is NOT TRUE 5. Why is this important? If the IF were TRUE then PulseOffTimer would have gotten an updated value of CurrMillis 6. It does NOT get updated so it is still at the same value. 7. Next time we enter PulseController() the first IF evaluates true AGAIN because currMillis - PulseOffTimer > IROff is still valid since PulseOffTimer did not get updated. And it never will because the first IF is true again and so PulseOnTimer = currMillis; happens again 8. After which the 2nd IF evaluates FALSE again! Because CurrMillis – PulseOnTimer is not bigger then IRPulse, in fact CurrMillis and PulseOnTimer are always of the same value! Jerz, are you absolutely sure you uploaded the right code? I fixed it by adding the condition in the first IF that IRLEDPin needs also be low. Like this if(digitalRead(IRLEDPin)==LOW && currMillis - PulseOffTimer > IROff)

Again, the previous post looks crappy

1.       PulseController() makes the IR leds high when the first IF is TRUE

2.       -In the IF it assigns PulseOnTimer = currMillis;

3.       -Now the second IF is evaluated, first statment digitalRead(IRLEDPin)==HIGH is now TRUE

4.       -But the second : currMillis – PulseOnTimer > IRPulse is NOT TRUE

5.       -Why is this important? If the IF were TRUE then PulseOffTimer would have gotten an updated value of CurrMillis

6.       -It does NOT get updated so it is still at the same value.

7.      - Next time we enter PulseController() the first IF evaluates true AGAIN because currMillis - PulseOffTimer > IROff is still valid since PulseOffTimer did not get updated. And it never will because the first IF is true again and so PulseOnTimer = currMillis; happens again

8.       -After which the 2nd IF evaluates FALSE again! Because CurrMillis – PulseOnTimer is not bigger then IRPulse, in fact CurrMillis and PulseOnTimer are always of the same value!

Jerz, how can this work for you, are you absolutely sure you uploaded the right code?

I fixed it by adding the condition in the first IF that IRLEDPin needs also be low. Like this

 

if(digitalRead(IRLEDPin)==LOW && currMillis - PulseOffTimer > IROff)

The red clone is functional!

Hi all!

Finally Penny has got a little sister. 

<embed

width=“420” height="345"
src="http://www.youtube.com/watch?v=PiVTC8JhZTQ"

type=“application/x-shockwave-flash”>
</embed>

I could not get the IR sensors to work properly. They look too difficult for me considered their task. I plan to replace them by digital ones. With them its still possible to tune some kind of range, by adjusting the comperator treshold levels. I rewrote the code to fascilitate such digital sensors, it works good. Only I used some cheap China sensors from dealextreme which do not fit in the nice 3D printed body Penny has. Now I will make new sensors, using the panasonic IS471. Its a bit costly (well… 4euros per piece) but they have everything on board, they pulse an IR led of 940nanometer theirselves and are very robust and quite insensitive to environmental noise. There’s a lot of that when you bang around 3 servo motors so close to the microcontroller board :wink: I had to do absolutely nothing to the mechanical parts but print them, Jerz big thanx for that. Also the servo control functions all work out of the box

1 Like