Page 1 of 2

Zener diodes at D+ D-

Posted: Tue Jun 05, 2007 11:20 am
by mik
From main page:

"D1 and D2 are a low cost relpacement for a low drop 3.3 V regulator chip, such as the LE33. Operating the AVR at higher voltages exceeds the common mode range of many USB chips. If you need to run the AVR at 5 V, add 3.6 V zener diodes at D+ and D- to limit the voltage."

Why should be the 3.6 V zener diodes ? (not 3.3 V) ? USB data lines work at 3.0 - 3.6 V.

Posted: Thu Jun 07, 2007 2:35 pm
by christian
Zener diodes don't have an ideal characteristic curve. The nominal voltage of 3.6 V is only valid for a certain current. With the 68 Ohm series resisotors, you don't reach this current and the 3.6 V diodes come close to 3.3 V.

Posted: Sun Jun 10, 2007 7:18 pm
by Guest
Just Some Additional Info For you, I tried using 3.6V 1W Zener diodes (Motorola 1N4729A) on D+ and D- and the capacitance was so excessive that it prevented USB communication on an ATMEGA162.
Removing the Diodes works fine.
Using 400mW zeners also works fine.

Bob.

Posted: Sun Jun 10, 2007 10:11 pm
by christian
We recommend the smallest types you can get, which is usually 250 mW. Thanks for posting experimental results with other power ratings!

zener diodes on D+ and D-

Posted: Sat Jul 14, 2007 1:18 pm
by tom
Hi,

How the zener diodes should be installed on D+ and D- lines? Cathode to Vcc and anode to GND? Normally, I mean without any zener diodes, I have 0V on D+. Is it correct? I have message that the computer didn't recognize a device. I've been trying all configuration which you were describing on forum and unfortunately it didn't help.

Please help,
Tom

Posted: Sat Jul 14, 2007 2:24 pm
by christian
Please see the example projects such as e.g. Automator. The circuit diagram is in PDF format, you should have a viewer for that.

zener diodes D+ D-

Posted: Mon Jul 16, 2007 5:16 pm
by tom
Unfortunately, the system still doesn't work. I've mounted two zener diodes 3,6V and it hasn't helped.
To make sure, the main.hex for HidKeys is ready to install to the uC to work on Windows OS, isn't it? I don't know if the problem is related to software or communication, for instance.
I've built the electronic board without any key, but I think it doesn't matter, the problem is with loading drivers.
Please help. what should I check?

Tom

Posted: Mon Jul 16, 2007 5:29 pm
by christian
Please make sure that the AVR is really clocked at 12 MHz. As shipped, the ATMega8 runs on an internal RC oscillator. You must program the fuses for the external crystal oscillator option.

Please run "make fuse" in the project directory to set the fuse values correctly.

diodes zenera on D+ D-

Posted: Mon Jul 16, 2007 7:17 pm
by tom
As I good understand, the below values are correct:
fuse:
$(UISP) --wr_fuse_h=0xc9 --wr_fuse_l=0x9f

If not, could you be so kind correct me.

Sorry for my questions, but I'm already beginner and I'm interested in it.
To change the fuse, is it enough to edit the "makefile", change the "fuse" line to correct value, save the changes and rebuilt the .hex file?

(I use AVR Studio and STK200/300 programmer).

Thanks in advance,
Tom

Posted: Mon Jul 16, 2007 8:34 pm
by christian
No, fuse values are NOT stored in the hex file. They are sent to the device in a separate programming session.

The fuse values distributed with our project should be correct. But you need to program them with "make fuse". You probably have to change the Makefile if you use a different programmer, though.

RC5 and ATmega as HidKeys

Posted: Tue Jul 17, 2007 7:45 pm
by tom
Hi,

The HidKey works properly, the problem was related to incorrect fuse bits.

Have you ever been doing something like HidKey, but a computer is managed through RC5 remote control. I'd like to create a system using the keyboard drivers and one input connected to InfraRed receiver. The uC would have to translate the data from RC 5 remote control for keyboard button codes. In that case it'd be possible to manage a computer using standard RC remote control (Philips) or made by someone.

Thanks for any info in advance.

Tom

Posted: Tue Jul 17, 2007 8:58 pm
by christian
Please look at the projects page. There are two IR remote control to USB keyboard converters in the list of HID devices. None of them uses RC5, though, as far as I remember. But it should be easy to change the code to RC5.

Thanks

Posted: Tue Jul 17, 2007 9:52 pm
by tom
Thank you very much for your help.

KR,
Tom

Posted: Mon Feb 04, 2008 9:21 pm
by Dieter
I have a similar problem with the usbasp programmer. The device gets recognised by Windows, but I get an avrdude error " program enable: target doesn't answer. 0".

I had 1W zeners in at first, but as someone mentioned, they don't work. I replaced them with 350mW zeners, but that did not make a difference.

One thing I noticed, was that the voltage on the zener on pin 2 was 2.2V with the 1W zener. That has gone up to 3V with the smaller zener.

I have checked and rechecked every connection, fuse bits, rewrote firmware with different versions, but to no ovail. Also, the data line on an oscilloscope looks like a triangle when it goes low. I suspect I have too much capacitance on the line, but can't figure out from where.

I hope someone can offer some words of wisdom here...

Posted: Mon Feb 04, 2008 11:00 pm
by christian
If the device is really recognized by Windows, then USB communication must be working. If Windows knows the device name, it was able to read the device descriptor. If it just claims to have an "unknown device", it does not recognize it.

Trapezoid waveforms are OK on the scope, but real triangles which don't go from limit to limit are not OK.