Welcome! Log In Create A New Profile

Advanced

New Smoothie Board

Posted by TopherMan 
New Smoothie Board
May 15, 2013 02:53PM
Hey all,

Since I've determined I don't have the programming chops to port firmware to the Due, I'm just going to use Smoothie. I happen to have an LPCXpresso 1769 that isn't up to anything, so I've been inspired by this: [smoothieware.org]. The past few days I've been messing around with KiCAD making a board for the LPCXpresso that's similar to RAMPS: [github.com]. It's got slots for 5 steppers (Pololu style), 4 power MOSFETs (one that has its own independent 12V line), a MicroSD slot, endstops, 3 thermistors, and can be powered from the USB or the power source. And I'm going to add an I2C line for any cool add-ons that may appear.

While I suspect I'll be the only one who ever uses this (which is fine; I did it mostly for my own amusement), if someone would take a quick look at it and tell me if I've made any major errors, I'd appreciate it. I'm a mechanical engineer, so my board layout skills have come from looking at RAMPS and Gen7 and lots of guesswork. I probably won't start buying parts or sending the boards to fab for a while, but I figured the longer it's out in the wild the more likely it is that someone is bored enough to check my work.

Thanks!
Chris
Re: New Smoothie Board
May 15, 2013 03:03PM
You should fork Hoekens project.


- akhlut

Just remember - Iterate, Iterate, Iterate!

[myhomelessmind.blogspot.com]
Re: New Smoothie Board
May 15, 2013 04:36PM
I saw his post on the Smoothie forum, but it looks like he actually went with an Arduino Mega. Or, if there is an LPCXpresso version, I couldn't find it in the linked repo or any of his other public repositories.
Re: New Smoothie Board
May 15, 2013 09:12PM
Just downloaded and took a look, for a quick check.

I think this is second board i see with inverting buffer on mosfet gate, i hope you realize that the default state when the pin is undriven, is to have the fet conducting, which means default state cand easily turn into a mess. If uC doesnt turn on, gets stuck, doesnt reset properly etc, then = meltdown. Rather dangerous, because some of them arent even failure modes, e.g. a watchdog wich may just wait for a user reset. IMHO, add a pnp or else may take the inverter away so default, undriven state is turned off - not conducting.

I think D2 is meant as reverse polarity protection coz its labeled 4004 not tvs, and a 4004 couldnt do anything else there. But it will probably blow before Fuse2 blows, coz is rather weak for 1A. Then perhaps may need a bulkier diode there, dc rating A > fuse Amps, which is probably going to be a bigger physical diode.

I think fet Q2 is for bed, so 10 amps there and the track width 1.4~mm is kinda low. Using track width calculator in pcb tools says 10A is min 3.7mm track width for a +30 deg rise.

If it would have just a bit thicker traces would be good for DIY. But thats just me smiling smiley

Pololu modules: pullup for sleep + reset should be max 4k7 (see pololu site comments for latest module drv8825) so perhaps change 10k to 4.7k or even lower like 3.3k perhaps better coz there is only one. Also 220nf ceramic caps decoupling near each module i think that would be a good recommendation.

Motor connectors perhaps need more space, just heads up that in kicad SIL ones are narrower than pinhead... and physical ones.

Min max headers and 2 buttons are under the board, or board is on the other side? Power i found a page that says "3.15V-3.3V external powering, or from USB..." which made me a bit confused if vin is 5v or 3.3v so probably double check, i cand find a fast enough answer for myself.

Otherwise looks quite nice. These days I am routing an lcd board for connection via I2C, also in Kicad and will work with 3.3v, so there is at least one addon for it. In a week or two it will be under RDB feature page. Another set of electronics which i am also probably the only one to use them. Btw, consider making a page for it on reprap wiki, at least for reference.
Re: New Smoothie Board
May 15, 2013 09:31PM
Btw, the gnd path from mosfets goes through the other side of the board, like through each gnd pin of the stepper module. Because of how 12v line is routed. If you click highlight net and click on the vertical 12V near header 4 willl see it better. Adding 10-12A from bed and ~2-3A from hotend there are ~15 amps going through that path, all around, and at some point in the top right corner it even comes trough a pin and comes on top with a 0.61mm track width and then goes back to bottom. Imho this gnd path is fatal and needs to be rerouted / redone. For purpose to have the V+ and gnd paths from mosfets directly to the connector and back. And as short as possible and kept separated from all else.

Edited 1 time(s). Last edit at 05/15/2013 09:35PM by NoobMan.
Re: New Smoothie Board
May 16, 2013 08:14AM
Wow, thanks NoobMan! Lots of good advice.

No, I did not realize that this layout would invert the gates. I took it from the Gen7 development thread. The inversion was mentioned a little later in the thread, but I must have missed it the first time through. The smaller gate is in there because the IRLB 8743's don't work well at 3.3V. How does the attached image look? I took this layout from bobc_hardware/RAMPS_FD, and it was explicitly listed as non-inverting.

Yes, I put the diode in backwards. Whoops. I just used the same one RAMPS uses, since I haven't had any issues.

I'll make all the tracks larger. I just sorta guessed on size.

I'll change the pullup resistors. I just used what RAMPS uses, I didn't do my research. As for the caps, what would they go between? VCC and ground, or something else? I've already got them between 12V and ground at each one.

More motor header space is a good idea, I didn't think that one all the way through.

I had originally laid it out with the mcu on the bottom, with female headers facing up like the Arduino. I had tried to have the pololus straddle the pins, but it didn't quite work, but my brain was stuck thinking of the Xpresso on the bottom. As I make these changes I may try laying it out with the mcu on top (pins facing down), so I'll have to move the headers and buttons out from underneath. Similarly, I found this: http://reprap.org/wiki/Sanguish]polyfuse on bottom[/url] (third picture on right-hand side). Do you see any problem with having the polyfuses under the board, tilted flat? It will make laying them out a little easier.

The schematics don't make power very obvious, but it looks like it can be done two ways: if you have 3.3V already, you can feed it straight into the VCC port (pin 28), or you can power through VIN at pin 2. One place said VIN takes 4.5V to 5.5V, and one said 4.5V to 14V, so I'm going to play it safe and power at 5V, from either USB or from main power through a transistor.

I'll add the I2C header. I'm assuming I should put the pullups on this board, right? Or will those be on the slave board?

Good point about the wiki page. I haven't ever done one, so that will be a good learning experience.

I had posted on the Smoothie forum as well, and they also mentioned the mosfet ground issue, which I hadn't known about. And yeah, that bottom left corner of the board is a bit of a mess, I think I'll re-work that so the grounds and +12V are a little nicer and cleaner and less likely to melt the board. Again, thank you a ton for all the recommendations. I think you just saved me many weeks of trial and error already.

EDIT2: Stupid broken links. Fixed.

Edited 2 time(s). Last edit at 05/16/2013 08:53AM by TopherMan.
Attachments:
open | download - NewMosfetLayout.png (9.9 KB)
Re: New Smoothie Board
May 16, 2013 09:01AM
Gaah, I've given up trying to get that link formatted correctly. Oh well.

I was just checking Pololu's site, like you mentioned, and looked at my schematic again. I don't think the 10k pullups are an issue, because they're pulling up the enable pins, not the sleep/reset pins. Sleep and reset are connected directly to VCC, as in Pololu's minimal wiring diagram.

Thanks again!
Re: New Smoothie Board
May 16, 2013 02:07PM
Well thank you too really, for not taking it the wrong way.

The gate like that is inverter with one small npn and a pullup and output taken after pullup, so when small transistor is not driven it is closed and the inverter output is 12v into the bigger mosfet gate and hence the bigger power mosfet is always conducting coz its gate is always relaxing at 12v. So with mcu turned off, power to hotend or bed is always on. Only when small transistor is actively driven, it pulls the 10k pullup to ground, the output is 0v at the gate of power fet, and only then the big power mosfet starts to close. Imo, this is a dangerous way to work, prone to meltdown.

Yes you are right about that its not pullup for sleep, i saw it like one and jumped at it with prejudice smiling smiley However is probably better to have pullups on pins than to simply tie them to vcc as latter does not imply any current limiting and then perhaps chips can burn easier. But its a matter of opinion ofc.

I dont think D2 is the other way around, if i got this correctly then in reverse position will shorts the voltage to gnd. As it is, its reverse biased and points from gnd to v+ in forward. So it only opens if the power is connected wrong polarity and could blow fuse this way, or else if its a transient supressor which breaksdown to put higher voltages to ground. These are my suppositions but a 4004 wont do much either way.

I thought of lpc board being on top coz of mbed ones, and it generally makes more sense to me to have the board easily available than hidden underneath. For example the boards usually have some features on it that need no duplication: headers, including icsp ones, reset button, leds, etc. If the board is on the bottom and in a position that these cant be accessed, then need to duplicate things like that, which imho isnt great. Dunno about lpc, but for example arduino mega has its own leds, icsp connector, reset button, etc, but because ramps covers them, then its required to duplicate them all over again. So imo, leaving the board fully accessible is way better. Like the mbed modules, or wiring. At least in principle, and just my personal perspective. Or for ease of hacking things. In the big picture ofc i can understand for commercial purposes some may worry the board area underneath if not used may be wasted, and since pcb are paid by area then perhaps duplicating some basic features may be a smaller cost than such a board space cost.

I think polyfuse when active can get hot, and probably better upwards can get better ventilated. But probably more a preference thingy, dunno how much it would count in the end, if these want to burn then will probably burn in either position same way. I would put them on top, even if just to be sort of visible or "touchable" and be able to catch the user's eye when have problems.

I2C pullups theoretically depend on that line capacitance and speed mode of i2c, you can put them there or you can leave them out, doesnt rly matter much coz a typical i2c accessory board should have place for such pullups, but only one set is needed. If its convenient put them, like if you have vcc right nearby, else its ok to leave them out.
Re: New Smoothie Board
May 16, 2013 04:52PM
Thumbs up for the fet driver. But one more thought if you still want to bear with me. Works nice for 12V. But ppls may go for 24V in which case it may be something to investigate, for example there are lots of mosfets with Vgs max of 16v or 20v. So this may impose other kind of restrictions on mosfets, like Vgs max > Vin. So depends if you want the board to be usable with 24v psu + normal mosfets. If so, then perhaps a onboard regulator can make 12v just to supply gate voltage, and in Vin is 12v it will output Vin - regulator dropout. Even if its not LDO and has some 3v drop, still 9v quite ok for gate voltage. Its just a thought or a consideration, something to think about.
Re: New Smoothie Board
May 16, 2013 09:50PM
Sweet, thanks again. I've made another attempt at getting all the traces down. Everything's connected, in theory, but I have a godawful mess of vias and some ugly rat's nests, so I'll probably try to clean it up later. DEFINITELY not DIYable at the moment.

The extra regulator is a good idea, if I can squeeze it in I may give that a try. Also, I was reading [reprap.org] and I may try to work in a freewheeling diode as well. The FETs really seem to be the most sensitive part, and if I can protect them with a 50-cent part, why the heck not.
Re: New Smoothie Board
May 17, 2013 10:05PM
I can try give it a shot at routing if you'd like the collaboration, better said if you want me to mess with it, but just for me soonest break is probably to end of next week.

Edited 1 time(s). Last edit at 05/17/2013 10:16PM by NoobMan.
Re: New Smoothie Board
May 17, 2013 10:59PM
Feel free! I'll probably keep fiddling with it this weekend, but I haven't come up with a layout that I'm totally thrilled with yet. Plus, with this being only the second board I've ever laid out, I'd like to see how someone with some experience decides to do it. I'm not really in a rush to send it off for fabrication since I have too many projects and not enough money at the moment, so whenever you feel like it is fine with me.
Re: New Smoothie Board
May 18, 2013 03:44AM
I sorted the schematic a little, redone annotation, and made a pull request for these changes.
Re: New Smoothie Board
May 18, 2013 11:02AM
Merged. Thanks NoobMan. I've also added two issues with the power side of things.
Re: New Smoothie Board
May 22, 2013 02:46PM
I've created a wiki page: [reprap.org].

For those who are interested besides Noobman and myself, the layout is pretty much done (HUGE thanks to Noobman) and I've got a config file for Smoothie on the repo. Today I should be getting some breakout boards and I'm going to get the LPCXpresso all wired up on a breadboard and confirm my pin selection works.
Re: New Smoothie Board
May 22, 2013 08:28PM
When you get the PCB's fabbed let me know - I'll give it a shot if you've got a spare.


- akhlut

Just remember - Iterate, Iterate, Iterate!

[myhomelessmind.blogspot.com]
Re: New Smoothie Board
May 22, 2013 09:08PM
Sure thing, Akhlut. You're my most loyal customer winking smiley
Re: New Smoothie Board
May 31, 2013 06:37AM
I'm interested as well. This looks like a perfect candidate for a moving light project.
Sorry, only registered users may post in this forum.

Click here to login