Powering the prop from an automotive 12v source.
eagletalontim
Posts: 1,399
I am in the process of redesigning the power circuit on my project and am needing some advice. Currently, I am using the Prop Proto Board which has the 5V and 3.3V linear regulators built on it. I know that the 5V regulator cannot handle direct input from the vehicle (~14.2V) so I added an LM317 adjustable regulator before the Prop board to drop the voltage down to ~9V. I have also had to add a heat sink to the LM317 since it does get warm rather quickly. What I am looking to accomplish is to have a simple circuit that will accept the 14.2V from the vehicle and output 5V and 3.3V with little to no heat.
What I have found in my searching is the possibility of using a "drop in" switching regulator for the 5V rail and then an LDO regulator for the 3.3V rail. This method seems quite pricey. My other circuit which does the same thing as the current project I am working on but uses the SX28, has a standard 7805 linear regulator, has no heat issues and connects directly to the vehicle's power. I am limited on space on the PCB I am designing so the power circuit cannot have a bunch of parts. Any recommendations or components that could put me in the right direction?
What I have found in my searching is the possibility of using a "drop in" switching regulator for the 5V rail and then an LDO regulator for the 3.3V rail. This method seems quite pricey. My other circuit which does the same thing as the current project I am working on but uses the SX28, has a standard 7805 linear regulator, has no heat issues and connects directly to the vehicle's power. I am limited on space on the PCB I am designing so the power circuit cannot have a bunch of parts. Any recommendations or components that could put me in the right direction?
Comments
My first thought would be to use that or the innards of one.
I imagine they are cheap...
Another idea is to use these murata switching regulators:
http://www.murata-ps.com/data/power/oki-78sr.pdf
Correct.
Keep in mind that a switching regulator chip is not the same as a 3 terminal regulator chip. It needs to have the correct components and proper board layout to work. There are 3 terminal switching regulator modules available that are a drop in replacement for a linear 3 terminal regulator, and this is the simplest way to go.
This is true. The high frequency switching produces noise that can affect linear circuits, and ADC's have some linear circuits that can be affected.
Here is the switching regulator I am looking at for my project. https://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_192381_-1 I don't think I need 3A, but I would like to have room to expand on my circuit for future use. The most power hungry device I have right now is the Parallax 2x16 1 wire serial display with backlight. The backlight is what causes all the heat in my circuit so I am limited to what else I can add in the future with my current power setup.
http://www.eevblog.com/2010/05/29/eevblog-90-linear-and-ldo-regulators-and-switch-mode-power-supply-tutorial/
Designing a switch mode DC to DC converter
http://www.eevblog.com/2010/09/10/eevblog-110-lets-design-a-dc-to-dc-switchmode-converter/
Grrrhh, I just lost a long reply, here's the short version...
Use these cheap switchers which replace 3 terminal linear regulators.
Use suitable caps with the 3.3V LDO regulator.
Use an ADC with a 2.5V reference (built-in) or external) or use a cheap micro if you can which is what I do (cheaper and better)
Use a series diode and resistor (and opt. choke) from the +12V to the regulator along with a 1,000uf or greater cap on the regulator input.
I am also trying to find an ADC chip that may work for what I need, but I have 1 shot at this and am worried I will get the wrong one. Every part I am using, I am pulling the datasheet for and designing the PCB to use that one part. I have not used an ADC chip before so that is also another learning experience for me The board I am designing uses mostly SMD components to help save space so there is very little room for error.
The resistor needs to be low enough that it does not cause too much of a voltage drop at maximum load but also high enough to help filter out some of the surges and spikes. This is where a small choke can help too but the resistor can't hurt and costs a cent or less. BTW, it also becomes the fuse just in case as a car battery can make a lot of smoke.
As for the ADC it's best to know what you are measuring and what you want to do.
Breadboard your circuitry before building a prototype. There'll be some parts that won't work the same or won't work as fast because of the longer connections and higher capacitance, but it's better than not doing it.
If you want the ADC to handle 5V for its input range, you'll need a 5V reference voltage. With adequate filtering, you could use the output of a 5V switching regulator for this. You could also use an adjustable switching regulator set for 6V or 6.5V followed by a linear 5V LDO regulator, then a 3.3V LDO regulator and run the ADC's reference from the filtered 5V reference. It all depends on how accurate you want it and how sensitive you can tolerate it to be to noise. An ADC with a built-in 5V reference may be the simplest. For high resolution (12-bit), you will likely need a low noise external 5V reference.
Here is the code I use to calculate the throttle:
I am also thinking of use another ADC circuit to read a pot that will allow the user to adjust a setting on the fly. This would allow me to use less pins instead of using a rotary switch. There should not be any external noise for this circuit as it would all be powered from the internal regulators.
For something this basic I might even consider a cheap comparator and RC DAC to measure the input voltage. But rather than the comparator just use a dual opamp such as the LM358 and have one of them boost the 3.3V DAC voltage and the other opamp can be the comparator (it doesn't need to be fast). If you need a circuit I will draw one up for you. Total cost of parts <$0.5
I dislike using pots for any adjustments so consider using a single button input to ramp up through (and wraparound) the values you are after perhaps.
P.S. The reason for a 2.5V reference is that the ADC doesn't need to have a reference of the same voltage range you are measuring as you simply divide down the input much like a cheap multimeter measures hundreds of volts.
http://www.8052.com/forum/read/43807
Hal
Here are the 2 regulators I am looking at :
5V switching regulator : https://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_245569_-1
3.3V LDO linear regulator : https://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_192524_-1
You really need a proper PCB for a switching regulator and that's why I mentioned the switching regulators from Digikey and at $3.65 for one off they are really cheap. The 1k resistor value is way too high, you need to know what your maximum current draw is on the regulator input side as it will be around half that of the current draw on the 5V supply. Then calculate the resistor value as R=V/I but the trouble with that simple formula is that the current will increase because the regulator will be working off a lower voltage after the resistor. As a rule of thumb just use a 4R7 but make sure you use a diode in series with it too.
The 33uf is no good either unless it's a low ESR type, you want quality not quantity, so just use a 10uf tantalum and a 0.1uf in parallel. In your switcher circuit. You had 1,000uf after the switcher and 100uf before it but I would be inclined to put the 1,000uf on the input and up to 470uf on the output but I really don't think the 2576 is the way to go.
That regulator is just one of many but illustrates how simple, small, and cheap switching regulator modules have become although I'm sure 500ma is more than enough. For one, the solenoid is not powered from 5V anyway, Two, the LED display with those resistor values will be providing around 3ma per segment which is 24ma tops. Three, the backlight of the display will be around 100ma, Four, you can allow around 100ma for the Prop and circuitry (MOSFETs do not draw any static drive current). That brings it to under 250ma so we have 100% head-room.
For a simple potentiometer reading you don't need speed or much resolution so either a simple I2C bus 8-bit ADC will do as you can run this at 5V or alternatively the dual opamp is more than adequate and you can learn a thing or two about ADCs.
BTW, I design for 24V automotive systems as well and the tips I gave you are more than adequate for what you require.
Check back on this message soon and I will have some part numbers.
Since you are doing SMD I thought I'd just keep it simple and look for standard 8-pin SOIC packs and so I found a 16-bit I2C ADC with internal reference, the MCP3426 for $2.84 1-off This is way overkill for reading a pot but it's your decision. The 2.048V reference means you use a simple resistive divider on the input and the values can be convenient values as you have enough usable resolution to do a simple multiply and divide to convert the units.
Peter's tips are very helpful.
So in summary, just to check (and partly because I might be building the same thing). Assume 1 amp max:
1) diode - eg 1N4001
2) Choke - presumably 1 amp so not one of those RF chokes. How many uH?
3) Resistor. 4R7, wire wound, 5 or 10 watts?
4) Capacitor, 1000uF, 25V (16V might be too low)
5) Then regulator, either linear or switching.
Does the order of components 1,2,3 matter?
Should we add a fuse?
Aluminium case, earthed?
Back to the switching regulator....
For a "spike protection" resistor you say a 4R7 is what I should use. I have a BUNCH of SMD resistors that I got in a combo pack and I do see a 4R7 which is a 4.7K right? All the ones that I have are 1/2 watt or 1/4 watt which is too low for the incoming power to the regulator so I would need to go with a larger watt resistor, possibly a wire wound correct?
The standard 1N4004 is more than adequate considering that the 12V current will be about half of the 5V current and it's main task is not really for reverse protection but to isolate the input capacitors from "draining back" during cranking.. As for the choke that's only an optional extra but I have never needed to use it but it would be mainly for the high frequencies so I would have to have a look at a suitable one if it were used. The resistor provides that little bit of extra filtering due to the RC time constant but it's also an embedded fuse in the case of a catastrophic failure as even small lead-acid batteries can cause wiring to catch fire in a flash. This should just be your standard thick film but as a suggestion you can place two 400mW 10R in parallel (that's 10 ohms as the R is the decimal point and the shortform for ohms) which should fail nicely under overload. Sometimes I use a through-hole resistor and mount it off the board a little to prevent the PCB from being charred. There's a lot of material to consider if it is compliant to a standard.
Generally I avoid user replacable fuses as they are problematic and undesirable for a few reasons. For light loads such as powering control logic I don't bother except maybe allow for the resistor fuse but in the case of heavy loads such as motors I use polyfuses that are rated much higher than the normal load (otherwise they become a problem). If I get a motor stall and for some reason the control system doesn't shut it down then the polyfuse will trip and do it's job nicely. Turn off the power and a few seconds later it's ready to go again.
One of the biggest faults in ECUs and even domestic gadgets is the humble electrolytic capacitor. Too many times they dry out or burst open and for the sake of a few cents the whole unit is junked or "exchanged" by all-too-knowing repair establishments. BTW, just open your failing LCD monitor or ECU and visually inspect the electrolytics, especially those on the power input side or around the switching regulators and you might see signs of bursting or leaked electrolyte due to overheating. I've resurrected stacks of equipment simply by doing this. The point here is to give thought to the importance of that particular electrolytic that you are using and where and how it is being used. So, yes, choose a voltage rating that's certainly high enough and also consider the high temperature versions. Heating is not just due to cabinet temperature but also ripple current which is another parameter to consider along with ESR (it can get involved).
When it comes to switching regulators I see the LM2576 and their ilk rear their dreaded heads time and time again. If you know how I feel about LM386 audio amplifiers then you might get an inkling about how I feel about far out-dated TO220 switching regulators. There are far far better ways of switching and the chips these days are more efficient and tiny while all the other components are small and cheap too (don't forget the other components). That said, there are those modules that are really cheap and just work because if you don't lay out the pcb correctly for your own switch-mode design then you will have problems.
It just makes so much sense to use the switching regulator since the input supply is much higher than the logic supply and then to just use linear regulators to provide a nice clean ripple free logic supply. There's a lot of choice out there for linear regulators but I favour LDO types that are stable with a 1uf X7R ceramic.
4R7 is 4.7ohms. 4K7 is 4700 ohms.
And yes, would need a larger wattage. Worst case, 1A so W=I^2R so that is 1x1x4.7 = 4.7 watts. I think your max was a few hundred mA but still best to have a reserve.
Addit: cross post with Peter. Reading all the good advice...
I would still go for the opamp approach but otherwise use an I2C ADC with internal "voltage" reference. I'm not quite sure why you would need any kind of speed or resolution etc since you are reading a pot, a most imprecise device in itself. At the most I would say 10-bits of resolution (can you move the knob of a standard pot 0.263 degrees?). from a cheap SAR ADC would be all that you would ever need.
See my previous post regarding the other details.
EDIT: This was the circuit I originally drew up but you could do it with a single comparator and a input voltage divider
Here's that circuit:
BTW, the comparator will output a high if the voltage on the + input is higher than the - input.
ADC.spin
Short answer, NO.
Lookup SAR & Sigma/Delta if you are interested to find out more.