USB circuit disconnects when the circuit is put near another surface

Hello,

I have built a basic circuit for the PIC18f4550 using a 20 MHz crystal from

formatting link
. I have installed the HID firmware from
formatting link
(USB complete). The circuit works fine and connects ok then installs the driver as long as it is suspended in free space.

As soon as the circuit comes near ( 2-3 cm) another surface (paper or the wooden table) the usb disconnects. When I investigated I found the voltage on D+ signal line went down from the required 3.1V(approx) to 1.45V as it neared the surface, thus initiating the disconnection.

Connecting just the ground side of an oscilloscope to the ground on the circuit also cured the problem. I have no idea how to modify the circuit to make it more stable. I assume it is interference in the clock signal that is causing the problem, although this is only a guess.

Any help would be greatly appreciated.

Best regards

Mike.

Reply to
caagal
Loading thread data ...

Seems to me there is no ground connection between the PC and the CUI board....

Meindert

Reply to
Meindert Sprang

Yes but caused by an intermittent connection on the ground as the circuit is moved nearer the surface something is flexing, causing an open circuit.

Whenever movement causes a problem I look for intermittent connections or cable breaks.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
              GNU H8 & mailing list info
             For those web sites you hate
Reply to
Paul Carpenter

t info

u hate- Hide quoted text -

Thanks for the advice. However the circuit definately disconnects when something is brought to within approximately 1-2 cm of it. To prove this I clamped the USB plug with the circuit board in free space vertically. With no contact at all with the circuit board and it not moving, a book brought slowly towards the circuit makes it disconnect once it comes within 1-2 cm and reconnects when I take it away.

I have tried swapping the usb cable and measured the resistance of the board ground to the computer end of the usb cable, they are all fine.

I have connected all the ground points shown in the circuit to the ground of the usb supply (pin 4), should there need to be any connection to the usb cable sheath earth? Or does it need to be in a metal box connected to the sheath to stop the stray reflections?

Thanks

Mike.

Reply to
caagal

Hey Lewin,

Remember your thread on the proximity detector in the supermarket freezer island?

Michael

Reply to
msg

..

l
D
)
t

t.

r

ist info

you hate- Hide quoted text -

Sounds like the reset pin on the PIC is floating..

Reply to
Rocky

I always have an independent wire connecting the PC chassis to the ground on a board before connecting either USB or parallel port (e.g., debuggers) to a board. RS-232 connections work fine, but USB and parallel ports are much more affected by ground noise. The extra wire has made a clear difference to the reliability of USB devices in a number of setups.

Reply to
David Brown

Could be that your 20MHz oscillator is barely oscillating. Check the solder connections on both legs of the crystal, and make sure the connections between the crystal and OSC1 / OSC2 are as short as possible and not accidentally connected to ground or to the case of the crystal. Also make sure that you're using the proper type crystal (series / parallel) and the proper load capacitance; something around 18pF should be fine. Also make sure you have the proper oscillator type selected in your config fuses (address 300001), I believe it should be set to HSPLL (bits 3-0 set to 111x) for full speed USB.

--Tom.

Reply to
Tom

Sounds like the reset pin on the PIC is floating..

........or the low voltage program input pin is enabled - I'm not sure about the PIC18f4550, but I had a similar experience with a 'F877.

Reply to
Robbo

al

HID

it

r

und

x)

.
r

ween

're

the

B.

Cracked it! You were right about the poor clock. I had a poor connection on the crystal which I had missed on many checks. Resoldered the crystal and I can now place the circuit board anywhere and it stays connected.

The reflections from a nearby surface must have been just enough to overwhelm it.

Thanks for all the help, I can now spend the rest of the day working out how to use the outputs of the chip. As you have probably guessed these microcontrollers are all brand new to me.

Mike.

Reply to
caagal

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.