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?

migrated from electronics.stackexchange.com May 19 '14 at 15:38

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

10 Answers 10

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.

  • 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.

  • 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
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!

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.

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

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 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. :-)

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.

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

  • Its logical to change a port when you change a board. – RSM Jul 19 '15 at 12:09
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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.