CNC Stepper Controller

A place to document your own projects.

Re: CNC Stepper Controller

Postby bearmos » Fri Dec 07, 2012 5:23 am

Got the PCB's from hackvana last week. I've assembled one and for the most part everything is working.

There are plenty of silly design level mistakes:
- Home LED's turning on when an axis is *not* homed (need to use 541 buffer for syncing current on the home LED's instead of sourcing). Looking at the SCH quickly this is glaringly obvious. . .not sure how that got missed. . .
- R49 needs to be a short, not 1k
- silk screen on the A4982 step mode setting is backwards (still need to look into this).

Two assembly issues that still needs resolved:
- The x axis Vref current setting seems to be pegged (most likely an assembly issue).
- need to buy a SOIC analog mux (sourced a TSSOP but PCB has a SOIC footprint)

The driver chips get hotter than I was hoping for. There seems to be a decent amount of heat being transferred to the secondary side of the board, so I may try and find a way to heat sink the bottom (the original plan was to use some thermally conductive material and butt it up against the base plate of an aluminum case).
Attachments
cncControllerPCBA2.jpg
3 axis CNC Controller PCBA
cncControllerPCBA1.jpg
3 axis CNC Controller PCBA
bearmos
Hero Member
Hero Member
 
Posts: 740
Joined: Tue Nov 02, 2010 10:02 pm

Re: CNC Stepper Controller

Postby katjap » Fri Dec 07, 2012 3:30 pm

WOW! it looks beautiful! Gratz bearmos! ^_^
katjap
Newbie
Newbie
 
Posts: 22
Joined: Tue Nov 27, 2012 5:53 pm

Re: CNC Stepper Controller

Postby bearmos » Mon Dec 17, 2012 3:43 am

Testing has been going fairly well. Because I went with the stock thickness PCB (1.6mm) and just 1 oz/inch copper, thermal performance certainly leaves a bit to be desired, but it's certainly useable.

There have also been a few gotcha's, like EMC's default hardware estop implementation, which assumes if it gets an ESTOP input, the ESTOP output that it generates will automatically be latched by the hardware. Luckily LinuxCNC has a really useful HAL (hardware abstraction) language with user customizable code that runs, so after diving in an learning a bit about how the HAL is setup, the software ESTOP will keep track of it's own output signal, as well as accept input from the external ESTOP. This means that ESTOP can now be generated by hardware or software and the software will stop executing gocde and the hardware will disable power to the stepper drivers. Details on the HAL implementation can be found here

Also, here's an overview of all the changes from revA to revB: http://twilightrobotics.com/electronics/cnccontrollerrevb
bearmos
Hero Member
Hero Member
 
Posts: 740
Joined: Tue Nov 02, 2010 10:02 pm

Re: CNC Stepper Controller

Postby Sleepwalker3 » Mon Dec 17, 2012 7:02 am

matseng wrote: And of course it saves quite a bit on shipping costs when getting a batch of boards from Seeed with DHL/Fedex since the boards are half the weight.

For DIY etching my preferred board would be the Phenolic Paper version with 0.5 oz copper. Easy to cut and faster to etch. Hard to find though.....


Unless going over the maximum satchel weight, it shouldn't make any diff to the price - of course your batch of boards may be over that weight. Why not use FR4 with 1/2 Oz copper if you specifically want quick etching? - not that there is that much diff in the etching time between the two, in that it's still pretty quick.
User avatar
Sleepwalker3
Hero Member
Hero Member
 
Posts: 530
Joined: Mon Jan 16, 2012 4:12 am
Location: Down Under

Re: CNC Stepper Controller

Postby Sleepwalker3 » Mon Dec 17, 2012 7:28 am

bearmos wrote:
JuKu wrote:Diode loss! Are all your chips happy with 4.3v or less?

I probably should have pointed that out - thanks for noticing! The most picky IC's on the board should be content with 3V.


Ever heard of Schottky's ? Just watch the PIV. What sort of current are you expecting to pull on the 5V line?
User avatar
Sleepwalker3
Hero Member
Hero Member
 
Posts: 530
Joined: Mon Jan 16, 2012 4:12 am
Location: Down Under

Re: CNC Stepper Controller

Postby bearmos » Mon Dec 17, 2012 8:11 am

Sleepwalker3 wrote:Ever heard of Schottky's ? Just watch the PIV. What sort of current are you expecting to pull on the 5V line?

Yep and that's exactly what's spec'ed (B0520WS-7-F specifically;-) - which is why I wasn't all that worried about it. I really do appreciate the concern and suggestions! Expected draw on the 5V line is < 250mA with all 12 LED's on - if they're driven at 20mA, closer to 120mA if I go down to 10mA drive current. In normal operating conditions, none of the LED's should be on full-time. The diodes chosen are rated for 500mA with a max forward voltage of 430mV.

After I get the remaining parts (analog mux, ATX jumper posts), get some firmware together see if those aspects work, I'll probably offer up the remaining PCB's since everything seems to be working tolerably.

In a future rev, I'm considering looking into some sort of reverse polarity protection for the motor voltage line (up to 35V @ 6A) and possibly doing some switching for the spindle on-board (this could be anything from DC for a brushed motor to mains for a rotary tool/router). The reason it got left off of in this round was time, space, cost, and complexity ;-) The original thought (which is implemented on the current revB) was to simply provide an output that would drive an SSR - so then the end-user worries about what they're switching, amperage clearances, etc. Even including a relay socket would take up a large amount of board space and bring the nasty world of high current mains onto the PCB, which I really don't want to deal with for this project.

Any thoughts?
bearmos
Hero Member
Hero Member
 
Posts: 740
Joined: Tue Nov 02, 2010 10:02 pm

Re: CNC Stepper Controller

Postby matseng » Mon Dec 17, 2012 11:10 am

It seems like most stepper boards are using integrated solutions. Is it very very hard to make the h-bridges with discrete fets, drivers and a microcontroller if you also want microstepping? Just wondering - I've never been fiddling with motor drivers....
User avatar
matseng
Hero Member
Hero Member
 
Posts: 876
Joined: Sat Oct 15, 2011 12:29 pm
Location: Kuala Lumpur, Malaysia

Re: CNC Stepper Controller

Postby Sleepwalker3 » Mon Dec 17, 2012 11:37 am

OK. Please don't take my suggestions or questions as negative, just I see a lot of people making 'simple to make' mistakes. If I'm telling you how to suck eggs, then let me know.

Re. The diodes, Lots of ways of doing it, Diodes like you have done is one way (but some disadvantages as you've mentioned), MOSFET switch, Relay, etc. Good old-fashioned Relay makes it simple and are available in 6mm wide (little board real estate). Have the Relay NC circuit from the Reg., have the coil turned on when (if) the PC supply kicks in and the C/O contacts would switch to feed Vcc from the PC supply.

Re. Spindle - Well SSR keeps it off the board (assuming you use the heatsink mountable type), but you may possibly have some problem with noise getting back to the board (though that's the case with anything if not handled right), though that's sortable. An off-board relay on a proper base is fine, so long as it's appropriately rated - the mistake people often make is thinking that the AC switching rating will be the same as the DC rating and likewise that the 'headline rating' (which is almost always the Resistive rating) will be the same as the Inductive rating - it won't and the inductive rating will be much lower.

Re. LEDs - Are you talking 20mA per LED? If you're using high efficiency LEDs (and most are these days), you can usually (depending on the application) get away quite happily with 5 or 6 mA per LED and be more than bright enough for most indicator applications (Diffused are better for indicators), in fact you can often go quite a bit lower and still have ample brightness. Your current circuit looks to be using 500R and depending on LED colour, lets say Red and 2V across the LED, so 5V-2V=3V (I'm so good at maths aren't I? ;) 3V/500R=0.006A i.e. 6mA I'd suggest trying your leds out with a 1K and see if they're bright enough, I think you'll find they are.

I reckon you are really tempting fate trying to pump 24V into a little baby regulator like that, as you noted, the dissipation is going to be pretty mean. I know hobbyists try to save every cent, but would $10 be too much if you had a readily available source of switch reg that would fit in a TO220 footprint? If that sounds OK, I'll point you in the right direction.

If you haven't already, you should checkout Sparkfun's Stepper boards, as I think they used the same chips and people found they could get the full ratings out of them with the dissipation involved. Could you route the section of the board under the chip (have your fab do it later obviously!) and fit up a block of aluminium (or Aluminum if you're a yank) into the cut-out, obviously a good thermal interface medium between the two, and transfer the heat down to the chassis, where again you use a good thermal interface medium? Essentially get rid of the vias and turn it into a block of Aluminium that connects to the chassis to give it real heatsinking. I wouldn't likely be going down that path if I was it were me, there's decent drives out there for 'reasonable' prices, though I understand the appeal of making it yourself. I'd make my own breakout, probably, but I don't believe those chips are a good design overall - not knocking them, I just think they have put unrealistic ratings on them for decent use.


How are you working the logic on the E-Stop button, i.e. It looks like you're expecting to bridge the connection when the button is pressed in (i.e. when there is an emergency), thereby pulling E-STOP_IN high, pulls the output of the buffer high, sends a high to the PC, sends a high via D2 which eventually ends up pulling the /Enable Line on the Driver chip high, thereby Disabling it - Correct?
User avatar
Sleepwalker3
Hero Member
Hero Member
 
Posts: 530
Joined: Mon Jan 16, 2012 4:12 am
Location: Down Under

Re: CNC Stepper Controller

Postby bearmos » Mon Dec 17, 2012 1:39 pm

matseng wrote:It seems like most stepper boards are using integrated solutions.

Yep, they're inexpensive require little board space (quick also adds to the inexpensiveness) and are easy to design in.

Is it very very hard to make the h-bridges with discrete fets, drivers and a microcontroller if you also want microstepping? Just wondering - I've never been fiddling with motor drivers....

Usually, you'll use a translator IC to take care of the chopping and microstepping and then do the discrete FET's or maybe an H-bridge IC in a large package. It is more involved (and costs more). I think most hobbyist applications find that they can get away with using the integrated solutions, so they do. I'd like to get into some higher power discrete solutions in the future.

Sleepwalker3 wrote:OK. Please don't take my suggestions or questions as negative, just I see a lot of people making 'simple to make' mistakes. If I'm telling you how to suck eggs, then let me know.

Not at all. I make far more mistakes than I'd like (a lot of times when I (should) know better). I really do appreciate all the input! If I come off as being defensive - it's certainly not intentional :(

Sleepwalker3 wrote:you can usually (depending on the application) get away quite happily with 5 or 6 mA per LED and be more than bright enough for most indicator applications...I'd suggest trying your leds out with a 1K and see if they're bright enough, I think you'll find they are.

Yeah, I'll definitely be trying out a lower current.

Sleepwalker3 wrote:I reckon you are really tempting fate trying to pump 24V into a little baby regulator like that, as you noted, the dissipation is going to be pretty mean.

While driving the LED's in their existing configuration, this correct. The worst-case won't be so bad if the LED current is reduced down to 5-6mA ea (even then I'm still looking at dissipating around 2 watts worst case (.006mA * 12 LED's * 30 volt drop). On the positive side, the regulator specified ( IFX27001) has built in thermal protection, so if things do overheat, it shouldn't cause any permanent damage. Admittedly, I wouldn't think about using an LDO in this capacity for something I was doing in my professional life. . .

I know hobbyists try to save every cent, but would $10 be too much if you had a readily available source of switch reg that would fit in a TO220 footprint? If that sounds OK, I'll point you in the right direction.

I think in this case the $10 probably is too much, although I'm always curious to hear what other people like ( I had a bad experience with a "Simple Switcher" once :( - I think it was due to a poor layout).

Sleepwalker3 wrote:How are you working the logic on the E-Stop button, i.e. It looks like you're expecting to bridge the connection when the button is pressed in (i.e. when there is an emergency), thereby pulling E-STOP_IN high, pulls the output of the buffer high, sends a high to the PC, sends a high via D2 which eventually ends up pulling the /Enable Line on the Driver chip high, thereby Disabling it - Correct?

Spot on. This arrangement also allows the PC to supply an ESTOP. Certainly not as robust as going directly into a relay that cuts power to the whole thing. Admittedly, this is a bit indirect and doesn't even allow for a single point of failure (the buffer), but it seemed like a step in the right direction from the usual purely software-implemented ESTOP's. Suggestions?

Sleepwalker3 wrote: Could you route the section of the board under the chip (have your fab do it later obviously!) and fit up a block of aluminium (or Aluminum if you're a yank) into the cut-out, obviously a good thermal interface medium between the two, and transfer the heat down to the chassis, where again you use a good thermal interface medium?

Aluminum for the yank ;-) and you'll also find that I tend to speak in terms of mils and inches ( I fully realize I'm in the minority here, but until I can actually visualize what a mm is I'll have to live with my curse. . .) I was really hoping that this board could be used with or without external heat sinking (not up to the max ratings without external heat sinking of course). I like the idea of an Al block under a routed portion of the board, but this would necessitate the need for an external enclosure (which isn't a desirable requirement to impose). I've had good luck with a 4 layer board with the same chip and a similar layout tied to a chassis sheet metal. I need to do a bit of research and figure out if it's reasonable to expect similar performance from 2oz/inch copper and a thinner FR4 substrate (probably not) - more along the lines of 0.8mm.
bearmos
Hero Member
Hero Member
 
Posts: 740
Joined: Tue Nov 02, 2010 10:02 pm

Re: CNC Stepper Controller

Postby Sleepwalker3 » Tue Dec 18, 2012 2:35 pm

A bit to cover there and I've been working back really late, so I'll reply when I've got a moment. :)
User avatar
Sleepwalker3
Hero Member
Hero Member
 
Posts: 530
Joined: Mon Jan 16, 2012 4:12 am
Location: Down Under

Re: CNC Stepper Controller

Postby bearmos » Tue Dec 18, 2012 2:52 pm

Sleepwalker3 wrote:A bit to cover there and I've been working back really late, so I'll reply when I've got a moment. :)

No worries - in summary: "Thanks!"
bearmos
Hero Member
Hero Member
 
Posts: 740
Joined: Tue Nov 02, 2010 10:02 pm

Previous

Return to Project logs