Pages: [1]   Go Down
Author Topic: Cannot upload code to Arduino Mega when connected to external power supply  (Read 1508 times)
0 Members and 1 Guest are viewing this topic.
Denmark
Offline Offline
God Member
*****
Karma: 8
Posts: 546
Please don't send questions as PM!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Denmark
Offline Offline
God Member
*****
Karma: 8
Posts: 546
Please don't send questions as PM!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 116
Posts: 5393
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What voltage are you putting into Vin?
Logged

Denmark
Offline Offline
God Member
*****
Karma: 8
Posts: 546
Please don't send questions as PM!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 116
Posts: 5393
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Denmark
Offline Offline
God Member
*****
Karma: 8
Posts: 546
Please don't send questions as PM!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Denmark
Offline Offline
God Member
*****
Karma: 8
Posts: 546
Please don't send questions as PM!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Good guess Nick smiley

?????
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good guess Nick smiley
Try to reset it again.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 116
Posts: 5393
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!  smiley-eek
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.
« Last Edit: April 09, 2012, 05:11:04 pm by SurferTim » Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 178
Posts: 12288
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Spam.  The miscreant has been removed.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Nice, France
Offline Offline
Full Member
***
Karma: 11
Posts: 234
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: [1]   Go Up
Jump to: