<p>I would not recommend changing Arduino powering.
You can either do as you say and power Arduino by giving it regulated 5V to Vin, but then the ATMEGA2560 still will be powered through the 5V voltage regulator. The voltage regulator (NCP1117ST50T3G) needs to be supplied with 6.5V to give out regulated 5V. So you will be powering the Arduino with some 4V, which might work, but it will be less reliable. But it is electrically safe.</p>
<p>Second option is to power Arduino through it's 5V pin. That is less safe, because the voltage regulator might have an over output-over-voltage-protection that will to load or short-circuit the 5V until it is 5.000V.</p>
<p>Regarding TMC2209. I have not seen any documentation that has any opinion on what order it shall be powered up and down.</p>

CC BY-SA 4.0
2021-02-24T00:31:43.690Z
Why not to just power Arduino via USB (5V), while the RAMPS itself is powered separately using 12V power supply? Doesn't it work this way, when we connect to Arduino from PC to sent G-code commands from a serial terminal? Connecting USB to already working printer is causing a board reset (at least in my case), and I always understood that it is ATMega switching the source of power. Please correct me if I am wrong.
octopus8
CC BY-SA 4.0
2021-02-24T01:44:50.190Z
The Arduino will use 5V from USB, but only if Vin is not used. Yes, that will work. I must admit that Ihave not tested what happens if you actually feed Arduino >5V on either USB or 5V-pin.
dotswe
CC BY-SA 4.0
2021-02-24T01:50:30.523Z
Reason for Arduino's reboot when USB is connected, is that most terminal programs set the pin/signal DTR high when connected. DTR and RTS are used to set the MEGA2560 in flash-mode. It is possible to avoid this, but reflashing will be more difficult.
dotswe
CC BY-SA 4.0
2021-02-24T02:40:06.643Z
Powering the Arduino through the regulator is desirable because it reduce noise from SMPS. This is the only source I've seen about the TMC powering sequence: https://learn.watterott.com/silentstepstick/pinconfig/. I never seen it anywhere else, which is partly why I asked the question
leloctai
CC BY-SA 4.0
2021-02-24T02:59:54.253Z
The link says that permanent damage can happen to the TMC2209 if you remove 12V/24V while the stepper motor is powered (electrical current goes through the coils, but the stepper does not necessarily need to be moving). I agree that this could be a problem. But in the real world I think you will have enough capacitors on the main board that will make the power-loss to be so slow (several milliseconds) that this is not a problem.
dotswe
CC BY-SA 4.0
2021-02-24T03:06:42.960Z
If you want to filter the noisy supply voltage from a SMPS through the linear voltage regulator, so that it outputs a clean 5.00V for the Arduino, you need to accept that it converts some energy to heat. I suggest that you supply Arduino Vin with >7V or leave it driven by the 12V.
dotswe
CC BY-SA 4.0
2021-02-24T10:05:01.800Z
It the second section in that page that I'm mentioning. The problem is separated from back EMF. It's have something to do with the internal regulator of the driver. Some heat is fine, I just want to "perfect" thing as I need a separated 5V source anyway, but you convinced me that 5V is not enough if I'm using the regulator. Need to think again about this, thanks for the answer
leloctai
CC BY-SA 4.0
2021-02-23T22:26:22.373Z
2021-02-23T22:26:22.373Z
dotswe
<p>I'm going to add a Raspberry Pi to my printer, which requires a 5 V source. I want to take this opportunity to also power the Arduino with that same source, as dropping 12 V -&gt; 5 V is a quite big waste. I know the electronics don't consume much power, and the regulator can handle the heat, but why not?</p>
<p>I want to know how can I safely do this. Is it sufficient to just bent the pin from the RAMPS to the Arduino's VIN?</p>
<p>I'm also using TMC2209 stepper drivers. According to this: <a href="https://learn.watterott.com/silentstepstick/pinconfig/" rel="nofollow noreferrer">https://learn.watterott.com/silentstepstick/pinconfig/</a>, these requires the 12 V line to turn on before and turn off after the 5 V.
I wonder if this is true, as I haven't seen this anywhere else.</p>

<electronics><arduino-mega-2650><switching-power-supply><raspberry-pi><ramps-1.6>
How should I connect a separated 5 V source to an Arduino connected to a RAMPS board
leloctai
# How should I connect a separated 5 V source to an Arduino connected to a RAMPS board

(Asked by: username_0 on 2021-02-23)

I'm going to add a Raspberry Pi to my printer, which requires a 5 V source. I want to take this opportunity to also power the Arduino with that same source, as dropping 12 V -> 5 V is a quite big waste. I know the electronics don't consume much power, and the regulator can handle the heat, but why not?

I want to know how can I safely do this. Is it sufficient to just bent the pin from the RAMPS to the Arduino's VIN?

I'm also using TMC2209 stepper drivers. According to this: <https://learn.watterott.com/silentstepstick/pinconfig/>, these requires the 12 V line to turn on before and turn off after the 5 V.
I wonder if this is true, as I haven't seen this anywhere else.

**Tags:** electronics, arduino-mega-2650, switching-power-supply, raspberry-pi, ramps-1.6

---

## 1 answers

### Answer by username_1 on 2021-02-23. Score: 1 | Accepted answer

I would not recommend changing Arduino powering.
You can either do as you say and power Arduino by giving it regulated 5V to Vin, but then the ATMEGA2560 still will be powered through the 5V voltage regulator. The voltage regulator (NCP1117ST50T3G) needs to be supplied with 6.5V to give out regulated 5V. So you will be powering the Arduino with some 4V, which might work, but it will be less reliable. But it is electrically safe.

Second option is to power Arduino through it's 5V pin. That is less safe, because the voltage regulator might have an over output-over-voltage-protection that will to load or short-circuit the 5V until it is 5.000V.

Regarding TMC2209. I have not seen any documentation that has any opinion on what order it shall be powered up and down.

> **Comments:**
> **username_2**: Why not to just power Arduino via USB (5V), while the RAMPS itself is powered separately using 12V power supply? Doesn't it work this way, when we connect to Arduino from PC to sent G-code commands from a serial terminal? Connecting USB to already working printer is causing a board reset (at least in my case), and I always understood that it is ATMega switching the source of power. Please correct me if I am wrong.  
> **username_1**: The Arduino will use 5V from USB, but only if Vin is not used. Yes, that will work. I must admit that Ihave not tested what happens if you actually feed Arduino >5V on either USB or 5V-pin.  
> **username_1**: Reason for Arduino's reboot when USB is connected, is that most terminal programs set the pin/signal DTR high when connected. DTR and RTS are used to set the MEGA2560 in flash-mode. It is possible to avoid this, but reflashing will be more difficult.  
> **username_0**: Powering the Arduino through the regulator is desirable because it reduce noise from SMPS. This is the only source I've seen about the TMC powering sequence: https://learn.watterott.com/silentstepstick/pinconfig/. I never seen it anywhere else, which is partly why I asked the question  
> **username_1**: The link says that permanent damage can happen to the TMC2209 if you remove 12V/24V while the stepper motor is powered (electrical current goes through the coils, but the stepper does not necessarily need to be moving). I agree that this could be a problem. But in the real world I think you will have enough capacitors on the main board that will make the power-loss to be so slow (several milliseconds) that this is not a problem.  
> **username_1**: If you want to filter the noisy supply voltage from a SMPS through the linear voltage regulator, so that it outputs a clean 5.00V for the Arduino, you need to accept that it converts some energy to heat. I suggest that you supply Arduino Vin with >7V or leave it driven by the 12V.  
> **username_0**: It the second section in that page that I'm mentioning. The problem is separated from back EMF. It's have something to do with the internal regulator of the driver. Some heat is fine, I just want to "perfect" thing as I need a separated 5V source anyway, but you convinced me that 5V is not enough if I'm using the regulator. Need to think again about this, thanks for the answer  

---

