Feb 172014
 

As mentioned in an earlier post I have decided to use the Eggbot control board (EiBotBoard) to drive my drawbot. I’ve gotten the electronics up and running, mostly just plug it in, screw down the stepper motor wires, and plug in the pen lift servo motor. Here are some videos of the EiBotBoard in action.

Some commentary on why I am using the EiBotBoard. The EiBotBoard is a nicely integrated dual stepper motor, multi servo motor driver that accepts high level motion commands over USB from a serial console.

Description of the motors selected for the drawbot. A couple NEMA 17 stepper motors I had laying around in my parts box. They are 0.8 amp motors, well within the 1.25 amps the EiBotBoard can supply.

Motion demo of the EiBotBoard driving two steppers and a pen lift servo. The script that is running is posted below. I am using a cygwin command window to echo the commands to the USB virtual comm port. Keep in mind Windows enumerates the COM ports starting at 1 and cygwin enumerates /dev/ttySxx starting at 0. In the script below I am echoing to ttyS18 because Windows enumerated the COM port at COM19.

Finally more commentary on why I like using the EiBotBoard.

Commands running in a cygwin shell script. Script with comments below.
echo "v" > /dev/ttyS18
echo "sm,500,500,500" > /dev/ttyS18
echo "sc,4,6000" > /dev/ttyS18
echo "sc,5,26000" > /dev/ttyS18
sleep 1
echo "tp" > /dev/ttyS18
sleep 1
echo "tp" > /dev/ttyS18
sleep 1
echo "tp" > /dev/ttyS18
sleep 1
echo "tp" > /dev/ttyS18
sleep 1
echo "tp" > /dev/ttyS18
sleep 1
echo "em,3,3" > /dev/ttyS18
echo "sm,1000,2000,2000" > /dev/ttyS18
sleep 1
echo "sm,1000,-2000,2000" > /dev/ttyS18
sleep 1
echo "sm,1000,2000,-2000" > /dev/ttyS18
sleep 1
echo "sm,1000,-2000,2000" > /dev/ttyS18
sleep 1
echo "sm,1000,2000,-2000" > /dev/ttyS18
sleep 1
echo "sm,1000,-2000,2000" > /dev/ttyS18
sleep 1
echo "em,0,0" > /dev/ttyS18

Send the version command to the board, establishes communication with the board.
echo “v” > /dev/ttyS18

Move both steppers at 1/16 size steps (the default) for 500 steps each and take 1/2 second to move (500 msecs)
echo “sm,500,500,500” > /dev/ttyS18

Set the pen lift servo min and max values, 6000 and 26000, determined from experimenting with this servo
echo “sc,4,6000” > /dev/ttyS18
echo “sc,5,26000” > /dev/ttyS18

Each TP command toggles the pen position from up or down
echo “tp” > /dev/ttyS18

Set the stepper fraction to 1/4 sized steps.
echo “em,3,3” > /dev/ttyS18

Step the motors for sm, duration in msecs, number of steps motor1, number of steps motor2
echo “sm,1000,2000,2000” > /dev/ttyS18
echo “sm,1000,-2000,2000” > /dev/ttyS18
echo “sm,1000,2000,-2000” > /dev/ttyS18
echo “sm,1000,-2000,2000” > /dev/ttyS18
echo “sm,1000,2000,-2000” > /dev/ttyS18
echo “sm,1000,-2000,2000” > /dev/ttyS18

Disable the motor drivers to avoid over heating the motors.
echo “em,0,0” > /dev/ttyS18

 Leave a Reply

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)