Cannot upload code to Arduino Mega when connected to external power supply

Hi.

I got an Arduino Mega from a friend, it's brand new. He owed me one, since i gave him mine, sitting in a RepRap that i sold him.

The new Arduino Mega 1280 i received works perfectly, i just have a single problem - I cannot program it when it's connected to power trough the DC barrel connector or trough the VIN pin - When trying to upload the program the RX LED blinks three times, and i get this message: "avrdude: stk500_recv(): programmer is not responding"

I have tried a Loopback test, connecting RST to Ground and bridging RX and TX pins (0 and 1) there is fine communication over the FTDI chip.

It's not an genuine Arduino board, but looking at the PCB layout it's 100% based on the older Mega design (FTDI based)

Uploading code without external power connected works just fine, and the Arduino works fine and runs my program with external power connected.

Any advice, i cannot seem to find out what is causing the problem.

// Per.

My guess is it's something to do with reset. When externally powered it has already reset itself by the time you go to program it.

Toggling the RST pin resets the Arduino just fine, under USB power or External power.

I guess i have to hook up the Oscilloscope to find out what is going on.

It's just interesting this reset-program is only there when on external power.

// Per.

What voltage are you putting into Vin?

SurferTim:
What voltage are you putting into Vin?

I was using a 12V supply, because i had some exteral stuff connected that needed the 12V supply too.

I have tried connecting an adjustable DC power supply now, and when the voltage on VIN gets over 6,75 volts, the communication stops.

This is really weird!

The 3,3 and 5V voltages on board is within specs.

What is happening ?!

// Per.

I am not sure. There is another thread that involves usb failures and powering the Mega through the +5v pin. Maybe it has the same problem through Vin also?
http://arduino.cc/forum/index.php/topic,82046.0.html

The odd number is 6.75v. If you read that thread, that is about the voltage that disables T2. That is the transistor that provides power to the CPU from the usb port. Maybe the regulator on the Mega Vin is not working?

Well i got fed up and whipped out the oscilloscope and tried some stuff out.

Here is what happens:

When feeding the board a low voltage on VIN the 5V rail looks like this:

And when i turn up the voltage, this happens:

So the voltage regulator and/or Opamp is not happy!

I will try to replace some components and see what happens.

I'll return with my findings.

// Per.

tommtrue:
Good guess Nick :slight_smile:

?????

tommtrue:
Good guess Nick :slight_smile:

Try to reset it again.

Zapro:
Well i got fed up and whipped out the oscilloscope and tried some stuff out.
(snip)
So the voltage regulator and/or Opamp is not happy!

I will try to replace some components and see what happens.

I'll return with my findings.

// Per.

I would guess one or the other is not happy! :astonished:
Let us know what you find.

edit: What time scale are you using there? I can't tell how often that is happening.
Never mind. I just saw the time scale in the lower right corner.

It looks a bit like the voltage regulator is oscillating. I believe there is supposed to be a cap on its output to stop that. Maybe that has failed or they used a cheap or under spec one.

Zapro:

tommtrue:
Good guess Nick :slight_smile:

?????

Spam. The miscreant has been removed.

Oh, rats! So my guess wasn't good?

Zapro:
Well i got fed up and whipped out the oscilloscope and tried some stuff out.

When feeding the board a low voltage on VIN the 5V rail looks like this:

It would be interesting to see similar oscilloscope traces when feeding a range of voltages (5.5V - 12V) into the DC jack. Is the 5V stable or does it oscilate?

I ask because I wonder what is the optimum wallwart voltage to get - 7V? 9V?