Trouble using arduino without USB

Hi there,

Im just working on a project and want to make it portable without the need of a laptop and USB cord. I've uploaded the simple flashing LED on the arduino board and plugged the USB out ot the arduino. I've hooked up an external 9V battery with an adapter and also tried a 2 AA batteries connected to the Vin and a ground pin.

All i am getting from the arduino itself is the on button on the board is lit green.
Is there anything i need to add to the code before uploading so that it stays on the arduino itself or do i need to boot something on the arduino before i can use it without an external power source.

Best regards to anyone who can help.

Hi there,

Im just working on a project and want to make it portable without the need of a laptop and USB cord. I've uploaded the simple flashing LED on the arduino board and plugged the USB out ot the arduino. I've hooked up an external 9V battery with an adapter and also tried a 2 AA batteries connected to the Vin and a ground pin.

All i am getting from the arduino itself is the on button on the board is lit green.
Is there anything i need to add to the code before uploading so that it stays on the arduino itself or do i need to boot something on the arduino before i can use it without an external power source.

Best regards to anyone who can help.

3 alkaline AAs connected to 5V/Gnd is what you need.

Or 4 rechargeables if they are 1.2V when charged.

3 & 4 AA battery holders available here

Some have an on/off switch.

If you want to use the barrel jack, or Vin, then you need more batteries to overcome the reverse polarity protection diode, and to power the 5V voltage regulator. 6 AAs are enough.

I like using this boost converter set to 5v (connected to Arduino 5v pin) and a 3 alkaline battery holder.

MT3608

You can crank the o/p to 7 or 8v and feed it to Vin.

Thanks for that, didn't think I'd need to add anything else as I can't see any additional part on other peoples projects.

The good thing about using a boost converter is when the battery voltage decrease, due to discharge, the converter holds the output at 5v till the battery voltage goes below 2 volts i.e. for the MT3608.

You can get 10, MT3608 boost converters for about $8.00 USD from eBay.

But as Crossroads has mention there are options . . .

Which Arduino?

retrotouille:
also tried a 2 AA batteries connected to the Vin and a ground pin.

Two AA batteries in series will give you about 3V. The voltage regulator fed by Vin needs at least 6.2v to get 5V out. The power jack has a diode in series so it needs at least 6.8V.
You can use 3 AA cells in series (4.5V) if you connect through the +5V pin. That doesn't go through the regulator so 4.5V is enough. If you go through the Vin pin, use 5 AA cells in series (7.5V).

Do you have a USB power bank to run your arduino with? It's much easier than having to use the weak 9V battery or AA batteries.

retrotouille:
Hi there,

Im just working on a project and want to make it portable without the need of a laptop and USB cord. I've uploaded the simple flashing LED on the arduino board and plugged the USB out ot the arduino. I've hooked up an external 9V battery with an adapter and also tried a 2 AA batteries connected to the Vin and a ground pin.

All i am getting from the arduino itself is the on button on the board is lit green.
Is there anything i need to add to the code before uploading so that it stays on the arduino itself or do i need to boot something on the arduino before i can use it without an external power source.

Best regards to anyone who can help.

Most boards already come with the flashing LED program installed so no need to upload again.
Either way, did the program run while still plugged in to the USB?

retrotouille:
Is there anything i need to add to the code before uploading so that it stays on the arduino itself or do i need to boot something on the arduino before i can use it without an external power source.

If you are using an Arduino with native USB, like the Leonardo or Micro, and you have the required

  while(!Serial){}

after Serial.begin(), you will find that the sketch hangs there if you don't have the Arduino connected to a USB host. You can change it to

  while(!Serial && millis() < 5000){}

to have it continue after five seconds even if no USB host is present.

@retrotouille

TOPIC MERGED.

Do NOT cross post / duplicate !

Could you take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.