odd behavior of AVR-Doper

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Neumaennl
Posts: 15
Joined: Fri Mar 14, 2008 11:24 pm
Location: Munich, Germany
Contact:

Post by Neumaennl » Tue Mar 18, 2008 5:21 pm

um, now that you mention it bad routing could definately be a cause if it can lead to such behavior - that was why I was thinking about re-wiring the beast in the first place...

I'll check for differences in the voltage and if there are none I'll get out my soldering iron again and re-solder that thing with better wires (Klingeldraht statt Litze).
Right now the wiring is kinda messy.

Neumaennl
Posts: 15
Joined: Fri Mar 14, 2008 11:24 pm
Location: Munich, Germany
Contact:

Post by Neumaennl » Tue Mar 18, 2008 10:42 pm

hm, I guess it has to do with the brownout - I just tried to program another ATmega8 using the AVR-Doper and I set the jumper to provide the ISP power supply and when I connected the device to my laptop it was not recognized at all (Gerät wurde nicht erkannt), but when I connected it again to the laptop without the other ATmega8 attached to it, it was recognized again.

So it seems like my laptop is the faulty part in the chain :(

I did however use 3,6V Zener diodes.

Is there any other way I can get the device to work? an external power supply? can I connect it parallel to the USB power? What precautions would I have to take so I don't damage my Laptop?

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Tue Mar 18, 2008 10:50 pm

Don't know whether I understand this correctly. If it works stand-alone, but not when connected to a target which is also connected to a computer, you may have an EMI problem. This particular one is known as the German term "Brummschleife" in analog electronics. Current which flows through (e.g.) the ground wires in a loop.

Blocking capacitors may help. EMI is a complex problem.

Neumaennl
Posts: 15
Joined: Fri Mar 14, 2008 11:24 pm
Location: Munich, Germany
Contact:

Post by Neumaennl » Tue Mar 18, 2008 11:07 pm

ne, ich hab nen andern ATmega8 auf n Steckbrett gesteckt, Quarz und 2 15pF Kondensatoren dazu gesteckt und das dann an den AVR-Doper angeschlossen. Den Jumper für "Provide ISP supply" hab ich gesetzt und dann das ganze Gespann dann an den Laptop angeschlossen (nirgendwo ne externe Stromversorgung)

Da wurde der AVR-Doper dann garnicht mehr erkannt. Wenn ich den Kram auf dem Steckbrett wieder vom AVR-Doper abklemm und ihn alleine an den Laptop anschließe, dann verhält er sich wie zuvor beschrieben.

for the non-german speakers: the AVR-Doper is not recognized when I have another µC connected to it that it should program and the jumper for "provide ISP supply" is set. when there is nothing connected to the AVR-Doper it shows the behavior described before.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Tue Mar 18, 2008 11:19 pm

Still looks like a hardware problem, most likely some kind of EMI (although not "Brummschleife" in this case). I doubt that you exceed the maximum allowed current of the port with two AVRs, unless you have short-circuited some of the outputs of one of the AVRs. The supply is close to 5 V? And you have 100 nF ceramic blocking capacitors in the supply close to both AVRs?

Neumaennl
Posts: 15
Joined: Fri Mar 14, 2008 11:24 pm
Location: Munich, Germany
Contact:

Post by Neumaennl » Tue Mar 18, 2008 11:35 pm

There is a 0.1µF ceramic capacitor between VCC and GND on the AVR-Doper and it is very close to the AVR. I didn't have a capacitor between VCC and GND of the other AVR though, but I have a capacitor between each connector of the quarz and GND - both on the AVR-Doper and the other AVR.
I'll try if it makes a difference if I put a capacitor between VCC and GND of the other AVR, too.

Edit: after adding the capacitor between VCC and GND of the AVR to be programmed, nothing at all happened when I connected the AVR-Doper to the laptop - not even a "device not recognized" message...

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Tue Mar 18, 2008 11:47 pm

Maybe you have the low tech version of a semiconducter: a loose connection.

The "device not recognized" message is generated by the 1.5 k pull-up resistor alone, no processor required. To make it a recognized device, the AVR must respond on the bus.

Neumaennl
Posts: 15
Joined: Fri Mar 14, 2008 11:24 pm
Location: Munich, Germany
Contact:

Post by Neumaennl » Wed Mar 19, 2008 12:00 am

I am such a fool, I had VCC and GND exchanged on the AVR to be programmed. I hope I didn't do any damage - I corrected the mistake, but the described behavior still applies.

The AVR Doper is not recognized when the other AVR is attached to it, but it is recognized when it is alone. AVR Studio also recognizes the AVR Doper in CDC mode as STK500 when the other AVR is not connected to it.

Do you still think it has to do with EMI and not brown out?

Well, the current soldering is kinda messy and I bought better wires today (Klingeldraht), so I'll just re-solder the AVR Doper in the next few days and do it more tidy. I hope that this will help.

I really hope that I didn't do any damage to the 74HC126 or any of the AVRs because of my stupid mistake... :?

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Wed Mar 19, 2008 12:04 am

I think you must have another error such as the swapped supply lines.

Rebuilding the device from scratch will probably get this resolved, since you rarely make the same mistake again. The wire type does not matter, though.

Neumaennl
Posts: 15
Joined: Fri Mar 14, 2008 11:24 pm
Location: Munich, Germany
Contact:

Post by Neumaennl » Wed Mar 19, 2008 9:06 am

There is definately no wiring error on the AVR-Doper - I've checked it so many times...

I don't think the new type of wire will be better for the circuit neither, but "Klingeldraht" is way easier to solder than "Litze" and you can control its path on the PCB much better. That's why I chose it and I hope that this will make a difference because right now the wiring and soldering is kind of crude and there are several lines crossing and the soldering has some bloches that are not very nice. When I redo it, it will be much cleaner because of the other type of wire and I hope that it will work correctly when it's redone.

I think I will have it finished some time on the easter weekend and I'll tell you whether it lead to success or not.

Guest

Post by Guest » Thu Mar 20, 2008 11:13 pm

I think I may have found the reason for the odd behavior:
I am in the middle of re-wiring the AVR-Doper and I noticed that the resistance between VCC and GND on the ISP connector side is not infinite but it is 54kOhm instead - I've made sure that this is not a soldering issue, so I think that the 0.1µF capacitor that is connected to both VCC and GND of the ISP connector may be defect... :?

Neumaennl
Posts: 15
Joined: Fri Mar 14, 2008 11:24 pm
Location: Munich, Germany
Contact:

Post by Neumaennl » Thu Mar 20, 2008 11:17 pm

forgot to log in again :roll:
the post above is from me...

Neumaennl
Posts: 15
Joined: Fri Mar 14, 2008 11:24 pm
Location: Munich, Germany
Contact:

Post by Neumaennl » Sat Mar 22, 2008 12:30 am

ok, I've resoldered everything and it works like a charm :)
the 54kOhm between VCC and GND on the ISP side were not because of a faulty capacitor, but because of the 22kOhm and 33kOhm resistor that are between there :oops: :P took me some time to figure that out :lol:
anyways, I'm happy that it works now and while I'm at my parent's house over the easter holidays I got my father interested in the subject :D

have some nice easter holidays despite the awful weather (at least in Germany it is awful)

Post Reply