Stepper Motor Drawing Machine

Поделиться
HTML-код
  • Опубликовано: 15 сен 2024
  • Drawing machine using stepper motors and an Arduino controller.
    Sketch for Arduino Uno listed below:
    /*
    free running pulse train generated on outputs 3,6, and 7
    based on countdown of redcount, yelcount, and grncount.
    */
    int yellow=6;
    int red=7;
    int green=3;
    int redcount=125; // turntable
    int yelcount=29; // yellow motor
    int grncount=25; // green motor
    int redvar=redcount;
    int yelvar=yelcount;
    int grnvar=grncount;
    // the setup function runs once when you press reset or power the board
    void setup() {
    // initialize three digital pins as outputs
    pinMode(yellow, OUTPUT);
    pinMode(red, OUTPUT);
    pinMode(green, OUTPUT);
    pinMode(13, OUTPUT); //
    digitalWrite(13,LOW); // turn off onboard LED
    }
    // the loop function runs over and over again forever
    void loop() {
    --redvar; // reduce redvar by one
    if (redvar != 0) {goto redskip;} // skip motor pulse if redvar is not 0
    digitalWrite(red,HIGH); // Step Red on
    delay(1);
    digitalWrite(red,LOW); // Step red off
    redvar=redcount; // reset redvar
    redskip:
    --yelvar; // reduce yelvar by one
    if (yelvar != 0) {goto yelskip;} // skip motor pulse if yelvar is not 0
    digitalWrite(yellow,HIGH); // Step yellow on
    delay(1);
    digitalWrite(yellow,LOW); // Step yellow off
    yelvar=yelcount; // reset yelvar
    yelskip:
    --grnvar; // reduce grnvar by one
    if (grnvar != 0) {goto grnskip;} // skip motor pulse if grnvar is not 0
    digitalWrite(green,HIGH); // Step Green on
    delay(1);
    digitalWrite(green,LOW); // Step green off
    grnvar=grncount; // reset grnvar
    grnskip:
    delay(1);
    }
    ---------------------------------------
    Parts List
    From Amazon
    Arduino or Elegoo Uno R3 Controller Board $17
    DRV8825 Stepper Motor Driver and Shield Boards (3 ea) $19
    Nema 17 Stepper Motors (3 ea) $28
    Lazy Susan Turntable Ring, 8”, TROOPS BBQ $18
    Flange Shaft Coupling 5 mm (4 ea) $9
    12 V 2A DC Switching Power Supply $8
    Stabilo Point 88 Fine liner pens $12
    Cardstock paper $13
    From Home Depot
    Aluminum Rod ¼” (2 ea) $11
    Hinge $2
    10-32 x 3” bolts and nuts for legs (4 ea) $5
    Spare Parts in my shop
    Aluminum T-Track for ¼”-20 T bolt or Hex head bolt
    Ball Bearings
    Hex Bolts and Wingnuts, ¼”-20
    PVC Blocks
    Set Screws 6-32
    2x4 wood blocks
    ¾” pine shelving
    Prototype Board
    LEDs (3 ea)
    270 Ohm Resistors (3 ea)

Комментарии • 12

  • @rusticagenerica
    @rusticagenerica Год назад

    Damn beautiful bearing system you have there.

  • @beatrute2677
    @beatrute2677 Год назад

    nice, i use to love making spirographs when i was a dwarf

  • @weirdsciencetv4999
    @weirdsciencetv4999 Год назад

    This is genius. I love it! Subscribed!!

  • @MAS150MD200
    @MAS150MD200 Год назад

    Awesome.

  • @weirdsciencetv4999
    @weirdsciencetv4999 Год назад +1

    Have you considered programming some kinematics and making this an arbitrary shape drawing machine?

    • @jeffg8232
      @jeffg8232  Год назад

      Oh, my goodness, this machine is arbitrary enough. Even small changes to the arm length or radius can make huge differences in the pattern. I often don't know if a good pattern is being drawn until it's almost finished. Even the starting position or phase of the two arm motors can make a difference. Sometimes it turns out a mess. I've learned to keep elaborate patterns from crossing the center of the table. That can generate a messy bulls-eye blob. I've shown examples of my good patterns. I've made lots of bad ones as well.
      There are many kinematic drawing machines on RUclips using pendulums. Some are very clever and interesting. Check them out. Thank you for your comment.

    • @weirdsciencetv4999
      @weirdsciencetv4999 Год назад

      @@jeffg8232 Yes, I have seen lots of kinematic drawing machines too. Just saying your kinematics as they are might already be capable of that, just with some code additions. It was just a question if you intended to do that personally, which the answer of course is ‘no’.

  • @jozefnovak7750
    @jozefnovak7750 Год назад

    Super!

  • @rusticagenerica
    @rusticagenerica Год назад

    You like PVC blocks :))

  • @BrianBoniMakes
    @BrianBoniMakes Год назад

    Have you seen a Rose Engine also called a ornamental turning lathe or Guilloche? They are mostly known for making the patterns on the faces of expensive watches. Your drawing machine reminds me of these. It looks like you have no way to "preview" your program. As far as spirograph goes your examples look better than any plastic gear videos I've seen, Was this your idea? Well done!

    • @jeffg8232
      @jeffg8232  Год назад

      I'll look up the ornamental lathe. I'm always interested in tools like that. My inspiration was the old Hootnanny toy I had as a kid, but I copied many elements from the Drawing Machine II by Photonflood on RUclips. His design has variable control of all 3 motors. I just made everything direct drive, and employed the Arduino as a controller. I also made it much smaller. You are correct that there is no preview. It's all trial and error. I make notes on my speeds and arm settings, and then make small adjustment to try to improve things. I've learned to not let the pen draw across the center of the page. After multiple passes across the center, it turns into an inky blob. Thanks for your comment.

  • @rusticagenerica
    @rusticagenerica Год назад

    Dear God, the system looks complex :)