USB 2 Serial Connection

Hey there,

I’m trying to rebuild an Arduino Uno with basic components to get an better understanding of it. I followed the instructions to build an basic Arduino Standalone, which basically works fine for me. But somehow I can’t manage to set up a working USB 2 Serial Connection. Power supply works, but I can’t upload new sketches on my ATmega (I tested ‘Blink’). The Adapter is recognized by my Win7 system and I set Com9 as my serial port. The IDE compiles my sketch, but then tells me it has problems uploading the sketch to the board:
Binary sketch size: 1018 bytes (of a 32256 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I got a Mini USB Adapter (Pinout: see http://arduino.cc/en/Main/MiniUSB) and connect it the following way:
TX Adapter - RXD ATmega (green)
RX Adapter - TXD ATmega (blue)
5V Adapter - Power supply (red)
GND Adapter - GND (black)

What do I have to change to make this work? I attached an image.
Hope you can help me figure it out! Thanks in advance :slight_smile:

picture.jpg

try resetting the arduino right before you upload

I know this procedure, but unfortunately it doesn’t help with my problem :frowning: - same error. Any other ideas? Is my wiring correct?

it could be anything really.try taking it apart and putting it all back together, and use different holes on the breadboard. maybe there are connectivity issues (maybe the crystal?).

Hard to say about the wiring, the picture is very grainy. Can't even tell if the reset pin is connected to the switch. If you measure the voltage on the reset pin, is it at 5v and going to 0 when the switch is pressed?

Yes it is very hard to see and determine if you have the reset pin’s resistor and reset switch wired properly in that picture, my best guess is you might not.

However, reset wired correctly or not, you are always going to be fighting the lack of a auto-reset feature on your layout. The arduino IDE relies on the ablity to automatically reset the board at the correct time to upload a sketch to your layout. Hitting the reset button to accomplish this is not just a matter of hitting the reset button, but rather hitting and releasing it at the correct instance required. If your USB converter module is of the newest ‘revised’ version, they make the DTR signal avalible on one of the pins and if you just connect a .1ufd cap between that DTR signal and your chips reset pin, you will have the same auto-reset feature that all the current arduino boards have.

Thanks for you responses. I rebuilt everything with all new parts (except USB Adapter and ATmega) - same problem).
I took a picture of the new circuit, perhaps you can see the connections better now.
Sorry by the way for the grainy picture quality! I just have my mobile phone camera.

The reset switch is connected right in the first picture, it’s just hidden.

I am trying now the idea of retrolefty - but with an 1uFD cap, as I don’t have an .1uFD. I hope it’ll work :slight_smile:

again.jpg

So if you measure the voltage on the reset pin, is it changing with your switch? I ask because switches like this usually have pins 1/2 and 3/4 connected internally - so you may have pin 1 wired to ground and pin 2 to the reset pin, so the switch is not doing anything.

I tried the auto-reset feature - no luck. Neither with a 1uFD cap, nor with a .1uFD cap (which I built by connecting 10 1uFD in a series).

@CrossRoads: the reset pin works, it restarts my sketch each time I press it (easy to see, as my current sketch lets RGB-LEDs blink in a certain pattern and has an unique beginnig sequence which reoccurs everytime I reset the ATmega).

I really wonder what causes this error. All parts are new (less than a week old), and as I mentioned before, I exchanged almost all of them and nothing changes.

Where did the avr 328 chip come from, that is what bootloader code does it have installed into it?

Lefty

It came right with the Arduino Uno from bausteln.de with an bootloader preinstalled(http://bausteln.de/shop/arduino/arduino-uno.html). How can I figure out which bootloader is preinstalled?

I had an idea what the issue could be: the COMport. My Arduino Uno is on Com9, this device on Com8. For the Uno, I had to delete the drivers and reinstall the ones that came with the arduino package. I just tried doing this with Com8 - no success. I won't accept the drivers that come with the arduino packages. Which driver do I need to install for this USB Adapter? Do you think that could solve the problem?

I finally got it to work!! :D

For anyone with the same issue: I had to switch the wiring.

Initially (not working): TX Adapter - RXD ATmega RX Adapter - TXD ATmega

Now (working): RX Adapter - RXD ATmega TX Adapter - TXD ATmega

It doesn't make sense to me, but it works! I guess the wiring below always needs to be used with the blue USB Mini Adapter (which is featured in no tutorial), whereas the wiring listed above needs to be used with the red breakout chip. Thanks everyone for their help!!