I have read many posts here and elsewhere, but there seems to be some conflicting information so, as my very first post here, I figured that I would try to learn.
I have a CNC router, running 4 nema stepper motors. The controller is composed of an Uno plugged onto a control board that has 4 motor drivers. The board and the drivers are powered by an external power supply. The Uno is powered by USB from a desktop PC. The CNC is sent code from a gcode sender on the pc, which talks through the same USB cable.
I and many others suffer from frequent disconnects while running projects. Many, many solutions have been proposed, including emi chocks, grounding and baud communication rates. None of this are consistently successful.
Now, finally to my questions. I have been reading that the Uno can reset if the power from the USB drops or fluctuates too much. Can I eliminate this as a problem by plugging in a DC power supply into the barrel jack on the Uno? Will this have any effect on the data signal through the serial/usb port on the PC?
Why don't you use the external power supply also for the Uno?
If the voltage is high enough then the Uno disconnects form the USB power. If a clone does not have that feature then it should not be used to control CNC machine.
With respect to both of you, this conversation is likely why I was a bit confused. I am not talking about sending 5V to the pin. I would be using a wall wart to send 9V to the female barrel jack.
The control board has a female jack into which the power supply plugs. I don't know how I would get a lead from there to the uno' barrel jack. Plus, the power supply is 24V.
Get local help. Soldering wires to boards or barrel connectors is no woodoo. Use a step-down regulator down from 24V to something that the Uno accepts.
Be careful when using the power plug or Vin. Powering through Vin or the power jack means that the Arduino and all peripherals that are on the 5V rail are powered by the onboard 5V regulator. The on board 5V regulator is not heat sinked so will supply limited current before it overheats and shuts down. The amount of current depends on the voltage input to Vin or the power jack. The higher the voltage the less current can by supplied. I would use a buck converter to drop the higher voltage to 5V and connect that to the 5V on the Arduino, bypassing the, weak, 5V regulator. Then the rated current of the DC DC converter is available on the 5V line.
If you are powering just a couple of sensors or small LEDs from the 5V, you are fine with Vin or the jack, just be aware the for heavier currents the on board regulator may not hold up.
Understood and thank you. I think in the short term, I will go with a wall wart to the barrel jack. If this does solve the problem, I will look to your solution as the permanent one. Since there is no guarantee at all that this idea will fix my problem, I'll hold off on soldering and using a step down.
Thank you. Clearly, I need to learn more about what the Uno in my controller is powering. I know for sure that the motors are being powered by the current external 24V power supply. The controller is really not doing anything but powering the motor drivers, so with luck, the Uno is not doing anything to "power" them. All the other power outputs on the controller are coming from the control board, not the Uno. So, with luck, the USB input and/or the 5V barrel jack are only powering the Uno itself.
Thank you. That was more or less a typo. I was just going through my wall warts. I have some 9VDC output and some 12VDC output. Would the 9V be better? They are lower amperage than the 12V. I guess that goes without saying.
The 9V would be my choice. How much current do you need?
An Uno, by itself, needs about 50mA.
Since the 5V regulator is poorly heat sinked the maximum power (Watts) that the regulator will dissipate before overheating and shutting down is about 1W. If you are powering the 5V regulator with 9V, the regulator must drop 9V - 5V = 4V. The max current that can be supplied and stay under 1W dissipation is 1W / 4V = 250mA. 50mA for the Uno 200mA for the rest of the stuff on the 5V rail. With 12 power the max is (12V - 5V) / 1W = 143mA, 50mA for the Uno and 93mA for the rest.
I never use the power jack or Vin. I will use a DC-DC converter (buck converter) to drop the higher voltage to a well regulated 5V and attach that to the 5V pin and so bypassing the weak 5V on board regulator. If you do connect 5V to Vin or power jack the 5V pin, heed what @sterretje said about not powering with USB and the 5V pin at the same time. Some boards are OK with it and some are not. Unless you know, avoid powering with USB and 5V, simultaneously.
Tks, but @sterretje specifically referred to using a USB and 5V to the pin, not the jack. @DrDiettrich seems to be saying that there is no issue using the USB and sending power through the barrel jack.
Am I missing something or is it just that there is no consensus on this?
Yes, my badly worded statement. Vin or power jack is a mistake.
That should be
If you do connect 5V to the 5V pin,
I will edit my post.
You miss little. I made a mis-statement. Powering through Vin or the power jack and USB at the same time is OK. Powering through the 5V pin and USB is not OK on some boards and is on OK on others. Know which you have.