Shop OBEX P1 Docs P2 Docs Learn Events
Proper decoupling of VDD/VSS & other h/w questions — Parallax Forums

Proper decoupling of VDD/VSS & other h/w questions

agsags Posts: 386
edited 2011-09-21 20:22 in Propeller 1
I'm developing a board using the P8X32-D40 package, and am looking for "correct" usage of decoupling capacitors. I've reviewed the Prop Proto Board (USB) schematic which has the P8X32A-Q44 package. It shows one 1uF cap (I presume it is a tantalum surface mount) connected to just one VDD pin. Most ICs seem to use 0.1uF ceramic decoupling capacitors. What value and type is "correct" for the D40 package, and should I only use one cap on one of the two VDD pins for the 40-pin DIP package? If just one VDD pin is sufficient, does it matter which one?

Some schematics for the Prop Proto Board USB show a 10uF capacitor on Vin and Vout of both the 3.3v and 5.0v regulators. I can see that there apparently are three surface mount capacitors in the area of the regulators. However, some schematics show two additional 10uF capacitors in parallel on the 3.3v Vout and 5.0v Vout pins. I see what appear to be through-hole tantalum capacitors on my board, but many pictures (on the Parallax web site) do not show them. The National App notes suggest just one 10uF tantalum on Vin and Vout (which can be skipped on Vin if well-regulated). Is there any reason for me to include the additional caps (besides driving the Prop itself, I'll be driving some HCT shift registers and a WizNet 812MJ module)?

Some designs (from Parallax) using the AT24C512 (I2C) EEPROM show a 10k pull-up on SDA only, some show a 10k pull-up on both SDA and SCL. I plan to use the latter, as it seems like an equally bad thing if SCL were to float or "bounce" while not being driven. Is there some downside to this (other than the additional cost, area, and assembly to include an additional resistor)? Also, since the Atmel part is no longer readily available, is there any problem substituting the MicroChip 24LC512?

Is there anything that prevents one from inserting the Prop Plug backwards? I planned to simply use a 4-pin 0.1" header and wonder if there is some way to prevent accidental reverse insertion.

Finally, is there any difference between the two leads of the 5MHz crystal? I realize this must sound stupid, and I can't imagine there is any polarity, but while I'm doing all this asking I thought I'd check to be sure (I suppose it's like left- and right-handed socks...) I plan to use the ABRACON AB-5.000MHz-B2.

I realize this is a boatload of questions, and appreciate thoughtful answers to any or all of them. Thanks.

Comments

  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-20 16:53
    I can answer a few of these but others will no doubt have more things to add.

    First, starting at the end, the 5Mhz crystal is non polarised so you can put it in either way.
    Ceramic capacitors can also go in either way, but it is very important to get tantalums the correct way otherwise they explode.

    I'm not sure about two vs one 10k pullup resistors but resistors are cheap so use two like you suggest. Or use resistor networks.

    The 24LC512 should be fine.

    My personal preference for power supplies is to use whatever capacitor the regulator datasheet suggests and put this right next to the regulator and to use larger tracks for gnd and supply.

    Next to the prop, a 10uF tantalum. Two 0.1uF ceramics, one above the chip and one below it. The xtal just above the 0.1uF. The tracks work out very short as a result.

    I tend to also put one 0.1uF ceramic per additional chip - eg one for the eeprom, one for each shift register etc.

    And if you add an sd card, I put a 0.1uF and a 22uF tantalum right next to the sd card power supply pins as well.

    These are just my personal preferences and perhaps it is overkill. There are others on the forum who have a lot of expertise in this area and hopefully they will chime in soon.
  • Clive WakehamClive Wakeham Posts: 152
    edited 2011-09-20 20:12
    Regarding the pull-up resistors for the SDA/SCL lines.

    Some of the objects in the OBEX actually "float" the SDA and SCL lines so they need to be pulled up to operate correctly. If you write your own object to interface with I2C devices and output high then you should not need the pull-up resistors.

    And they "float" them by making the pins on the Prop that control them "inputs".
  • agsags Posts: 386
    edited 2011-09-20 20:33
    Regarding the pull-up resistors for the SDA/SCL lines.

    Some of the objects in the OBEX actually "float" the SDA and SCL lines so they need to be pulled up to operate correctly. If you write your own object to interface with I2C devices and output high then you should not need the pull-up resistors.

    And they "float" them by making the pins on the Prop that control them "inputs".

    That is what I thought. Thanks for confirming my suspicions. I'm surprised that I found any official Parallax schematics with only SDA pulled-high, but as you point out, if one knows that any code being run will set the Prop pin to an output and keep it logical 1, then there would be no problem. I'm going to spend the money on the 10k resistor!

    Thanks
  • agsags Posts: 386
    edited 2011-09-20 20:43
    Dr_Acula wrote: »
    Next to the prop, a 10uF tantalum. Two 0.1uF ceramics, one above the chip and one below it. The xtal just above the 0.1uF. The tracks work out very short as a result.

    I tend to also put one 0.1uF ceramic per additional chip - eg one for the eeprom, one for each shift register etc.

    These are just my personal preferences and perhaps it is overkill. There are others on the forum who have a lot of expertise in this area and hopefully they will chime in soon.

    Thanks for the reply. Understand, agree and will move forward with the non-polarized Xtal, polarized tantalum capacitors, non-polarized ceramic capacitors, 10k pull-up on the EEPROM I2C SCL line, 0.1uF caps for "regular" ICs, substituting the 24LC512 for the Atmel part, and following the manufacturer's datasheet for the regulator capacitors (in my case, LM1086 calls for 10uF tantalum on Vin and Vout). I'm not using an SD card in this design. I didn't think of using caps on the EEPROM - but I don't know why I didn't. It's an IC, I guess it's because I have never seen a capacitor on the EEPROM in any Parallax schematic.

    I'm not clear on you description of the caps for the Propeller itself. First, are you describing the positioning with the DIP running left-to-right (longways, horizontally)? If so, then I think I see what you mean about the Xtal and 0.1uF ceramic capacitors. I can be very close to the "paired" VDD/VSS pins on each side, and the Xtal will be close as well. Where would the tantalum capacitor be, and connected to which pins? I've seen it done on many schematics, but why use a 10uF and 0.1uF cap in parallel? Doesn't that just become a 10.1uF capacitor?

    Thanks again for the response.
  • kwinnkwinn Posts: 8,697
    edited 2011-09-20 22:12
    Re "Doesn't that just become a 10.1uF capacitor?" Yes, and no. The 0.1uF capacitors are mounted as close to the pins as possible to provide a small "reservoir" that can react to current demand very quickly. The 10uF capacitor is a little further away and acts as a much larger but slower reacting "reservoir". The total capacitance is 10.2uF, but having 2 small and one large capacitor is much better at reacting to sudden current peaks than having one large capacitor of equivalent value.
  • SapiehaSapieha Posts: 2,964
    edited 2011-09-20 22:55
    Hi ags.

    If You search after my signature You will find all info needed for Decoupling.

    I have said it already many times on forum and see still some misunderstanding of functions of decoupling.

    0.1uF are for SHORTING high frequencies that IC can be disturbed on else can produce and emit on POWER traces.

    10uF are for momentary Reservoir of EXTRA POWER that IC needs in times it increase its power needs.
    And as most modern CPU's and Propeller have VARIABLE power consumption and that CAPACITOR is necessary


    Ps. and forget all You know on how You calculate capacitance in parallel.
    as in Decoupling usage every capacitor have its own function (LOOK on some FILTERS) and how them use capacitors to filter out different frequencies.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-21 03:13
    I'm not clear on you description of the caps for the Propeller itself. First, are you describing the positioning with the DIP running left-to-right (longways, horizontally)?

    Yes sorry that wasn't very clear. Have the prop in front of you, pin 1 to the bottom left, notch on the left, writing is the right way up and I use "bottom" to mean pins 1 to 20 and "top" to mean pins 21 to 40. The propeller pin layout is really good for these capacitors as the traces only end up a few millimetres long.
  • agsags Posts: 386
    edited 2011-09-21 05:54
    OK, that is what I was guessing and makes sense - for the 0.1uF ceramics & Xtal. With that orientation, where would the 10uF tantalum go, and which pins is it connected to? Thanks.
  • agsags Posts: 386
    edited 2011-09-21 10:34
    @Sapieha: thank you for the reply. I did search your posts and found this one (http://forums.parallax.com/showthread.php?113349-Design-rules-for-stable-propeller-operation-and-overclocking) on overclocking and decoupling capacitors. I understand now that the 0.1uF ceramic has a low ESR and acts as a short to filter high frequency components (either created elsewhere on the board and fed into the Propeller or possibly produced by the Propeller and output to the board).

    I've also read (following links in the thread above) about the "singing regulator" on the Prop Proto Boards, which was due to too-low ESR of ceramic capacitors on the regulator causing instability. It was fixed with higher-ESR tantalum capacitors. So the lesson is to read the regulator manufacturer's datasheet for specific requirements of which value and type of capacitor to be used with that regulator.

    So I will use a 0.1uF ceramic capacitor very close to both VDD/VSS pin pairs on my D40 package Propeller. I am still unclear as to whether I need another tantalum capacitor near the Propeller itself, or will the 10uF tantalum capacitor from Vout to GND at the 3.3v regulator be enough? If I need to add tantalum capacitor(s) closer to the Propeller chip (in addition to those on the regulator output) do I need one - and if so on which VDD/VSS pin pair - or two? If needed, would they just be in parallel with the 0.1uF ceramics, with the ceramic closest to the Propeller and the tantalum the "next closest"?

    BTW, my design is running at 80MHz (5MHx Xtal * PLL16) and I am using 6 cogs, each doing independent bit-banging which requires intensive waitcnt use. From the link mentioned above, that sounds like a situation where the Propeller will need to have good decoupling due to the dynamic power consumption in such a design. I am currently using only the decoupling capacitors that come standard on the Prop Proto Board USB, which is a single 1uF on only one VDD/VSS pin pair (of 4 pairs) on the Q44 package.

    Thanks.
  • SapiehaSapieha Posts: 2,964
    edited 2011-09-21 14:37
    Hi ags.


    On this -- my answer
    You NOT need more that that ---- IF Propeller are only one IC in Yours construction and traces to it are of good quality.

    BUT if You have many IC's and Propeller are connected to Regulator by long Traces/wires USE one more tantalum as near as possible VVD/VSS pins on Crystal side of Propeller

    On this -- my answer.

    Yes I know that AND for overclocking I always add caps to all 4 pairs




    ags wrote: »
    @Sapieha: thank you for the reply. I did search your posts and found this one (http://forums.parallax.com/showthread.php?113349-Design-rules-for-stable-propeller-operation-and-overclocking) on overclocking and decoupling capacitors. I understand now that the 0.1uF ceramic has a low ESR and acts as a short to filter high frequency components (either created elsewhere on the board and fed into the Propeller or possibly produced by the Propeller and output to the board).

    I've also read (following links in the thread above) about the "singing regulator" on the Prop Proto Boards, which was due to too-low ESR of ceramic capacitors on the regulator causing instability. It was fixed with higher-ESR tantalum capacitors. So the lesson is to read the regulator manufacturer's datasheet for specific requirements of which value and type of capacitor to be used with that regulator.

    So I will use a 0.1uF ceramic capacitor very close to both VDD/VSS pin pairs on my D40 package Propeller. I am still unclear as to whether I need another tantalum capacitor near the Propeller itself, or will the 10uF tantalum capacitor from Vout to GND at the 3.3v regulator be enough? If I need to add tantalum capacitor(s) closer to the Propeller chip (in addition to those on the regulator output) do I need one - and if so on which VDD/VSS pin pair - or two? If needed, would they just be in parallel with the 0.1uF ceramics, with the ceramic closest to the Propeller and the tantalum the "next closest"?

    BTW, my design is running at 80MHz (5MHx Xtal * PLL16) and I am using 6 cogs, each doing independent bit-banging which requires intensive waitcnt use. From the link mentioned above, that sounds like a situation where the Propeller will need to have good decoupling due to the dynamic power consumption in such a design. I am currently using only the decoupling capacitors that come standard on the Prop Proto Board USB, which is a single 1uF on only one VDD/VSS pin pair (of 4 pairs) on the Q44 package.

    Thanks.
  • agsags Posts: 386
    edited 2011-09-21 17:30
    @Sapieha: Thank you for the response! I have 8 74HCT595 shift registers on the same board so I will include the additional 10uF tantalum capacitor to the VDD/VSS pin pair on the Xtal side. I mentioned the bit-banging (with many waitcnt instructions) and 6 cogs running, and the lonely 1uF capacitor on my current Prop Proto Board, because I think that may be contributing to some glitches and instability in my system. Thanks for pointing that out.
  • madrfskillsmadrfskills Posts: 24
    edited 2011-09-21 20:22
    Good luck on your design. It sounds like you have understood the excellent points provided by the posters here, and it is highly likely that your design will succeed.

    The only thing I'd like to add is that the routing of your power and ground can have as much influence over your decoupling performance as the caps themselves. The key is to keep the AC current loops from power pins to ground as short as possible. Best practice is to use a continuous ground plane. Barring that make your ground traces as thick as possible to minimize inductance (bear in mind that if you have low noise analog on the same board there are some additional requirements). If I can do so I like to use continuous power plane as well - barring that, I use a tree-like power distribution approach with thick, thick traces. On occasion I've gotten away with putting decoupling caps underneath the decoupled chips, but this depends on getting fairly low inductance in the plated vias - try not to do this, but sometimes its the only way to get the routing done...

    In terms of tantalums, I've had issues with them catching on fire. Very rare but exciting. Therefore I like the AVX TAW or Kemet T496 series tantalums with built-in fuses. Part of this is due to my paranoia concerning the previous failures, and the other is that the additional parasitic resistance of the fuse (ESR) increases damping in the bulk capacitance portion of the decoupling network, which helps somewhat with DC/DC converter stability. When I'm feeling very paranoid about my power supply quality I make a pi network power input filter of two big fused tantalums (47-100uF) and a 10uH shielded inductor, followed by a smaller (lower ESR) tantalum of about 10uF. Chips get a 0.1uF ceramic at each Vcc pin. I always use a 5KPA-series TVS in shunt across the supply to keep it honest; a fast-blow fuse which will (hopefully) fail open if something untoward happens, and do so before the 5KPA becomes a smoke-emitting-friode.


    Good luck!
    Mike
Sign In or Register to comment.