SparkFun Forums 

Where electronics enthusiasts find answers.

Questions relating to designing PCBs
By steve1515
#146625
I'll add the BAT54's to my schematic later tonight. What is the equivalent though hole part so I can test on a breadboard?
By rrpilot
#146628
Looks like the BAT85 is very similar in specifications but available in through-hole.
By Joeisi
#146650
Make sure your LED series resistors are ok.Other than that, you are looking good from here. You may want to design a board and post it too. I know on some of my boards I've made dumb mistakes that could've been fixed had I looked over it again.
By steve1515
#146652
I'll definitely check the LED resistors. I haven't spec'd the final LED's yet, though. I'll definitely post the PCB after I breadboard the circuit.

You guys have been a great help! Thanks!!! :)
By Suudy
#146687
One note on the LEDs. In my experience, it is always preferred to sink current from an LED rather than source current into it. Not all parts can drive enough current to provide the LED brightness you desire. It also may cause problems on some parts with regard to maximum current per bank (though I don't think your ATmega has that problem).

So rather than have the LEDs go to ground, better to have VCC through the diode and resistor into your part. So, setting the output to 0 will turn on the LED, and setting it to Vcc will turn it off.

If you don't want the inversed polarity, you can use an NPN with the emitter to ground, a series resistor between the base and your ATmega, and the LED and resistor in series between Vcc and the collector. Something rather like here:
Image.
By steve1515
#146799
Quick question about the resistors...

I'm specing out surface mount resistors. I was going to use all 0805 size, so they would be 1/8W. Also, I was looking at 5% tolerance.

Is this ok for my circuit?
By steve1515
#146802
As for the caps. Would you say that +/- 10% would be fine for all of the MAX232 caps and +/-5% for the crystal caps?
Thanks!
By steve1515
#146808
In addition to the question above... when selecting a PTC, do I have to over estimate the voltage? For example, I expect 8-12VDC to be the input voltage to my circuit. Should I double the max voltage and get a 24V PTC or would a 12V (or maybe 16V) PTC be fine?
By AndyC_772
#146817
The parts you suggest are fine.

Over-rating the PTC won't do any harm, though it's not that big a deal. The PTC only ever sees the circuit voltage (12V in this case) when it's actually tripped; in normal use the voltage across it is very small indeed.
By steve1515
#147153
Hello everyone.
So, I've bread-boarded my design, and it works great with one potential problem... I've noticed that my 5V regulator gets very hot. So hot that I would get burned if I held my finger on it. This was a TO-220 package. The 3.3V (also TO-220) didn't feel hot at all. I've measured that my circuit draws about 185mA while up and running, and it draws about 250mA as inrush when starting up. I calculated that I'm burning about 2W of power over the 5V regulator with 12V input. I was going to use SOT-223 packages for the final PCB, but now I'm thinking that this isn't going to work.

I've looked in the datasheet for the LD1117 and did some checking on line, but I'm not really sure on how to calculate thermal resistance and things like that. Perhaps someone could explain this to me? The data sheet (http://www.st.com/stonline/stappl/st/co ... 000544.pdf) lists that that SOT-223 part has a Rjc=15, but it doesn't list Rja. I'm a little confused with this, so please correct me if I'm wrong. I figured that at 2W, I'm raising the case temperature of the SOT-223 by 15*2=30 degC above ambient. Say the max ambient temp is 35 degC, then the max temp that the case would be is 30+35=65 degC which is lower than the maximum of 125 degC. This seems to indicate that I'll be ok, but then where does the junction-to-ambient come into play? For example, for the TO-220 at 2W, I calculate that the temp will rise ((50+5) * 2) = 110 degC above ambient. So if ambient is 35 degC, then I've exceeded the maximum operating temperature. I guess one question would be when do you use the Rjc and when do you use Rja.
I'd really appreciate any help with this.

Now, while looking all of this thermal information up, I came across some information saying that I should be using switching regulators instead of linear regulators. I guess that would eliminate the heat problem, correct? Should I use switching regulators? Which ones are the equivalent to the LD1117's? Will they still allow me to have the same input spec of 8-12VDC?

Now for a related question...
I originally sized my PTC at 500mA, but if the current actually goes to 500mA @ 12V input, then my regulator would surely burn up. If I keep the linear regulators, should I change my PTC to a lower value? Given that the operating current of the circuit is 185mA and the inrush is 250mA, what should the PTC be sized to? What if I change to switching regulators?

Sorry for the long post. I'm at least happy that my first PCB project worked correctly on the breadboard!
Thanks for the help! :)
By AndyC_772
#147159
Rjc is usually the more useful figure, because the relationship between the semiconductor die and the package of the device is consistent, well defined and always the same. You can measure the package temperature and calculate the amount of power being dissipated in the device, and that allows you to work out the junction temperature with a fair degree of accuracy.

Rja is much less useful, because it depends so strongly on the nature of your product. Is the package upright, or laying down? Does it touch the PCB? If it's touching the PCB, is it touching copper or bare laminate? Is there solder mask in the way? What's the air flow like? And what does the manufacturer mean by "ambient" anyway? (Air temperature, board temperature, something else...?)

Dropping 12V to 5V with a linear regulator is bound to generate some heat. A couple of Watts will cause any device to get very hot on its own, though a modest heat sink will bring the temperature down a lot. That would be the easiest fix.

A more elegant fix would be to swap the linear regulator for a switcher, which will still get warm but not nearly as much so as a linear regulator. You can certainly get a pre-assembled module that will go 8-12V in, 5V out. In fact, a wide input voltage range is a very common feature of switching regulators, and is one reason they're often used.

Your PTC is there as a protection device, it's there to trip if some major fault occurs (eg. a slip of the voltmeter probe!) which would cause a device to be damaged. You can't use it to reduce the normal operating current of your circuit; you have to choose one which won't trip when the board is operating normally. If the board requires 500mA, you need to choose one which definitely won't trip at 500mA, and you need to provide adequate cooling for your regulator so it doesn't burn up. If your circuit requires 185mA, then a 250mA device might be more suitable. Don't worry about the inrush, PTC devices just aren't that fast.

If you change to a switcher, the input current will reduce. Your switcher module might well incorporate some overcurrent protection which means you don't really need the PTC at all.
By rrpilot
#147166
This is how I have always interpreted the datasheet values... All the thermal figures in the datasheet are there to be used as a guideline and unless you're attaching a heatsink to the device I would start with the junction-to-ambient figure. So let's think about your scenario...

2W are to be dissipated by the linear regulator,

Trise = Rja * Pd = 50 * 2 = 100 degrees C above ambient (you didn't need to add both Rjc and Rja together)

Now as I mentioned earlier, these are guidelines and since the maximum junction temperature is 125C then we need to raise some alarm bells and figure out a different solution. What you did in your case and actually touched the regulator is good practice, you could actually measure the temperature with a probe to find out exactly but the fact that you are thinking ahead and deciding that you might end up drawing 500 mA in the future is great thinking. Keep in mind, anything above 60-70 degrees is going to feel like its burning your finger, water boils at 100 degrees.

Anyway lets move on and see what we can do with a heatsink...

Lets say you grab a heatsink with a thermal figure of 10 degrees C per Watt in still air (use still air unless your planning on having air flow across it). Now you can go ahead and use Rjc...

Case temperature: Tcase = Rjc *Pd = 5 * 2 = 10 degrees above ambient
Junction temperature: Tjunction = Pd * (Rjc + Rhs) = 2 * (5 + 10) = 30 degrees above ambient

Even at 35 degrees ambient, a estimated 30 degrees temperature rise seems like a good figure and you can feel much more confident you wont' exceed the maximum junction temperature.

However, what happens up at 500 mA, now we are all of a sudden up to just over a 50 degrees rise even with the heatsink. You still have ~30 degrees headroom and if you're confident that you wouldn't always be running up at 500 mA, personally I wouldn't be all that concerned.

Switching regulators are always nice and are easy to use as long as you follow the device manufacturer guidelines. I find Microchip provides awesome documentation and its hard to go wrong with their parts. Check out the MCP16301 for one such example.