Category Archives: Hardware

hexapods / summer status update

hexapod: IK, preprogrammed dancing+lilypad controls ETA end of August (2 months, pure software development)
electronics working, now apply programming
(look at trossen robotics code, implement IK)
buy things: xbee tx and rx, two lilypads, some battery male plugs + femfem servo cables, maybe a sensor or two?, maybe a ps2 controller? or accel for lilypads?, el wire, [conductive thread]
vision: sound-reactive EL wire’d body, movements depend on real-time sound input processing. lilypad
buy them soon. spend money, you can do it. o__o
mechanical: upgrade to laserjet acrylic, 3d printed, or waterjet+Al body. Put HITECs on shoulders. double-sided support. (ETA New Year ish)

hexarideablepod: ETA end of July (1 month), ideally by next week…
order steel monday or tuesday
learn welding tuesday or wednesday
CAD slightly larger version, possibly with gearing to avoid undervolting and provide more torque/power. probs not for first version… check for bolts etc.

laser-cutter: ETA end of IAP (next January)
make spreadsheet of options and commercial cost
e.g.
bed size, laser wattage, commercial price & URL, laser commercial price & URL.
Then email out to MITERS.

direct-to-pcb/garment printing: requires just a weekend. maybe with Rush funding?

MITERS, lights automation and RFID keyholding, ETA last two weeks of August (begin after GSoC end).
*go ahead and order parts


Timeline:
hexarideablepod, until Monday July 11th (intense build during week off from CfA).

hexapod w/ IK and bluetooth, 2 weeks. w/ EL wire, 1 week. (aug 1st). w/ lilypad, 1 week (aug 8th).

Then 3 weeks left…
Plan A: MITERS personality core, 1 week, RFID keyholding, 1 weekend, rotary phone Putz, 1 week.
Plan B: make a scooter (hate walking). Last week = rush.
Plan C: start on hexaawesomepod

mysekritproject, 1 weekend sometime.

how to set up arduino + pololu mini maestro (for an 18 servo hexapod)

EDIT 4 Dec 2012:
As of august 2012-ish (I haven’t tried to run hexapod since then, because I ate my pololu controller sometime while dragging my hexapod all around the country this summer >__< Ugh I fail at taking care of expensive electronic things), there are some syntax changes if you’re using the latest version of arduino because newsoftserial is now built into arduino, not a separate library.

This version of the code is also slightly better organized…
https://github.com/nouyang/18-servo-hexapod/blob/master/pololu_aug17-2012.pde

[updated because i saw a link from http://forum.pololu.com/viewtopic.php?f=16&t=6188&p=29520#p29520]

EDIT 18 March 2013:
I made a video about my hexapod.

Also, a diagram to explain what is going on in the August 17th revision of the code:

[updated because I saw a link from hexy forums]

=====

this post because pololu has awesome documentation but dear lord is it long and difficult to wade through when I’m fairly new to this stuff. Also, I finally figured out the sad-servo problem that was plaguing me for a week.

Fig. 1

My current setup: eighteen servos on maestro pins 1-18 (pin 0 left empty), VSRV=VIN jumper has been removed. 8.4V battery pack fed through 5V linear regulator on carrier board. The servo wire with with masking tape comes from PIN2 of the carrier board/arduino setup and is supplying the pololu controller with GND, VIN, and the serial signal. Red and black wires going from breadboard on carrier board to VSRV on maestro.

If all that didn’t make sense…

Steps

a. Hardware
  1. Look at labeled picture http://www.pololu.com/docs/0J40/1.b
  2. What you need on pololu-side: serial going through to RX pin on pololu, power to VSRV and VIN, ground to GND, and lots of servos
  3. According to our eventual code:
    #include <NewSoftSerial.h>
    #define txPin 2
    NewSoftSerial mySerial(rxPin, txPin);
    void setup(){
    mySerial.begin(9600);
    delay(1000);
    }
  4. we should take a servo female-female wire, put one end on servo male header pins for pin 2 of Arduino.

  5. RX/TX and Microntroller power: Put other end white wire (or yellow or whatever wire is SIG) on RX on maestro, and red (VIN) and black (GND). Should look like pic above, the wire-with-masking-tape, with black facing “out” toward the USB port.
  6. Servo power: see pic above, the two non-servo cables (the red wire and black wire going to the breadboard) are screwed into the blue terminal block on the maestro. The breadboard has 5V and GND from the 8.4V battery going through the linear regulator on the carrier board. I’m actually stealing 5V from a servo pin. See the black wire soldered to Dig9Output, 5V in the upper left of this pic (which is actually carrying 5V, not GND) (via a female header pin so I wasn’t soldering straight to the carrier board pins) (ignore the gazillion extraneous wires)
  7. Remove VSRV=VIN jumper

Why remove the jumper? Well, a. Makes the pololu RX pin happier (compare to setup below) b. Setting that jumper seems to current-limit the power going to the servos, leading to my sad-servo symptoms. aka unable-to-walk hexapod.

the single pin (pololu RX) inside the masking-tape-servo-cable is a sad pin. The cable also falls off often.

I used the jumper originally because I was thinking I would need two batteries (one for VSRV one for VIN) or something otherwise. But hey look, it’s setup to be neater without the jumper, I’m still only dealing with one battery, and my hexapod doesn’t work with the jumper on. u___u

b. Software
[edit 27 Jun 2011 I fixed the many errors in my post, as pointed out on the pololu forums: Pololu maestro and arduino again]

1) newsoftserial should be downloaded from the internet and the folder inside the zip put in (path to where you unzipped arduino)/arduino/libraries/ (e.g. for ubuntu 10.10 via the repository, /usr/share/arduino/libraries)

And the code from http://www.pololu.com/docs/0J40/5.e or from above means:
a. BYTE is a parameter that pecifies the base (format) to us http://www.arduino.cc/en/Serial/Print
b. target is a non-negative integer less than 8192 (it can be written in binary notation with 14 or fewer digits)
e.g. 6000, or in binary: 01011101110000 
c. 0x7F is 01111111 in binary, which infinity zeros to the left, so “&”ing (bitwise AND) it masks out all the digits in target (when target is written in binary) except the last 7 digits (only 1 AND 1 == 1. all other combinations == 0)

  01011101110000
& 00000001111111
= 00000001110000

d. right shift operator, shifts last seven digits (numbers 7 through 13) in target off into empty space and so now the “new” last seven digits were originally bits #0 to 6 (see color-coded pololu doc). Mask with 0x7F again, just to be sure.

  01011101110000,>>7 to:
00000000101110, then:
& 00000001111111
= 00000000101110

You can see the code I used with Fig. 1 here: https://github.com/nouyang/18-servo-hexapod/blob/036271da7e66b80ff7ea732ea13b7028b43d28ac/pololu_jun17a.pde

The main difference from the default code is that I mapped the values so that I could mindlessly port code from arduino-“Servo.write()”-style to pololu-“settarget()”-style.

void settarget(unsigned char servo, unsigned int target)
{
target = map(target, 0, 180, 2400, 9500);

Also feel free to compare to original arduino version: https://github.com/nouyang/18-servo-hexapod/blob/master/arduino_may13_2011.pde

hexarideablepod

Rideable Hexapod (aka spiderbot or hexabot or whatever). Anyway, I want.

Step A. KISS. Clone someone else’s work on a linkage hexapod.

~$ git clone git@instructables.com:Hexabot-Build-a-heavy-duty-six-legged-robot/

haha I wish hardware was as easy as software to duplicate.

Substeps:

  1. Acquire materials
    1. Steel stock
      1. Turner Steel (carpool with someone)
        1. 60 feet of 1″ square steel tubing, 0.065″ wall ~$72
        2. 20 feet of 2″ x 1″ square rectangular steel tubing, 0.065″ wall ~$37
        3. Directions
        4. (508) 583-7800 –inquire about cost for delivery to MIT, also hours
      2. Inquire from the Central Machine Shop, bldg 38-001
  2. Apply CAD (scale up, can motors handle? torque calcs?)
  3. Apply controller to motors (make original one? probably stick with relays)
    1. schematic
  4. Learn welding (MIG or TIG)
  5. Build build build
Oh, right, youtube research: (specifically for this kind of linkage-based rideable hexapod)
Look it’s bicycle powered http://www.youtube.com/watch?v=jJY1fqzuqL0
Look it’s wheelchair motor x2 powered http://www.youtube.com/watch?v=xuRT9gC0CGs

in the meantime, I learned a bit of serial by asking Leighton, a hallmate, so now I understand the pololu code. But I still don’t understand why it’s sad. Yay I kept thinking it was something with the code, and I couldn’t find my cute tiny 2.007 battery to try . But I tried something I knew wouldn’t work, and it worked! yay. will post in pololu forums to make it more findable.
http://forum.pololu.com/viewtopic.php?f=16&t=3944&p=19496#p19496