Arduino doesnt seem to boot when powered externally

Hi Guys

I indeed googled up that one and someone suggested 10k resistor from rx to tx and I tried , didnt work.

Small programs like Blinking when i Upload to arduino does work when i remove the arduino from usb and connect it to the external power.

I tried NRF2401+ chip with the RF 24 library / getting started example.

This arduino seems to run ONLY if the serial monitor is open else I believe arduino is waiting for the computer to open serial port before it can run.
Because even when i connect the arduino to the USB it does not really start running or send / receive the signals.. immediately after i open the serial monitor, it loads up the welcome message and starts working

I tried to disable all the serial outputs on the command and still I cannot make it run independent of the usb.

Is this library specific or i am doing something wrong here?

Hi

I presume you've got an Arduino Uno and the external power is via the 2.1mm power socket? If not please shout out as the rest of this will be based on that assumption.

paimpozhil:
I indeed googled up that one and someone suggested 10k resistor from rx to tx and I tried , didnt work.

Don't do that. I can't imagine why that was considered a good idea. On the plus since it's not a dead-short you are unlikely to have smoked anything. Rest assured putting a resistor between RX and TX is not a normal requirement - so take that out and maybe don't listen to that someone so much in future :slight_smile:

There is nothing in the Arduino that makes it need a serial connection - unless you make that happen in your code - it's common to use those pins for purposes other than serial comms in fact, or for there to be no serial communication at all in a sketch, as it is with the blinky example you cite.

On the question of the serial monitor being open, the Arduino also doesn't wait for comms to be confirmed so if you don't open the serial monitor and there are Serial.println() etc in your code, they will just happen and be lost if there's nobody/nothing listening. You can send as much as you like without anything connected on the other side and the Arduino is fine with that...unless you code it to do so. Same goes for data sent to the Arduino - unless you're specifically looking for it it will be ignored.

Opening the serial monitor does reset the Arduino though, so your sketch will be restarted as a consequence.

Are you suggesting the blinky LED sketch doesn't start when you run it from external power without the USB plugged in? If so, does the power on LED come on? What you're describing sounds to me to be a power issue with your wall wart.

Cheers ! Geoff

A further thought - if it's not an Arduino Uno but an older model, not all automatically select the power source. I have an Arduino that needs to have a jumper changed to select the power source being the 2.1mm DC jack. An Arduino Uno should (I think all models) auto-select the power source.

Geoff

strykeroz:
A further thought - if it's not an Arduino Uno but an older model, not all automatically select the power source. I have an Arduino that needs to have a jumper changed to select the power source being the 2.1mm DC jack. An Arduino Uno should (I think all models) auto-select the power source.

Geoff

I have UNO R3 :slight_smile:

strykeroz:
Hi

I presume you've got an Arduino Uno and the external power is via the 2.1mm power socket? If not please shout out as the rest of this will be based on that assumption.

paimpozhil:
I indeed googled up that one and someone suggested 10k resistor from rx to tx and I tried , didnt work.

Don't do that. I can't imagine why that was considered a good idea. On the plus since it's not a dead-short you are unlikely to have smoked anything. Rest assured putting a resistor between RX and TX is not a normal requirement - so take that out and maybe don't listen to that someone so much in future :slight_smile:

There is nothing in the Arduino that makes it need a serial connection - unless you make that happen in your code - it's common to use those pins for purposes other than serial comms in fact, or for there to be no serial communication at all in a sketch, as it is with the blinky example you cite.

On the question of the serial monitor being open, the Arduino also doesn't wait for comms to be confirmed so if you don't open the serial monitor and there are Serial.println() etc in your code, they will just happen and be lost if there's nobody/nothing listening. You can send as much as you like without anything connected on the other side and the Arduino is fine with that...unless you code it to do so. Same goes for data sent to the Arduino - unless you're specifically looking for it it will be ignored.

Opening the serial monitor does reset the Arduino though, so your sketch will be restarted as a consequence.

Are you suggesting the blinky LED sketch doesn't start when you run it from external power without the USB plugged in? If so, does the power on LED come on? What you're describing sounds to me to be a power issue with your wall wart.

Cheers ! Geoff

Thanks for your reply.

LED Sketch does start nicely and works when i power with an wallwart.. Power LED is on and the 13 pin LED is blinking which suggests me everything is normal

but with my wireless sketch wont boot, can this still be a problem with power adapter?

More wierdness is that I have 2 UNO R3s with the Nrf24 attached to each and both behave just like this. could this be a problem with my nRf chip? I dont know

Regarding resistor yeah I was lucky.. i didnt wire it directly.

Hi

paimpozhil:
but with my wireless sketch wont boot, can this still be a problem with power adapter?

It doesn't sound likely, but without sharing your wiring and sketch it's hard to know what it is doing. For debugging it's sometimes worth keeping a visual pulse in your project - so using the blink without delay method to have an LED flash every second will let you know the microcontroller is active, even if the rest of the sketch and hardware is not responding the way you expect. That would be my first item to add.

Once you do that you'll know if it has booted, but on the evidence the blinky sketch does what you expect under external power, I think you can presume that the Arduino is all good on a wall wart, and start looking elsewhere for the issue. If the power LED doesn't come on when the wireless hardware is connected this can be an indication you have a short (there's a resettable fuse that will take the power away from the Arduino to protect it). If you have a power LED but the sketch isn't doing what you expect, start from the basics and build it back out until you find the bit that's failing.

And if you get stuck, by all means come back here - but do post your code and a photo of the hardware too.

I do recommend a pulse LED if you have a spare Arduino pin though.
Geoff

Because this was the only topic I found regarding my problem I decided to reply here instead of starting a new topic. I have exactly the same strange behaviour of my Mega2560 board that was described above. I tried three supply configurations:

  1. connected to my laptop (MacAir, able to deliver 500mA on USB port)
  2. connected to USB-Charger (500mA)
  3. connected to external power supply (7.5V 300mA)

When I made tests with the blink programme, all three variants work fine. When I uploaded a programme for the use with RF240 modules via SPI, only 1) works. It has nothing to do with external components because the different behaviour can be reproduced only with the naked board.

I added a blinking led into the main loop of the attached sketch, and indeed: Only connected to the laptop the led starts blinking.

Does anyone have an idea, why there are different boot behaviours?

led_remote.pde (5.42 KB)

  1. Yes, there is surely nothing like that you have to change power supply for UNOs.
    As Strykeroz mentioned that UNO get that automatically, even the older designs were later on shifted to use P type mosfet to switch the supplies between USB and External via dc jack.

  2. Yeah, it obviously doesn't sound likely a normal behavior.
    To my experience, user is doing something wrong in most of the cases rather than hardware being faulty(it occurs but at lesser rate).

As you mentioned that you are having LED blink working fine
=> the time you are not attaching anything external and just running the board by powering it up via USB or the External supply and it is working fine in both ways
=> board is all fine(minute chances or it is very feebly probabilistic that it is having some other hardware issue)

  1. The moment you are attaching this RF chip, what are the conditions of the power led on the board ?
    If it goes off as soon as you attach the RF chip, check for the polarity of Vcc and Gnd and immediately pull the connector off, in case the led turns off.

  2. Try running other basic sketches using the board only hardware like Analog in Serial out etc. to make sure board is running all fine