Sunday, February 10, 2019

Plotter Attachment for Laser Cutter

Long story short, I had an old inkjet printer. I've seen some DIY plotter machines made from old printers, so I thought, why not? how hard could it be

Data warning: ~76MB in GIFs on this post.

 Turns out, there's a reason to keep the old gantry inside the original printer case. The paper feeder can be out of alignment to the rollers, and it causes the paper to shift as it goes back and forth. Even well made plotters can suffer from alignment issues. Let's start with the first design: 


It's basically an enclosure for all the electronics and rolling mechanics. This took several iterations before I had all the dimensions where I wanted them. When I was happy, I started making the wood version.


 Partially assembled, I added the printer gantry. The electronics worked with the open source software I found (some GRBL controller for Arduino). Confident it would work, I put a piece of paper in. The result was paper that would rotate slightly with each back and forth movement. I thought a slight design change would fix it, but I also knew this would always be a problem, no matter how fine I tune it.


So, it sank into the swamp.

I decided a standalone plotter was too much effort, since my laser cutter already has an XY transit system I could use. After some fiddling around, I found some pins on the control board that indicates the laser firing, even when the laser power is off. This was my trigger for a solenoid. The idea was to use maybe one or two transistors, a relay, and some passive components for the entire system.


I didn't like how oddball the device was looking. It was unpredictable, sometimes the solenoid would get stuck, it was wobbly in places, got hot real fast. Sank into the swamp.

Next version involved the same nozzle clamp system as the last, but that's the only similarity besides the red color. It's Arduino controlled, so I can set exactly how far it moves, how much power it's getting, when it triggers, all the good stuff. 


The only problem is the device was also wobbly; the only thing keeping it level was the drive screw. At slow speeds it was alright. Unfortunately, I have aspirations, so this too sank into the swamp.

There was another...

This final version was designed to be much beefier. I added rails to keep the whole system rock solid, while adding features that didn't impact stability. This one has it all. It's got a rotating head that can be adjusted for calligraphy pens or simply drawing with a slanted pencil. I've also added a set of rails so the tool can sit on top of the material, not be forced to puncture it. This way I can roughly set the height of the tool, and it'll still work just fine. 


Here's a test of the up/down action, tripped by the laser trigger. All the electronics were in the design phase, so breadboard and Arduino 2560 still in the picture.

 Here's the final shape based on my redesign. Nice big knob for changing out tools. I'd like to say the hardware cost $3, but this is Seattle. Each of those two collars by the motor cost over $3 each. Total of about $25, not including the motor and hardware I already had. No idea where everyone is getting their $3 hardware from, but I guess I'm supporting my local businesses this way.
 

Shot of the attachment on the laser.


I have a bag of blank through-hole circuit boards, so I designed the electronics around that. Using an Adafruit Metro Mini as the brains and a Pololu stepper driver for the brawn.


Solder traces are not fun with a blunt tip. 


 Here's how I tied everything into the exiting circuitry of the laser. The power supply gives 24 volts and about 2.5 amps. I figured it could spare an extra half amp. Worst case, I know where to find a new one. The TTL trigger from the M2 Nano board needed a 100,000 ohm resistor to block any rouge signals. The 5v for the logic was supplied with a small transformer I installed to the right of the power line filter, out of frame. I can tap into that if I add anything else later on. The custom board is currently mounted neatly next to the power supply. Paired wires are twisted and hidden within the rail. I promise it doesn't look this messy right now.


After painstakingly threading all the wires through the drag chains, I added a connector for quickly releasing the plotter attachment. I'll have to add a switch for deactivating the electronics when not in use. Everything works. I'll want to avoid drawings where the stepper is moving constantly because of heat issues, but I can always run it slower. There's a "test" button I can use to raise the pen higher than during normal operation, so I can change out tooling easily.


"But the fourth one stayed up. And that’s what you’re going to get, Son, the strongest castle in all of England."
          -King of Swamp Castle


Weird code for reference:


const int testPin = 7;
const int limitPin = 6;
const int inputPin = 5;
const int motordir = 3;
const int motorstep = 4;
const int motoroff = 10;

int test = LOW;
int limit = LOW;
int input = LOW;

int var_busyup = 0; //busy 1 or idle 0
int var_busydown = 0; //busy 1 or idle 0
int var_direction = 0; //down 0 or up 1 direction
int var_running = 0; //indicates that it's in running mode, for when listening to the input
int var_updistance = 0; //variable to control the up travel distance depending on mode


void setup() {

pinMode(testPin, INPUT);
pinMode(limitPin, INPUT);
pinMode(inputPin, INPUT);
pinMode(motordir, OUTPUT);
pinMode(motorstep, OUTPUT);
pinMode(motoroff, OUTPUT);

digitalWrite(motoroff, HIGH);

delay(1000);
}

void loop() {
 
test = digitalRead(testPin);
limit = digitalRead(limitPin);
input = digitalRead(inputPin);


digitalWrite(motoroff, HIGH);

if (input == LOW){
  var_running = 1;
}

if (test == HIGH){
  var_running = 0;
}

if (((test == HIGH) && (limit == LOW) && (var_busyup == 0)) || ((input == LOW) && (limit == LOW) && (var_running == 1) && (var_busyup == 0))){
  var_busydown = 1;
  for (int x = 0; x <= 150; x++){
    digitalWrite(motoroff, LOW);
    delay(1);
    digitalWrite(motordir, LOW);
    digitalWrite(motorstep, HIGH);
    delay(5);
    digitalWrite(motorstep,LOW);
    limit = digitalRead(limitPin);
    digitalWrite(motoroff, HIGH);
    if (limit == HIGH){
      break;
      }
    } 
  }
var_busyup = 0;
limit = digitalRead(limitPin);
input = digitalRead(inputPin);

if (((test == HIGH) && (limit == HIGH) && (var_busydown == 0)) || ((input == HIGH) && (limit == HIGH) && (var_busydown == 0) && (var_running == 1))){
  var_busyup = 1;
  if (var_running == 1){
    var_updistance = 10;
  }
  if (var_running == 0){
    var_updistance = 90;
  }
  digitalWrite(motoroff, LOW);
  for (int y =0; y <= var_updistance; y++){
    digitalWrite(motoroff, LOW);
    delay(1);
    digitalWrite(motordir, HIGH);
    digitalWrite(motorstep, HIGH);
    delay(5);
    digitalWrite(motorstep,LOW);
    test = digitalRead(testPin);
    input = digitalRead(inputPin);
    digitalWrite(motoroff, HIGH);
    if (input == LOW){
      break;
    }
  }
}

var_busydown = 0;


}

Tuesday, January 22, 2019

Laser Dump and a Print

The laser made easy work of Christmas gifts for family and friends. These first ones have the family crest engraved on some glasses. You can see the super sculpey being put to good use, propping up the glass. The design was etched using a low power setting, rasterizing each line. The curvature wasn't too bad, so I didn't have to use the rotary axis for these. Just had to make sure they were perpendicular to the laser travel and level-ish. Pro tip, etching glass with a laser doesn't give off smoke, but it's important to keep the ventilation system running to suck up those microscopic glass particles. 



Here are a couple white elephant coasters for the gift exchange with friends. My partner helped draw the geometric shapes, while I finished it off in Inkscape to create the negative space for Totoro. The eyes, nose, and belly pattern were rasterized, the rest vectors for speed. It's difficult to clean out the tiny charred gaps with alcohol, but a coating of matte acrylic helps cover it up and prevent moisture from damaging the wood when in use.


 Some Alien themed coasters for my brothers. The middle one is actually Ripley holding Jones, the cat. Didn't turn out very well. Rasterizing these things always takes way too much time.


Got to use the rotary axis on a glass soda water bottle. The glass is full of distortions, which means the design is difficult to see. I also found out the motor was wired backward, causing the design to flip. Fortunately with this design, you can't tell. I've since fixed the issue. You can see how easy it is to set up. Just plug in and flip the switch. I'm currently building a plotter attachment that will involve more holes in the side of the case. 



Tiny antlion guard from Half-life 2, about 1.5 inches tall and painted. Printed this with my new Wanhao D7. It's quite different than the Pegasus Touch, but I've learned the quirks. Like, using the supplied flash drive is a bad idea and freezes the print mid way, and using a power line filter and ferrite cores are important so turning on the laundry machines don't crash a print. Kinda important. This is exactly why I want an oscilloscope, to confirm I'm not crazy. Love the printer though.


Monday, September 10, 2018

Laser Cutter - Rotary Axis

 For my previously mentioned laser cutter. I made a rotary axis that will be hooked up soon. I made sure to use a similarly sized motor to the one I'll be stealing power from on the Y axis, so I don't have to mess with the current. It will use a 2 position 4 way switch so I can change which motor gets the power. Just plug, and switch! The construction is very rigid with epoxy everywhere. I have attachments planned for tilting, live center, and steady rest. I'm also working on some way to protect the wood in case a stray laser attacks the tool.


DIY Laser Fume Extractor

 After purchasing a hobby laser cutter as any DIYer should, I quickly realized the fumes pumping out the window would be a problem. When the gas leaves the building, air must replace it, or it'll get sucked back in through any cracks. An open window in the bedroom helps. However, should any vapors return, I'd like them to be made harmless (and odorless). To mitigate this, I researched solutions and spent weeks designing my own. It must fit in the tight space under the laser cutter, be easy to open for filter replacement, and have quality parts.




 The construction is plywood screwed together, with silicon at all corners. The design is such that any leaks simply pull additional air in. So there's no risk of leaking gasses where it shouldn't. The worst* that can happen is the gas isn't filtered completely, and still gets pumped outside.









There are perfectly cut blocks slid into place over each component. This acts as a barrier to keep dirty air moving through the filters, and is removable for maintenance. Each loose part is lined with neoprene or window stripping. The perfect fit is because I also modeled this entire setup in 3D.




The finished product does a fine job, and isn't loud at all. Each of the filter and fan components is rated for around 250 cubic feet per minute capacity. Since the fan is at the end of the filter, it pulls in the walls of the box, creating an even better seal. No, that isn't a car engine filter attached to the fan. It's a HEPA filter, making sure any smoke or carbon is filtered out before running through the fan. My fancy test was lighting and blowing out a candle to see where the smoke pulled into the box. No leaks! At least not externally. Putting a scented candle at the inlet and my nose near the end yielded no odors, so it seems to be working. The purpose of this was not to go cheap, although it definitely saved money over any plug and play option.


Known downsides are the cost of filter parts. They weren't crazy, but there are other ways. The inlet being so close to the carbon filter is also an issue. It may develop preferred paths, lessening the filter ability over time. I can rotate the filter over time to help with this, or stick a piece of paper over the closest section of filter to diffuse the gasses around more, at the expense of a little suction. Cheers!

Saturday, January 6, 2018

Injection Mold Machine (part3)

Consider this a test of the control layout, noise interference, and my sanity. Just kidding, I'm only lazy. I usually need to make some kind of custom breakout board for these projects, but I may just delve into PCB layout software to have them professionally made (solder traces are a total waste anyway). The modular bits, like the Arduino board I'm using, will stay as is, and basically become my cheap PC/104.

Tuesday, January 2, 2018

Injection Mold Machine (part 2)

Early testing shows the clamp mechanism works. Despite the rod sleeves not yet attached, there was no binding during actuation like I was afraid of. Next, I'll attach the rest of the clamp end and see about securing the back end of the actuator. I may end up attaching more linkages to the forward section, but hopefully it won't come to that just yet.