UNO R3 5V Output Current

Hi!

I have read the datsheet on the fantastic Arduino UNO. While you are allowed to draw 50mA at the 3V3-output it says nothing about the 5V-output.

It might suffice to learn if the output is short-circuit protected then I can just try. I do however not wish to destroy my UNO by trying this before asking.

The reason I am asking is that my next small step and idea to begin understanding and using the UNO is to control a RC-servo. A servo that I do not know the maximum current for. But suspect somewhere between 100-200mA. It weighs only 7,5g so it is a very small servo. And it will not be loaded during the test.

A simple way to circumvent this problem would be to use an external power source like a 6V battery pack. It would however look more beautiful in my next Arduino movie if the set is as clean as possible :slight_smile:

Below is my progress so far. And it was not so easy and it really is not so trivial as it may look like. And it sure made my day!

Take care!

Best regards, Roger
PS
Actually, the only "problem" I have had with the UNO so far is the choice of the correct COM port. The real problem with this was however to actually understand the failure notice ("out of sync") and get the idea of trying to change the actual port.

I don't know what the recommendations/guidelines are, but it depends... It mostly depends on the supplied voltage.

The energy dissipated (and heat generated) in the on-board (linear) voltage regulator is determined by the current through it (the Arduino's current plus anything added) times the voltage dropped across it. (Power = Voltage x Current.) i.e. With 7V applied, you have 2 volts dropped across the regulator. With 12V applied you have 7V dropped across the regulator and 3.5 times as much heat generated in the voltage regulator.

It also depends on what's connected to the Arduino. If you have a bunch of LEDs connected and therefore have a lot of current flowing through the Arduino, that adds to the total current through the regulator.

Regulator is spec'ed at 800mA.
You'll only get that much with maybe a 7V source and a good heat sink - reverse polarity drops 0.7V, so that's 6.3V for the regulator to turn into 5. The arduino board design does not provide much heatsinking.
Output is not overcurrent protected. Device will go into thermal shutdown if heat build up is 'slow', and will go up in smoke or worse if not.

I have 2 Uno boards that I use for various projects and testing. I have ran multiple devices through the board at once with no external power source other than my USB cable as you have shown in your video. The only problem I have run into while running devices that suck too much power from the board is that the power to all of the devices, obviously, is like water getting channeled to multiple hoses and you start to run out of water if you have a million hoses and each hose is trying to suck more water than there is supplied. With that being said, these are tough little boards and I have never short circuited any of my boards by drawing power from them or accidentally making a wrong connection.

With that being said, I have found that using a wall wart power supply for my board far more efficient than running it from the USB port alone. USB's, while they can charge a cell phone and power little stuff, are nowhere near as powerful as a standard wall power outlet. If you want your program to run correctly, you must supply enough power to the board so it can power it's bootloader and all your in/outputs.

In the name of Science, I figure with a cheap board, it's not worth worrying about accidentally breaking it. But I wouldn't recommend using that as an excuse to hook it up to a car battery :stuck_out_tongue:

As far as COM ports go, on the Arduino compiler program you can select which COM port you are using out of the list of active COM ports the program sees by going to tools> Serial Port and then select the port you need. That is of course assuming you have installed your USB drivers for the board correctly first.

Thank you all for your nice replies.

For safety reasons as well as economic reasons I think I will use a 6V battery pack for this experiment.

Later on I will however need "no" current beacuse this RC -servo stuff is just me experimenting.

I think the video will turn out nice. Switching the breaker on will make the servo turn fully CW, swithching it off will make it turn fully CCW.

The sport now is however to make this happen in reality.

In the thankfully supplied Blink-routine a delay function is supplied. This function delays in ms. This does however mean that the servo (being supplied by 1-2ms for each end) cannot be turned gradually.

My plan is thus to design a delay function that can generate delays in the 10us-region. I have seen some example of this at Arduino that might make it possible. But I do not know right now how to proceed.

Anyway, my first attemt will be with the supplied delay function and thus generate 1ms/2ms for either end.

Bets regards, Roger

rogerk8:
My plan is thus to design a delay function that can generate delays in the 10us-region. I have seen some example of this at Arduino that might make it possible. But I do not know right now how to proceed.

See delayMicroseconds() in the Language Reference.

OK, so you said the magic word "servo".

The word is - don't even think of powering this from the Arduino regulator even though you may find it described in the "playground" (along with many other Really Bad Ideas).

It is pretty much universally agreed to be a terrible idea.

Power the servo from a 6V battery. Figure out how to power the Arduino from some supply, either greater than 7V through the regulator (with no "dips" below 7V) or from a fully regulated 5V supply via Vcc. The 5V out pulse train will be fine for the servo running from 6V.

Paul__B:
OK, so you said the magic word “servo”.

The word is - don’t even think of powering this from the Arduino regulator even though you may find it described in the “playground” (along with many other Really Bad Ideas).

It is pretty much universally agreed to be a terrible idea.

Power the servo from a 6V battery. Figure out how to power the Arduino from some supply, either greater than 7V through the regulator (with no “dips” below 7V) or from a fully regulated 5V supply via Vcc. The 5V out pulse train will be fine for the servo running from 6V.

Thank you very much for telling me this!

Today I hooked the servo up to a test-bench I have built at work with another project in mind (refridgerator knob control) which suited fine for testing the current peak while the servo is running fully CW to fully CCW.

In spite of the servo being so tiny, the peak current drawn was so high as some 300mA (caught by a Fluke’s peak-and-hold)!

I also brought a 6V battery pack. I then connected it to the servo only while generating TTL-levels to the servo and this worked very well as you so kindly have told me.

I will thus move forward using my 6V battery pack.

Best regards, Roger

Henry_Best:

rogerk8:
My plan is thus to design a delay function that can generate delays in the 10us-region. I have seen some example of this at Arduino that might make it possible. But I do not know right now how to proceed.

See delayMicroseconds() in the Language Reference.

Thank you very much for this!

Best regards, Roger

void setup() {
// initialize the digital pin as an output.
pinMode(13, OUTPUT);
// initialize the digital pin as an input.
// Pin 2 is connected to a button tied to GND with pullup 10K to VCC.
pinMode(2, INPUT);
}

// the loop routine runs over and over again forever:
void loop() {
if (digitalRead(2) == LOW) {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1); // wait for 1ms
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(19); // wait for 19ms
}
else {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(2); // wait for 2ms
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(18); // wait for 18ms
}
}

This is about the first (C-)program "I" have written in my whole life! With the use of the supplied Blink-routine and the "Arduino School" (Lektion 2: Knapp och Lysdiod (del 1) | LAWICEL AB - Blogg) I managed to come up with this program for my servo.

I am however very uncertain that this may work and would have liked to be able to compile it without uploading (because my UNO is unawailable for the moment).

Best regards, Roger
PS
What is the button "Verify" by the way? I do not dare to try it :slight_smile:

rogerk8:
What is the button "Verify" by the way? I do not dare to try it :slight_smile:

When you do upload, it compiles your code and if the compiler did not return an error, it will attempt to upload it to the board. Note, if you hit upload twice, and you haven't modified your source in the mean time, the compile step will be skipped, and the upload will use the results from the last compile.

If you do verify, it just does the compile step, but it does not try to upload the sketch.

If you are writing code and want to get the syntax right but aren't at a state you where it is ready to run yet, you could use verify instead of upload.

Another use is for the microprocessors like the Adafruit Gemma/Trinket. Those processors only have a 10 second or so window where they look for a program being downloaded before executing the stored program. I found that it was very hard to hit the reset button, hit the upload button, and get the compile step done before the microprocessor timed out (the laptop I program on is several years old). So now, I do the verify step, and if there are no errors, hit the reboot button on the Trinket/Gemma, and then hit upload. Since it doesn't do the compile step, it is more likely to start doing the uploading.

Success!

Best regards, Roger

MichaelMeissner:
Another use is for the microprocessors like the Adafruit Gemma/Trinket. Those processors only have a 10 second or so window where they look for a program being downloaded before executing the stored program. I found that it was very hard to hit the reset button, hit the upload button, and get the compile step done before the microprocessor timed out (the laptop I program on is several years old). So now, I do the verify step, and if there are no errors, hit the reboot button on the Trinket/Gemma, and then hit upload. Since it doesn't do the compile step, it is more likely to start doing the uploading.

Do you not just wait until the message "Binary sketch size: xxxx bytes (of a 30720 byte maximum)" appears and tap reset at that moment? That's how you do manual reset with the 1 second timeout bootloaders.

MichaelMeissner:
So now, I do the verify step, and if there are no errors, hit the reboot button on the Trinket/Gemma, and then hit upload. Since it doesn't do the compile step, it is more likely to start doing the uploading.

What IDE are you using? Mine always does the compile whether or not the sketch has been verified.

Henry_Best:

rogerk8:
My plan is thus to design a delay function that can generate delays in the 10us-region. I have seen some example of this at Arduino that might make it possible. But I do not know right now how to proceed.

See delayMicroseconds() in the Language Reference.

I have now tried delayMicroseconds() and it worked out very well, thanks.

I set the pulse width to 500/2500us respectively and that made the servo turn the full 150 degrees.

The most important fact with this is however that the above function works and that I'm now able to control the servo gradually by using a potentiometer and thus learn how to use one of the A/D channels.

Best regards, Roger

Paul__B:
Do you not just wait until the message "Binary sketch size: xxxx bytes (of a 30720 byte maximum)" appears and tap reset at that moment? That's how you do manual reset with the 1 second timeout bootloaders.

I tried that, and for me, it works better using the verify and then upload method, due to my computer setup, where the mouse, keyboard, and the microprocessor are. It may also be that I need a little bit of delay while my Linux system processes the USB event upon connecting, before making the HID device available to the program.

Henry_Best:

MichaelMeissner:
So now, I do the verify step, and if there are no errors, hit the reboot button on the Trinket/Gemma, and then hit upload. Since it doesn't do the compile step, it is more likely to start doing the uploading.

What IDE are you using? Mine always does the compile whether or not the sketch has been verified.

I use the Arduino 1.0.5 IDE on my Fedora Linux 14 Dell D620 laptop that was modified for the Trinket/Gemma system. Note, I select the option to use an external editor, and so I don't use the IDE for anything but compiling and loading the program. It may be that if you use the IDE editor, it always recompiles the code. Or perhaps the Linux system is different from the Windows/Mac systems most people use.

I'm using the IDE editor, V1.05, in Windoze 7. Possibly the reason for the difference.

I have now managed to control my servo linearly :slight_smile:

You may view the progress here

Best regards, Roger