Go Down

Topic: [solved] Chinese arduino mega 2560 cant upload sketch with Win 7 (Read 1 time) previous topic - next topic

31CH

Hi There

So i am trying to upload a sketch to the chinese arduino clone but i always get the avrdude error (see further down). The sketch is the Bilnk example.

Code: [Select]

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch


I installed the chinese driver, i selected the right port, i tried all other ports, i tried to hit the resetbutton at the perfect time (https://www.youtube.com/watch?v=tAzjO4v7oF4), i tried to let go of the reset button at the right time and loads of other stuff like: different cables, different USSB ports, chanche the COM port.

I also tried the serial test, and it failed.
The test works like this. connect the RX0 to the TX0 pin. Open the serial monitor on the right port and just send a letter. afterwards the letter should be sent back by the arduino.

Now the strange part is.
i can upload a sketch from my laptop and never had a problem, the serial test also works on the laptop. Well i also didnt had to install the chinese driver for the serial communication chip (CH340G), i just plugged it in and it worked. The difference is, the laptop runs Win 10 but it also worked with Win 8 some moths ago. But it just wont work on my desktop computer, which runs Win 7.



Desktop System Information

OS Name:                  Microsoft Windows 7 Professional
Version:                      6.1.7601 Service Pack 1 Build 7601
System Manufacturer:  Gigabyte Technology Co., Ltd.
Systemmodell:            Z87-D3HP
Prozessor:                  Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz, 3201 MHz, 4 Kern(e), 4 logische(r) Prozessor(en)







Laptop System Information  

OS Name:                    Microsoft Windows 10 Pro
Version:                      10.0.14393 Build 14393
System Manufacturer: Hewlett-Packard
System Model:            HP EliteBook 8540w
Processor:                   Intel(R) Core(TM) i7 CPU       Q 740  @ 1.73GHz, 1734 Mhz, 4 Core(s), 8 Logical Processor(s)




Since it works on the laptop, i figured the boodloader should be ok, and i didnt reprogram the board.

if there are any questions, dont hesitate and i will try to answer them.
Thanks for the help.



ballscrewbob

#1
Apr 25, 2017, 10:46 pm Last Edit: Apr 26, 2017, 06:06 pm by Ballscrewbob
There is a chance it is the TYPE of USB ports you are using as Arduinos generally do not play well with USB 3.0 ports.

If that is your issue then a POWERED USB 2.0 hub inserted between the computer and the Arduino quite often fixes the problem.

BTW thank you for taking the time to put up a well documented post..it is such a refreshing change from a newbie.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Ogi1167

Your Arduino Mega is Chinese so it could hapen' that your arduino is not called mega... Let me explain... I bought an Arduino for about 10 weeks ago, and i had the same problem, after researching online a bit i saw that my Arduino Nano is actually called Arduino Micro! But its Nano! So go Tools, Board and try all posible boards, meybe it will work, it worked for me! Hopei helped you and good luck with your problem! Also try uploading you Arduino IDE, cause some Chinese arduinos, for some reason, doesn't work with olds IDE

ballscrewbob

@ Ogi1167

The video clearly shows a "MEGA" so there is no need to try all boards.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

31CH

@ Ballscrewbob
Yesss it works. Thanks

I already tried different ports on the front. I have USB3.0 and 2.0 in the front, as well in the back and i tried all in the front. Now i tried USB 2.0 in the back and it works, after installing the driver again.

And thanks for the compliment :)


Joramar

Hi people.

I have a Win7 PC trying to flash chinese ATMEGA2560.

I had in fact 2 boards and both of them failed with the "sync" error.

After many googling leading to bootloaders or 100nF capacitors at the DTR pin or playing with reset button, my solution came by using a much much shorter USB cable.

I changed from 1m to few cms and then everything worked flawlessly. Tested on 2 boards.

I have to say that my USB cable 1m long has no issues with other peripherals but with this chinese ATMEGA.

As a root cause, these chinese boards have a 50 ohm resistor between USB D+/D- and the CH340g pin. I guess this is causing a voltage drop that added to 1m lenght of cable, causes the signal to be too low.

Apparently there's no need for those resistors. They are not in the typical usage in the datasheet of CH340g. I presume they could be shortcircuited but I haven't tested it.

Hope I can save time to anyone who reads this.

ieee488

As a root cause, these chinese boards have a 50 ohm resistor between USB D+/D- and the CH340g pin. I guess this is causing a voltage drop that added to 1m lenght of cable, causes the signal to be too low.


Would you take a photo with your smartphone of the area around the 50 ohm resistor?


.

m4rten

Hi folks !!

i just added a 330µF capacitor to 5V and GND and after that it works fine !! also with 2 extension cables!

hope that helps others!

kind regards


Go Up