I’ve taken Wilba6582’s eggbot drawbot code and cleaned it up enough to build under Processing 2.0. It requires grabbing the latest controlP5 library and I’ve removed the gamepad control.
I haven’t tried running it against an EiBotBoard yet but that’s the next step. The code builds and runs, it rasterizes an image, and brings up a gui with the ability to drag the pen around.
I’m in the process of organizing and cleaning up the code and I’ll continue to push changes to github.
We’ll see where this goes but it gives a nice starting point for jumping off, a big thanks to Wilba6582 for doing the initial work.
Here’s the interface up and running from the barely modified code.
I mentioned in an earlier post I had found a video on youtube of someone else using an EggBotBoard to drive a drawbot. That was pretty exciting because most of the drawbots out there (and maybe we’ll find later for good reason) are based on the Arduino / Adafruit motor shield combo. Since I decided to use the EggBotBoard it was good to find a kindred spirit that had already blazed a trail.
I left a comment on the video asking about what software was used and Wilba6582 responded and sent me a bit of code. I’ve just started to look at the code but from Wilba’s comments in the email he sent the code is targeted for the Processing environment and as shown in the video actually parses a file and drives the drawbot.
I’m posting the code here along with Wilba’s release. As I dig more into the code I’ll decide how much can be used as is, how much needs to be updated, and how much needs to be re-written wholesale. Part of my problem is that I’m not fully familiar with the Processing environment so I’ll need to take a moment or two to figure that out.
In the meantime I’m working on mounting the motors and electronics on a portable rigid surface (think piece of wood) so I can place the whole package above the surface I want to draw on, plug it in, and draw away.
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.
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
Not a huge amount of progress on my drawbot but I’ve stumbled across a couple interesting ideas I want to capture as part of this build stream.
I have printed a gondola and a couple spools. I printed this gondola and it looks good.
It holds a sharpie marker great, tight with just the right amount of tip poking out. It has good mount points for the cords and a place to put some weights on the bottom. The problem is, and I didn’t think about it before printing it, there isn’t a way to mount a pen lifter servo. I could probably rig something up that would work fine, but I’d rather have a designed in solution. So I’ll likely be printing a new gondola soon. This gondola will probably work fine for a TSP single line art but I want a pen lifter so I can do pointillist style images.
I also printed out some spools, the ones I mentioned in my earlier post, the ones makerblock recommended I shouldn’t use. They printed fine and I think I can glue them together to avoid the coming apart and unspooling problem. But they aren’t ideal, for a lot of the reasons makerblock pointed out. They press fit onto the motor shaft, no set screw, they are kinda narrow so you get cord build up changing the spool diameter. They looked good on paper but after printing and holding them in my hand I can see some of the issues makerblock pointed out. So I’ll be printing new spools.
On to the interesting part. I found a link on youtube to a guy who made a drawbot using the Eggbot hardware. So far I haven’t found any more details but at least someone tried, and succeeded, at this before.
Second, and I think more cool. I stumbled across a video for building a drawbot on the cheap. This guy uses some super cheap stepper motors, less than $5 USD each with motor drivers, simple 3D printed spools, and cup hooks for cord guides. No motor mounts, he just screws through the motor mounting tab into the wood drawing surface. Doing a quick BOM using the cheap motors and drivers, a super simple bare bones arduino clone, 3D printed spools, cup hooks or eyelets for guides, a cheap wall wart power supply, and a hand made or 3D printed gondola I think you could make a drawbot for less than $50 UDS, maybe less than $35 with some searching.
To me this is a super exciting way to introduce robotics to newbies. The drawbot itself is cool, people just seem to like watching the drawing appear physically. The cost is pretty cheap, it seems within the range of a learning or science project, and it’s super simple to build. I think a high school or middle schooler could easily assemble a simple drawbot in a day. Build up some kits and sponsor a build a drawbot day at your local school.
Drawing board, melamine coated shelf board from HD
Stepper motors with drivers
A cheap arduino clone, preferably already assembled to avoid soldering
Cables and wiring harness, preferably already assembled for plug and play
3D printed spools and gondola
Cup hooks and screws
Some fishing line
A sharpie marker
The software would need to be developed to drive it but that problem is being worked. I think this is a cool idea that could be pretty interesting for young wanna-be nerdlings.
Search DealExtreme for stepper motors, I’ve found some motors with drivers for less than $4 USD each.
I built my 3D printer from a kit a couple years ago. It is a MendelMax style and it came with a modified version of Marlin as the firmware and printrun as the host app.
One of the first things I did after putting everything together was update the firmware to the latest version of Marlin and printrun. That was a couple years ago. New versions of both the printer firmware and host software have come and gone and I’ve largely ignored them. My printer has been working fine and no need to mess with what works.
I’m in the process of building a polar plotter and I’m using my 3D printer more heavily to create many of the parts. After using the printer to print a couple parts, and remembering many of the little irritations that always bothered me, I decided to look around and see what new firmware and host apps are available.
I tried a couple different firmwares but eventually settled back on Marlin. I forked and cloned the latest from ErikZalm, created a branch for my printer mods, updated the Configuration.h, pushed my branch back to my fork, and pushed the changes to my fork. The changes for my printer are pretty minimal but pushing them to github gives me a place to stash them off box and makes them available if anyone else finds them interesting.
I added ErikZalm’s original github repo as an upstream repo so I can continue to fetch and merge his latest changes.
Fork ErikZalm’s Marlin repo into my github – do this on github.
Clone my fork onto my desktop. git clone https://github.com/bhunting/Marlin.git
Add ErikZalm’s repo as an upstream remote. git remote add upstream https://github.com/ErikZalm/Marlin.git
Create and checkout a branch for my feature work (support for my MendelMax) git checkout -b bhunting_MendelMax
Fetch and merge upstream (ErikZalm’s repo), not really needed right now since I just forked and cloned it. git fetch upstream git merge upstream/Marlin_v1
Push my feature branch to my repo git push origin bhunting_MendelMax
Modify the code as needed…..
Add, commit, and push git add Configuration.h git commit -m"configuration changes for MendelMax 3D printer - BAH" git push
After the mods I built the firmware using Arduino 1.5.2 and flashed it to my printer.
First off I like that the annoying beep when using the rotary encoder has been toned down. Much more palatable now. I like the new menu system. Not a lot has changed but it does look cleaner and I like the wording better. But how does it print?
I upgraded to the latest version of printrun but at the same time I wanted to try Repetier Host. Printrun seems to work fine with the latest Marlin but Repetier has a more full featured interface. Repetier provides both host side software and printer side firmware. I was unsure if Repetier Host would talk to Marlin firmware but it turns out Repetier Host is more than happy to drive the Marlin firmware. In fact the two get along just dandy.
I’ve only done one print using Repetier Host and Marlin firmware but one thing I did notice, other than the improved user interface on both the printer and host side, is my print started and completed in one pass, no hiccups or restarts. It might be an anomaly but at least it didn’t crash and burn right out of the gate. So far I’m happy and looking forward to trying more prints with this combination.
I just finished printing both motor mounts for my work-in-progress Polargraphic Plotter / Drawbot / Plotterbot. I decided on these motor mounts on Thingiverse. They fit a NEMA 17 motor and they looked simple and easy to print. Although I am a little concerned about the print layers being parallel to the mount bolt holes.
I printed these on my MendelMax 3D printer in ABS. I printed the mounts one at a time and each mount took a little over an hour to print. The prints needed some clean up with a pen knife to trim off the danglies but after that they look good. The motor mounting holes line up nearly perfect and the mounts are good fit to the motor bodies. We’ll see how they hold up under load but if I use a washer on the mounting holes it should distribute the stress.
My MendelMax printer
A two-for-one special, 0.5 mm printhead off of ebay. It seems to print ok.
The motor mount finished and ready to remove from the bed.
A video of the motor mount being printed
Another part down. Now on to the filament spools….
I’ve decided to use an Eggbot control board, the EiBotBoard, to drive my polar plotter.
Not for any particularly wonderful reason. The board costs right at $50, which is the cost of an Arduino uno R3 ($30) plus an Adafruit Motor Shield ($20).
It seems the software to drive a polar plotter already exists for the Arduino / motor shield combo. Eggbot board, not so much.
So I’m looking at the same cost and more work to use the Eggbot board. But hey, if it was too easy it wouldn’t be fun :). I like the form factor of the EiBotBoard and if I can get it working as a polar plotter I can add a little back to the community.
Ever since I saw a post about a drawbot on Hackaday I’ve been wanting to build my own.
A quick search of drawbot or plotterbot or polargraphic plotter will lead you to plenty of youtube videos and websites describing and demoing polargaphic style plotters.
I don’t expect to break any significantly new ground here. I’m planning on building a pretty standard two stepper motor, servo pen lift, monofilament on pulleys, weighted gondola polar plotter.
One thing I am doing that is possibly different, at least I haven’t seen it’s like yet, is I’m planning on using an EggbotEiBotBoard for motion control.
If you don’t know what an Eggbot is google it, watch a couple youtube videos, visit a few websites. It is a cool toy, and fundamentally nearly identical to a polar plotter. Basically an Eggbot is a spherical plotter. It should be a short step to a polar plotter. Certainly the hardware should be a drop in. The EiBotBoard has built in two axis coordinated stepper motor control, a pen lift servo control, and open source software for control and drawing conversion.
I plan on 3D printing the motor mounts and the pen gondola. Thingiverse has multiple models for motor mounts of various sizes and multiple different gondola styles. No real rocket science there. Download the models, update as needed for my motors and pen, and print them.
The interesting part is likely to the modification of the path generation to interface to the EiBotBoard. The Eggbot community has written a plugin for inkscape to wrap a flat vector drawing to a sphere and output the motion commands to the Eggbot EiBotBoard. It seems like a reasonable launching point to start with that plugin and modify it to convert line art to polar graphics and then drive the EiBotBoard on a polar plotter.
Often my blog posts are generated after the fact, after I’ve already completed the project, or done enough to figure out what I want to say or how the project is going to go down. In this case I’m blogging as I go. I haven’t started my polargraphic plotter project yet, other than a vague idea of what hardware I want to use and some of the mechanics that I think will work.
Next steps include picking parts and getting them ordered, picking some models and getting them downloaded and printed, downloading the Eggbot interface software and figuring out what’s going on there, then hook it all up and print, easy-peasy-pie.
One of the cool things about buying a widget from Sparkfun, or Adafruit, or Pololu is that almost invariably there is some reference software posted with the product to get you off the ground immediately.
The reference software comes with examples that demonstrate multiple ways of driving the LEDs. Here are a couple videos demonstrating the setup and Sparkfun’s demo code putting the bargraph breakout through it’s paces.
This is with no additional coding. Build the LED bargraph display, wire it up to the Arduino SPI, download the Sparkfun bargraph demo library, upload the example code, and sit back and watch the light show.
A different project I am working on needs a display with the feel of an analog VU style meter. I need to monitor a continuous variable and display feedback to a user of the variables relative value between it’s min and max. It was a short step from Sparkfun’s demo code to a display just like I need.
I wrote some quick demo code to read an analog input and map the read values to a set of LEDs on the bargraph display. I forked Sparkfun’s github repo for the bargraph kit and added my additional example code. You can pull the analog input to VU meter display demo from my github bargraph repo.
Here are some videos showing the setup and display of a read analog value in bar and dot modes.
This is exactly the style of display I was looking for and I think this package is going to work nicely.
I’m in the middle of a project that would benefit from an analog style display. Something to visualize an approximate value, within a min and max range, simply and clearly.
I like to browse Sparkfun’s inventory when I’m looking for new or interesting widgets. They are hometown boys (at least if your hometown is Boulder, CO), they make a range of interesting products, and being local it is easy to order and pickup parts the same day. And it turns out Sparkfun makes a nice LED bargraph breakout kit that looks like just what I’m looking for.
Fully assembled the display is supposed to look like this
The kit consists of a carrier pcb, four 8 bit serial to parallel shift registers(74HC595), some current limiting resistor packs, decoupling caps, and three 10 position LED bargraph displays. The Sparkfun kit comes with a Green, Yellow, and Red bargraph.
The Green to Yellow to Red transitions follow the typical Ok, Warning, Danger pattern. A reasonable choice by Sparkfun given no insight into their customers final designs.
When I picked up the kit I had a different application in mind. Rather than the standard transition from ok to danger I wanted more of a VU meter or power level type of display. For my application a single color for all three bargraphs makes more sense. It turns out Sparkfun sells the LED bargraphs in Blue, which is what I wanted. Each of the four colors of bargraph, Green, Yellow, Red, and Blue, are drop in replacements for the ones in the kit so you can mix and match to get the color or color ordering you want.
Eventually I want to mount this display in an enclosure with the LEDS showing and the pcb hidden. If the board is built as you would expect, all of the components firmly seated against the PCB before soldering, the LEDs do not sit very high above the shift register ICs. That means when the display is mounted either the enclosure walls need to be thin or else the LEDs will be set back in the enclosure wall. It turns out the LED bargraphs come from the factory with pretty long legs, probably around 5 mm. If you solder the LED bargraphs with the legs just through the PCB the front of the LEDs will stand off of the PCB about 12-13 mm and a good 6-7 mm above the ICs. That should give plenty of space to mount the PCB and have the LEDs mount flush to the front of an enclosure.
The kit is easy to assemble and the instructions are complete and easy to follow. The resulting display has a nice look and is easily programmed to display a variety of patterns. The kit can be assembled in under an hour and assuming you have an Arduino laying around and some jumper wires you can be displaying blinky patterns in less than 15 minutes more.