Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Aurium
Oct 10, 2010
One of the common small uC firmwares for motion control is grbl. It works well, has a number of nice features, and is small enough to fit on even the 328. Many of the current reprap firmwares are partially based on it. There's also a number of hardware solutions optimized for it.

JawnV6 posted:

Zooming out from the software stacks for a second, you seem to have a lot of faith in a $0.32 chip's ability to keep a regular clock with an onboard VLO and very little faith in something regularly counting out nanoseconds.

The software stack dominates here. Common OS are optimized for throughput and (human) acceptable latency at the expense of determinism.

Adbot
ADBOT LOVES YOU

Aurium
Oct 10, 2010

rotor posted:

is this actually a problem or is this just that people dont want to deal with OS licensing and expense?

like what is the supposed issue with something like linuxcnc?

Yes and no.

For hobby stuff a realtime patch for linux, or some of the better windows solutions, are easily good enough. Low end hardware, such as an arduino, effective performance is really no better or worse, though it does have more I/O and the possibility of measuring analog signals. The trade off is that you now need some kind of infrastructure to get the g-code to the uC rather than it all just being on the computer. You also don't need to find a parallel port. So at the low end it's really more about I/O and how you want to do it.

The finer your work the higher the step rate, providing you want to keep speed. The faster the step rate the more issues you have with mistimed pulses from os jitter. Real systems can have 100k-10m step rates.

The opposite side is the very low end hardware, such as an arduino, just isn't fast enough to produce steps at this rate either. At 100k step rate and 3 axis, you'd be talking 1 in every 26 instructions being a step pulse.* Now consider that you're working with very specific timed intervals, and might need to do math for acceleration.

Of course, uC's grow extremely fast in terms of clock speed without sacrificing determinism, and they can also have very high gpio counts. That's one solution, and another typical one is a FPGA pci (or sometimes the newfangled pcie) card, with the potential to offload work onto it too.

*16m instructions per sec / 100khz /3 axis / 2 instructions needed to make a pulse (high low)**

**I'm assuming can do useful work between the high low instead of wasting instructions with a delay, you don't have many left.

Aurium
Oct 10, 2010

rotor posted:

so I use a gecko g450 to talk to the motors and linuxcnc talks to the gecko

are people just connecting their parallel ports to the motors or am I not getting something?

I don't know exactly how internally sophisticated the g450 is*, but lets take the case of a bare allegro chip where the control is step and direction.

What it does is when you send it a step pulse it changes the current balance though the two windings to move it forward to the next (micro)step. It's still completely dependent on the external signal for timing.

Think of a swing. Give it a push just past the apex and you'll add energy. Be off before, and you'll subtract energy, be late and you'll barely add energy at all.

The faster you go the smaller the window you have to give that push. OS jitter can eventually make it so that you can't guarantee that you're within the window, and then you miss steps and have no idea where you are or simply stall.

*My searching didn't really turn up anything on the 450, instead I found info on the 540. The 540 isn't any more sophisticated in capabilities, has slower response, but it is much more powerful.

Aurium
Oct 10, 2010

rotor posted:

sorry yeah 540

No prob. Seems to be a common mistake.

I couldn't find it in the manual or product page at all, but some posts on random boards mention that geckos do anti-resonance and morphing,* which implies that there's a fair bit of internal sophistication. It seems that the gecko sees out current speed of incoming pulses, works out the goal speed, and then sends appropriately timed pulses to the motors.

If you doing that you'd have much fewer issues with jitter. You'd need is the number received and a count received over some short time period. Then your speed would be limited to how smart/well/fast your chip can do the above, and we're back at that same question of having a controller there.

*of course, now that I know the terms, I found this.

Aurium
Oct 10, 2010
I wanted to link this because of the stepper conversation, but I never really had a good place for it in my walls of text.

http://www.dr-iguana.com/prj_StepperDriver/index.html

Resonance/properly timed pulses in steppers is the difference between 4rev/sec and 31rev/sec.

Now, 1860 rpm unloaded doesn't seem so useful, but this technique took his cnc from 120rpm (7in/min with his screws) to 810rpm (45 in/min.)

Aurium
Oct 10, 2010

babyeatingpsychopath posted:

I just wanted to chime in on this a bit. I took a bare arduino and hooked up a A4988 stepper controller to it with three wires (step, dir, enable).

In AVR c, my loop was this:
code:
main()
{
write(PIN,LOW);
write(PIN,HIGH);
}
and the stepper spun along fairly well.
I then looked at the assembler and did the same thing. My program was only 40 bytes or so, and the motor spun MUCH, MUCH faster. Now, atmel is doing clever things with their 328s, so 1 clock=1 instruction. Other microcontrollers have execution speed that's a fraction of clock speed (1/4 usually).

Now clearly, my firmware isn't going to be able to control things as fast as the tightest-coded loop available. The best I've been able to get without missing steps is something on the order of 5000 steps/sec, which is 20RPM. If I enable servomotor control, it gets slightly worse, as the servo library is interrupt-driven. The servo jitters and there are annoying pulses in the movement of the axes. SDcard and LCD also on? Servo is even more jittery, and I start to lose top-end speed; only being able to get 3000 steps/sec.

I'm not sure what the answer to this problem is, but I'm sure it's going to be more, faster chips with less processing burden per chip, with well-designed code to get timings PERFECT.

Have you tried any kind of acceleration ramping?

In marlin (one of the reprap arduino mega 2560 firmwares) step generation and timing is done by interrupt. It was kind of hard to find numbers quickly, but this guy's analysis indicates that he's getting 10-20k steps per second on his machine.

Aurium
Oct 10, 2010

babyeatingpsychopath posted:

I'm on a Mega 1280; that may be the issue. I'll investigate whether it's worth it to move up to a 2560.

edit: I'm also using scavenged steppers. They say 12VDC 1.7A/phase. They're six-lead motors, and I've got them hooked up with only 4 leads, using the full windings. Is this the correct way to do things? I am now fundamentally confused as to the difference between unipolar and bipolar stepper motors.

double edit: A computer store nearby was having a yard sale and I ended up with a 2560 and LCD/button shield. Score. We'll see if this thing gets better.

The 1280 and 2560 have the same computational performance, the difference is the amount of the various kinds of memory. 128 kb of flash vs 256 kb. They probably have different amounts of eeprom and ram too, but I'm phone posting and it's hard to look up.

Otherwise the I'm pretty sure that some of the earlier reprap firmwares ran on the 1280. The current ones might too?

Otherwise I'm pretty sure the Marlin acceleration code was from grbl anyway (Marlin started as a sprinter grbl mashup.) And that'll run all the way down to a 328. Which again has same performance, just less ram (and pins and timers and uarts and so on. But same speed.)

Aurium
Oct 10, 2010

edmund745 posted:

There is the ARM version of the 'mega', I forget the name ATM.... it is 84 MHz? compared to 16... Dunno if the I/O pins are any faster. And that Edison thing that just came out.

Another question: is it typical to design these CNC mills so that the smallest step is a particular distance? Say, if you were using metric ball screws (as they all are, as far as I've seen...). The smallest realistic measurement you might expect your machine to cut might be 1/50th of a mm. So you would pick a drive ratio for the steppers turning the ball screws, so that 1 step of the motor moved the ball nut 1/50 of a mm.... If you wanted to have rotational axis, then you would just set 1 stepper step as equal to 1/50th of a degree or so.

....

The machine I want to build has to do something pretty odd in terms of measuring and then 3-D printing, and I don't know that existing LinuxCNC stuff can help with that. The usual grid-probing thing isn't going to work.

If the machine hardware is set up for maximum simplicity--such as, 1 motor step on X, Y or Z = 1/50th of a mm and 1 motor step on the rotational axis = 1/60th of a degree rotation, I know that I can write the code to get it to do what I want. I don't want to be bothered with G-code at all, as I don't think it would really help. And I don't know if any of these prebuilt controller boards would allow that kind of access, but a normal arduino mega run over USB would.

Arduino Due.

You usually have a selection of different minimal step sizes. It depends on thread pitch, steps per revolution of the motor. Costs are pretty high to customize either of those. You could alter the ratio with a gear train, but that would add backlash.

There can definitely be better ratios than others though. Example: The reprap software does all the math in metric. The z axis usually is driven by an 8mm screw. When people build imperial machines they usually substitute it with 5/16 in screw which is almost the same size. Unfortunately the conversion between m8 screw and 5/16 isn't round. What you end up with is where 9 out of ten layers is 10 steps, and every 10th layer is 11 to prevent error from accumulating. If you use m8 it stays consistent with no calculated error.

Aurium
Oct 10, 2010

oxbrain posted:

Most of the world calls it cable carrier. It's cheap it you buy Chinese. This should work.

http://www.ebay.com/itm/390917609516

You can also get them out of the doors of minivans. Junkyards and the like are a cheap source.

Aurium
Oct 10, 2010

Bad Munki posted:

Oh that's fun. Where does it usually sit? In case I decide to take a field trip just for kicks. I'm guessing in the floor of the van below the door? As opposed to unrolling inside the door?

In the Dodge/ Chrysler/VW vans it's in the floor. Not sure where it is in others, but I have no reason to suspect differently.

Aurium
Oct 10, 2010

Parts Kit posted:

I do not have a metal supply store nearby. The amount of cans isn't an issue, I've got several bags that have yet to be taken to the scrap yard. And it's not like other scrap aluminum is hard to find either.

Similarly I've wondered if it would be worthwhile to attempt simple composites out of sawdust and HDPE or something.

Because of the surface area cans produce huge amounts of dross when you try and melt them. If you compact them (really really compact them, not just crush) you can do decent.

If you have scrapyards though, and you want to take up metal casting, find and melt aluminum alloy wheels. Auto salvage yards often sell them cheap, and wrecked ones very cheap.

Aurium
Oct 10, 2010

Spazzle posted:

I'm assembling a cnc thing in my garage. I'm used to using openscad to make stl files. What software can I use to convert these into gcode?

I've been working on fixing a router, that now runs linuxcnc, and I really can't quote

ante posted:

Oh man, you're in for a nasty shock

this enough. I was working with 3d printers before, and the cnc toolling suuuucks in comparison, at least as a beginner.

Mostly I've been using pycam, which is slooooow. At least it's free and isn't otherwise obviously crippled.

I hear good things about sheetcam from people I trust. I don't know if it does stls, or just 2.5d from vector graphics. It's relatively inexpensive.

There's tons of packages, lots of strong opinions, and it seems the only ones universally regarded as good are >$200.

Aurium
Oct 10, 2010

Spazzle posted:

Pycam is indeed slow.

Let's say I'm willing to buy some software under $300. What options are there?

I hear consistently good things about meshcam. Particularly from non machinists, and people new to it all.

Down side is it's 250. It's definitely worth looking into.

Aurium
Oct 10, 2010

Spazzle posted:

How do you deal with tabs in pycam?

To be honest, I haven't dealt with them. I've been securing the work by screwing it to a sacrificial bed.

Aurium
Oct 10, 2010

Sagebrush posted:

That works fine if you're okay with holes in the middle of your part, or cutting it out of a block at the end. Tabs/bridges are necessary for more complicated pieces.

Oh yea, tabs are good, I'm hoping someone may come and answer that question.

But it won't be me.

Aurium
Oct 10, 2010

Mister Sinewave posted:

Unlike the 3D printing crowd, it seems no one here has experimented with poo poo-tier stuff (or at least, no willing to admit it) :v:

E: trefolyte huh? I know it by trade names only (ultragrave, lasermark) and have used it enough with laser engraver/cutter to get pretty familiar with its quirks. Never heard that name but thanks for the tip.

Eh, I once played with a 3020, which is kinda sorta the next size up. It's made of aluminum extrusions though.

I'd say that that thing shouldn't have any problems engraving. Go for it. It's probably not good for much else though, but the price does look right.

Aurium
Oct 10, 2010

Revol posted:

I didn't get the job offer that I hoped was coming, which is a bummer. Makes me think, if for whatever reasons I have to delay getting a CNC machine, is there perhaps a new model coming soon I might want to look into?


It doesn't look like that is supposed to actually cut much of anything using the laser, just to engrave. I'm not well versed in the subject, but in my research on entering the hobby myself, it seems like you want at least a 400W laser to begin to start cutting anything of substance. But I'm not sure how you're going to make project boxes using CNC laser. I'm looking to entry the hobby primarily to make boxes, too, but they're going to be around 9"x7", and they need to be sturdy, so 3D printing really isn't an option for me. I'm better off carving wood and then putting the pieces together using joints. I imagine it depends on exactly what you're trying to make. I assume you're looking to make enclosures for electronics. Sorta like maybe along the lines of cases for a Raspberry Pi? I'd definitely go 3D printer with that.

If you want questions answered about laser, though, you should check out the laser cutter thread.

Making laser cut boxes? There's a ton out there. And no shortage of generators either.

Anyway, you don't need anywhere near that powerful of a laser to cut wood. A good 40w co2 cutter can cut 1/4 inch wood/acrylic.

Aurium
Oct 10, 2010
The Taig also uses a lightswitch as the on off switch. :swoon:

Aurium
Oct 10, 2010

NPR Journalizard posted:

I am thinking of getting into some small scale cnc routing, and wanted to know just how rubbish the Chinese diy kits are. I don't need a large workspace, 30cm *30cm would be enough for my purposes, and it would just be wood and maybe acrylic.

My personal experience (6040 machine): mechanics are pretty solid, electronics were flakey.

Spindle controller burnt out, and the optoisolators on the CNC parallel board were the limiting factor in speed.

Aurium
Oct 10, 2010

Cockmaster posted:

There's also these controllers, which take step/direction inputs like a common stepper controller and drive a common DC motor with an encoder:

http://www.cadcamcadcam.com/servo.aspx

http://www.geckodrive.com/geckodrive-brush-dc-drives.html

Some of the Mesa controllers can also directly connect to DM motors and encoders.

I haven't used any of those personally, but it should be possible to combine one with a cordless drill motor and an encoder and get some level of closed-loop control for a fraction of the price of most servomotors.

I've used gekko drivers before. They work really well.

Aurium
Oct 10, 2010
There's pycam. I've found it useable for engraving, but very slow to do anything actually 3d with.

Aurium
Oct 10, 2010

Parts Kit posted:

Look at the specs for the control board, it might be as simple as connecting normally open microswitches to its limit switch pins and a ground. At least that's how easy it is with a GShield. An axis bumps the switch, it closes, the pin gets pulled low, and the board goes "oh gently caress I hit a limit better stop right now."

I'd advise you to look up the config for how to make them normally closed instead.

If you use normally open and a wire breaks the switch will read fine even as the CNC drives into it, possibly crushing it.

If it's normally closed an a wire breaks, it will refuse to run until you fix it, as it will think it's always at a limit.

Other than changing which switch terminal you use, there's typically no wiring changes.

Aurium
Oct 10, 2010
You'd want a drag knife to cut those materials.

They also work well on fabric, vinyl, leather, other papers and the like.

A laser cutter would probably work as well.

Aurium
Oct 10, 2010
Yea, I blanked on that you can engrave things other than lines.

Vacuum table if you have it.

You can tape down on the edges if you plan your cuts well. You can use temporary adhesives with some materials. Rubber cement usually comes off paper cleanly.

The vinyl for vinyl cutters comes on and is supported by a temporary backing that you don't cut though. I don't know of any paper products that are like this, but it's plausible.

Some soft materials, like rubber, get hard when cold, and that's a great help for milling or engraving. Not really the case with paper, though the fibers may get a little more brittle? It also opens up the hilarious option of soaking it, and then freezing it.

Aurium
Oct 10, 2010

JEEVES420 posted:

$500-$1000 gets you roughly the same working area as a 3018 and a 40w laser tube. Instead of tooling you need lenses and CO2. You're limited on what materials (no metals at all at that price) and thickness you can work with and have to assemble flat cut parts. You will have to think about glue/screw/tabs, how the parts can fit together, and durability.

Lasers have their place, and is next on my purchase list, but I really don't see it compared to a CNC/3d printer in the type of work it can do.

For a 40w laser you're not buying multiple lenses. The reason to have more than one is to have a longer focal length to cut though thicker material, and a 40w laser doesn't have the punch to cut though thick stuff in the first place.

You're also not buying CO2 at this price point. The tube is sealed, and is the consumable with a life of around 1500-2500 hours.


NewFatMike posted:

What lasers are you thinking around that price range? Are K40s no longer expensive firestarters?

Good news! all lasers are expensive firestarters. And no, K40s are as bad as they've ever been. They're still fantastic value for money. Get one with an analog meter and a knob, not one with a 7 segment panel and +/- buttons. Yes, this sounds backwards. Yes the digital panel is billed as an upgrade. It is not. The digital panel is also far more common.

A random example. https://www.ebay.com/itm/313082039289

The digital panel ones just set percentage of a pwm output which then sets current to the tube. The problem here is that at 100% pwm is far more current than the tubes can handle, and with no meter you have no real idea what you're actually sending. It's far too easy to burn up a tube with them.

The next level up is the 50w cutters with a "dsp" controller which start at about 1500. They usually have a better build quality, come with an air assist by default, have an adjustable z, and can do combined etch and cut jobs at once as they can automatically control power level. They still don't actually link power level% with laser output percentage, and don't have a current meter, again making it rather easy to burn up a tube.

Aurium
Oct 10, 2010

BattleMaster posted:

I am putting together a setup for LinuxCNC and am working on the mains-side power circuit. I have an SSR switching the power to the machine, wired to the estop signal from LinuxCNC. So in order for the machine to get power, the estop condition needs to be cleared in LinuxCNC, which outputs a logic high signal and turns on the SSR.

If I want to put a physical estop switch in the setup, is it adequate to use the switch to cut off the signal going to the SSR so the SSR cannot turn on when it is hit? The other option is to use the estop switch to cut the power directly, which seems to be an obviously better idea because it will function even if the SSR fails closed but requires a switch rated for the machine's current.

(Current rating isn't really an issue right now since I am just doing a LinuxCNC refit of a low-power 3018 router, so this is more for my information if I move on to a bigger project later.)

SSRs fail closed way too often for me to trust them in a safety application.

I also don't really like them as a sole power switch as they have a high enough leakage current that they can leave things unexpectedly live even when off. It's usually not a problem, and you really should be unplugging things before sticking your hands inside them anyway.

Many estop switches are rated for decent currents as a matter of course, but the way to deal with large currents is just to use a contactor (a fancy name for a beefy relay).

Aurium
Oct 10, 2010
A cnc converted import minimill. Grizzly, Harbor freight, etc.

Massively more time and work, but far more capable.

Acrylic is kind of meh mechanically. It can be brittle and is prone to cracking. Delrin also lasers well, and is generally quite good.

Aurium
Oct 10, 2010

horse_ebookmarklet posted:

I had not heard of these mini mills before, these look way more legit than these routers you can buy on amazon.
Are these more suited to removing real material? I suppose I should do some research..

Extremely so, they aren't even in the same ball park. They are baby machines for machinists, but they are proper machine tools. They're stiff enough to cut steel (slowly) and ~4-8x the power. (60w for a typical, 150w for some of the "pro" 3018 variants vs 600w) They are much bigger, you can pick up a desktop router in one hand, and the mini mill is going to be like ~140lb

They're also manual machines. Making them CNC, even with a kit, is not a small undertaking. To be honest, I don't recommend it unless you want to do a conversion as a project, not just what you can do with it. You will also need to learn all sorts of things about work holding, tool selection etc. This is something that 3dprinting (and laser cutting) spoils us on. Also, be prepared to spend even more on tooling. A usual rule of thumb is to take what you spent on a machine, and then spend it again on accessories.

For ready to run, there is taig's cnc offering. Taig is a pretty long established small US mill brand. It looks a little odd (light switch on off) because it's a long standing design. It's slightly outside your price range. It's a bit smaller than the import minimills, at a svelte 100lb

On the 3d printer side, abs isn't too hard to get right, and can be as simple as a cardboard box. PC is an adventure.

Describing your part, I wouldn't do it out of acrylic, delrin would probably be fine.

insta posted:

Jesus gently caress the pricing on that makerspace is insane
This jumped out at me too.

Adbot
ADBOT LOVES YOU

Aurium
Oct 10, 2010
They take up much less space. I can put one on a workbench in my garage instead of clearing multiple feet of floorspace. I could even put one in the spare room of an apartment on the second floor.

They exist. In many places a $1000 Bridgeport may as well be a unicorn. I can go to grizzly's or hf's or nt's page and have one in a week or so.

They're new. That $1000 Bridgeport might exist, but what state is it in? Are its ways wallowed out? The leadscrews? Am I, the entry level hobby machinist l, really the right person to inspect and tell what kind of wear is ok? There is a conversation here about the QC and finishing of some of the importers, and why some are <800 and others are hundreds more, but anything beyond the absolute cheapest noname will be functional, or obviously broken and returnable.

Feel. Sure this is more where the Sherlines and Taigs of the world are, but on small pieces done with small bits it's nice to have a very smooth machine with light responsive wheels can be helpful. If you've ever watched a clickspring video he switches between his Sherlines and his (still not large) import lathe all the time depending on the part. Basically jeweler's and watchmaker's machines are a thing.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply