1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

USB circuit disconnects when the circuit is put near another surface

Discussion in 'Embedded' started by caagal, Jan 28, 2008.

  1. caagal

    caagal Guest


    I have built a basic circuit for the PIC18f4550 using a 20 MHz crystal
    from http://www.create.ucsb.edu/~dano/CUI/ . I have installed the HID
    firmware from http://www.lvr.com/usb.htm (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

    Any help would be greatly appreciated.

    Best regards

    caagal, Jan 28, 2008
    1. Advertisements

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

    Meindert Sprang, Jan 28, 2008
    1. Advertisements

  3. On Monday, in article
    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, Jan 29, 2008
  4. caagal

    caagal Guest

    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?


    caagal, Jan 29, 2008
  5. caagal

    msg Guest



    Hey Lewin,

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

    msg, Jan 29, 2008
  6. caagal

    Rocky Guest

    Sounds like the reset pin on the PIC is floating..
    Rocky, Jan 29, 2008
  7. caagal

    David Brown Guest

    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.
    David Brown, Jan 29, 2008
  8. caagal

    Tom Guest

    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, Jan 30, 2008
  9. caagal

    Robbo Guest

    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.
    Robbo, Jan 30, 2008
  10. caagal

    caagal Guest

    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.

    caagal, Jan 30, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.