Welcome! Log In Create A New Profile

Advanced

RAMPS and D1 diode

Posted by kreidler 
RAMPS and D1 diode
February 10, 2015 02:49PM
I posted the questions already in the German section but unfortunately without a response up to now.

My RAMPS 1.4 is equipped with a Full Graphic Smart Controller. D1 and D2 are factory soldered on the board. The unit works with and without USB connected to the Arduino. Unfortunately the wiki section for the RAMPS confuses me more than it helps as I am new to reprap.

Therefore some questions:
1. I want to use the PS-ON on the RAMPS for switching the ATX-PSU. I assume that I have to connect additionally the 5V standby from the PSU to the 5V rail located near to the PS-ON. Correct?
2. For the beginning I would like to have USB permanently connected to the Arduino. Later on a raspberry may do the job on the same line. Do I have to remove D1 in this case or does it not matter if the RAMPS supply voltage will be around 12V?
2a. If the diode has to be removed, can I use as a workaround an USB data cable without the 5V connection?

Any comments appreciated.
Matthias
Re: RAMPS and D1 diode
February 10, 2015 04:02PM
Quote
kreidler
1. I want to use the PS-ON on the RAMPS for switching the ATX-PSU. I assume that I have to connect additionally the 5V standby from the PSU to the 5V rail located near to the PS-ON. Correct?

The 5V header where you indicate only will power the servo headers. It won't power the 5V rail in general. Attach the 5VSB and ground wire to a barrel connector and plug that into the Arduino. This will allow you to power the Arduino, and the LCD display, with out having the ATX power supply on. Attach the PS_ON wire to the power supply to the PS_ON pin.

Quote

2. For the beginning I would like to have USB permanently connected to the Arduino. Later on a raspberry may do the job on the same line. Do I have to remove D1 in this case or does it not matter if the RAMPS supply voltage will be around 12V?
Nope. doesn't matter. D1 just connects the 12V input of the RAMPS to the voltage regulator of the Arduino. The only time that you need to remove it is if you're running voltages higher than 12V on the RAMPS input. The Arduino can't handle higher voltage, it'll over heat and cook the regulator.

Quote

2a. If the diode has to be removed, can I use as a workaround an USB data cable without the 5V connection?
If you remove the diode, you have to power the arduino with either the barrel connector or via USB.
Re: RAMPS and D1 diode
February 11, 2015 08:02AM
That's not entirely correct I think.

In the Wiki it says:

Quote

Without D1 installed, or when the 12VIN is not connected, the Arduino gets its power from USB. If you want your kit powered without USB connected you need to solder in D1 OR connect VCC to your PSU.
The VCC pin can be connected to your ATX's 5Vsb to continuously power the Arduino from your ATX power supply. You will want to make sure that D1 is not installed or cut out. The Arduino is not designed to be powered directly on the VCC rail and the VIN pin at the same time.

If you want to use PS_ON to turn on your power supply then don't use diode D1, you need your Arduino to be powered from 5Vsb otherwise when no USB is connected the PS_ON pin floats (and your power supply pulses on and off).

The 3 pins next to the reset button on RAMPS are VCC, PS_ON, and 5V
So disconnect D1, and attach your PSU 5VSB to VCC (this will power your Arduino), attach PS_ON to your power supply PWR_ON, and leave 5V unconnected (unless you need to power servos, in which case you would connect it to the PSU 5V rail (not the 5VSB )).

When you add the RPi you can power that also from 5VSB (no need to disconnect 5VSB from the RAMPS).
Re: RAMPS and D1 diode
February 11, 2015 08:37AM
Quote
cdru
The only time that you need to remove it is if you're running voltages higher than 12V on the RAMPS input. The Arduino can't handle higher voltage, it'll over heat and cook the regulator.

This is a common piece of misinformation. The Arduino is rated for up to 20V input. If you have nothing running from the 5V rail apart from the RAMPS, you can quite safely run the Arduino with 15V input, possibly a little more (but many RAMPS boards have capacitors rated at only 16V).

On the other hand, if you have a 12864 LCD attached to the RAMPS with the backlight powered from the 5V rail, then you are probably overheating the voltage regulator even with 12V input.

Edited 1 time(s). Last edit at 02/11/2015 09:15AM 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: RAMPS and D1 diode
February 11, 2015 11:29AM
Quote
dc42
Quote
cdru
The only time that you need to remove it is if you're running voltages higher than 12V on the RAMPS input. The Arduino can't handle higher voltage, it'll over heat and cook the regulator.

This is a common piece of misinformation. The Arduino is rated for up to 20V input. If you have nothing running from the 5V rail apart from the RAMPS, you can quite safely run the Arduino with 15V input, possibly a little more (but many RAMPS boards have capacitors rated at only 16V).

I'll stop spreading misinformation when Arduino.cc stops putting this on the Arduino Mega 2560 webpage:

Quote

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

Perhaps I should temper my wording to say that may overheat instead of it will. But when Arduino themselves say that it's not recommended to run it over 12V, then I'm going to tend to believe the people that created it.
Re: RAMPS and D1 diode
February 11, 2015 12:26PM
Quote
plankton
Quote

If you want to use PS_ON to turn on your power supply then don't use diode D1, you need your Arduino to be powered from 5Vsb otherwise when no USB is connected the PS_ON pin floats (and your power supply pulses on and off).

The 3 pins next to the reset button on RAMPS are VCC, PS_ON, and 5V
So disconnect D1, and attach your PSU 5VSB to VCC (this will power your Arduino), attach PS_ON to your power supply PWR_ON, and leave 5V unconnected (unless you need to power servos, in which case you would connect it to the PSU 5V rail (not the 5VSB )).

How confident are you that your 5VSB is exactly 5V and you won't draw more current than the Arduino traces can handle? The Vcc pin you are talking to can supply the Arduino, but it bypasses the regulator and is not advised to use. The 3 recommended ways of powering an Arduino are the USB connection (polyfuse protection of 500ma), barrel connector (1A polarity protection diode), and Vin pin (no current protection I believe). The Vin pin is what is connected to D1 on the RAMPS board.
Re: RAMPS and D1 diode
February 11, 2015 01:32PM
Quote
cdru
Perhaps I should temper my wording to say that may overheat instead of it will. But when Arduino themselves say that it's not recommended to run it over 12V, then I'm going to tend to believe the people that created it.

I think the issue is that the guys at Arduino.cc don't know what users will be powering from the 5V rail. Many Arduino users try to power LED displays, LCD displays, relay boards and even motors from the 5V rail. The Arduino.cc guys evidently either think most Arduino users are too stupid to be able to work out the power dissipation in the regulator for themselves, or can't be bothered to explain how to do it. Neither can they be bothered to specify how much current an unloaded Arduino takes, which is necessary to know in order to work out the power dissipation. Instead they have taken the easy option of recommending 12V maximum. But this is an arbitrary figure - even 12V is too much if you put a heavy load on the 5V rail.

I measured the current consumption of an Arduino + RAMPS at 90mA. At 15V input, this gives a power dissipation in the regulator of about 0.8W, which the regulator should be able to handle without difficulty. Given the way the regulator is mounted, I would be comfortable dissipating about 1W in it. I can keep my finger on the top of the regulator, which confirms that it is not overheating. But if you add a 12864 LCD with a current draw of 55mA to an Arduino/RAMPS, then even at 12V input that's 0.9W dissipated in the regulator - more than an unloaded Arduino/RAMPS with 15V input.



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: RAMPS and D1 diode
February 11, 2015 01:58PM
Quote
cdru
How confident are you that your 5VSB is exactly 5V and you won't draw more current than the Arduino traces can handle?

I think the concern is that powering via the 5V pin bypasses the voltage regulator, providing more than 5V could damage the Arduino. Current draw is a function of voltage and resistance, a badly regulated PSU isn't going to "push" more current through the board unless the Arduino has a short (which lowers the resistance).

Quote
cdru
The Vcc pin you are talking to can supply the Arduino, but it bypasses the regulator and is not advised to use. The 3 recommended ways of powering an Arduino are the USB connection (polyfuse protection of 500ma), barrel connector (1A polarity protection diode), and Vin pin (no current protection I believe). The Vin pin is what is connected to D1 on the RAMPS board

Agreed that's what Arduino recommend, but if you want to turn off your power supply with G-code then you need to power the Arduino from 5VSB (unless you use a separate external 12v supply, which rather defeats the purpose), so that's your only choice.

Quote
cdru
Attach the 5VSB and ground wire to a barrel connector and plug that into the Arduino.
Quote
Arduino
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable

So using 5VSB to power the board via the barrel connector is not a good idea.

I think with a good quality modern ATX supply the 5VSB should be well enough regulated (I've not seen any posts suggesting using a smoothing capacitor, or additional regulation, although I suppose that might be an option if you were concerned). I haven't done it yet, but what I posted is the way I plan to do it when I finish my current M90 build (using a new Corsair PSU).


Tim

Printers:
Prusa i3 (plywood box frame)
RAMPS 1.4 and Arduino Mega

Mendel 90 (sturdy)
Smoothieware

My RepRap Blog
Re: RAMPS and D1 diode
February 11, 2015 03:13PM
Quote
dc42
The Arduino.cc guys evidently either think most Arduino users are too stupid to be able to work out the power dissipation in the regulator for themselves, or can't be bothered to explain how to do it.
Judging from the average post here or in an Arduino form, I'd say that the former is more likely. They didn't say that you couldn't use it with higher voltages, just that it's not recommended.

Quote

Neither can they be bothered to specify how much current an unloaded Arduino takes, which is necessary to know in order to work out the power dissipation.
That's like stating how much gas a car uses when it idles. Who cares, because it's not doing anything. You have to load the car and move at a particular speed in order to do something useful. Likewise, an unloaded Arduino just sits there. If it's not calculating something, or controlling pins to do things, it's of no use. And since an Arduino is designed to do whatever the user wants and not some single fixed task, they can't say how much current is the limit. Is it making an LED blink? Or running a LCD display? Or utilizing an Ethernet shield? All 3 things are going to have very different current utilization.

Quote

I measured the current consumption of an Arduino + RAMPS at 90mA. At 15V input, this gives a power dissipation in the regulator of about 0.8W, which the regulator should be able to handle without difficulty. Given the way the regulator is mounted, I would be comfortable dissipating about 1W in it. I can keep my finger on the top of the regulator, which confirms that it is not overheating. But if you add a 12864 LCD with a current draw of 55mA to an Arduino/RAMPS, then even at 12V input that's 0.9W dissipated in the regulator - more than an unloaded Arduino/RAMPS with 15V input.
The spec sheet for the regulator says the maximum power dissipation can be computed, for an ambient air temp of 20C and a thermal pad of 7.5mm square by (150C - 20C) / 120 C/W = 1.08 Watts. So your 90mW + 55mW load running at 15V = 1.45 watts to dissipate, exceeding the maximum unless a heat sink or air flow can help the dissipation. At 12V, the 145mW load has 1.02 watts dissipated, right at the upper limit without additional cooling. If I'm misunderstanding the details behind this, educate me where I'm doing something incorrectly.
Re: RAMPS and D1 diode
February 11, 2015 03:26PM
Quote
plankton
I think the concern is that powering via the 5V pin bypasses the voltage regulator, providing more than 5V could damage the Arduino. Current draw is a function of voltage and resistance, a badly regulated PSU isn't going to "push" more current through the board unless the Arduino has a short (which lowers the resistance).
I would agree on voltage is more a concern than the current, but current shouldn't just be forgotten about. People try to run a servo. Or a motor. Or a fan. Or there's a short. Or... there's many ways that someone might exceed what otherwise would be protected even if it's minimal protection.

Quote

Agreed that's what Arduino recommend, but if you want to turn off your power supply with G-code then you need to power the Arduino from 5VSB (unless you use a separate external 12v supply, which rather defeats the purpose), so that's your only choice.
I power my arduino and rpi with a 5VSB through the barrel connector, as well as have D1 in place so it could get power through the normal 12V input. When my Pi needs to turn on the printer, it sends M80 which grounds the PS_ON pin turning on the ATX power supply giving full power to the Arduino, heated bed, fans, etc. When it's done printing, M81 brings PS_ON high turning off the power supply. The Arduino then resumes running off of 5VSB. The arduino doesn't care if it receives different voltages and both circuits are protected from back feeding one another either by the polarity protection diode for the barrel connection or D1 on the RAMPS board. And since you'd be using a common ground for everything, that's not a problem either.

Quote
cdru
So using 5VSB to power the board via the barrel connector is not a good idea.
The arduino will basically be idling with no real load, so it still works. Once you need it to work under a load, the power supply will have been turned on and 12V will be present.

Hook up your electronics whatever what you want I guess. My RAMPS board came with D1 installed already and there was no need for me to remove it. I had an old barrel connector that worked so I just attached 5VSB to it and it just works.
Re: RAMPS and D1 diode
February 11, 2015 05:25PM
I never expected such a huge discussion about power dissipation and so on. From my background I am able to read electric schemes but most of them I do not understandsmiling smiley

Of course, I wanted to connect the 5VSB to the Vcc pin and not to the 5V pin.
In general as plankton with the Corsair PSU I do not have any supply problems with an 430W Xilence PSU ATX12V 2.3. The 5VSB rail can deliver up to 3A continuous. As per spec the voltage should be within a range of +-5%.

Based on your comments, I learnt a lot. Hopefully enough to unterstand the details:
1. If D1 on RAMPS is installed, 12V supply is connected to RAMPS, these 12V are going directly to the Arduino via Vin into the regulator NCP1117 having fixed output of +5V on at least 6.5V input. Delivering at least 1A.
2. If the Arduino is (additionally) connected through the barrel connector with 5V(SB ) this will end in a regulated voltage less than 5V according NCP datasheet. Nevertheless switching with G codes seems to work.
3. +5V on the Arduino will be supplied either by Vin via! regulator (if D1 installed) or by USBVcc 'via' MosFET T1. Mega2560 scheme
4. If Vcc pin on RAMPS is not connected this pin gets +5V from the Arduino.

So, 'correct' way would be to remove D1 from RAMPS and connecting 5VSB to Vcc on RAMPS. In any case I will give the barrel connector a trywinking smiley.
Any other suggestions?

Edited 1 time(s). Last edit at 02/11/2015 05:26PM by kreidler.
Re: RAMPS and D1 diode
February 12, 2015 03:57AM
Quote
cdru
I power my arduino and rpi with a 5VSB through the barrel connector, as well as have D1 in place so it could get power through the normal 12V input.

Just for my understanding: You are powering the Pi through the Arduino barrel connector only or do you have Micro-USB on the Pi connected to PSU+5VSB also?
Re: RAMPS and D1 diode
February 12, 2015 09:56AM
Quote
kreidler
1. If D1 on RAMPS is installed, 12V supply is connected to RAMPS, these 12V are going directly to the Arduino via Vin into the regulator NCP1117 having fixed output of +5V on at least 6.5V input. Delivering at least 1A.

Yes. The NCP1117 states that the output current limit is at least 1000mA and that if the input voltage is >= 12 volts, that this limit shouldn't be exceeded.

Quote

2. If the Arduino is (additionally) connected through the barrel connector with 5V(SB ) this will end in a regulated voltage less than 5V according NCP datasheet. Nevertheless switching with G codes seems to work.

Correct. I've never have had an issue doing basic "idle" tasks while running on 5V through the barrel connector.

Quote

3. +5V on the Arduino will be supplied either by Vin via! regulator (if D1 installed) or by USBVcc 'via' MosFET T1. Mega2560 scheme

Almost. If 6.6V is supplied via the Vin pin or the barrel connector, then the USB power will be disconnected via T1. 6.6V is determined with the voltage divider dividing the external power in half, then comparing that with a 3.3v reference. If greater than 6.6V is supplied, than the gate is off and the USB power is disconnected. If less than 6.6V is supplied, the gate is on and USB power (if available) is used, ensuring that at least 5V is available based on USB voltage specs. If USB isn't plugged in, then 5V may not be guaranteed.

Quote

4. If Vcc pin on RAMPS is not connected this pin gets +5V from the Arduino.

Correct. Think of that pin more like a 5v power source. Some people have been able to jumper that to the 5V pin below it to power a small servo. Some tiny servos work, others just twitch as it's just not enough power.

Quote

So, 'correct' way would be to remove D1 from RAMPS and connecting 5VSB to Vcc on RAMPS. In any case I will give the barrel connector a trywinking smiley.

If you're confident that your 5VSB is clean enough, and you aren't worrying about overcurrent, yes, that can work. IMHO the barrel connector, even if it's running at 5V is the better approach for our situation.
Re: RAMPS and D1 diode
February 12, 2015 10:39AM
Quote
kreidler
Just for my understanding: You are powering the Pi through the Arduino barrel connector only or do you have Micro-USB on the Pi connected to PSU+5VSB also?
I use an old micro-usb cable that I clipped one end off and just connected the outside two power wires to 5VSB and ground from the ATX power supply. To those same connections I connected the ardiono's barrel connector I clipped from an old wall transformer power supply that was the right size.
Re: RAMPS and D1 diode
February 12, 2015 01:52PM
Quote
cdru
Quote
kreidler
Just for my understanding: You are powering the Pi through the Arduino barrel connector only or do you have Micro-USB on the Pi connected to PSU+5VSB also?
I use an old micro-usb cable that I clipped one end off and just connected the outside two power wires to 5VSB and ground from the ATX power supply. To those same connections I connected the ardiono's barrel connector I clipped from an old wall transformer power supply that was the right size.

Please correct me if I am wrong.
You have a micro-USB cable from 5VSB to RPi and a barrel connector from 5VSB to Arduino. Additionally you have an USB cable between RPi and Arduino.
If the PSU is off (no 12V on Vin) you should be able to remove the barrel connector from the Arduino without any change in system behaviour because the Arduino will be powered with stable 5V from the USB on the RPi and not via the barrel connector.
Re: RAMPS and D1 diode
February 12, 2015 03:16PM
Quote
kreidler
Please correct me if I am wrong.
You have a micro-USB cable from 5VSB to RPi and a barrel connector from 5VSB to Arduino. Additionally you have an USB cable between RPi and Arduino.
If the PSU is off (no 12V on Vin) you should be able to remove the barrel connector from the Arduino without any change in system behaviour because the Arduino will be powered with stable 5V from the USB on the RPi and not via the barrel connector.
Early RPis were not able to output enough power via the USB ports. The RPi's USB ports had 140mA polyfuses and at 100ma, the resistance increased to a point where the voltage dropped to about 4.5V. Add in a USB wifi dongle and you can run out of power on those RPi. You can get around this by using a power USB hub, but the wiring just gets a little complicated and not worth the hassle. You'd still have to power the powered hub so you still have as many power connections, you're just moving where they connect.

Also, I sometimes steal my RPi for other tasks, so you'd still need to have a power source for the Arduino.
Re: RAMPS and D1 diode
February 12, 2015 03:50PM
Thanks, Well understood. I checked out the B+ only. And, of course, if the Pi walks away...
Re: RAMPS and D1 diode
February 12, 2015 05:01PM
Quote
kreidler
Thanks, Well understood. I checked out the B+ only. And, of course, if the Pi walks away...
I'd check out the RPi 2 Model B. Faster processor, more memory, more GPIO, and backwards compatible with earlier models if that's a concern.
Re: RAMPS and D1 diode
May 06, 2015 10:55AM
Hello everyone, I've signed up, and I do not really understand in English (only with google translate). I had already read a few topics in my problem. Unfortunately, the language barrier creates some problems in understanding my problem solutions.

The essence of my problem is that I'm trying to connect to the ATX power supply board RAMPS, so teams worked to M80 and M81.

When I connect from the power supply the green wire to pin PS_ON everything works fine. That is, the power supply and switched on and off. But as soon as I disconnect from the Arduino USB power supply is turned on and begins to supply power, as if I closed the black and green wires. I checked, a short circuit in the power supply or RAMPS no, if somewhere in the circuit. Visually, it's OK.

I read as much as possible to solve this problem. I understand that if you connect the purple wire + 5VSB to pin VCC is the power supply ceases to be included if disabled USB.

But then another problem arises. When USB cable is connected power supply does not respond to the M80 and M81. That is, I connect to the Arduino I see that changing figures on the thermostat but when command M80 nothing happens.

As soon as I disconnect from the + 5VSB pin VCC all starts.

At the moment, I do not use the display and card reader in my printer. Only a direct connection via USB to my laptop or connect to rasbpberry pi + b (not 2 2 has not yet reached to me)

Now RAMPS board works without diode D1, I had sealed-off because one of the options has been said that it is not necessary when connecting PS_ON. But when connected to D1 observed the same problem.

When + 5VSB off and disconnect the USB power supply is started, but D1 he constantly switched on and off. And when connected to + 5VSB power supply is switched off when the USB is included. And when applying commands M80 M81 nothing happens.

I would like to once and for all to understand how to connect to the power supply RAMPS connecting PS_ON if possible with the scheme. Because everything is described on the wiki, but it is not clear what to do if they receive such problems. = (

Here are 4 schemes to what I wrote, if there are problems with the understanding of machine translation =)

1. [goo.gl] +5VSB - disconnect, usb - disconnect = atx work
2. [goo.gl] +5VSB - connect, usb - disconnect = atx standby
3. [goo.gl] +5VSB - disconnect, usb - connect = atx standby, m80/m81 work
4. [goo.gl] +5VSB - connect, usb - connect = atx standby, m80/m81 does not work
Re: RAMPS and D1 diode
May 07, 2015 06:03PM
It turned out the problem with the power supply. I will be watching how to fix it
Sorry, only registered users may post in this forum.

Click here to login