Arduino Pro Mini - not in sync and reset not working

Hi,
so I am have a weird problem with my arduino. I am trying to create a light organ using FHT - everything worked on a breadboard, so I etched myself a PCB and just got done soldering. Now when I try to upload to the Arduino Pro Mini 328 5V I get the error

avrdude: stk500_getsync(): not in sync: resp=0x00

But not only that, if I press the reset button nothing happens. The red Power-LED is always on, but the green pin-13 LED never. Additionally I can’t get any readings through Serial.print to help me troubleshoot.

As soon as I unplug it from my circuit I can upload without any problems, reset the Arduino and get readings through Serial.print.

What can cause the Arduino to not reset and not be able to upload? Since it works outside the PCB, I guess it has to do with that - but I dont even know what to look for. A short somewhere? Voltage on a programming pin? I have cut off all pins I dont need and protected them so I am not able to connect them by mistake - so what can cause the arduino to

a) not reset
b) not get written onto
c) not Serial.print

For troubleshooting I have:

a) re-uploaded the bootloader
b) rebuilt the circuit on a pcb
c) checked every connection on the pcb

attached is a screenshot of the Eagle-file as well as an image of the soldered circuit. Below the code running on the Arduino.

/*
fht_adc.pde
guest openmusiclabs.com 9.5.12
example sketch for testing the fht library.
it takes in data on ADC0 (Analog0) and processes them
with the fht. the data is sent out over the serial
port at 115.2kb.  there is a pure data patch for
visualizing the data.
*/

#define LOG_OUT 1 // use the log output function
#define FHT_N 256 // set to 256 point fht

#include <FHT.h> // include the library

//LED Pinouts

int ledLow = 2;
int ledMidLow = 3;
int ledMid = 5;
int ledMidHig = 7;
int ledHig = 9;

//Bins to store the max value in

int sumLow = 0;
int sumMidLow = 0;
int sumMid = 0;
int sumMidHig = 0;
int sumHig = 0;

//Bins to change system and for random counter

int switcher = 12;
unsigned long randomNumber = 0;
int counter = 0;
int flag = 0;

void setup() {
    Serial.begin(115200); // use the serial port
    TIMSK0 = 0; // turn off timer0 for lower jitter
    ADCSRA = 0xe5; // set the adc to free running mode
    ADMUX = 0x40; // use adc0
    DIDR0 = 0x01; // turn off the digital input for adc0
    pinMode(ledLow, OUTPUT);
    pinMode(ledMidLow, OUTPUT);
    pinMode(ledMid, OUTPUT);
    pinMode(ledMidHig, OUTPUT);
    pinMode(ledHig, OUTPUT);
    pinMode(switcher, INPUT);
    //randomSeed(64000);
}

void loop() {
  Serial.print("a");
    while(1) { // reduces jitter
        Serial.print("b");
        if (digitalRead(switcher) == HIGH) { // Reads switch and sets switcher value to determine program
            if (flag == 0) {
                counter = (counter + 1) % 2; //increase  % N when new program is available
            }
            flag = 1;
        } else {
            flag = 0;
        }
        
        if(counter == 0) {  // program 1 - Frequency Analyzer
            cli();  // UDRE interrupt slows this way down on arduino1.0
            for (int i = 0 ; i < FHT_N ; i++) { // save 256 samples
                while(!(ADCSRA & 0x10)); // wait for adc to be ready
                ADCSRA = 0xf5; // restart adc
                byte m = ADCL; // fetch adc data
                byte j = ADCH;
                int k = (j << 8) | m; // form into an int
                k -= 0x0200; // form into a signed int
                k <<= 6; // form into a 16b signed int
                fht_input[i] = k; // put real data into bins
            }
            fht_window(); // window the data for better frequency response
            fht_reorder(); // reorder the data before doing the fht
            fht_run(); // process the data in the fht
            fht_mag_log(); // take the output of the fht
            sei();
            //    Serial.write(255); // send a start byte
              Serial.print("c");
            
            int binSize = 14;
            
            for (int i=0 ; i < FHT_N/2 ; i++) {
                //      Serial.print(i); // send out the data
                //      Serial.print(": "); // send out the data
                //      Serial.println(fht_log_out[i]); // send out the data
                
                if (i < 3) {
                    continue;
                }
                else if(i > 2 && i < binSize) {
                    sumLow = max(sumLow, fht_log_out[i]);
                }
                else if (i < binSize * 2) {
                    sumMidLow = max(sumMidLow, fht_log_out[i]);
                }
                else if (i < binSize * 3) {
                    sumMid = max(sumMid, fht_log_out[i]);
                }
                else if (i < binSize * 4) {
                    sumMidHig = max(sumMidHig, fht_log_out[i]);
                }
                else {
                    sumHig = max(sumHig, fht_log_out[i]);
                }
            }
            //    Serial.print(sumLow); // send out the data
            //    Serial.print(" "); // send out the data
            //    Serial.print(sumMidLow); // send out the data
            //    Serial.print(" "); // send out the data
            //    Serial.print(sumMidHig); // send out the data
            //    Serial.print(" "); // send out the data
            //    Serial.print(sumHig); // send out the data
            //    Serial.print("n"); // send out the data
            
            if(sumLow > 80) {
                digitalWrite(ledLow,HIGH);
                } else {
                digitalWrite(ledLow,LOW);
            }
            
            if(sumMidLow > 80) {
                digitalWrite(ledMidLow,HIGH);
                } else {
                digitalWrite(ledMidLow,LOW);
            }
            
            if(sumMid > 80) {
                digitalWrite(ledMidHig,HIGH);
                } else {
                digitalWrite(ledMidHig,LOW);
            }
            
            if(sumMidHig > 80) {
                digitalWrite(ledMidHig,HIGH);
                } else {
                digitalWrite(ledMidHig,LOW);
            }
            
            if(sumHig > 80) {
                digitalWrite(ledHig,HIGH);
                } else {
                digitalWrite(ledHig,LOW);
            }
            
            Serial.print(sumLow); // send out the data
            Serial.print(" "); // send out the data
            Serial.print(sumMidLow); // send out the data
            Serial.print(" "); // send out the data
            Serial.print(sumMid); // send out the data
            Serial.print(" "); // send out the data
            Serial.print(sumMidHig); // send out the data
            Serial.print(" "); // send out the data
            Serial.print(sumHig); // send out the data
            Serial.println("n"); // send out the data
            
            sumLow = 0;
            sumMidLow = 0;
            sumMid = 0;
            sumMidHig = 0;
            sumHig = 0;
            
        }
        
        if(counter == 1) { //program 3 - On
            digitalWrite(ledLow,HIGH);
            digitalWrite(ledMidLow,HIGH);
            digitalWrite(ledMidHig,HIGH);
            digitalWrite(ledHig,HIGH);
        }

        // if(counter == 2) { // program 2 - Random flashing
        //     randomNumber = random(5,150);
        //     Serial.println(randomNumber);
        //     unsigned long int millisCurrent = 0;
        //     unsigned long int millisStart = millis();
        //     Serial.println(millisStart);
        //     while(millisCurrent - millisStart < randomNumber) {
        //         millisCurrent = millis();
        //         //Serial.print(millisCurrent);
        //         //Serial.print(" - ");
        //         //Serial.print(millisStart);
        //         //nothing to do
        //     }
        //     digitalWrite(ledLow,HIGH);
        //     digitalWrite(ledMidLow,HIGH);
        //     digitalWrite(ledMidHig,HIGH);
        //     digitalWrite(ledHig,HIGH);
        //     millisCurrent = 0;
        //     millisStart = millis();
        //     Serial.println(millisStart);
        //     while(millisCurrent - millisStart < randomNumber) {
        //         millisCurrent = millis();
        //         Serial.println(millisCurrent - millisStart);
        //         //nothing to do
        //     }
        //     digitalWrite(ledLow,LOW);
        //     digitalWrite(ledMidLow,LOW);
        //     digitalWrite(ledMidHig,LOW);
        //     digitalWrite(ledHig,LOW);
        // }
    }
}

If you have any idea about the cause of this, please help me, I am getting desperate!

Best regards,

Jakob

How about a schematic showing promini pin names? I see one unrouted wire, looks like you got that covered on the back.

Attached the schematics.

I couldn’t fit the unrouted wire anywhere, so i soldered a wire and made a “flying” connection.

Any idea what could cause the Arduino to not-reset via the reset-button?

Either your shematic, pinout or something else is wrong.

You shorted TX with V-In on the PCB, GND with Reset and maybe something else. After these two errors i stopped searching. Double check the pinout against your schemativ and PCB. Then the failure get fairly obvious.

Edit: I had a look at the picture of the PCB, i see at least one possible short, one bad solder connection, a very dirty board and a lot of holes missing. I do not want so sound mean but i if it were a horse you should get your shotgun. Scrap that whole board, the schematic and give it a fresh start.

NEVER, EVER trust librarys downloadet from the internet. I learned that the hard way, too.

Found the problem. Thank you for your input.