MBC99
March 8, 2019, 8:48pm
1
Hi there, I'm working on a project to automate my heating system. I have asked several questions here: Arduino Mega on PCB - General Electronics - Arduino Forum and here: Best system for heating automation - General Electronics - Arduino Forum
The situation is that I have assembled the PCB, I've made a basic checking consisting on making sure that all the VCC and GND pins on the Atmega2560 are corectly connected. I'm using an Arduino nano to burn the bootloader.
I've turned on verbose to see the full problem:
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -carduino -PCOM10 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM10
Using Programmer : arduino
Overriding Baud Rate : 19200
AVR Part : ATmega2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x000000 (retrying)
Error quemando bootloader
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Could it be something related to the crystal? I don't understand much from that info, but it seems to me that something is not correct.
I attach photos of the PCB and the connection with the Nano just in case.
MBC99
March 8, 2019, 9:04pm
3
PS: now that I'm seeing the images on the computer I've decided to start clening the board
MBC99
March 8, 2019, 9:19pm
4
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -carduino -PCOM10 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM10
Using Programmer : arduino
Overriding Baud Rate : 19200
AVR Part : ATmega2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)
Error quemando bootloader
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xffffff (probably .avr8x_mega)
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
I've retried and something has changes. Now on device signature it says:
avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)
How does he "probably" know it's this board?
MBC99
March 8, 2019, 9:29pm
5
Wow, by just changing the capacitor of reset pin (In arduino Nano there are two, I thought they did the same) we have made a small step:
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -carduino -PCOM10 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM10
Using Programmer : arduino
Overriding Baud Rate : 19200
AVR Part : ATmega2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Error quemando bootloader
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x837fff
avrdude: Expected signature for ATmega2560 is 1E 98 01
Double check chip, or use -F to override this check.
avrdude done. Thank you.
It gets the device signature but it doesen't match with an Arduino Mega :o
srnet
March 8, 2019, 11:10pm
6
Have you tested the Arduiono Nano as ISP, on another board, so you are sure its working ?
Give the board a clean.
MBC99
March 8, 2019, 11:32pm
7
srnet:
Have you tested the Arduiono Nano as ISP, on another board, so you are sure its working ?
Yes, on an Arduino Uno.
The results are inconsistent. Sometimes the signature is all 0's, sometimes all 1's and sometimes signature that seems right but doesen't mactch an arduino Mega.
srnet:
Give the board a clean.
Done
srnet
March 9, 2019, 8:03am
8
I have seen similar behaviour, random IDs, when the wiring was a bit excesssive. One programmer that normally then works is the Pololu one, you can slow it right down.
Myself I would have attempted to program the Mega when it was the only component on the board, plus the decoupling capacitors. Even the crystal should not be needed (initially) if its a factory fresh Mega.
MBC99
March 9, 2019, 9:27am
9
srnet:
I have seen similar behaviour, random IDs, when the wiring was a bit excesssive. One programmer that normally then works is the Pololu one, you can slow it right down.
Myself I would have attempted to program the Mega when it was the only component on the board, plus the decoupling capacitors. Even the crystal should not be needed (initially) if its a factory fresh Mega.
Thanks.
I've followed your advice and unsoldered all the compoenents that were directly connected top the chip except for the bypass capacitors and the reset circuit. I have also unsoldered the crystal with the same results. The board is not recognised.
One detail though:
I have a Nano and a Uno. The Nano has the old bootloader. So I've decided just to make sure I am trying to burn the bootloader properly to burn a bootloader from the Uno into the nano. The results are similar:
Error quemando bootloader
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x008080
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
avrdude done. Thank you.
srnet
March 9, 2019, 10:04am
10
You can attach a programmer direct to the CPU, if you have the appropriate ZIF socket, yes there are not decoupling caps in this case, but it normally works.
I have used the crude setup below, it works if the Pololu programmer is slowed down to 144khz, but fails at a higher speed.