Motor Party!

it is like -19213 degrees outside, so i spent the day workin’ on my motor shield design and then had a MOTOR PARTY!

Here is a preview of the motor shield for Arduino that I’m workin’ on…it can drive 2 hobby servos as well as up to 2 steppers or 4 bidirectional DC motors.

  servo_init();
  servo1_enable();
  servo2_enable();
  motor_init();
  stepper1_enable();
  motor4_enable();

  while(1) {
    servo_setpos(1, -2000);
    servo_setpos(2, -2000);
    motor(4, FORWARD);
    for (i=0; i< 250; i++) {
      stepper(1, FORWARD, SINGLE);
      motor_setspeed(4,i);
      _delay_ms(5);
    }
    motor(4, BACKWARD);
    servo_setpos(1, 2000);
    servo_setpos(2, 2000);
    for (i=0; i< 250; i++) {
      stepper(1, BACKWARD, SINGLE);
      motor_setspeed(4,i);
      _delay_ms(5);
    }
  }


Try Adafruit's new iPhone & iPad app for makers! Circuit Playground! "Incredibly handy for anyone working in electronics. Perfect for engineers and non-engineers alike."
Looking for engineers, makers and the builders of dreams? Try our Adafruit job boards.
Join our weekly Adafruit SHOW-AND-TELL at 9:30pm ET every Saturday night! Then at 10pm, ASK-AN-ENGINEER with Ladyada and the Adafruit team!

11 Comments

  1. Will this be ready as a kit or schematic? It so when!!

    Comment by Robb Greathouse — January 21, 2008 @ 10:19 am

  2. Excellent!

    Comment by Chris — January 21, 2008 @ 11:48 am

  3. :-) You can call these guys the ‘Gotham City Rollers”.

    Comment by TomP — January 21, 2008 @ 1:28 pm

  4. >drives 2 steppers
    unipolar or bipolar

    Comment by not_starman — January 21, 2008 @ 2:16 pm

  5. these steppers that i had in my STUFFBOX are unipolar, but from what i understand, the hardware for bipolar is the same so if i could get my hands on a bipolar stepper it would be straightforward to add code support

    Comment by ladyada — January 21, 2008 @ 3:00 pm

  6. me likey! i’d buy that for a dollar … or however many it costs :D

    Comment by unsped — January 21, 2008 @ 5:14 pm

  7. I was listening to ‘Pilgrims of the Mind – Something’s Pulling me Under’ on SomaFM’s groovesalad while watching this video. The flappy, buzzy motor sounds were in perfect time with the music. Happy++

    Comment by Jimmy — January 22, 2008 @ 6:04 pm

  8. ladyada — disassemble an old floppy drive. It will likely have bipolar. Or, if you can get your hands on a six-wire stepper, you can connect it up as either unipolar or bipolar. Great to see software for this otherwise orphaned shield board. Now … does it work with the boarduino (obviously not, but I thought I’d just ask that question. Maybe with the addition of a set of holes off to one side into which you could solder a boarduino? Or for that matter, just put the Atmel on the motor control board, with the six-pin angle connector and be done with it.)

    Comment by Russell Nelson — January 23, 2008 @ 12:17 am

  9. ladyada – Are schematic and pcb available? It’ll be great for my project and I’ll buy the pcb if available.Cool video.

    Comment by misan — January 23, 2008 @ 9:50 am

  10. I’ve been working on my own motor control interface for the Arduino, but it sucks so far because I’m not really a very good electrician at all, at all. Can’t wait to see what you came up with!

    Comment by dc — February 12, 2008 @ 2:52 am

  11. these are in the shop now…
    http://www.ladyada.net/make/mshield

    Comment by ladyada — February 26, 2008 @ 6:24 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

www.flickr.com
adafruit's items Go to adafruit's photostream
www.flickr.com
items in Adafruits More in Adafruits pool