ladyada’s ranting afowejfaiwuehfakjnfa

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);
    }
  }

11 Responses to “Motor Party!”

  1. Robb Greathouse Says:

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

  2. Chris Says:

    Excellent!

  3. TomP Says:

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

  4. not_starman Says:

    >drives 2 steppers
    unipolar or bipolar

  5. ladyada Says:

    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

  6. unsped Says:

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

  7. Jimmy Says:

    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++

  8. Russell Nelson Says:

    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.)

  9. misan Says:

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

  10. dc Says:

    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!

  11. ladyada Says:

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

Leave a Reply

You must be logged in to post a comment.