Mega working fine when usb powered but not when jack. [solved]

Hi all!.

I´ve mounted a datalogger with a mega 2560, a gps from libellium and a ethernet shield (just for using the sd card).

I´ve got the system up and running ok, reading and saving properly.
When I power the system with the USB cable, system is working fine (I have a led blinking each time a string is saved), and it´s properly blinking. If I connect serial monitor I can see the live values with no problem and, after that, I can retrieve the values from the *.csv file.

BUT!!...

I was packing the system to do some field recordings and when I power the system via the jack (9 v power supply), I have the "ON" led but no blinking led... no readings.. no data. Switch to USB and.. data led starts to blink..

What´s wrong? Is there any bug? I'm puzzled...

Thanks, folks,

L.

9V adapter is underpowered? What is its current rating?
Or,
5V regulator is overdrawn, and is overheating/shutting down? Can your remove some components and see if things work, like the Mega by itself?

Errr... I´ll try... I was using a spare 9V 400 mA power source from a broken router. Tomorrow I´ll try with the lab power source. I haven´t found any overheating and I can see proper green light in the power leds...
I´ll try. Hope this solves the problem...

Thanks,

L

I want todo something similar with an Arduino Mega. How does one monitor the voltage and amperage on the input socket, when using a 9V battery as source?

So long ago, but for closing. I swapped to a 1 Amp power source and everything was fine.

Regarding monitoring input voltage you could use some resistors. with a couple of them you can build a voltage divider, and then get, for instance, half of your battery voltage. Remember that if you apply more than 5V to an input you can fry it easily. Nevertheless this way is not so accurate, 'cause probably your battery is alive with 9 v and dead with 8. This is from 4.5 to 4 using a voltage divider factor 2. And this .5 volts full scale from top charge to fully discharged may be not enough.

In this case you shoud use a slightly more complex circuit, with a zener diode to get a reference, and an amplifier giving you a 0-5 output with this 0.5 v reading.

Sensing current is more or less the same. you should put a (small) resistor in series with your main 9v supply. This resistor makes a small voltage drop, wich is related to the current flowing. Then, amplifier and... ta-da!.

regards,

Luis