Hello All,
I'm new to PCB design and just created a PCB based on the Arduino Nano schematic. All parts of the PCB work correctly (I have tested the same circuit with a real arduino nano), except uploading code via USB.
My Mac recognizes the PCB as an arduino when I plug it in, as I have successfully burned the bootloader via USBasp. I can also program the PCB with USBasp. However, my PCB needs to communicate with a laptop via USB and when I attempt to upload code through the Arduino IDE, I get the following error:
Using Port : /dev/cu.usbserial-1410
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
My suspicion is the error is somewhere with the CH340C or reset capacitor (C10).
As a side note, I was unable to upload my schematics as I am a new user, so here is a link to them in google drive. I've also added my gerber files and pictures of the PCB.
Other Notes:
- After programming through USBasp, I can still read output on the USB serial line and send input to the PCB (even though USB cannot program the board).
- I have 2 LEDs on pins A2 and A3. When I upload a blink program to them, I can observe the MCU gets reset when programming through USB as the LEDs temporary turn off.
- If I upload a program that counts on the serial line, the error changes and comes in much quicker.
Code:
int x=0;
int delayTime = 1000;
void setup() {
Serial.begin(115200);
pinMode(A2, OUTPUT);
pinMode(A3, OUTPUT);
}
void loop() {
delay(delayTime);
digitalWrite(A2, LOW);
digitalWrite(A3, HIGH);
Serial.println(x);
x++;
delay(delayTime);
digitalWrite(A2, HIGH);
digitalWrite(A3, LOW);
Serial.println(x);
x++;
}
Error:
Using Port : /dev/cu.usbserial-1410
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x0d
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x31
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x0d
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x32
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x0d
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x33
avrdude done. Thank you.
This is my first post on the arduino forum, so please kindly let me know if I have made mistakes in procedure.