[SOLVED]Arduino Mini wants to sync but fails

SOLVED:
The labeling on my USB to Serial adapter is wrong: So in my setup TX to TX and RX to RX. Name of the adapter: "dfrobot.com USB2Serial Light"
Working setup:

Original post:

Hello!

I have an Arduino Mini, powered and connected by Serial to Usb Adapter to a Windows 8 machine.
My setup: https://goo.gl/photos/prBZd1nLU3GTbncR9
My code I want to upload(I think really irrelevant):

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("Hello World!");
  delay(1000);
}

When I click upload or execute avrdude manually I reset the Arduino. I am sure that I do it correctly because without pressing Reset avrdude can't send anything. The command line output when doing it correctly:

             Using Port                    : COM4
             Using Programmer              : arduino
             Overriding Baud Rate          : 115200
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0xc1
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude.exe done.  Thank you.

Every time I press Reset again after the first time it wants to sync(it counts up to 10 as you can see). I think I am not doing much wrong because the Arduino talks to the computer and wants to sync. But it fails.
Do you know why it fails and how to do it right?

Thanks in advance
RandomByte

I suggest removing that wire you have between R and your 5V rail, and try again.

If you still can't get it to accept a sketch, change Tools, Board to Nano, and try again, just in case it has an older bootloader on it.

Thanks for reply!
https://www.arduino.cc/en/Guide/ArduinoMini#connecting says:

Reset. Whenever this pin is connected to ground, the Arduino Mini resets. You can wire it to a pushbutton, or connect it to +5V to prevent the Arduino Mini from resetting (except when it loses power). If you leave the reset pin unconnected, the Arduino Mini will reset randomly.

I can confirm that: When Reset isn’t connected to “HIGH”(5V) the Reset button doesn’t do anything. Normally when I press and hold it the power supply indicator(?) LED goes black until I release Reset. I think that is the normal behavior. Apart from that arvdude doesn’t receive any sync tries from the Arduino.
Selecting Arduino Nano sadly doesn’t work, too. :-\ arvdude starts(saying where config is etc.) but even doesn’t try to send anything. It was worth a try.

I think I am so close before it works because everything is communicating…

Don't connect Reset directly to 5V. When you do, and you press the reset button, it shorts out the power supply of your FTDI adapter, and that most likely means shorting out your computer's USB power.
The power LED does not need to go out to indicate it is resetting.

I can't tell for sure where you have everything connected from your photo. Does your FTDI adapter have any LEDs which flash when it tries to program?

Google Photos
It has a TX and RX LED. RX flashes three times when uploading(probably the three packets sent by arvdude). When pressing Reset sometimes(quite sure when communicated before with arvdude) both LEDs turn on. So the communication works I think.
How should I connect the Reset pin? I don't think I have do special things because the doc doesn't say so.

The guide you linked, https://www.arduino.cc/en/Guide/ArduinoMini#connecting, shows connecting Reset to DTR of the USB-serial adapter, to provide automatic reset. That is optional. If you get the timing just right with pressing and releasing the reset button, your finger provides the same functionality. You do need to get the timing just right.

If I were in your position, I would go ahead and try the capacitor reset next.

I am a little concerned about the Arduino IDE boards.txt file indicates the Mini should have the optiboot bootloader running at 115200 baud, but in the description on the Arduino web site they say the bootloader takes 2K of flash. Optiboot does not take 2K. Some versions of this may have come with an older bootloader which runs at 57600 and which does take 2K. That is why I had you try the Nano board setting, because it has the older, bigger bootloader running at 57600.

If you have an ISP programmer or another Arduino such as Leonardo or Uno, you could try burning a fresh bootloader on it, and then you would KNOW what baud rate the bootloader is using.

I think it is a matter of timing of the reset, or mismatched bootloader baud rate, which you should be able to try the 2 most likely values by alternating between the Nano and Mini board settings in the IDE. Somebody more experienced than me may offer some more tips.

For the capacitor: Could anything go wrong if I will do this without the 0,1microF capacitor? I think the only purpose of this tiny thing is to delay the reset. That is of course important but maybe it would work. Sadly, my smallest capacitor I have is 2microF which is definitly to big. I thought I could time the reset button press correctly.
The bootloader tips are good! Because I am new at Arduino I don't know these.

The cap's purpose is to help you get the timing right so you don't need to press the reset button. It turns the long-duration DTR signal to a short pulse which resets the Arduino. If you don't use a cap, leave the Reset line of the Arduino unconnected.

If you can't get this going, I recommend setting it aside for a while until you get some experience with Arduinos, and get an UNO to start off with. It has the USB-to-serial and the reset capacitor built-in.

I have found one big issue: On the adapter the jumper was on 3.3V instead of 5V...
But it still doesn't work. I want to try the auto reset. Is 22microF really to big? I only have this at home.
Edit: Couldn't I use a resistor(I have quite a lot) to lower the output of the capacitor?!

I don't believe there is any substitute for the behavior of the 0.1 uF cap. You are not looking to lower the output, you are looking for the behavior of the cap, as it provides the reset pulse. Nick Gammon shows us a pretty neat picture of what the in-line capacitor's pulse looks like compared to the DTR signal, which goes low and stays low during the connection: http://forum.arduino.cc/index.php?topic=145996.0

Ah... Right! A bigger capacitor loads longer. Ok.
Then I will try doing the reset manually. I think 30 tries per day until I have the right capacitor.
Thank you!

I do not understand how you managed to solve your problem, can you please be more detailed. Are you saying the problem was the drivers?

How about using my raspberry pi as an isp programmer? Using Raspberry Pi as an Arduino (AVR) programmer - Lukáš Lalinský describes how to connect the raspberry as a bootloader programmer but I can use the connection to directly program my sketch to the Arduino, can't I?

You were right! The reset pin is definetly not connected in the right way. I just wanted to try to upload a sketch from the raspberry but when I pressed reset the raspberry crashed. Probably because of no energy for the raspberry. Nothing is damaged :slight_smile: .
How should I connect the reset pin? Defintely to 5V but with a resistor in between? How big should the resistor be?

You are very lucky to not burn out your various devices when you keep hooking up that reset pin in various ways and pressing the reset button to short out your power supplies. Do not use a resistor of any size. Use a 0.1uF capacitor. There is no need to ever hook up a resistor to the reset pin. Anything you hook up to the reset pin will be shorted to ground when you press the reset button.

You probably don't need to try shorting out a raspberry pi if you already have the USB to serial adapter recommended for Arduino.

The guide you linked to earlier, https://www.arduino.cc/en/Guide/ArduinoMini, shows how to hook it up and they use a cap in that guide.

Okay. I ordered that capacitor. :slight_smile: So lucky that nothing is damaged! :slight_smile: It should be clearer that you mustn't connect 5V to Reset although it says so in the guide.

I think the wording of the guide could use some improvement in that area. It looks like it was written for previous versions of the Mini which do not have onboard reset button.

What am I doing wrong??? :sob:


Always "programmer is not responding". Then it attempts to do it 10 time again with various responses. Does that mean the Arduino isn't connected right? I think the responses should always be the same. Can I safely connect TX to TX and RX to RX just for testing?

I suggest try selecting on the tools board menu the Uno and if that does not work choose Nano. If one of those selections work and the other does not work it may tell us what baud rate your mini listens for.

When you try to upload, you are on the sketch or file menu and selecting Upload, and not selecting Upload Using Progrrammer, is that correct?

You can also do a loopback test to see if your FTDI adapter is working. To do that, disconnect the FTDI adapter from the board and connect a jumper wire between tx and rx. Open the serial monitor in Arduino IDE and send some characters and they should be repeated back to you. Others on the forum who have more experience may also have some advice.

Also meant to say that wiring looks ok to me. I assume you have plugged in the usb cable although it appears disconnected in the photo.