## Repola Computations

[Updated: Attached new images to show more accurately the curve scales. Previous images lacked an accurate 'zero' frame. Also added a 'zoom' image to show spline error up close]

I have made some progress working thru the conversion of linear segments into an N dimensional spline path.

I've created a simulated environment for the RepolaRap XY platform to test some of my ideas out. I created an algorithm curve consisting of line segments of various lengths, and fractally segment it so I get a few quiet areas with long straight segments, as well as some noisy areas with lots of tiny segments.

My goal will be to produce an complete description of every control that must change at each precise moment, and approximate this with spline segments to within as much accuracy as is needed to get an accurate build.

This first image shows the general shape that I've been testing with. The blue segments are simple euclidean line segments, and would represent the output of a G-Code interpreter of all three axes, as well as extruder rate (integrated to get an extruder 'position'), temperature control, fans, and any other special devices that would need to be controlled. Although I assume these are straight linear segments for my simulation, the conversion to splines does not actually require they be linear, only that some function be described that can give its position at some time t.

The red segments in this image represent the spline approximation for the X and Y axis converted into two angles for a two link arm. The simulation allows for distinct pivot arm lengths, but I have assumed they are the same in this image, E.G, that the extruder will be able to reach the exact center point of the build platform.

Mapping the angle positions across time results in the following chart. I have chopped it into the modular domain, rather than extend it beyond the 360 degree motion that actually defines model space. I point out those cases where the apparent branch cuts actually do not exist in the simulated revolutions. As I have mentioned previously, only one axis actually needs 360 degree freedom (the build platform); the radial arm only requires 180 degrees, so no it does not require welding, and no special logic for handling the branch cut is needed.

My next goal is to figure out a way to dilate or compress the time component such that one axis will always move at maximal jerk, acceleration, or velocity. I think this will happen by cutting each spline segment into as many as six segments as different limits are hit. I've included the stock graphs for the equations that will need to be dilated, consisting simply of the first, second, and third derivatives of the angular motions.

I fully expect during extrusion that the extruder will actually arbitrate the majority of time, with the exception of very noisy, very short segments. As I've not yet gotten this logic in yet, it's hard for me to judge yet.

One last image here shows what the spline error tends to look like. This image was generated by finding a region with some error, and zooming into it 100x. This is the first angle area on the right near the top of the path.

## Hydra-MMM Software/Firmware updated to v1.1

First off, I am thrilled to see how many people were willing to try out my software and firmware. Thanks for all the feedback from the community! I pushed out an update this afternoon that added several of the features that were most requested. A summary is below:

v1.1
- Extruder support added that automatically determines correct extruder speed based on XYZ specified federate
- Support for external motor drivers added, the option is now at the top of the firmware to choose to use dir/step method (for external driver) or defining each coil and using MOSFET transistors or something of that nature (see below)
- Wiring diagram added by request to show how to hook up a stepper motor without an external motor driver
- Made preview window larger and added ability to change the size easily in the Processing sketch (variables pw_width and pw_height)
- Sample gcode file added by request

The biggest things here are that external motor drivers are now supported. This means that the firmware can now seamlessly be used with a Reprap or Makerbot machine. There is still one limitation that the current firmware assumes you have a stepper motor driver. If you happen to be using a custom extruder board with RS232 comms or something of that nature, you will have to either throw together another external motor driver or just grab 4 FETs and wire the motor up as shown in the schematic below.

If you do choose to go with the above method, the advantage is that you get a microstepping driver for only a few bucks! I hope to add RS232 or RS485 comms soon, but being that I won't be using that method for Hydra, it is a low priority at the moment (unless I get a lot of feedback saying this would be useful!). So as always head over to the sourceforge page for the latest and greatest: https://sourceforge.net/projects/hydra-mmm/

Labels: , , , ,

## first tests building a powder-based stereolithography printer: part 2

hi folks,

i thought i'd take a break from applying to postdocs and things, and tinker a bit more tinkering with progressively building the powder-based stereolithography printer rig:

(click on the thumbnails for larger pictures)

i decided that rather than go pickup a spare gen3 electronics set, i'd just build a stepper controller board and plug it into a dsPIC breakout board (thinking that the printer will need at least 3 steppers -- two on the pivotable mirror, and one to index the table, plus however many other motors for laying down new layers of powder).

i picked up some L293D H-bridges, and after a good afternoon had a 4-channel stepper controller (or, alternatively, one stepper channel could be used to control two DC motors). around this time i also remembered how very long it takes to build things on perfboards with through-hole components, and how much time surface mount components and the folks over at gold pheonix have saved me in the past couple of years :).

the stepper controller can take separate voltages for the two left and two right channels, although one channel has to be between 4.5-7v to supply logic voltages to the L293D H-bridges. it also supports both unipolar and bipolar steppers -- i just added two pins to the 4 stepper header that supply the motor voltage, incase it ever needs to be used for unipolar steppers.

after some tests plugged into the dsPIC33FJ256MC710 board, i decided to start working on the pivotable mirror mechanism. the pivotable mirror has to reflect the laser beam through variable angles such that the entire print space of the chamber is accessable, and at a sufficiently high resolution to be able to print things (not that we know what that resolution has to be just yet, so higher is better, while still maintaining some speed. in the event its too slow, the laser diode could always be pulsed, too).

i've never made a pivotable mirror before, and there seemed to be lots of different ways to go at it. you could have two spinning mirrors slightly out of phase, and rasterize a pattern, you could attach some mirrors to a galvanometer, or a bunch of other ways. my goals for the project are, as much as possible, to keep things fairly simple and off-the-shelf. i decided that the spinning mirrors probably weren't a great idea, since you'd likely want to be able to have a sustained beam present at a given location for some time, and to be able to move that beam progressively (or, at least, this seems like a good way to start -- maybe the spinning mirror idea would work out pretty well, heating up an entire layer gradually and simultaneously).

the idea i went with was to have a single mirror mounted to a small sheet of acrylic. this acrylic sheet would pivot about its center, and have two ball joints on both the X and Y axis that would move back and forth on tiny lead screws connected to steppers, allowing the mirror to be aimed.

finding some small ball joints wasn't very easy, and so i ended up using some pretty big ones from tiny tripod camera mounts i found at the dollar store. i used some epoxy to hold a long screw coupling to the center of the ball joint (to act as the nut), and found some long machine screws to use as the actual screw. couplings are a big problem, so i whipped up some compression based ones out of a few layers of acrylic and aligned them *by eye* before supergluing them. they actually worked not horribly, but a much better solution has to be thought up that doesn't require precision machining equipment.

here is a whole single-axis mechanism: stepper (bottom), stepper-screw coupling, screw, nut (but really it's a large screw-screw coupling), and the ball joint (top).

the steppers were mounted to a sheet of acrylic

and here's the little table, with the ball joint on the pivot point (center), as well as the mounting holes for the other ball joints for both the X and Y axis. the mirror would be mounted to the center point.

and here's the whole mechanism together, with stepper control. i tested it out, and there are a bunch of issues that need to be resolved, and so i think it will require some redesign (though it was a good test -- i've never designed anything like this before):

1) the stepper-screw couplings need to be VERY precise, so i'll have to figure out a better way of mounting the stepper to the screw.

2) the ball joints are huge, and i don't think they're the ideal solution as the ball-holder section of the joint can spin if there's any friction between the nut and the screw, leading to reduced motion of the mirror, and importantly, an inaccurate idea of where the mirror is actually pointing.

3) ideally the ball itself (or whatever pivot joint is used) should be mounted as close to the surface of the mirror as possible -- the more distance between the pivot and the mirror, the more skew things will have (although, this can be compensated for in software as long as you know the distance).

4) generally the whole mechanism is pretty big, and I think could be reduced quite a bit.

i have some thoughts on redesigning things, but i'm curious to hear others thoughts?

---

laser update:

i've accidentally overvoltaged more DVD burner diodes than i'm willing to admit -- without part numbers or datasheets on the diodes, this is *very* easy to do. i'm keeping an eye out on ebay for an inexpensive module that includes both a 250+mw diode with a collimating lense that reduces the beam width to somewhere on the order of 0.5mm to 1.0mm. there are plenty of ~808nm infrared diodes on ebay that can be had inexpensively and that are on the order of 1000mw, but that just seems both dangerous (the beam is invisible), and difficult to work with / align / etc.

---

plastic powder update:

i've decided to try and make some ABS plastic powder, since it seems really difficult to find ABS in powder form (it's most commonly granules, filament, or sheets). i'm thinking of a belt sander or some of the options mentioned in the comments on the last post -- the trick is that the whole SLS printer has the best chance of working when the powder size is very fine. we took a bunch of our failed prints from the repstrap and put them in a pop can to melt down with a blow torch. not the best option, but it's freezing cold outside, so slow cooking them under a candle or something similar likely wouldn't work. it's almost melted in spots, and i'd like it to be pretty consistent before heading to a belt sander:

---

past posts:
[part 1]

---

so, that's the progress so far. i'm going to rethink the pivotable mirror and try to think of some small pivot joints, and also give some thought on attaching a stepper to index the table up and down (although i'll likely run into some problems with alignment in developing some way to couple the stepper shaft to the screw -- so this will require some thought as well).

thanks for reading! thoughts appreciated :).
~peter

## Hydra-MMM Software and Firmware v1.0 Release!

So I have been working pretty diligently over the past 2 weeks on the software and firmware for the machine. Enough additional features were required that the software and firmware was completely written from scratch. So onto the details...

Firmware: The firmware is written in the Arduino development environment and is currently being tested on an Arduino Mega. The Mega was needed due to the large number of pins required for a multi-headed design. The firmware communicated to the host software via a USB serial connection and has a large collection of standard G and M codes that it accepts as input. A custom stepper motor library was created (cpwStepper) that allows for multiple stepping modes to be used on the machine. The stepping mode can be changed mid-build via a custom M code. The modes available include wave drive, half-stepping, full torque drive, microstepping 4x, 8x, 16x, 32x, and 64x. For our purposes, anything past 8x microstepping will likely be too slow as we are already gearing the machine down significantly through the use of a leadscrew. The firmware also features a PID temperature controller through the PID Library available from the Arduino Playground. There are many additional G and M codes added as the machine will need to be able to accept standard machine codes for milling as well. Some of these include a set/return to reference position, enable/disable software endstops, set/disable maximum speed setting, set current position as home, and many more. The readme file in the release linked below has more details about the complete code list.

Software: The software is written in Java via the Processing development environment and thus can be run on Windows, Mac OS, and Linux. I have tested the software on all 3 platforms and it works flawlessly assuming you have Java and USB serial drivers installed. The software is what is used to send individual commands or complete gcode files to the machine. Sending files to the machine is extremely easy and robust. The file sender also includes a preview window to show exactly what each command that is sent to the machine should be doing. For example if the last command sent to the machine specifies that the extruder lay down plastic from X0.0 Y0.0 Z0.0 to X3.0 Y2.0 Z0.0, you will see a thick line appear on the virtual build table corresponding to where the extrusion should take place. Movements without extrusion or cutting are represented with a thin line. This file preview ability is also available without actually sending the file to the machine. If the independent file preview is used, there will be a timeline skimming bar along with a play button to move through the build and preview what is supposed to happen. This is extremely useful for checking a gcode file for incorrect commands before actually sending it to the machine. The software is also able to pause sending a file mid-build and perform any number of other operations while being paused. This includes sending individual movement commands, setting a new temperature, setting/returning to a reference point, and lots more. All in all, it is a very robust alternative to what is currently out there.

Here is a screenshot of the GUI:

The software and firmware has been packaged and is available to download at: https://sourceforge.net/projects/hydra-mmm/

I would love any feedback on the project so please feel free to try it out and let me know about any suggestions for improvement!

## first tests building a powder-based stereolithography printer: part 1

hi folks,

i'm a bit sleepy, but i thought i'd post this while it's fresh:

after seeing really interesting powder-based printer designs like this one, that place down a layer of powder then "print" a binding material onto it, i began to wonder (as others have) if we could build a similar setup using ABS powder and a laser diode to fuse the material together. designs like this have a bunch of benefits, including the potential to use the powder as it's own support material. (and, after a few weeks of tinkering with building an extruder for a second printer that *constantly* clogs, i think i needed a break to think about better days when we won't need to rebuild extruders, or hope we build working ones in the first place... ). my goals for this tinkering are to build things with common off-the-shelf materials wherever possible, and so I went searching for some form of ABS powder, as well as a laser diode.

After some searching, it looks like ABS powder really isn't easy to come by, and it's most often found in pellet form. Zach had a similar idea a while back ( link ), and so I asked him if he'd had any luck. He said he never got past the materials research stage, but that polyester-based powders used as powder coatings sounded promising since ABS powder was so hard to come by.

I figured that if I was going to use a DVD burner laser, I'd need some black powder to absorb the radiation (since a 250mw red laser is relatively low power to melt plastic that isn't black). I sent an email to our local hackerspace in hamilton, thinkhaus, and folks were really encouraged by the idea. One of the folks there, jason, ended up finding a local place that manufactures powder coatings. I called up a fellow there and told him about the idea, and he was extremely kind and prepared up some samples of black powder coatings, one a polyester, and the other a polyester-epoxy hybrid. jason and i did some tinkering with both these as well as some laser printer toner (since it's carbon mixed with a polymer). jason tried both with the hackerspace's laser cutter, as well as just heating a bunch of the stuff up in a popcan. in both cases each powder (polyester-based, polyester-epoxy hybrid, as well as laser toner) fused, but the product was VERY brittle. the pop-can tests that melted material to be a few millimeters thick showed that the problem seems to be with the material itself -- unfornately, even relatively thick pieces would snap pretty easily. (though powder coatings do contain quite a few different materials in them for curing, flow, and pigment, so it's quite possible that some particular combination might work).

so, not much luck on that front. i would really like to get my hands on a good couple of cups of black ABS powder, or make some. (random thought: i think the size of the powder will be fairly critical -- ideally one would want to maximize the ratio of surface area to volume of each little ABS grain, such that the laser diode could more easily heat up relatively little volume).

---

so, i decided to work some on a little test rig to try out different powder materials (and, conceivably, with some better seals, you might even be able to use it for liquid stereolithography). i figure that you don't need a great deal of print volume to test if the material is viable or not, so i decided to make a "mini stereolithography" system -- infact, it's almost pocket sized, save some of the larger mounting bits.

here's my progress so far (in picture form):
(click on the thumbnails for much larger versions)

first i went out and picked up this DVD burner. it's a 24x (the fastest i could find), so the diode in it should be around the 200-250mw range if memory serves. (clearly here i should add in the usual warnings -- LASERS CAN BLIND YOU AND THE FOLKS AROUND YOU INSTANTLY, unless you know exactly what you're doing and take appropriate saftey precautions, you shouldn't attempt this!).

off came the cover

and here's the diode -- it's even labeled (the pins are DVD, GND, and CD). The CD one is likely infrared, and even with lightscribe likely only within the ~40mw range -- so not too useful. But still plenty powerful enough to blind me instantly, and invisible so I'd never know. So I left that pin alone! :)

i soldered some leads on the diode, and tested it out to make sure the pins were correct, and to get an idea of the voltage.

even though the diode was still in the focusing housing, i thought i'd give it a try to see what sort of heat it could produce on some black plastic. the focus of these lenses is on the order of about 1mm from their surface, so the material has to be up pretty close.

having the diode on for a couple seconds heated it up pretty well, and i tried moving the head back and forth a bit and it produced a really faint line. so, it works, but i decided to take the diode out and not deal with all the optics in the DVD burner that weren't really required for this.

there are lots of interesting beamsplitters and lenses and such in modern CD/DVD combination readers/writers, and i often save these bits for tinkering. the diode was epoxied in, so it took a little bit to get it out.

i put some wire wrap leads on the diode

and tested it out. for some reason i remember reading the current should be around 200-250ma, but i'm not sure where. this turned out to be about 2.5V for this diode.

a quick test with the diode right against the surface --

this worked *much* better than when the diode was within the DVD burner optics, and even quickly turning the power on and off yielded distinct melting.

being a laser, the beam should be coherent and come out in a straight line with some width -- so i decided to see if i could get the same results from a bit of a distance -- a few centimeters above the plastic. unfortunately the laser beam divered quite a bit, and this didn't yield any melting, even for quite a few seconds of exposure.

(as can be seen here -- no melting under the raised laser diode configuration)

---

i had wandered around home depot for half an hour or so for ideas to make the indexing build chamber for the powder. i figured that a simple idea would be to just make it round, and find two pieces of pipe that fit snugly within each other -- the outer one would be the chamber, and the inner one would have a little piece put over the top to act as a "table", and index down within the larger outer pipe by a small lead screw or some other mechanism. here are the various pieces of pipe that i found. i think the outer pipe (the black one) is around 1.25 inches in diameter.

here are the critical bits. there's the black outer pipe for the "chamber" (left), a smaller white pipe that fits right into it that's threaded on the inside to be the "indexing table" (right), and a third pipe that screws into the "indexing table", that acts as the lead screw (center). you could attach a stepper to this, or just index it down manually.

here's the "indexing table" piece (top) fitting right into the "lead screw" (bottom).

and here's the whole idea, where the "table" and "lead screw" fit with the "chamber".

they fit together something like this, where the "table" ends up mostly inside the "chamber", starting mostly near the top but being able to be pulled down quite a bit. the "lead screw" piece is always outside of the chamber, and doesn't move up or down. (the "table" would index up or down, while the "chamber" and "lead screw" parts would be vertically stationary).

i foraged around looking for something to build the actual "table" out of, and was thinking plastic or even cardboard, so that you'd get a bit of a very rudimentary seal around the edges (although it's probably not critical if a little bit of the material leaks out). one of the folks at the hackerspace offered me some dense foam, and it seems like an even better idea than the cardboard -- it's pretty stiff but also a bit flexible, and expands to form a seal while still making it easy to move the table up and down! i cut out a circular piece to fit the "chamber", about 5 to 10mm thick.

checking the fit, it was nice and snug, but easy to slide the table up and down. i epoxied it to the "indexing table", making sure not to get any onto the "chamber".

it was around this time i had a crazy idea, and noticed that the "chamber" happened to be around the same size as the hole for the spindle cap in the DVD drive! i was thinking about how to mount the table, and decided to give it a try, so i cut out the spindle cap cover.

and removed it, revealing a nice perfectly sized hole!

AND it looks like everything fits! the chamber fits right ontop of the hole without falling in, while the table slides right through it with a bit of space to spare.

look at that!

the indexing table needs some guide rails to make sure it only goes up and down, rather than spinning in place, when the lead screw is rotated. i found the rails used in the DVD burner, and made up some slides and holders out of acrylic.

from top to bottom, here's the foam table proper, epoxied to the "indexing table" piece. the indexing table has a plastic guide (two holes, drilled in a piece of scrap acrylic) superglued to it. the "lead screw" screws into the indexing table, and beside the lead screw at the base is a keeper for the rails, also made out of some scrap acrylic. everything is resting on a piece of scrap acrylic that's being used as a base.

and here it is with the chamber on top, too.

the bottom of the "lead screw" should be resting flat against the base, and after measuring everything when the table was indexed all the way up, i determined that the setup would need a bit more height than just the DVD drive cover would have, so I brought it up a bit with some L-brackets. (it actually needs to come up a bit more, but I didn't have any larger brackets, so I made up some little acrylic spacers for screws, too).

and, here it is all together. too cool! :) i drilled some holes in the metal DVD case beside the spindle holder aperture to act as upper keepers for the guide rails.

---

so, that's my progress so far, and now i'll have to forage for some tiny steppers to both index the table, as well as move the laser on the x and y axis. the travel is extremely small -- the build area will be about an inch in diameter, with a height of about 1cm. that's pretty tiny, but should be more than enough to test different powder materials to see if they can successfully build very small parts with sufficient structural integrity. the neat thing is that the whole thing can come apart pretty easily, so it can be washed out to prepare for a new material. hopefully once the steppers and axis are on there, it'll still be just as easy.

hope you've enjoyed my little story! (and i hope my supervisors don't read it -- i'm supposed to be working on my dissertation).
~peter

Subscribe to
Posts [Atom]