Hot!Low voltage on I/O pin used for supply

Page: 123 > Showing page 1 of 3
Author
brownt
Junior Member
  • Total Posts : 117
  • Reward points : 0
  • Joined: 2015/11/21 14:58:09
  • Location: 0
  • Status: offline
2017/10/24 04:05:56 (permalink)
0

Low voltage on I/O pin used for supply

Hi,
 
I am using a PIC16F18326, and powering a circuit with an I/O pin (RC0). The PIC is running on 3.3 volts and the IO pin is high and so has 3.3 volts on it, until it is connected to the circuit I want it to power, then it drops to 2.8 volts. It is powering an I2C device drawing 2mA and a SPI device drawing 1mA, and when they are connected to the IO pin, the IO pin voltage drops to about 2.8 volts. The I2C lines and SPI lines are connected to the PIC that is powering it.
 
When the I2C device is powered without the SPI device the voltage drops to 3.0 volts. When the SPI device is powered with out the I2C device, the voltage drops insignificantly, by 0.03volts. When they are both connected it drops to 2.8 volts.
 
Just to recap -
I2C connected - voltage drops to 3.0 volts
SPI connected, voltage drop is insignificant (0.03 volts)
I2C and SPI connected - voltage drops to 2.8 volts.
 
Maybe because the devices being powered are also running their clock and data lines from the powering PIC, the drop is normal, but I wonder why that is.
 
regards
Tim
#1

49 Replies Related Threads

    DarioG
    farewell.
    • Total Posts : 53177
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/24 04:19:55 (permalink)
    0
    Shouldn't happen, yeah: I did that some many times...
    I just added some decoupling, say a 10ohm resistor in series and a 470n / 1uF cap in parallel: might help.

    forget about me, subhumans. adieu

    #2
    qhb
    Superb Member
    • Total Posts : 6257
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/24 04:43:03 (permalink)
    +3 (3)
    Specification D370 in the datasheet says the Voh will be within Vdd - 0.7 at an output current of 6mA.
    You are seeing a voltage drop of 0.5V at 3mA, so it's not out of spec.
    You really should use an external FET if you need a lower voltage drop.
     
    #3
    coffee critic
    Super Member
    • Total Posts : 161
    • Reward points : 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/24 08:50:21 (permalink)
    0
    What are you using for the pullup resistors on the clock and data lines for the I2C device? 

    n_*$
    #4
    brownt
    Junior Member
    • Total Posts : 117
    • Reward points : 0
    • Joined: 2015/11/21 14:58:09
    • Location: 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/24 14:02:10 (permalink)
    0
    4.7K  pullups.
    When powered directly from a 3.3 volt supply there is a 0.5 volt drop across the pullups.
    When powered from the IO pin, there is a 1.0 volt drop across the pullups.
    #5
    coffee critic
    Super Member
    • Total Posts : 161
    • Reward points : 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/24 15:12:05 (permalink)
    0
    I kinda expected the opposite result but any case it looks like there is not enough info without the characteristic  graphs in chapter 36.  The graphs are complete in the data sheet for 16F18323 which should be close.  Figure 36-35: has VOH/IOH at 3.0V.   

    n_*$
    #6
    brownt
    Junior Member
    • Total Posts : 117
    • Reward points : 0
    • Joined: 2015/11/21 14:58:09
    • Location: 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/24 17:13:01 (permalink)
    +1 (1)
    Do you mean inline with the IO pin supplying the I2C device? and then a cap from there to ground? I'm not sure what the cap would do, but the resistor would create a voltage drop, wouldn't it?
    #7
    brownt
    Junior Member
    • Total Posts : 117
    • Reward points : 0
    • Joined: 2015/11/21 14:58:09
    • Location: 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/24 17:20:03 (permalink)
    0
    That's done the trick. I assume you meant a current buffer, like in the attached picture "FET current buffer". Now there is hardly any voltage drop.
     
     
     
    post edited by brownt - 2017/10/24 17:53:15

    Attached Image(s)

    #8
    DarioG
    farewell.
    • Total Posts : 53177
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/25 01:55:29 (permalink)
    0
    Of course a buffer is better Smile But from my experience (with some PIC18 and 24, at more or less the same current drain, I did not see that issue).
     
    As for the filtering, it was meant for preventing oscillations and alike. The small resistor would not drop anything significant at this current rate.

    forget about me, subhumans. adieu

    #9
    qhb
    Superb Member
    • Total Posts : 6257
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/25 02:19:34 (permalink)
    +1 (1)
    brownt
    That's done the trick. I assume you meant a current buffer, like in the attached picture "FET current buffer". Now there is hardly any voltage drop.

    The first diagram is incorrect, and the second one is switching the low side.
    If low side switching is acceptable, then you could do the same with the PIC GPIO pin.
    GPIOs can usually drive low harder than they can drive high.
    alternatively, use a p-channel FET to switch the high side, and invert the state of the GPIO pin.
     
    #10
    DarioG
    farewell.
    • Total Posts : 53177
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/25 02:35:22 (permalink)
    0
    Funny, now that I look at it, what is diagram #1 supposed to do?
    "common base" configurations were used usually for high-frequency amplifiers... low input impedance, low output impedance... but this is a mosfet so...

    forget about me, subhumans. adieu

    #11
    brownt
    Junior Member
    • Total Posts : 117
    • Reward points : 0
    • Joined: 2015/11/21 14:58:09
    • Location: 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/25 02:51:55 (permalink)
    0
    hmmm well I don't really want the buffer coz I can't afford the space, I'll look into it further. thanks
    #12
    brownt
    Junior Member
    • Total Posts : 117
    • Reward points : 0
    • Joined: 2015/11/21 14:58:09
    • Location: 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/25 17:01:36 (permalink)
    +1 (1)
    Diagram #1, I don't know. I uploaded it by mistake, and can't work out how to remove it.
     
    #13
    brownt
    Junior Member
    • Total Posts : 117
    • Reward points : 0
    • Joined: 2015/11/21 14:58:09
    • Location: 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/25 22:30:40 (permalink)
    0
    Well I have tried everything I can think of. Unfortunately the series resistor/cap did not show up anything. I tried 10K I2C pullups rather than 4.7K. Checked the ports for unintentional weak pull ups, open-drain control and slew rate. Double checked the peripheral pin select mappings as I am not using the default pins. No difference.
     
    The SPI device on its own which actually draws 10mA, does not cause a voltage drop. The I2C device draws only 2mA but causes a 500mV drop on the IO supply pin. I am using a 16LF rather than a 16F, though I have tried both anyway.
     
    The only way I could save a few hundred millivolts was to slow things down.
    Dropping I2C from 400KHz to 100KHz gave me an extra 150mVolts
    Slowing the internal microcontroller oscillator - 130mV
    A 5mS delay in the main routine, which slows how often the I2C routines are called - 250mV
    They don't combine though, so its not like I am saving 500mV by doing all three things.
     
    Is that normal?
     
    I can see when the I2C device is supplied with voltage the IO pin supply drops by 500mV. Then when it is disconnected, the IO pin supply is back to full. But when it is reconnected it only drops by 300mV. I guess this means it is the micro's internal I2C functions that are causing some of the drop and the I2C device is also causing some drop. Or some leakage somewhere. I don't know.
     
    I guess I'll have to go with the buffer, though I feel there is something not right.
    post edited by brownt - 2017/10/25 22:33:16
    #14
    qhb
    Superb Member
    • Total Posts : 6257
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/25 22:49:00 (permalink)
    +1 (1)
    How are you measuring the voltage?
    Are you observing it with a hi speed scope, and making sure ground currents are not affecting the measurement?
     
    #15
    brownt
    Junior Member
    • Total Posts : 117
    • Reward points : 0
    • Joined: 2015/11/21 14:58:09
    • Location: 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/26 01:48:12 (permalink)
    0
    Can you explain that please?
    #16
    qhb
    Superb Member
    • Total Posts : 6257
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/26 02:04:31 (permalink)
    +1 (1)
    You first. HOW are you doing the measurment?
    i.e. with what, and where is it connected?
     
    #17
    brownt
    Junior Member
    • Total Posts : 117
    • Reward points : 0
    • Joined: 2015/11/21 14:58:09
    • Location: 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/26 03:23:21 (permalink)
    0
    Please see attachment.
     
    The micro's +ve and -ve are connected to a 3 volt bench power supply. The -ve connection of I2C device is connected to the -ve of the micro, and the +ve of the I2C device is connected to an IO pin on the micro. I am using a multimeter to measure between the IO pin and -ve, and it measures 2.73 volts. The IO pin when not connected to anything measures 3.0 volts.
     
    I connect the +ve and -ve of the SPI device along with the I2C device and then there is 2.43 volts between -ve and the IO pin.
    I disconnect the I2C device, leaving only the SPI device, and there is 2.97 volts between -ve and the IO pin.
     
    The I2C pull ups are between the IO pin and -ve.
     
    thanks

    Attached Image(s)

    #18
    brownt
    Junior Member
    • Total Posts : 117
    • Reward points : 0
    • Joined: 2015/11/21 14:58:09
    • Location: 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/26 18:37:18 (permalink)
    +1 (1)
    some new information. thanks for your help first, I lack knowledge so the info I get from this forum is great.
     
    Measuring with the oscilloscope showed a huge flaw in the system, but I don't know why. I can see a dip in voltage every time the I2C and SPI routines are ran. Even when using the bench supply voltage rather than the IO supply voltage. Though when using the IO supply voltage the results are magnified significantly.
    The multimeter i guess was just reading the average.
     
    So, here is where I am up to. I am no longer using the IO supply, but rather am powering everything from the bench supply. 3.0 volts.
     
    When the I2C routine runs drawing 2mA, the supply dips 5mV. When the SPI routine runs, drawing 10mA the supply dips 40mV. If I do use the IO supply this is magnified about ten fold. The SPI device is a RF transmitter, I wonder what the instantaneous curent draw is?
     
    There is a 10uF tantlum and a 100nf ceramic across each device. I tried a 100uF electrolytic across the supply which reduced the dip by half and 470uF mostly removes all the ripple. But is seems odd to have such a large value, doesn't it? And importantly, although it reduces the ripple significantly, it does not make any difference to the average value read by the multimeter on the IO pin.
    post edited by brownt - 2017/10/26 20:56:45
    #19
    SpokaneNexus
    Super Member
    • Total Posts : 322
    • Reward points : 0
    • Joined: 2013/02/05 14:53:25
    • Location: 0
    • Status: offline
    Re: Low voltage on I/O pin used for supply 2017/10/26 19:33:19 (permalink)
    +2 (2)
    Let's make sure the pin you want to use is actually sourcing the current you think it is (and that the spec sheet says it will). How about disconnecting everything from that pin and "powering" a known fixed resistor to ground? What does the voltage do then, and what does Ohm's Law tell you the current is?
     
    Examine the pin behavior with a scope, not a meter. Have your code toggle the pin and see what the rise/fall times look like with your fixed resistors.
     
    Second step: Add up the current you expect your "load" to consume and calculate an equivalent resistance value. Stick that on the pin, to ground, and see what the voltage does. If the calculated current is below what the spec sheet says should be available, and you're confident of your resistor value, then you can focus on pin configuration.
     
    For example... any chance the pin in question on this family of devices has an open drain option that might be turned on? Have you enabled some sort of weak pullup option instead of a true active high side driver? (I'm not familiar with this family, but these are options on other PIC devices.)
     
    Report back!
     
     
    #20
    Page: 123 > Showing page 1 of 3
    Jump to:
    © 2017 APG vNext Commercial Version 4.5