Welcome! Log In Create A New Profile

Advanced

How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley

Posted by AndrewBCN 
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 17, 2015 08:06PM
Quote
AndrewBCN
The really critical MOSFET is without any doubt the heatbed one, in my case I have replaced the one that came on my RAMPS clone with a IRLB8743 (as discussed above), which apparently can handle the 10A or so required by the heatbed even when driven by the 3.3V ARM MCU.

Replacing the original mosfet on the RAMPS by that one is a good idea, but I repeat: you are running it out of specification, which is something that no professional electronics engineer would do. From the datasheet, it looks as though it is like to work for a typical device. But typical parameters are just that, and the tolerance on the gate threshold voltage is so large (1.35V to 2.35V) that there will almost certainly be some samples of that mosfet that will get extremely hot when driven like that.

I also repeat my earlier warning: do not upload firmware with 12V power applied, because until the mcu has run Marlin initialisation, all the heaters are likely to be on - and if the upload fails, they will remain on.

This sort of conversion is fine as a one-off hack, but is not how a professional design would interface a Due to the mosfets, making allowance for component tolerances and safety.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 17, 2015 09:49PM
Warning heard and accepted, but I don't think anyone in this thread thinks it's a "professional design". It's an out right hack... But fun to try and tinker with.
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 17, 2015 10:45PM
Dc42's safety concern is quite justified actually, specially for the heatbed MOSFET, and even for our hack.

If the gate voltage is not large enough for the MOSFET to operate in saturation mode, it will operate in linear mode, acting basically as a resistance in series with the heatbed. In saturation mode, the MOSFET for the heatbed has a low Rds, probably below 20mOhm, so it dissipates (I ^ 2 * R) approx. 100 x .02 i.e. < 2W i.e. it will get hot, but a small heatsink and a fan providing good airflow can easily take care of that heat. The problem is if the MOSFET operates in linear mode and its resistance reaches, for example, 100mOhm, it now has to dissipate 10W and that would require a very large heatsink, much larger than we can fit on the RAMPS. If the cooling fails to keep the MOSFET within a reasonable range of temperatures the risk is it will burn and take the RAMPS, the Due, and possibly the rest of the house with it i.e. it could start a fire. hot smiley

In other words, if you are going to use the hacked RAMPS to actually drive a heatbed, either use a MOSFET driver, a 3.3V compatible power MOSFET, or at least make sure that the IRLB8743 you have soldered in operates within safe temperatures. I have an infrared thermometer here that I use to check temperatures of electronic components, it works quite well and it's a very good thing that dc42 reminded me to use it!

I'll try to post a few pictures tomorrow of my setup.
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 01:53AM
Dc42's point about about the mosfets is indeed a very important one. I my earlier messages I forgot to mention that I also replaced the mosfets with IRLB3034, which should work well even with a gate voltage of only 3.3V.

Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 05:19AM
That's a very good choice, from the datasheet it seems the IRLB3034 would not need a heatsink even for the heatbed MOSFET. thumbs up
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 09:04AM
I can't see anything in the datasheet to guarentee that. It only quotes Rds(on) at 4.5V and 10V and I can't see a graph of it against Vgs.

Note you have the terms saturation and linear the wrong way round for a FET. They are opposite compared to a BJT. The current saturates when there isn't enough Vgs and Vds rises, so you want to operate in the linear mode to get the least voltage drop.


[www.hydraraptor.blogspot.com]
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 09:12AM
Quote
nophead
I can't see anything in the datasheet to guarentee that. It only quotes Rds(on) at 4.5V and 10V and I can't see a graph of it against Vgs.

I agree. Again, the graph of typical characteristics suggests that you will typically get away with 3.3V gate drive, but it isn't guaranteed.

For my low-cost 32-bit controller board design, I did a search for mosfets that were guaranteed to work with 3V gate drive. I found some that could handle the current draw of the hot end heaters, but none that could cope with 10A or more for a heated bed. So unless there is a suitable mosfet out there that I failed to find, the choice for a mass-produced design is between using about 3 mosfets in parallel for the heated bed, or using something (e.g. a 74HCT04) to increase the gate drive to 5V.

Edited 1 time(s). Last edit at 04/18/2015 09:17AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 09:24AM
I haven't done a search but I also have never come across one that doesn't need a gate driver for 3.3V. I tend to use just a tiny MOSFET in common gate mode to level change.


[www.hydraraptor.blogspot.com]
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 09:32AM
Quote
nophead
I can't see anything in the datasheet to guarentee that. It only quotes Rds(on) at 4.5V and 10V and I can't see a graph of it against Vgs.

...

Page 3, first two graphs...
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 09:39AM
Quote
dc42
Quote
nophead
I can't see anything in the datasheet to guarentee that. It only quotes Rds(on) at 4.5V and 10V and I can't see a graph of it against Vgs.

I agree. Again, the graph of typical characteristics suggests that you will typically get away with 3.3V gate drive, but it isn't guaranteed.

...

What's the problem here, a case of collective blindness?

You have the curves for VGS=3V on page 3, for T=25 and T=175, in both cases the IRLB3034 can easily switch something like 60A. Even if you derate that for a worst-case MOSFET sample, we should still be well within safe margins with our 10A heatbed.
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 09:40AM
Or you use a 5 dollar solid state relay and put all the mosfet woes behind you ( well most of them) and gain access to using 24 volt for your heated bed.
Even in its standard state with Mega & ramps1.4 taking the 10amp current and potential autofuse/ mosfet issues away from the ramps has to be a good thing right?
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 10:17AM
The graphs show it will pass the current but don't show Rds, so its hard to say how hot it will get without a heatsink.

One can say at 30A it would drop about 0.1V but it would then dissipate 3W, which is too much for TO220 with no heatsink. And they are just typical values. When designing volume electronics you have to use worst case or else you end up without a leg to stand on when you get a big batch or parts that are within spec but not typical.


[www.hydraraptor.blogspot.com]
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 11:43AM
Quote
AndrewBCN
What's the problem here, a case of collective blindness?

You have the curves for VGS=3V on page 3, for T=25 and T=175, in both cases the IRLB3034 can easily switch something like 60A. Even if you derate that for a worst-case MOSFET sample, we should still be well within safe margins with our 10A heatbed.

There is a difference between typical behaviour (which is what the graph shows) and guaranteed behaviour, which takes into account the spread of behaviours of actual devices. The gate threshold voltage is shown in the datasheet as being 1.0V minimum, 2.5V maximum. So the actual minimum gate voltage you need to switch (say) a 10A heated bed without overheating the mosfet will vary between devices over a range of around 1.5V. For some devices, to get the behaviour shown by that 3V curve, you might have to use 3.75V, perhaps even more.

But if you are going to hack a board and use less than the gate drive needed to give guaranteed results, then that mosfet is a better choice than most I have seen.

Edited 1 time(s). Last edit at 04/18/2015 11:46AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 12:58PM
Quote
nophead
The graphs show it will pass the current but don't show Rds, so its hard to say how hot it will get without a heatsink.

Indeed hard to say, so why not try a few IRLB3034's and then find out whether it overheats or not? Oh, wait, that's exactly what enif did!

Quote
nophead
One can say at 30A it would drop about 0.1V but it would then dissipate 3W, which is too much for TO220 with no heatsink. And they are just typical values. When designing volume electronics you have to use worst case or else you end up without a leg to stand on when you get a big batch or parts that are within spec but not typical.

We just need it to switch approx. 10A. If we interpret the curves from the datasheet and derate Rds accordingly when going from Vgs = 4.5V to Vgs = 3.0V we still end up way below 0.003 Ohm i.e. way below 300mW

I'll just point out another detail that makes me say the IRLB3034 is a very good candidate for the present RAMPS4Due experiment: its threshold Vgs actually goes down sharply with temperature.

Now, if we were designing a RAMPS 1.5 to be manufactured in thousands of units, compatible with both the Arduino Mega 2560 and the Arduino Due by just switching a few jumpers (as enif has shown could possibly be done), I guess for the heatbed MOSFET only it would be a good idea to add a single transistor circuit to shift the gate voltage for the IRLB8743, because quite possibly a small percentage of these would cause problems.

Since we are just hacking our $7 RAMPS 1.4 boards by cutting traces and header pins, I think we can afford to go without the driver transistor for now.

Edited 1 time(s). Last edit at 04/18/2015 01:09PM by AndrewBCN.
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 02:50PM
Quote
bigfilsing
Or you use a 5 dollar solid state relay and put all the mosfet woes behind you ( well most of them) and gain access to using 24 volt for your heated bed.
Even in its standard state with Mega & ramps1.4 taking the 10amp current and potential autofuse/ mosfet issues away from the ramps has to be a good thing right?

No doubt about that!
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 03:00PM
Quote
AndrewBCN
Indeed hard to say, so why not try a few IRLB3034's and then find out whether it overheats or not? Oh, wait, that's exactly what enif did!

That doesn't mean that all IRLB3034's will work OK - especially if all the ones he tested came from the same batch, which is very likely if he bought them all at the same time. Buy devices from another batch, and the outcome may be different. There is probably a minority of devices that won't work OK with 3.3V drive - and you won't necessarily get 3.3V anyway, because voltage regulators typically have a 5% tolerance - so it may only be 3.14V

Quote
AndrewBCN
We just need it to switch approx. 10A. If we interpret the curves from the datasheet and derate Rds accordingly when going from Vgs = 4.5V to Vgs = 3.0V we still end up way below 0.003 Ohm i.e. way below 300mW.

NO NO NO! Rds(on) does not derate linearly with gate voltage, it's much steeper than that. Also, with lower gate drive you may run into the current-saturated region before 10A, in which case there is no meaningful Rds(on) value at 10A. Observe how the Rds(on) @ Vgs=45V is quoted at a lower drain current than at Vgs=10V. Finally, the mosfet source soldered joint and associated PCB trace has finite resistance, and if it is e.g. 10 milliohms, then at 10A that's another 0.1V of gate voltage lost.

But I agree that most IRLB3034 mosfets are likely to work OK in that situation. I wouldn't want to rely on it though.

Edited 1 time(s). Last edit at 04/18/2015 03:01PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 03:02PM
You can use any voltage your MOSFET can handle and solve the fuse problem simply by connecting the positive bed lead to the positive of your second supply and common the PSU grounds.

A correctly specified MOSFET driven correctly will always beat a solid state relay on cost and performance.


[www.hydraraptor.blogspot.com]
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 03:34PM
PS - I can point to a couple of specific reasons why these mosfets should not be relied on for switching 10A from an Arduino Due unless they are individually tested:

1. First observe that we cannot rely on 3.3V gate drive, because of tolerance in the Arduino Due voltage regulator, and resistance of the trace connected to the mosfet source line. This is why logic level mosfets are specified at Vgs=4.5V and not Vgs=5V. So let's assume we can only rely on 3.0V gate drive.

From Fig. 3 on the datasheet, we observe that the typical gate threshold voltage is 2.0V @ 25C. But the datasheet says that it may be anywhere between 1.0V and 2.5V. So it may be 0.5V greater than the typical case.

Now look at Fig. 1. We would like to use the 3rd curve from the bottom, which is the curve for 3.0V gate drive. We can see that it drops 0.1V @30A, which implies typical Rds(on) of 3.3milliohms. So far, so good. But that's for a typical device, with 2.0V gate threshold voltage. Now suppose we have a device with the maximum 2.5V gate threshold voltage. To a first approximation, we have lost 0.5V gate drive. So to account for the worst case, we should use the 2.5V curve. That shows that the device would drop about 15V @ 10A! I stress that this only gives a rough idea of the worst case, it is not precise.

One mitigating factor is that if the device does get really hot, the gate threshold voltage drops, and the device starts conducting better to some extent.

2. Given the demand for mosfets that can be driven from 3.3V logic, why hasn't IR given a specification for Rds(on) @ Vgs = 3.0V?

The hot end heater mosfets are less of a problem, because you can get mosfets (at least in SMD packages) that have guaranteed Rds(on) @ 5A drain current and 3V gate drive.

Edited 2 time(s). Last edit at 04/19/2015 05:46AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 18, 2015 10:54PM
Please forgive my limited knowledge of electronic components and principles but id like to understand this more.

I understand that due to the fabrication process the gate threshold maybe as high as 2.5V . I understand that due to voltage regulators /PCB traces etc the gate drive maybe as low as 3V .
The bit i dont get is how that could potentially equate to a 15V drop.??
Thanks

Edited 1 time(s). Last edit at 04/19/2015 05:09AM by bigfilsing.
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 19, 2015 04:29AM
Quote
bigfilsing
Please forgive my limited knowledge of electronic components and principles but id like to understand this more.

I understand that due to the fabrication process the gate threshold maybe as high as 2.5V . I understand that due to voltage regulators /PCD traces etc the gate drive maybe as low as 3V .
The bit i dont get is how that could potentially equate to a 15V drop.??
Thanks

I am looking at fig. 1 on the datasheet at [www.google.co.uk]. Those curves are for a typical device, which we know from Fig. 3 has a gate threshold voltage of close to 2.0V @ 25C. Then I am saying that with 3.0V effective gate drive, we can estimate the effect of gate threshold voltage 0.5V higher than typical by using the 2.5V curve on the typical characteristics instead of the 3.0V curve. The 2.5V curve crosses the 10A line at approximately 15V. This is just an estimate, because we don't know how gate threshold voltage correlates with other characteristics.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 19, 2015 05:40AM
Thanks DC42
One last question then ill stop ...promise
Is there any significance to them in fig 1 ( and other figs) zooming the graph at 1 to 2 volts and 10 to 20 volts
Thanks
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 19, 2015 05:49AM
Quote
bigfilsing
Thanks DC42
One last question then ill stop ...promise
Is there any significance to them in fig 1 ( and other figs) zooming the graph at 1 to 2 volts and 10 to 20 volts
Thanks

They have used logarithmic scales on both axes, so as to cover a wide range of drain-source voltages and drain currents while still showing sufficient detail at the lower end.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 20, 2015 07:47AM
Quote
enif
I followed your instructions to modify a RAMPS board and configured/loaded Marlin4Due on my Arduino Due - and now it is already doing the first test print! So far everything seems to work nicely smiling smiley

I only had one problem, but it was not related to the modifications, but to Marlin4Due, which did not like my X-MAX endstop. It homed ok to the right, but then thought it was at 0, so only allowed going further right, i.e. bumping into the endstop. As it turns out, Marlin4Due seems not to like the "G28 X0" command issued by pronterface for "Home X". But after changing that to "G28 X", it now works fine.

This looks realy nice. The homing-issue is more or less a host-problem. I will make a small fix this evening and filter the '0' when using max endstopps. The problem is that most hosts will send a G28 X0 also when you type G28 X and this will set your endstops to 0.

Edit: Added RAMPS4DUE in my repository. Good work!

Edited 1 time(s). Last edit at 04/20/2015 08:12AM by Wurstnase.


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 20, 2015 11:06AM
I already had the IRLB8743s, but I'll pick up a couple IRLB3034s. I'll add a heatsink.
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 20, 2015 12:46PM
Thanks DC42 appreciate the explanation
What draws me to this is being able to use my silent stepsticks Trinnamic 2100's

I have a Due on order and a couple of back up clone Ramps 1.4 so ill definitely be giving this a go when i get back home in a few days
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 20, 2015 12:56PM
Quote
madmike8
I already had the IRLB8743s, but I'll pick up a couple IRLB3034s. I'll add a heatsink.

Same here, just ordered ten IRLB3034s and a 1.3" OLED I2C 128x64 graphics display. thumbs up
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 20, 2015 04:20PM
Regarding the OLED display, as promised, I have now put the details into a separate thread in the controllers section.
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 21, 2015 02:34AM
@Wurstnase: Thanks for adding RAMPS4DUE to the Marlin4Due repository!
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 24, 2015 02:23AM
SMART RAMPS is designed for due. In the design I also modified standard RAMPS 1.4 to work with Arduino Due. To facilitate debugging, the best also increased EEPROM

[forums.reprap.org]
Re: How to modify a standard RAMPS 1.4 to work with Arduino Due?confused smiley
April 30, 2015 10:53PM
SMART RAMPS

[www.aliexpress.com]


New 32 bit ARM based Motion controller for 3D printers, CNC Machines and Laser cutters. Like Azteeg x5 mini or smoothieboard(no network).
AZSMZ Mini [www.ebay.com] [bancuit.aliexpress.com]
AZSMZ 12864 LCD [www.ebay.com] [bancuit.aliexpress.com] [azsmz.aliexpress.com]
SMART RAMPS [www.ebay.com] [bancuit.aliexpress.com] [azsmz.aliexpress.com]
[www.facebook.com]
Sorry, only registered users may post in this forum.

Click here to login