Shop OBEX P1 Docs P2 Docs Learn Events
Prop Plug providing power to unpowered board — Parallax Forums

Prop Plug providing power to unpowered board

karl_34karl_34 Posts: 2
edited 2013-07-02 06:28 in Propeller 1
Hello, I am currently using a Prop Plug as an ftdi adapter to connect a PIC18F's USART to a terminal on a laptop via USB.

This works fine, with the I/O pins connected to the PIC18F (rx/tx) and ground connected to the breadboard.

The problem I am seeing, however, is that when I cut power to the board, but leave the prop plug hooked up to the computer's USB port, the prop plug continues to supply power to the MCU through the I/O pins. This causes certain things like power-on reset of SPI peripherals not to work.

Currently I have placed a series resistor on the prop plug's TX pin to alleviate the issue but I'm not sure that this is the correct solution. Additionally, I'm not sure if this is a known behavior when using a prop plug. The prop plug does not power my project.

Thanks in advance.

Karl

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-07-01 09:03
    I think the problem is fundamental to all ICs. If you turn off one set of ICs connected to ICs that are still powered, some power is capable of migration... causing odd behaviors.

    Having USB ports provide 5V power to one chip creates a host of problems with off conditions. In your case, the FTDI chip is still driving output into the PIC18Fxxx.

    I suppose that having the Prop Plug's ttl serial driven through a buffering chip that can go to a third state when the PIC18Fxxx is off would be ideal.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2013-07-01 09:47
    Hi karl_34;

    Loopy is right on.

    This sort of thing would happen on any serial device, not just the prop-plug.

    When TX from the prop-plug is high current can flow through the Props input pin protection diode to VCC and MAY power up the circuit depending on how much current they draw.

    Adding the series resistor, 10K or 100K, usually can't supply enough current to keep the prop running.

    Duane J
  • karl_34karl_34 Posts: 2
    edited 2013-07-01 11:53
    Thanks for the explanation. Putting a 10k series resistor certainly restores the proper power on reset behavior expected. Is the resistor how this problem is usually addressed? I'm afraid I'm not savvy enough to understand the use of a buffer in Loopy's suggestion.

    To another point is this a sign of a bad design or a necessary evil when interfacing to a pc for USB based serial support, but not powering the circuit via USB.

    Thanks!
    Karl
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-07-01 16:55
    karl_34: Firstly, welcome to the forum.

    As has been said, this is a problem caused in most ICs because of the ESD (static) protection. There are diodes placed to the rails on each I/O pin and another powered chip can therefore attempt to power another unpowered chip. The devil is in the way you have 2 isolated power supplies for different parts of your circuit (propplug vs the rest of your circuit).

    Only real way is to use a series resistor. A 10K works well, but of course this can have an effect on the line depending on the speed it is switching.

    A buffer circuit does not really fix the problem because the buffer will then supply the current.

    Converting the line(s) to open collector style would work as a permanent cure.....

    For the micro powering the propplug...
    On the input pin to the propplug, you place a 10K pullup to power (will be 3v3 in the propplugs case I think) on the input (RXD) pin, and a series diode such as a 1n918 with anode to the RXD pin and pullup, and cathode to the micros circuit.

    For the propplug powering the micro...
    A similar circuit in reverse (pullup on the micro side for its input (TXD on the propplug) with the diode cathode to TXD on the propplug.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-07-01 17:27
    See also this thread for specific suggestions:
    Can-Parallax-do-something-about-the-FTDI-reset-bug?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-07-02 06:28
    Forgive me. I thought some of the bus buffer chips were actually intended to create a hi-Z state so that nothing gets through.

    The 10K resistor solution is certainly far easier to implement.... less wiring involved.
Sign In or Register to comment.