Welcome! Log In Create A New Profile

Advanced

RAMPS for Due!

Posted by bobc 
RAMPS for Due!
September 10, 2013 04:23PM
I have been working on a prototype, porting code and its looking good so far. I have got comms, steppers going and just working on temperature control. There's a few snafus on the board that will need fixing.

There are schematics etc for the prototype here [github.com]. Firmware will be over here [github.com] but the repo is a bit out of date.

Soon I hope to hook up a printer and I will push v1 code.

There IS an Arduino Due under there, trust me!

I would claim FIRST but I am pretty sure RepRapPro have code running on the Due, so maybe SECOND?


IMG_0071 by donotdespisethesnake, on Flickr
Re: RAMPS for Due!
September 10, 2013 07:12PM
Brilliant job bob!

Will have a look soon and give some constructive feedback.
Re: RAMPS for Due!
September 10, 2013 10:53PM
Very cool. I see what appears to be spots for six stepper drivers, but the schematic only shows five. Does it support six drivers (I hope!)?


Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing.
Anyone can edit the wiki!
Re: RAMPS for Due!
September 11, 2013 08:44AM
The one thing I can see from the Gerbers is that some of the tracks seem a bit thin around the power area.

Also, which project file is the latest version, since there's two in the repo?
Re: RAMPS for Due!
September 11, 2013 03:51PM
Ah sorry everyone, versions got a bit out of sync.

RAMPS-FD.pro is the correct project, but the board file is RAMPS-FD-v3.brd. I'll try to tidy this up on next revision smiling smiley

@Cameron, there are 6 steppers, the PDF was out of date. I have uploaded a new PDF to match the schematic. I am planning an expansion board to handle even more stepper/extruders.

@Cefiar, for the prototype I used smallish traces to help the autorouter. For proper version I will use thicker traces or filled planes.
Re: RAMPS for Due!
September 11, 2013 08:14PM
Great stuff Bob. Keep us updated as things change. winking smiley
Re: RAMPS for Due!
September 11, 2013 08:56PM
Looks really nice Bob!

Just to make sure I understand the purpose of the 74LS08, does the /ESTOP then let you kill all the motors at once? And is P302 a pushbutton that does the same thing?
Re: RAMPS for Due!
September 11, 2013 10:14PM
From looking at the schematic, the ESTOP is a signal TO the Due/Mega so that it knows the emergency stop button has been pushed.

The P302 connector is for connecting what appears to be a Normally Closed Emergency Stop switch. You press it, it locks open until physically reset (usually by turning it).

With P302 closed, the AND gates of the 74LS08 pass all the signals through. When P302 goes open (someone pushes the emergency stop) the signals are all blocked.

That said, I think there is a problem with this:

An 74LS08 (AND gate) is the wrong choice, as the motor enables are Active Low (you pull the signal low to enable). With the current setup, the enable signals for the motors will be ALWAYS low if the emergency stop is triggered, so nothing will actually stop.

We probably need to use a proper bus driver (eg: 74LS244), and then use pull-up/down resistors on the outputs to make the Z output state (ie: bus driver disabled) the default logic level required. Pull ups on motor enables, pull downs on FET outputs. Note also that an 74LS244 has 8 input/output pairs, so you'd only need one chip (not two, as proposed with the flawed 74LS08). It does add 8 resistors though.

Edited 1 time(s). Last edit at 09/11/2013 10:17PM by Cefiar.
Re: RAMPS for Due!
September 12, 2013 04:13AM
Heh, you guys are quick!

The ESTOP feature was a last minute addition I couldn't resist trying, but I did goof it up. Logic chips are quite cheap, and I quite like the idea of a hardware stop.

With a quad NAND (74HC00) and removing the pullup resistors R204, R205, etc it works to a point, but an issue I have noticed is that if there is no 3/5V power from the Due (i.e. Due powered by USB, and USB disconnected), or if Due is in reset/unprogrammed, but power on 12V, then the MOSFETs for the heaters turn on. Obviously that is not ideal.

I think your 74LS244 suggestion would be better and hopefully fix that issue. I was thinking of commoning some motor enables so that all the heater outputs are on the ESTOP.

I think the board also needs 1 or 2 small FET outputs for fans etc.

Some other known issues:
- JP101 pinout needs changing
- R101 value
- need to derive a 9-10V gate voltage for 24V operation
- some of the connector positions/layout need improving
Re: RAMPS for Due!
September 12, 2013 11:54PM
bobc Wrote:
-------------------------------------------------------
> Heh, you guys are quick!

winking smiley

> The ESTOP feature was a last minute addition I
> couldn't resist trying, but I did goof it up.
> Logic chips are quite cheap, and I quite like the
> idea of a hardware stop.

No problem with the idea at all! I like it.

> With a quad NAND (74HC00) and removing the pullup
> resistors R204, R205, etc it works to a point, but
> an issue I have noticed is that if there is no
> 3/5V power from the Due (i.e. Due powered by USB,
> and USB disconnected), or if Due is in
> reset/unprogrammed, but power on 12V, then the
> MOSFETs for the heaters turn on. Obviously that is
> not ideal.

No, not really.

Also of note: I now see that the FET gate drive transistors (the 2N2007's) invert the signal, so I have probably suggested the wrong pull-up/pull-down resistor setup. This means you probably want them all pulling up. Advantage is you might be able to use 1 x 8way resistor (in an SMD pack) instead of 8 single resistors.

PS: Please double check that is correct!

> I think your 74LS244 suggestion would be better
> and hopefully fix that issue. I was thinking of
> commoning some motor enables so that all the
> heater outputs are on the ESTOP.

I thought about something that would drop in replace it (eg: NAND, NOR, etc), but couldn't figure out a way to do that would handle "the Arduino isn't providing any signal" case, hence the idea of a 74LS244. There may be something better that might be closer to the mark. I'll trawl through my 74xx and 40xx data books at some stage soon.

(Yes, OMG, Someone who still has data books on hand - for cases like this they're pretty useful!)

> I think the board also needs 1 or 2 small FET
> outputs for fans etc.

Sounds good to me.

> Some other known issues:
> - JP101 pinout needs changing

I'm assuming it's back to front compared to the other power connectors?

> - need to derive a 9-10V gate voltage for 24V operation

Any idea how much current we'll need?

The IRLB8743 needs a gate voltage below 20V. So if 12V is easier to get, then perhaps we could use that? It's also 3 volts less that we need to drop (dissipate) from whatever we use to get the voltage down.

Stupid idea #1: 3 pin regulator. For 12V operation, bypass the connections (connect IN to OUT). For 24V, populate with a 12V (or even a 9V) reg, OR if you have 12V (eg: from your PSU) connect it to the OUT on the board. Have to figure out a nice way to arrange the pins (to make it easy to connect in/out) and label them though. Also leaves the possibility of confusion.

Stupid idea #2: If the current needed to drive the FET is negligible, just set up the 2N2007's drain on a voltage divider, set for 3/4 of supply voltage. For 24V, that works out to 18V (below the IRBL8743's 20V max) and for 12V, that's 9V. Maybe err on the slightly lower side in case the 24V is exceeded a bit (which still gives a reasonable gate drive at 12V - more than we get with 5V anyway). If people want to max it at 12V, they can remove the bottom resistor in the voltage divider.

Another thing of note: I notice that you're using the IRLB8743 to drive the LED, but you're getting the supply for the LED from the gate drive voltage. If someone does something stupid like soldering in the LED backwards (the markings on many SMD LED's make this easy to do), you're going to end up with supply voltage (through the load - such as the heatbed) minus the LED voltage drop applied to the gate drive voltage. I don't think this will cause too much of a problem (due to the resistor in-line with the LED) but thought I should mention it, especially if you go with the voltage divider method, as it will definitely skew things.
Re: RAMPS for Due!
September 15, 2013 09:34AM
> I would claim FIRST but I am pretty sure RepRapPro
> have code running on the Due, so maybe SECOND?

Third? RADDS is running with Repetier-FW winking smiley.


3D gedruckter Messerschärfer +++ RADDS für den Arduino-Due +++ Meine Drucker
Re: RAMPS for Due!
September 15, 2013 11:15AM
Willy Wrote:
-------------------------------------------------------
> > I would claim FIRST but I am pretty sure
> RepRapPro
> > have code running on the Due, so maybe SECOND?
>
> Third?
> RADD
> S
is running with Repetier-FW winking smiley.

That looks impressive!
Re: RAMPS for Due!
September 15, 2013 01:56PM
Has there been any thought to going to a "wing" style instead of the stacking type. The beaglebone black and arduino due are relatively close dimensionally. I've read about a lot of people working with both working on a ramps style solution. I would think that everything could be interchangeable, so all that would be needed is a couple small jumper boards to handle the pinout differences. The economics of scale could bring down the price for both, and may be even the mega crowd could be included if the 3.3V and 5v specific components where pin out compatible.
Re: RAMPS for Due!
September 15, 2013 04:23PM
What exactly is a "wing" style?

I think the possibility of a common board was mentioned before, one of the problems is that the cost of connectors is significant. I'm not sure where the price break would fall.
Re: RAMPS for Due!
September 15, 2013 07:16PM
Be interested to see how well that works, given that they're driving the FET's directly off 3.3V (they're using IRF3708's). Also not so sure about the power on both ends thing, or the choice of Power input/FET output connectors (tho since they're standard pitch, they can probably be changed to something better).
Re: RAMPS for Due!
September 16, 2013 06:02PM
Quick and dirty sketch of what I was thinking. You can then bridge the gap between the headers with a small bridge board, re-routing the signals as required. I think this would also have the benefit of allowing the arm processor to breath a little better.
Attachments:
open | download - Wing-Shield.pdf (40.5 KB)
Re: RAMPS for Due!
September 16, 2013 07:04PM
bjmorel Wrote:
-------------------------------------------------------
> Quick and dirty sketch of what I was thinking.
> You can then bridge the gap between the headers
> with a small bridge board, re-routing the signals
> as required. I think this would also have the
> benefit of allowing the arm processor to breath a
> little better.

Ok, I see what you mean. I can get boards made fairly cheaply if I keep within a 10cm x 10cm area. The Due is about 10cm by 5cm, so that does not leave a practical space.

There is a 3d printer cape for BeagleBone called Replicape, not sure if it has reached production yet, but I think will be quite expensive. I am planning to fit a RAMPS-FD on a UDOO board, which is more expensive than the BeagleBone Black but has a Due built in. There is also Iteaduino Plus, which is different again.

It would be good to have a universal board, perhaps there is another way to do it. I have some ideas, I will have to think on it some more. I was planning a generic extension board for up to 8 steppers, perhaps that could be connected via a suitable adapter board.
Re: RAMPS for Due!
September 17, 2013 03:26PM
Here's some blurry videos of RAMPS-FD in action :

[youtu.be]

[www.youtube.com]

Finished piece :


IMG_0074 by donotdespisethesnake, on Flickr

So far everything checks out OK and performance is as good as it was before.
Re: RAMPS for Due!
September 17, 2013 11:50PM
Great to hear Bob!

Can't wait to see the latest revision with the new E-Stop electronics. At that point, I'll get one made for myself and start hammering it. winking smiley

FWIW: My local hackerspace has a whole "getting boards made" process that combines everyone who wants a PCB made into a single run to cut down the costs on 1-2 off designs.
Re: RAMPS for Due!
September 19, 2013 05:59PM
I have been slowly digesting your post...

Cefiar Wrote:

> > Some other known issues:
> > - JP101 pinout needs changing
>
> I'm assuming it's back to front compared to the
> other power connectors?

The idea of that is to get the logic voltage from IOREF, but for pre-R3 Arduinos that pin is not there, so the alternative is to get logic voltage from +5V.

I am just about clinging on to the idea of making the board work for Due or Mega, I think it is there apart from the SPI connector. Apart from the fact the SPI signals are on different pins, the physical SPI connector on the Due is in a slightly different position. I would have hoped that Arduino team had learnt from the previous connector fiasco! Perhaps they regard the SPI as optional and not really part of the footprint, but on the Due it is the main (only) hardware SPI channel. Some of the USARTS can be used in SPI mode, but these are allocated for UART, so you have to find the SCK pin - and one of the SCK pins isn't tracked, so there are only two available.

>
> > - need to derive a 9-10V gate voltage for 24V
> operation
>
> Any idea how much current we'll need?

Hmm, not really. I think q = I.t or something, not sure what a good value of t is. Maybe 1us or less?

> Stupid idea #1: 3 pin regulator. For 12V
> operation, bypass the connections (connect IN to
> OUT). For 24V, populate with a 12V (or even a 9V)
> reg, OR if you have 12V (eg: from your PSU)
> connect it to the OUT on the board. Have to figure
> out a nice way to arrange the pins (to make it
> easy to connect in/out) and label them though.
> Also leaves the possibility of confusion.

Well if that is stupid, I had the same idea smiling smiley

With a 12V regulator, that can also supply the Due in standalone operation. It seems to be the simplest idea. Otherwise I can only think of a wide range switcher with a low drop out, maybe 9-10V. That is more complexity than I would like.

Hopefully 7812 in 1A version will provide enough current, and can be heatsinked or substitute with 78S12.

It does mean there is a pesky jumper to set correctly. Worst case you apply 24V direct to 12V components.

> Another thing of note: I notice that you're using
> the IRLB8743 to drive the LED, but you're getting
> the supply for the LED from the gate drive
> voltage. If someone does something stupid like
> soldering in the LED backwards (the markings on
> many SMD LED's make this easy to do), you're going
> to end up with supply voltage (through the load -
> such as the heatbed) minus the LED voltage drop
> applied to the gate drive voltage.

That's a good point. I did myself get confused smiling smiley My theory was to show if the external load is actually getting power, if the LED is hung off the logic line the output can appear ON but if there is no 12V then the load is cold.

~~

ok, so I have incorporated a bunch of these ideas and tidied things up some, and pushed a new version to github.

Summary of changes:
- bring out all Due signals to a connector somewhere
- add 12V regulator for 24V operation
- add jumper in 12V feed to Arduino
- replace NAND gate in e-stop circuit with tristate buffers
- add extra UART connector
- add second i2c connector
- gate voltage for all MOSFETs is 12V
- change TX0108 buffer for endstops to 3/5V compatible buffer

I have some component/board changes planned too,
- use mini auto fuses. smaller than ATO size, still widely available?
- improve connector layout.
- try to fit KK footprints for endstops, thermistors
- move to 3.5mm terminals for extruder heaters?

And some extra features to consider:
- add 2/3 low current mosfet outputs
- more LED bling
- i2c EEPROM
- find space for micro-SDcard connector

If anyone has suggestions/requests, now is the time!

Edited 1 time(s). Last edit at 09/19/2013 06:02PM by bobc.
Re: RAMPS for Due!
September 20, 2013 05:11AM
Silly question, but why "add 12V regulator for 24V operation" for power for to the due I can understand

But.. 24volt HBP are becoming more common for larger areas and heats up a lot faster, and pololus run fine with 24 on the stepper side and the steppers move faster and stay cooler.

So please don’t force 12v operation, as 24v in places is really useful!
Re: RAMPS for Due!
September 20, 2013 06:02AM
If you are not sure if board would be supplied with 12v or 24v and want to allow both without any change, may use a 9v regulator, where 9v is good enough to run mosfets gates. Also 9v would be perhaps better to run arduino from instead of 12v, coz will have less drop and the arduino regulator should be just a bit cooler. If it draws 1A (not realistic but for the math), with 3v difference thats 3W less dissipation. And for gates 9v is still plenty and fast enough probably difference is not more than a decimal point.

I mean with a 9v regulator you dont need to say :if 24v then install regulator or change jumper...", you can just say "use 12v or 24v or whatever, doesnt matter".
Re: RAMPS for Due!
September 20, 2013 02:03PM
Dust Wrote:
-------------------------------------------------------
> So please don’t force 12v operation, as 24v in
> places is really useful!

Don't worry, the intention is to support complete 24V operation without requiring additional voltages. In order to do that, I need an intermediate voltage level generated on the board, partly for the Due but also for the gate drive on the MOSFETs.
Re: RAMPS for Due!
September 20, 2013 02:11PM
NoobMan Wrote:
-------------------------------------------------------
> I mean with a 9v regulator you dont need to say
> :if 24v then install regulator or change
> jumper...", you can just say "use 12v or 24v or
> whatever, doesnt matter".

Yes, I think you are right, the difference is negligible and the advantage significant. I will try with 9V linear regulator, and if that doesn't work out look at doing an SMPS. Really, not my field, but I guess there must be some open source designs out there I could borrow.

Not sure how much current a fully loaded board might draw. It may be only 200mA or so. I will try to get some measurements.
Re: RAMPS for Due!
September 20, 2013 10:10PM
Dust: The aim is allow 12 OR 24V operation. The reg is to allow the Due to drive the FETs properly, as well as powering the Due (I don't think the Due can handle >12V input to run it). We could use 5V for the FET gate drive, but it won't give you the best performance, so the FETs will get warmer than they need to.

One advantage of using a reg is that the user can populate it with whatever reg they choose. eg: 9V reg for 12V operation, 12V or 15V reg for 24V operation, or if they want to be cheap, leave it off all-together (as long as they're below 20V input).

The main advantage of using a 12V/15V reg for 24V (instead of a 9V) is that by dropping less volts, we reduce how much heat is has to be dissipated by the reg. Even with small currents, dropping 15V on a standard reg produces a lot of heat.

If the only thing I have to change to use a board at 24V is a single reg, then I'm quite happy. We'll need to document it heavily of course, but it's a small price to pay.

Note: You probably want a diode on either the reg input or output if the output can get voltage from somewhere else. I know that Mega's will happily supply voltage back out their VIN line when powered via USB. Many 3-pin regs also do this (any voltage on the input makes it to the reg's output, unless the output is already a higher voltage). I saw this happen when someone replaced the RAMPS diode D1 with a 9V reg on their setup (they wanted to use 15V, and the Arduino wouldn't handle that by default), then plugged the board in via USB only. The small 12V fan that was across the supply output (to cool the board) was slowly ticking over, which is what brought it to my attention.
Re: RAMPS for Due!
September 22, 2013 04:21AM
Just looking through stuff and commenting as I find it.

1. Caps across motors are only 25V. Can we increase this to 35V, so we've got a margin of error if using 24V drive?

2.The enable line from the E-Stop needs to be Low in use, and High when you activate the E-Stop (both the HC244 and HC125 are Active Low Enable). This means you need the jumper between the signal and Ground, not between signal and +V_Logic (via R304 & R305 respectively). You may want to change those 2 resistors around too.

That's about it from looking at the schematic. I'll look at the layout next and see if I can offer any suggestions there.
Re: RAMPS for Due!
September 22, 2013 05:27AM
E-stop circuit uses continuous current flow as a principle, like a feedback loop. This continuous current flow ensures signal path integrity, as continuous check. E.g. its always high (current flows continuous), and gets low only when estop is triggered.

If it would be the other way, e.g. no current flow as normal, e.g. normal low and gets high when triggered, then if a cable gets disconnected the firmware will not be aware, because normal low coincides with wiring disconnected. E.g. get an e-stop disconnected, and issue a home command and => u got a crash. For our small printers isnt an issue but with a big metal cnc with big motors a crash is pretty bad and costs top money. I guess this is why the principle is like that. A.k.a "what if a mice chews the cables".
Re: RAMPS for Due!
September 22, 2013 08:37AM
Thanks, those are all good points!

Layout is still in work, I have nearly found a way to get all connectors near board edge.

I think I have found a way to bring SPI signals out for both Due and Mega with two 5x2 connectors. Unfortunately cannot use same board for both Due and Mega, since the 6 pin SPI/ISP header is in a slightly different place. For Mega, this connector must be a no fit. I don't think I can dual footprint because the pins overlap too much.

I'm contemplating bumping the board size up slightly which could use space more efficiently and allow for extra mosfets.

I am thinking of using 3.5mm screw terminals instead of 5.08 for the extruders, these are rated about 7A. The 5.08 terminal for heatbed is rated about 15A.

I remember now why I wanted a 12V power rail, it is so that with a 24V supply there is a still a way to use 12V fans for cooling. 24V fans are available of course, but the PC market means there are loads of 12V versions around.

I looked into a SMPS, and not really knowing where to look I found LM2675M-12 which looks great on paper, but the BOM is frightening, the chip is £2.71 and first cap I looked at is £3.31 for 22uF 50V tantalum. That is nearly £6 for first two components... TI sell a SMPS module PTN78000HAZ which might work out cheaper at £10.92 and definitely simpler.

There also buck/boost regulators which work to zero dropout or undervoltage, again rather more complicated and expensive.

I think I will stick with a user selected jumper and linear regulator for now, perhaps we can find a less error prone but still inexpensive solution.
Re: RAMPS for Due!
September 22, 2013 12:19PM
I've pushed a new version and updated pdf schematic. I have added two extra steppers MOSFET outputsto the schematic but not yet to the layout. I am doing some trial routing and it's looking ok so far.

Be aware I have just updated to latest version of Kicad (BZR4022), so some file formats have changed to new version.

Edited 1 time(s). Last edit at 09/22/2013 08:34PM by bobc.
Re: RAMPS for Due!
September 22, 2013 07:26PM
NoobMan: Yes, but it's absolutely no use if the logic level put into the components is the wrong way (ie: the switch holds it high because it's NC, yet the buffers don't pass a signal because they REQUIRE logic low to be active). What I was suggesting (bob picked it up, you didn't) was to invert the whole circuit so that the NC ties the line low. If the cable to the NC switch breaks or the switch is triggered, it goes high. Yes I understand that if the cable shorts to ground, the switch will be useless, but without adding even more components to a fairly component-heavy board, there's no way around it.

Bob's updated the circuit and it should work fine now.

FWIW: I personally prefer the 5.08" pitch connectors, but that's because I use the pull apart style connectors that are specced for the default RAMPS power input on my outputs too. Having connectors with the easy disconnect setup (for me) works well, and means removing the board from the printer doesn't require screw/unscrewing the cables (which leads to eventual failure of the screw part of the connector, especially the cheaper ones).

Edited 3 time(s). Last edit at 09/23/2013 01:21AM by Cefiar.
Sorry, only registered users may post in this forum.

Click here to login