6

I have arduino pro mini 5V, 16M ATMega328 and CP2102 USB to TTL. I've wired them like this:

enter image description here

When I try to upload a sketch to the arduino board I'm getting the following error:

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

The board type and the serial port are correct. The sketch also compiles successfully and I've installed the CP2102 drivers. I've noticed that even if I unplug all wires from the arduino board(and just leave the cp2102 connected to the PC), I'm getting the same error again. I'm using Windows 7.

Anyone else encountered the same issue?

Deepsy
  • 157
  • 1
  • 1
  • 5
  • is your cp2102 shown in `lsusb` (linux and mac users) ? or in device manager (in case of windows)? –  May 19 '14 at 14:45
  • @nidhin Yes, it appears http://i.imgur.com/JHaDWbt.png – Deepsy May 19 '14 at 15:00
  • did you try what Nicolas said in his answer? –  May 19 '14 at 15:05
  • @nidhin I tried to press the reset button at the same time as I clicked the upload button. Also I tried to wire the rst pin on the cp2102 to both rst pins on arduino, none worked. – Deepsy May 19 '14 at 15:18
  • 4
    possible duplicate of [Some dude named avr won't let me upload my program, aka "avrdude: stk500\_getsync(): not in sync: resp=0x00"](http://arduino.stackexchange.com/questions/17/some-dude-named-avr-wont-let-me-upload-my-program-aka-avrdude-stk500-getsync) – The Guy with The Hat May 19 '14 at 21:39
  • You should check that your baudrate matches the bootloader on the board (there is one, right? is that a genuine board or a clone?). Also, disconnect the arduino and wire the CP2102's TXD and RXD pins together. Open the arduino serial monitor and type characters; you should either see one copy of what you type with the pins jumpered and none with them open, or else two copies with the pins jumpered and only one with them open. – Chris Stratton Jul 31 '14 at 15:29
  • 1
    Deepsy, I have exactly the same FTDI module and Arduino Mini Pro. Like say Corvin, if you add DTR to GRN, it will work. It's used to reset the arduino to start the bootloader –  Dec 07 '14 at 22:47
  • I had the same error message come up when I had shorted the digital inputs. oops! – Rich St. Onge Jul 04 '15 at 22:31

10 Answers10

6

It's hard to tell from your pictures, but are all the header pins soldered to the boards? If not, they need to be: there's no chance that the proper electrical connections will be made reliably if they're just inserted loosely into the holes.

kwc
  • 161
  • 2
  • 2
    Good spot, I did not see that on the picture at first, but it seems you are right, it looks like pin headers have just been inserted into the holes without any soldering. – jfpoilpret May 19 '14 at 21:00
5

This error means that the program responsible for uploading (avrdude) can not communicate with your arduino.

Did you reset the board just before programming? The reset pin of the arduino seems unconnected in your picture; so the board wouldn't be executing the bootloader when the serial cables expects it to.

Try either to reset the board manually just before programming, or connect the rst pin.

Nicolas D
  • 251
  • 1
  • 1
  • I tried to press the reset button at the same time as I clicked the upload button. Also I tried to wire the `rst` pin on the cp2102 to both `rst` pins on arduino, none worked. – Deepsy May 19 '14 at 15:07
  • Not simultaneously -- you must first do the hardware reset, then try the upload. – Dave Tweed May 19 '14 at 15:30
  • Sometimes it works better with a capacitor in series with the reset pin. I'd start around 0.1µF and try a few different values (it depends on the value of the reset pullup) – Nicolas D May 19 '14 at 15:34
  • @NicolasD Is there a way I can do it without capacitor? I think the arduino is not even connecting to the cp2102, but I don't know how to check. I also tried reseting the board(with the button on it) few seconds before uploading, still getting same error. – Deepsy May 19 '14 at 16:06
  • As @DaveTweed said, you can reset the board, say, half a second before clicking the "upload" button in arduino IDE. The capacitor is just for autmating this. – Nicolas D May 19 '14 at 17:57
  • BTW, Did you use that arduino board already? – Nicolas D May 19 '14 at 17:58
  • I know someone with a similar problem. But his problem is solved with a 1k resistor on both Tx and Rx in series and a 10uF capacitor which is required for arduino devices using the ATmega328 between the reset pin and ground. You could also try a PULLUP resistor on the reset. Which will mean a 10k resistor between the reset and +5V – Handoko Nov 08 '14 at 16:32
3

I solved this problem by connecting DTR signal from USB-converter to the pin which says GRN on the board (the one aside TXD). It was not obvious to find, but seen on ebay some arduino-dedicated-usb-programmer which seemed to be connected this way - so I took the chance. I do not get this error anymore and uploading works every time!!!

Cheers!

Corvin
  • 31
  • 1
1

As some of the other answers have said, you may not have soldered on the header pins. You can't just push them into place and hope for the best. See my Pro Mini:

Arduino Pro Mini

My soldering is reasonably neat, however you can see the solder come through to the other side.

Also see:

A lot of the issues in those threads apply to any Arduino.

Nick Gammon
  • 35,792
  • 12
  • 63
  • 121
1

To solve my sync issue I added a connection from USB serial adapter RST to ProMini DTR pin. I'm using Linux Mint 18 OS with Arduino IDE 1.8.5 - My other Arduino clones (UNO_r3 and Nano) uses the CH340G chip so I knew I had working drivers. Sorry for the picture quality, my old camera and I don't know how to balance LED light bulbs. The pins from USB to ProMini are: (U)GND-(P)GND; (U)3V3-(P)no connection; (U)5V-(P)VCC; (U)TX-(P)TX; (U)RX-(P)RX; (U)RST-(P)DTR. Hope this helps. 73 AB1OP_Ralph

CH340G USB serial adapter to Arduino ProMini

0

{linux}

The solution for me was to set the correct USB port.

I had been previously working with my Uno on USB0.

I could not upload to my nano as I had it connected on USB1

In menu: Serial Port -> /dev/ttyUSB1

ALX
  • 1
  • 1
0

This problem is caused by using the wrong USB cable. I have three cables, two of which work find, and one of which has this issue. The cables with the ferrite bead around them will work. The one cable that I have which works has a braided shield surrounding the conductors, and it is about 2 feet long. I have a 3 foot cable with no bead and no shield that exhibits this issue.

  • 2
    This is a *possibility* but it's a bit of a leap to assert that it is the cause. Typically, as the USB interface is a lot more "delicate" than the serial downstream of it, in a bad cabling situation the USB serial device would fail to enumerate rather than enumerate and stay present but fail to proxy serial data. – Chris Stratton Jul 31 '14 at 15:26
0

I spent hours looking for a solution to the same error message. Everything was correct - Board chosen, COM port, everything.

I switched my TX and RX pins, and connected the tx and rx to each other, instead of them being switched (which I saw from a tutorial). Then I pressed the manual reset, held it down, and uploaded, then released while it read Uploading. It worked.

Hope this helps.

0

I had the exact same problem. I tried installing the IDE on another laptop and uploaded the program from that laptop. Problem solved. Then I came back to my laptop, uninstalled the IDE and re-installed it. It works.

However, I wasn't satisfied because I can't find the source of the problem... so I tried running everything again the same exact way.. I found the problem but am not sure if that can be the actual cause of it.

In my project, I needed to carry out serial communication between Arduino and MATLAB (GUI). In order to see/verify the output(type) of MATLAB (GUI) serial data, I used HYPERTERMINAL and also VIRTUAL SERIAL PORT EMULATOR. I noticed that every time hyperterminal is running or VSPE is running while my serial monitor is on, it screws up the uploading feature of the program. I'm not sure if it's because of the VSPE or HYPERTERMINAL, but reinstalling the IDE worked for me. :-)

Peter Bloomfield
  • 10,842
  • 9
  • 46
  • 87
Hrdip
  • 71
  • 1
  • 1
0

This has happpened to me as well. I had a bluetooth/TTL unit wired to RX/TX, which are the same ports used by the usb connection to the computer (where transfer of the program happens), and all I had to do was disconnect RX to the BT unit when transferring the program.

Roger
  • 21
  • 3