I am designing a PCB with a STM32 microcontroller, a GPS, DataLogger and X-Bee module. The power supply is a 12V Battery. So in my project I need 5V and 3.3V, at the same time. I don't know if it is a bad ideia to have a 5v linear regulator(input 12V) and using the 5v as input in a 3.3v LDO regulator. I am aware of the Low Dropout properties of the LDO and the power dissipation of the voltage regulator. I came to this idea because the circuit used to shut down due to the temperature. I don't want to use a buck converter because I don't want to put an inductor in the same PCB with the X-bee(Radio Module). Finally, my project is included in a car, so temperature is a thing(the engine or even sun)
Use a non-linear power supply (i.e. a buck converter (like LM2596) in your case) for conversion from 12V to 5V. Then use a linear regulator (like AMS1117) to convert from 5V to 3.3V.
- The reason why I have suggested using a non-linear power supply (for 12V to 5V) is because the heat generated by the linear one increases quite a lot with a high voltage difference and the current being consumed. This also means quite a lot of power loss.
- It is safe to use a linear power supply for 5V to 3.3V as the voltage differnece is less and the consumption of high current is not expected at logic levels. But if the 3.3V devices consume upwards of about 500ma than it is better to use a non-linear one or a linear one with better efficiency.
- You can design the pcb such that the inductor and xbee radio are far away from each other or you can mount the inductor externally also. I don't think that a inductor of the size found on buck converters will cause a issue.
- Use the existing schematics of development boards like Arduino, ESP, xbee shields, STM etc. to get a better idea on how to deal with this issue.
The professional/pedantic way to design such a board with RF requirements:
- Step-down switch regulator from 12 volt to 5V, to supply general 5V plane.
- Step-down switch regulator from 5V to 3.3V, to supply general 3.3V plane.
- LDO from 5V to 3.3V to supply radio parts only.
The switch regulator's inductor is of little concern if the PCB layout is proper. There's quite a bit to be said about that topic and I'm not the right person to do it. Read all app notes by the manufacturer of the regulator.
But in a project with the above level of noise/immunity concern, you wouldn't be using a hobbyist radio module in the first place. I'd be far more concerned about what that module spits back onto my PCB, than the other way around.
When using linear regulators, the ordering of the regulators has little effect on overall efficiency and thus on overall heat dissipation. What it does affect is WHERE the heat is generated. Feeding the 3.3v reg from the 5v reg will ensure that the 5v reg dissipates most of the heat, while feeding the 3.3v reg directly from 12v will cause it to get a lot hotter.
For example: Say you need 0.25 A @ 3.3V and 0.25 A @ 5V. Running both from the 12V supply will cause the 3.3V reg to produce (12-3.3)*0.25 = 2.2W of heat. The 5V reg will produce (12-5)*0.25 = 1.8W of heat. The total heat produced by both regulators is 4W.
Feeding the 3.3V reg from the 5V reg will drop its heat to (5-3.3)*0.25 = 0.4 W or about 20% of before. The 5V reg now will have to source 0.5A of current so it will dissipate (12-5)*0.5= 3.5W of heat, double what it did before. The total heat produced is still 4W.
The decision as to which is better will come down to which reg IC has a bigger package with lower thermal resistance, and which is easier to attach a heatsink to. You will need a heatsink at these wattages. Shown below is an example of thermal resistance specs for an IC in a fairly large TO package. Note that without a heatsink, the "Junction to Ambient" is the spec that applies. 40 degrees per watt means 2W dissipated into an enclosure at room temperature will have the device running at over 100 degrees. Remember that the inside of your enclosure may heat up far above room temperature. A good heatsink on the same device might have a conduction to ambient of only 0.5 degrees per watt, bringing the junction temperature down to just a few degrees above the enclosure temperature.
Nice heatsinks are available from various catalog suppliers online, for nearly any package you might have. Careful design of your PCB can increase the amount of heat removed from the device, and ensure that heat is directed away from other sensitive components. Ensure you have as much copper as possible on the traces connecting to your regulators, think about getting your board made with 2oz copper, and look to see if your regulator is available in various packages. If you are using surface mount regulators, liberal solder application to the large tab and possibly a surface mount heatsink are helpful.
Finally, if you still find the heat produced to be a problem, or you are running off the battery for long periods of time without the vehicle running, a switching supply may be the only option. Noise concerns can be tricky, but if you have room, a simple solution is to separate your supply completely from the rest of your circuit. Having an external PCB to do the step-down even just to five volts will really reduce the heat your board has to endure, and vastly improve your efficiency. Enclosing the external supply in a conductive case and paying some attention to filtering its output should give you a very workable solution.