0
\$\begingroup\$

I have a 5V and 12V Super rechargeable Li-ion Battery, and I'm trying to power my Arduino with it. It's an emergency because tomorrow I have to present a robot and it doesn't work.

My Arduino is an Arduino UNO R3, I try connecting the 12V power to the barrel plug in the Arduino. It doesn't work.

I try connecting the 5V power from the battery to the USB port in the Arduino. It doesn't work.

However when I connect the Arduino by the USB to the computer, it works!

Could someone please provide some insight to this problem?

My code is this:

int led[5] = { 3, 4, 5, 6, 7}; // Assign the pins for the leds

int leftChannel = 0;
int left, i;
int Valor1;
int Valor2;
int Valor3;
int Valor4;

void setup()
{
for (i = 0; i < 5; i++)
  pinMode(led[i], OUTPUT);
}

void loop()
{

left = analogRead(leftChannel);
Valor4 = Valor3;
Valor3 = Valor2;
Valor2 = Valor1;
Valor1 = left;


left = left/5;

if (Valor1+Valor2+Valor3+Valor4==0){
   for(i = 0; i < 5; i++)
     {
     digitalWrite(led[i], LOW);

     }
  }

  else
  {
   for (i = 0; i < left; i++) 
    {
     digitalWrite(led[i], HIGH);

    }

    for(i = i; i < 5; i++)  
     {
      digitalWrite(led[i], LOW);
     }
  }
}

I believe it is the serial communication, I have tried connecting a 10k resistor from RX/TX to GND but it doesn't work.

\$\endgroup\$
  • 1
    \$\begingroup\$ When the battery is connected, what voltage is preset on the Vin pin and 5V pin of the Arduino? Since that code contains nothing related to serial communication, I doubt it is the problem. Define "Does not work". \$\endgroup\$ – baldengineer Jul 21 '13 at 18:37
  • 1
    \$\begingroup\$ The Arduino's power jack is center positive; be sure you're not reversing the voltage. \$\endgroup\$ – Nick Williams Jul 21 '13 at 18:42
1
\$\begingroup\$

I would guess you might have had a failure on one of power supply components. Here's the schematic for your board: http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

Here are a few thoughts:

  1. What is the actual voltage on your 5V battery? If it's not fully charged, it may not have enough voltage to keep everything running.
  2. Check the voltage across fuse F1 as you plug in the battery... Perhaps the battery is allowing for a higher inrush current than the USB bus, causing this fuse to open? This doesn't seem likely as there's not that much capacitance on the board, but is easy to check.
  3. It's possible it's not a power supply problem at all... can you clarify what you mean by "it doesn't work"? Does the board appear to power? It could be that you're not properly grounding your serial connection to whatever you're communicating with, and having it plugged into your computer via USB is providing an alternate path for the serial ground and causing serial communications to work. Without more knowledge of what you're communicating with and how it's connected, however, this is nothing more than a wild-ass guess.
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.