Welcome! Log In Create A New Profile

Advanced

RAMPS for Due!

Posted by bobc 
Re: RAMPS for Due!
December 16, 2013 07:34PM
ambrop7: The 10u caps were originally on the Mega (5V), so we may need to change their values for decent readings on the Due (3.3V).

That said, it should be noted that RAMBo has removed those 10u caps completely, so maybe it might be worth removing them and seeing how that goes?

Things that might be related:
1. Induced voltages in the thermistor cables from the hot end cables.
2. A high resistance path from a hot end pin to a thermistor pin.

Each of these may not change the voltages by much, but they might add up with the 3.3V rail change to be a noticeable difference.
Re: RAMPS for Due!
December 16, 2013 07:54PM
If you want to hit the FET's harder with direct drive use a 74ACT part to drive them. You will get 24 ma drive with a "normal" part and >=48 ma with a "buffer" part (one example is the 74ACT125 at 75 ma). That's way more than the 10K pull up is feeding the output FET shown on the pdf of the schematic that I have. If you want to go crazy, there are dedicated driver chips, or you can parallel gates....both take up room that seems to be in short supply. How ever much current you can move, it's just while switching. You still move nothing in the static state. (sorry if part of that drifts off into the obvious .... smileys with beersmileys with beer)

Edited 1 time(s). Last edit at 12/16/2013 07:55PM by uncle_bob.
Re: RAMPS for Due!
December 16, 2013 10:26PM
Problem with the 74HCT and 74ACT parts is that they're 5V logic only from what I have read (they're +5V with +/-0.5V supply), and 3.3V won't register as a logic "High".

If someone can point me to anything that says different, I'm happy to concede the point. This was based entirely on a 10 second Google search and looking at 2 spec sheets.
Re: RAMPS for Due!
December 17, 2013 01:03AM
Regarding the outpus being on when VCC has no voltage:

This is due to the way the pull-up resistors are hooked up and the fact we're using N channel FETs to drive more N-channel FETs.

Basically with no input on the gate of the DMN2075U's (the ones matching outputs 1-4), they are left in their open state. This means that the gate on the IRLB8743's gets all of +VGATE, switching it on.

This basically means that the existing Dual FET arrangement is broken by design if the 3.3v supply fails. :/
Re: RAMPS for Due!
December 17, 2013 01:08PM
As far as I know the 74ACT parts are undefined for logic levels when you run them off of 3.3V. That's not to say I haven't run them off 3.3. They don't seem to catch fire and explode...

I would only recomend them for a 5V powered design. I don't know if the driver IC + mini 5V regulator takes up less space than the FET drivers or not. A TO-92 78L05 would be plenty of current. They don't need much bypass to be stable.
Re: RAMPS for Due!
December 17, 2013 02:09PM
Quote
Cefiar
Problem with the 74HCT and 74ACT parts is that they're 5V logic only from what I have read (they're +5V with +/-0.5V supply), and 3.3V won't register as a logic "High".

If someone can point me to anything that says different, I'm happy to concede the point. This was based entirely on a 10 second Google search and looking at 2 spec sheets.

I spent a while looking at this trying to work out the best parts to use in any particular combination of input, output, supply... it's pretty complicated! There is a useful summary chart here [www.interfacebus.com]

For HCT/ACT, they need a 5V supply BUT will accept 3.3V or 5V logic level inputs.
For HC/AC they can use a 3.3V or 5V supply, BUT at 5V they are NOT compatible with 3.3V inputs. (In practice it may work, but can't rely on it).


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: RAMPS for Due!
December 17, 2013 02:30PM
Quote
Cefiar
Regarding the outpus being on when VCC has no voltage:

This is due to the way the pull-up resistors are hooked up and the fact we're using N channel FETs to drive more N-channel FETs.

Basically with no input on the gate of the DMN2075U's (the ones matching outputs 1-4), they are left in their open state. This means that the gate on the IRLB8743's gets all of +VGATE, switching it on.

This basically means that the existing Dual FET arrangement is broken by design if the 3.3v supply fails. :/

Yes, this is a serious design flaw smiling smiley Looking at it now, it is too risky to have heaters attached which may turn on, if the Due loses power (e.g. USB is disconnected). It really must be fail safe.

I think there are several options which have been suggested:

1) add a 5V regulator, run the buffers at 5V
2) run the buffers at 5V but remove the DMN2075 drivers and drive FETs at 5V
3) use some P channel FETs

I quite like 2), as it removes several components, including an easy to get wrong jumper. I think the IRLB8743 should be OK at 5V, especially if we use ACT buffers, they probably have more drive than a 5V AVR. The two main aspects are having a high enough gate voltage, which according to data sheet and testing by Traumflug, 5V should be fine. The other is being able to source enough current to have a fast switch on/off, to reduce time in the transition zone.

If the FETs are driven with positive logic, there is no need for a separate 5V, although if we now have room, it would be a good idea to add one. Ideally a switching type which can run 12-24V.

This looks like a really useful way to optimize the design, as well as fix a nasty gotcha.


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: RAMPS for Due!
December 17, 2013 05:50PM
Driving the IRLB8743's directly out of the buffers is fine as long as the buffers put out 5V. This also removes the inverted heater lines (no need for FETs to invert them, and their associated components), and means all the ESTOP pull-up's all become pull-downs.

The only issue I see is that with all the specs I've seen on all HC/AC/HCT/ACT (wrong, see below), logic "High" is considered anything from 0.5x (typical) to 0.7x VCC (the guaranteed limit at the temp specs of the package - -40C to +85C). At 5V, that means between 2.5v (typ) <-> 3.5v (max). This means as long as we're within the typical window (which never seems to be 100% defined on these things) we should be OK.

To test this in-circuit without redoing the board, we can probably just hack an existing board to get the same arrangement. Just lift the VCC pin for the buffers and power them directly from 5V (possibly take it from +VGATE if you install a 7805 in place of the 7812, since we won't need the 7812 any more), remove the excess FET components and pullups and either short the Gate-Drain on one of the driver FETs, or replace it with (say) a 10 ohm resistor to limit the inrush current to the gate.

For example:

For D10 (heated bed, the one that needs to be driven the hardest since it handles the most current), remove Q204, R214 and RP1. Remove the 7812 and replace it with a 7805. Lift pin 14 on U1 (74HC125, or replace it with a 74ACT125 but keep Pin 14 lifted) and run it to +VGate. Put a 10 Ohm resistor between the Gate and Drain pins on the pads for Q204, or just bridge them with a piece of wire. You can also add in an ESTOP pull-down resistor between the Gate and Source pins of Q204 as well (eg: 10K).

This would at least allow us to test this works 100% before we go ahead and get boards made.

Note: The output LED won't light up anywhere near as well (if at all), so you probably want to replace R220 with something smaller if you want that to work.

Edited 2 time(s). Last edit at 12/17/2013 08:30PM by Cefiar.
Re: RAMPS for Due!
December 17, 2013 06:22PM
Quote
Cefiar
The only issue I see is that with all the specs I've seen on all HC/AC/HCT/ACT, logic "High" is considered anything from 0.5x (typical) to 0.7x VCC (the guaranteed limit at the temp specs of the package - -40C to +85C). At 5V, that means between 2.5v (typ) <-> 3.5v (max). This means as long as we're within the typical window (which never seems to be 100% defined on these things) we should be OK.

What you say is true for AC/HC but not ACT/HCT. The VIH threshold for HCT is 2V. You can read that in any datasheet for an HCT part, so I don't what specs you were reading.


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: RAMPS for Due!
December 17, 2013 07:39PM
Ahh yes, I was misreading the spec sheet. Looking at the table on the wrong page. Was somewhat annoyed by the fact that the spec sheet said it was for ACT, but showed specs for AC and ACT. Doh!

Carry on. grinning smiley

Edited 1 time(s). Last edit at 12/17/2013 07:40PM by Cefiar.
Re: RAMPS for Due!
December 17, 2013 09:20PM
If all you are driving is logic, there's virtually no static current off of a hypothetical 5V supply. The regulator would not need to be very hefty. If you want to handle servos and other bits of this and that, you'll need something bigger than a 78L05.

Of course if you *do* have a 7805 in there, that will make driving opto isolated stepper controllers a bit easier .... (yes that's a turn into the ditch and over into a whole other design). My only real point begin that extra +5 current can be handy to have.

---------

Did the Microchip TC4426/7/8A's get looked at as drivers? You could run them off of +5 to +18V and still drive them (barely) with 3.3V logic (0.8 to 2.4V switch). They are reasonably cheap for driving a couple of FET's (70 cents for a dual). They are legit FET drivers with massive output capability. You would loose the built in "kill" capability that the tri-state buffer gives you with the duals in 8 pin dip packs. There's only so much they cram into them ....

[www.microchip.com]
Re: RAMPS for Due!
December 18, 2013 06:04PM
Quote
uncle_bob
Of course if you *do* have a 7805 in there, that will make driving opto isolated stepper controllers a bit easier .... (yes that's a turn into the ditch and over into a whole other design). My only real point begin that extra +5 current can be handy to have.

I'm open to the idea of making the board "opto friendly". smiling smiley An advantage of the stepper module is that it should be easy to interface to external drivers. The stepper driver logic supply are run off 3.3V on Due, but the motor voltage will be 12V or whatever is input via the Motor input. VMotor is only used for the stepper drivers, so you could run that at whatever voltage you like. If you use the Enable lines then you also have a hardware ESTOP.

It would be good to get a schematic together to see how plug in interface modules might work. They could be combined into a 3x1 strip perhaps.

Quote

Did the Microchip TC4426/7/8A's get looked at as drivers? You could run them off of +5 to +18V and still drive them (barely) with 3.3V logic (0.8 to 2.4V switch). They are reasonably cheap for driving a couple of FET's (70 cents for a dual). They are legit FET drivers with massive output capability. You would loose the built in "kill" capability that the tri-state buffer gives you with the duals in 8 pin dip packs. There's only so much they cram into them ....

[www.microchip.com]

I am sure they were mentioned in discussion, most things were!

I think the trick I missed before when adding the ESTOP (it was an afterthought) was to combine level conversion and driving the FETs. My brain was thinking of FET driver and ESTOP as separate things.

I want to run some tests with 5V buffers, Traumflug did some good work testing MOSFETs, [reprap.org]. The new generation of MOSFETs have such low on resistance it looks like we can get away without dedicated driver chips.


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: RAMPS for Due!
December 18, 2013 06:21PM
I have a fairly simple board laid out for the opto drive. It simply takes the control lines through resistor-transisotrs to generate open collector logic. The motor winding pins are used to connect to the opto's. At this point it's all untested. Having a 130 ma +5 power supply would save me putting three 1/8W resistors on the little boards....

-----------------

My main concern with the FET drive is having enough drive current rather than drive voltage. They can spend a *lot* of time in transition with weak drive. If somebody in the future decides to speed up the PWM, the power could add up fairly quickly. You can also get into some interesting thermal runaway issues if the drive voltage is a bit on the low side. I'd really rather not go into all of the details (and customer names and liability issues) of just how I know this...

Bottom line - you want to get the FET solidly turned on or there can be issues.

Edited 2 time(s). Last edit at 12/18/2013 06:24PM by uncle_bob.
Re: RAMPS for Due!
December 18, 2013 06:28PM
I've pushed a bunch of schematic changes to the github, based on recent discussions. I didn't add a 5V regulator for now, I realised we still need the 12V regulator to provide VIN to the Due.

Brief highlights :

Quote

commit d03338f50022aa99abe64a4e7b85a0ea21731da6
Author: Bob Cousins
Date: Wed Dec 18 22:42:30 2013 +0000

RAMPS-FD schematic: remove some redundant pulldowns;
add some explanatory notes;
update PDF

commit 1f6033e6de049db5228018c25bbc595a0df1a7aa
Author: Bob Cousins
Date: Wed Dec 18 22:20:43 2013 +0000

RAMPS-FD schematic changes:
#3 replace C301, C302, C303 and C501 with ceramic 0805;
#4 change endstop connectors to 6x1 and 6x2 to allow key position
#9 change E-STOP connector to KK type;
#18 add 10k pulldowns on heater outputs from CPU
#19 change E-STOP buffers to HCT type to always drive FETs at 5V and remove inverting drivers on heater outputs;
#20 add 24LC256 I2C EEPROM

I haven't made any changes to the board layout.

RAMPS-FD-Schematic.pdf


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: RAMPS for Due!
December 18, 2013 06:57PM
I'll get onto the board layout this weekend.

Edited 2 time(s). Last edit at 12/18/2013 06:59PM by Cefiar.
Re: RAMPS for Due!
December 19, 2013 09:55AM
Quote
bobc
#19 change E-STOP buffers to HCT type to always drive FETs at 5V and remove inverting drivers on heater outputs;

If you want to drive the FETs with more than 5V, there are a few "outside the box" options that come to mind. Besides the readily available FET drivers designed for this (which are a bit pricy), it seems that using an op-amp or comparator might work well. You can set the threashold voltage (even make it adjustable based on the I/O rail, if desired), you get inverting or non-inverting drive with the same part, and you could probably even fold E-STOP logic into the threashold level (pull the threashold level to above the logic supply rail, so the comparator is in an known state regardless of the signal input). The venerable LM339 seems like it might work well if you don't need really fast turn-on times (and they're dirt cheap). This would also remove the need for the additional 5V power rail.
Re: RAMPS for Due!
December 19, 2013 06:17PM
The drivers are 30 cents a channel, so that's not really to crazy.

An op-amp is going to be slew rate limited, you will spend more time doing the switch than you would like to. It's also going to be quite slow when driven in and out of saturation at both ends. I'd avoid the op amp.

The 339 comparator is simply an open collector driver. You have a pull up resistor doing the turn on. They have a very limited current capability. You can only make the resistor just so small. That gets you into the same slow transition issue.

These modern FET's have a *lot* of input capacitance. I've used bypass caps that have less capacitance than many of them have. Since part of it is miller effect enhanced, things can get mighty slow with a low power drive. You don't have to spend much time at half voltage / half current to put quite a bit of energy into the FET. Do a few thousand transitions a second and you may need a pretty good heat sink (which I believe we are trying to avoid ...).
Re: RAMPS for Due!
December 19, 2013 07:04PM
The op-amp idea was one I had thought of and discounted as they don't always provide a lot of current. Looking at it, the LM339 can't sink a lot of current (max 16mA) which might be a problem. An LM324 can do about 20mA sink, 40mA source, though not sure that's enough either, especially if we want fast turn-off times (see below). They're also fairly slew limited, which would be an issue.

Even if we did look at an op-amp, an LM339/324 can take 30VDC, I don't really recommend putting it on one of the voltage rails. Apart from the fact that we've got 3 of them (and they won't all necessarily be the same voltage), the gates on the IRLB8743's only take 20V max (from memory). Running it or a driver from the rail that runs VIN is a better choice.

I'd also considered replacing the 12V reg with a 9V reg (7809). This still gives a reasonable voltage for gate drive (much further up the drive elbow than 5V), and is more than adequate for running the Arduino (taking even more voltage drop away from the Arduino regulator under the shield, and thereby reducing heat generation under there - which could eventually be a problem). It also removes the need for the 12/24V jumper, as it'll always be on regardless. It'll require a heatsink if you run it off 24V, but the same was true for the 12V reg. Also, this gives a 3V margin at 12V, so the reg will run reliably (if not, we can always use a 7808 to get an extra volt overhead, at the expense of drive voltage).

Also, we do want (reasonably) fast turn-on times, but we can live with slower turn-off times by adding in a diode reverse biased across the gate drive resistor (anode to the gate, cathode to the drive). When the drive output goes to ground, this gives the gate a higher current back-path, effectively taking the gate resistor out of the loop till the gate is at the diodes forward bias voltage (eg: 0.6v). For even faster switch-off without going to a full gate drive, you can use a PNP switch-off transistor & a diode. This removes the current sink issue, at the expense of dropping the gate voltage by the diode's forward bias value (eg: 0.6v).

FWIW: The biggest issue with drivers is usually the amount of components that have to go around them, I know this isn't always the case, so please remember to take that into account when mentioning costs and usage. It also affects board real-estate.

Edited 2 time(s). Last edit at 12/19/2013 07:10PM by Cefiar.
Re: RAMPS for Due!
December 19, 2013 09:28PM
The Mircochip parts are dual channel drivers. They need normal / already there bypassing. They work fine with a 10 ohm resistor (or no resistor at all) going to the gate. No other extra parts / resistors / capacitors .. nada. Eight pin package to fit in easy on the layout.

The gotcha with any form of open collector / open drain is normally the gate going high rather than the gate going low end of the process. You can't run a 10 ohm pull up resistor to the +12V rail and have a 20ma device pulling it down.
Re: RAMPS for Due!
December 19, 2013 11:39PM
The TC4426ACOA and TC4427ACOA's look reasonable, though the cheapest I can find them for (with availability) is around the $1 mark (so 50c a channel).

Still fairly reasonable, and we'd only end up using 2, or 3 if we really want to use them for driving the DMN2075U's (as overpowered as that is for the job).

Edited 1 time(s). Last edit at 12/19/2013 11:40PM by Cefiar.
Re: RAMPS for Due!
December 20, 2013 04:17AM
The LM339 is rated to 36V, but that doesn't really matter since you'd run it off the FET gate voltage source (8-12 V per the disucssions above), and anything over 20V Vgs is going to kill most FETs anyway. The 339 will also sink 20 mA, which isn't a lot, but seems comparable to previous designs (an AVR I/O pin or a '244 pull-down / 10K resistor pull-up). None of these solutions will work nearly as well as a dedicated monolithic gate driver IC (which will pretty much need no additional components besides bypass caps), but are generally less expensive and the parts are more readily available. In high volume, the gate driver ICs are probably competitively priced, and seem like the way to go if you want fast turn on/off times. Be careful what you wish for, however, as fast turn-off will create huge dI/dT spikes and requires good protection of the FETs (and will be dumping lots of power into your protection diodes). I would actually recommend a series gate resistor and the option to add a Miller capacitor to control the output slew rate if you use a real driver IC capable of sourcing and sinking amps of current into the gate capacitance.
Re: RAMPS for Due!
December 20, 2013 07:24AM
Also, look into Logical Level MOSFET's that turn on most of the way at 4.5V or lower. They can cost a little extra each, but are great for being driven by normal logic levels. If you dig around you can often find some 30V 60+A MOSFET's in the $0.30-$0.60 range in qty (the price does go up quickly in the qty needed for a single 3D printer from some suppliers).
Re: RAMPS for Due!
December 20, 2013 08:06AM
There's a lot of room between the near ms turn on speeds with a weak pull-up resistor and the 10's of ns you might get with an uber driver on the FET. I would not cost reduce the series gate resistor out of the design.

---------------

You have to get to around the 250 piece level to move the price on the chips from the $1.xx to the $0.7x level. I was looking at the volume price earlier. The economics of getting the pc boards made are even worse than that volume wise.
Re: RAMPS for Due!
December 20, 2013 10:44AM
Quote
Cefiar
I'd also considered replacing the 12V reg with a 9V reg (7809). This still gives a reasonable voltage for gate drive (much further up the drive elbow than 5V), and is more than adequate for running the Arduino (taking even more voltage drop away from the Arduino regulator under the shield, and thereby reducing heat generation under there - which could eventually be a problem). It also removes the need for the 12/24V jumper, as it'll always be on regardless. It'll require a heatsink if you run it off 24V, but the same was true for the 12V reg. Also, this gives a 3V margin at 12V, so the reg will run reliably (if not, we can always use a 7808 to get an extra volt overhead, at the expense of drive voltage).

One good reason for keeping the 12v (IMO) is to allow 12V fans to be used with a 24V setup. You can get 24V fans of course, but the 12V ones are cheap and common.

I've been looking into buck converters again, there is a common Chinese module based on MP1584, the module only costs a £1 on ebay so clearly has a cheap BOM, and is quite small, should be good for 2.5A.example here Mini 3A DC-DC Converter Adjustable Step down Power Supply Module


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: RAMPS for Due!
December 20, 2013 10:45AM
Quote
uncle_bob
There's a lot of room between the near ms turn on speeds with a weak pull-up resistor and the 10's of ns you might get with an uber driver on the FET. I would not cost reduce the series gate resistor out of the design.

+1

IMHO, getting the turn of/off times below the uS region is just asking for trouble, and you'll wind up adding back any components you save on the driver side to the output side for dI/dT protection and reducing EMI. An LM339 and some discretes would be cheap and readily available, or quad comparators with push/pull outputs are about $0.50, but less generic. These could easily build a 12V gate drive circuit that would switch faster and better than driving a FET directly from the AVR I/O pin, which seems to have worked fine for the previous RAMPS.
Re: RAMPS for Due!
December 20, 2013 11:38PM
As soon as somebody decides to do PWM at a KHz sort of rep rate, you will very much *not* want a FET that takes 100's of us to turn on and 10's of us to turn off. That's the sort of thing you will get with a weak pull-up design. With some op-amps you could get numbers that are at least as bad.

Edited 1 time(s). Last edit at 12/21/2013 01:43AM by uncle_bob.
Re: RAMPS for Due!
December 21, 2013 08:38AM
I now have a real Arduino Due and I'm seeing problems with the serial port. It would not work right at 250000 baud. The board->host transfer is all right, but host->board is broke, with lots of errors. But the same firmware works fine on my SainSmart Due. I set the UART->UART_BRGR to 21, and this is actually the perfect value, being equal to 84000000/(16*250000). I've also tried baud 218750 (the next slowest rate with no error, for BRGR=24) and this one works.

Has anyone else seen such problems? I suspect the issue is with the atmega16u2 serial converter, most likely its firmware.
Re: RAMPS for Due!
December 21, 2013 09:24AM
This seems to be a common problem reported on the Arduino Due forum. I'm not sure what the solution is though, the recommendation seems to be to use the native USB port. Of course that needs the USB stack on the Due.


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: RAMPS for Due!
December 21, 2013 09:46AM
I've just discovered that the serial problems only appear if the board is connected to the RAMPS-FD, it works all right alone, powered via USB. When it's connected to the RAMPS-FD, it doesn't matter if it's powered via USB or the main power is connected.

Additionally, I've tried reading the firmware from the SainSmart's atmega16u2 and flashing it to the Arduino's (including the fuses), and it didn't fix anything.

Edited 1 time(s). Last edit at 12/21/2013 09:47AM by ambrop7.
Re: RAMPS for Due!
December 21, 2013 10:52AM
I've just tried connecting a Mega with my RAMPS-FD, and it's not working. I've first flashed updated firmware with the right pin configuration, and it boots all right on its own, but as long as the Mega is connected to a RAMPS-FD, it will not boot. The power LED is on but it never starts the firmware.

I've left JP101 in the IOREF position, having verified that my Mega provides 5V on the IOREF pin. The metallic USB connector also needed some electrical tape, else it would cause shorts.

Edited 2 time(s). Last edit at 12/21/2013 10:54AM by ambrop7.
Sorry, only registered users may post in this forum.

Click here to login