Power line filtering in a vintage car - Page 1
Forum section: electronics / projects

author: robzy
author_rank: Regular Contributor
timestamp: January 05, 2020, 10:00:09 am
content: So I have a problem: I connected an ESP32 to the 12v voltage rail of a vintage car (~70 years old) and let the magic smoke out. The module's AMS1117 voltage regular is rated up to an input voltage of 20v, but the module stopped working when the car was running, and the AMS1117 literally snap crackled and pop.I want to solve the problem.I think that the problem is the huge transient voltages caused by oldschool ignition systems. Even my multimeter can't handle voltage measurement of the car's power line, it shows around 12V, but then goes all glitchy.What is the best way to create a cleaner 12V rail from an old car for an ESP32?I have done some searching and I haven't found a lot of information. These are the thoughts that have occurred to me so far:Coils and capacitors: Currently my preferred option, but I can't find any information on the design of such filtering circuitsMOVs: They don't seem ideal, because it looks like they are generally used for irregular voltage spikes and the car would just hammer themIndustrialised voltage regulator ICs: I haven't found anything that seems rugged enough for this use case, I've found some IC's that claim to be able to protect themselves against higher voltage input levels, but nothing that seems ideal for this particular case

author: Psi
author_rank: Super Contributor
timestamp: January 05, 2020, 10:13:10 am
content: LM2937IMP regs are automotive rated and have built in 60-V transient protection. (buy them from legit source, there are fakes out there which are just normal regs)If you want a bit more protection, add a 0.1 ohm 5W series resistor and chunky ~3000W ~40V TVS diode to GND on the input side of that reg.

author: tautech
author_rank: Super Contributor
timestamp: January 05, 2020, 10:15:40 am
content: Not only are ignitions the noise source, generator brushes and electromechanical regulators are noisy too.Generally the solution was to suppress at the source and just the addition of caps was sufficient.IIRC 0.22 - 0.47uF 200V caps were used.

author: DBecker
author_rank: Frequent Contributor
timestamp: January 06, 2020, 12:19:11 am
content: Many '1117' regulators are rated for *far* less than 20V. Some are rated at 6V or 8V -- fine for dropping a regulated 5V supply down to 3.3V, but few other use cases. The real AMS1117 is rated for a maximum of 15V, but I've blown them out (more likely, a counterfeit) with a 12V wall wart supply.Some are also thermally vulnerable, and dropping 14V down to 3.3V might result in the thermal limit circuit not responding in time (assuming that a generic regulator even has a thermal shut-off).Automotive power supplies should be rated to survive at 28V continuous, with a brief load dump to 35V or more. There are plenty of medium-priced automotive chips that can reliably do this. What are your voltage and current requirements? Do you need the module to work during cranking transients?

author: duak
author_rank: Super Contributor
timestamp: January 06, 2020, 12:44:53 am
content: There are usually two capacitors (AKA condensors) on a Kettering or points style ignition system. One is across the points to reduce arcing. The second is connected to the other low voltage terminal on the coil to reduce RFI. This vehicle probably has a generator with an electromechanical regulator. These systems usually have caps on the generator and/or the regulator to reduce RFI. These caps usually have a value of 0.18 to 0.22 uF. I think I've seen these caps on horns and electrical fuel pumps too.For a filter into the electronics I would be looking for something like a 1 to 5 mH inductor in series and something like 10 to 22 uF in parallel with 1 uF to circuit common. These were available at car stereo shops at one time.

author: robzy
author_rank: Regular Contributor
timestamp: January 06, 2020, 02:12:54 am
content: Thank you everyone! Each of those posts was super helpful.I need 50mA at 3.3V, so my plan at the moment is to pick up an 'industrialised' voltage regulator, having its input protected by a resistor&TVS, and all this being fed an LC low-pass filter. I'll need to do some efficiency calcs to work out if I should do a 3.3V regulator or a 12V regulator (followed by a cheap 3.3V switcher).duak, when you say a 1uF to circuit common what do you mean? I.e. if I put a 15 uF from 14V (unregulated) to ground, where exactly would I put this 1uF?DBecker, I do not need the module to work during cranking transients, but I do need the module to not blow-upI assume that the above-mentioned plans should be sufficient for that, but do tell me if I'm missing something. Incidentally, thanks for sharing the guidelines re 28V/35V. Super helpful.A few other FYIs:- The 1117 regulator came with the cheap-as-chips aliexpress ESP32, so it is likely very suspect here. Lesson learned.- I want to avoid messing with the car's original electronics (e.g. by adding capacitors). The distributor contains a condenser between the coil and ground, but afaik there's nothing on the other side of the coil, and I'm not sure that the Lucas RF95 regulator has any capacitors in it.- You're correct in noting that it isn't just the ignition system, but also generator, regulators, and fuel pump. I confirmed that my multimeter still glitches when the generator is disconnected, but that doesn't mean it wasn't a problem in its own right.

author: basinstreetdesign
author_rank: Frequent Contributor
timestamp: January 06, 2020, 05:00:35 am
content: OK, about designing electronics to work within a vehicles electrical environment. It's not pretty. In fact automotive electrics are acknowledged by the experts to be one of the most vicious and nasty electrical environments going. You may hear everybody talk about a "12V system" but that value is a nominal value at best. Because the system also has to contend with engine cranking, accessory noise, inductive kickbacks from things like electric window motors when they stop and something called "load dumps", anything plugged into the system may be subjected to negative voltage spikes of over -100V, polarity reversals, positive voltage spike of several 100 V in amplitude as well as 24V jump starts, and accessory noise and RF from several Hz to the MHz range.It's kind of like Alice walking into Wonderland if you are not prepared for it. It's not a nice well-behaved place. You may find that your gizmo dies the first time you open the window. Here is an app note from Littlefuse that talks about it more.https://m.littelfuse.com/~/media/electronics_technical/application_notes/varistors/littelfuse_suppression_of_transients_in_an_automotive_environment_application_note.pdfYou should try to research what protection and filtering circuitry is used between the 12 source and the first component of your circuit. It usually amounts to an inductor/capacitor pair on input followed by a zener diode, silicon diodes to limit input to -1V to +15V range and more decoupling capacitors to filter out more noise.Here is a circuit that I used with a gizmo (car sign) that ran from cigarette outlet power on a Ford truck. It worked without any problem at all. I admit that the input inductor could have been somewhat bigger. Ignore that buck regulator - it is irrelevant but worked fine, tooGood luck.

author: langwadt
author_rank: Super Contributor
timestamp: January 06, 2020, 05:38:58 am
content: Quote from: Psi on January 05, 2020, 10:13:10 amnot need to use as little as 0.1 Ohm when you only need maybe 100mA at 3V

author: Psi
author_rank: Super Contributor
timestamp: January 06, 2020, 06:00:05 am
content: Quote from: langwadt on January 06, 2020, 05:38:58 amThat was to protect the TVS, but if his overall power needs are that low then the thin power wire to Vbat is enough to add some resistance.We have 36V 4000W TVS diodes on our automotive gear and, even then, they occasionally do pop.However we need to drive 10A loads, so our cables to Vbat are quite thick.

author: duak
author_rank: Super Contributor
timestamp: January 06, 2020, 06:14:57 am
content: robzy, the two capacitors I mentioned above should be connected in parallel. I used the term common because I don't know how your circuit common is connected to the vehicle as It could be a wire or a mounting screw to some sheet metal. The filter's effectiveness is the greatest with the caps' connection to circuit common as short as possible.Basin's design looks good too. I'd increase the value of C31 to something like 100n to 1u and L3//L4 to what I mentioned above. It sounds like the electrical system in this vehicle has some industrial strength transients. It's also about 70 years old - there's no guarantee that there's one solid, low impedance ground between the battery, charging system, ignition system, all the other bits n' pieces.That being said, if you have a 'scope, it'd be a good time to use it. We've all proposed solutions to what we think are the problems. It may be that there's something else that needs special attention.

author: robzy
author_rank: Regular Contributor
timestamp: January 06, 2020, 06:57:09 am
content: Quote from: basinstreetdesign on January 06, 2020, 05:00:35 amThank you very much for your post! That is very helpful. The addition of a diode in series with the circuit makes a lot of sense when it comes to protection from negative transients.Quote from: duak on January 06, 2020, 06:14:57 amAh, that makes sense. I was totally misreading your post.Quote from: duak on January 06, 2020, 06:14:57 amIf I had a scope I wouldn't dare to put it anywhere near this carThe proposed solutions have been very helpful, I've just ordered some parts, and I'll put together a new circuit on the weekend.

author: jfiresto
author_rank: Frequent Contributor
timestamp: January 06, 2020, 10:09:19 am
content: Quote from: Psi on January 05, 2020, 10:13:10 amIs the tenth ohm resistor necessary? I ask because an ISO-16750-2 load dump pulse generator for verifying such things has an internal resistance of 0.5–4 ohms. The last unsuppressed generator I designed for was 80V @ 2 ohms.

author: langwadt
author_rank: Super Contributor
timestamp: January 06, 2020, 05:42:21 pm
content: Quote from: Psi on January 06, 2020, 06:00:05 amsure for high current, but if the load is only 100mA@3V you might as well use something like 10-20 Ohm

author: amyk
author_rank: Super Contributor
timestamp: January 07, 2020, 02:51:37 am
content: Quote from: robzy on January 06, 2020, 02:12:54 am70-year-old car with an electric fuel pump?

author: Gregg
author_rank: Super Contributor
timestamp: January 07, 2020, 03:15:47 am
content: Quote from: amyk on January 07, 2020, 02:51:37 amIn post #5 OP stated the vehicle has a Lucas voltage regulator. That should be a clue as to why it has an electric fuel pump. Lucas electrics in vehicles are legendary (not in a good way). I know from experience, I have a 1957 MGA.Maybe Lucas and Murphy were drinking buddies.Edit: Additional information. Perlux ignitors (may be listed as Pertronix Ignitor) are available for most older vehicles and use hall effect sensors to replace the points. Resistor ignition wires may be of some help.

author: John B
author_rank: Frequent Contributor
timestamp: January 07, 2020, 08:25:59 am
content: I run a few microcontrollers in my car, and on each design I have put an RC filter on the input. R is generally ~100R. That makes it easier to implement basic clamping with zeners and caps, without having to worry about high instant power dissipation.

author: robzy
author_rank: Regular Contributor
timestamp: January 07, 2020, 10:41:41 am
content: Quote from: Gregg on January 07, 2020, 03:15:47 amVery nice! I've got a 1949 Morris Minor MM.Quote from: Gregg on January 07, 2020, 03:15:47 amI'm planning on fitting an Accuspark to replace the points.

author: DBecker
author_rank: Frequent Contributor
timestamp: January 07, 2020, 08:19:54 pm
content: Zero surprise that the generic 1117 blew up. It had no chance of surviving. Did it fail shorted so that everything attached died as well? Because that is their superpower.For an antique vehicle with DC dynamo you'll need to design for worse conditions than modern guidelines expect. If the battery cable is making intermittent contact at high RPM with no other electrical load, the voltage transients will be far above what happens with an alternator.Luckily you only have to supply a modest amount of power, and it's probably a carefully operated antique, so protection is far easier than the general case.The simplest solution is a fast-blow fuse, TVS and the circuit board out of a switching USB lighter adapter, feeding into the 1117. The next step up is a robust automotive linear voltage regulator on a heatsink. A high end design would be using a SM15T33C TVS and the reference design of the TLE9471V33.You'll have an excellent chance of surviving typical mechanical regulator transients.

author: floobydust
author_rank: Super Contributor
timestamp: January 07, 2020, 08:40:19 pm
content: OP there is also a great danger if you use a car cigarette lighter phone charger, these are basic buck-converters that can't take much for automotive transients. When they fail short, your phone will be destroyed. So maybe put more in than just for the ESP8266?In my own car I have a transient-protected module using series diode, industry standard 6,600W 27V TVSSM8A27,polyfuse etc. It clamps to 40V worst case so any Vreg IC should be good to that or a bit less.Lucas RF95 is harsh on electronics, it could use capacitors across the contacts for longer life.

author: DBecker
author_rank: Frequent Contributor
timestamp: January 08, 2020, 06:31:58 am
content: Quote from: floobydust on January 07, 2020, 08:40:19 pmMany of the cheap lighter-to-USB buck converters are quite robust. They are designed to work with either 24V or 12V systems, with margin. They are certain *way* better than the sketchy low end linear regulators.While the 27V TVS you suggest is OK in real life, it won't pass the tests that target a 28V jump start. Those tests are why a 33V TVS is the usual recommendation.A 28V jump start used to be a common tow truck trick to allow a quick start when long jumper cables were used with a good-but-discharged battery. It became far less popular once cars started using ECUs that could be damaged by high voltage. Today it would be quite uncommon to see a mobile service truck use anything but a high end jump start box.

author: floobydust
author_rank: Super Contributor
timestamp: January 08, 2020, 08:06:23 am
content: Would you trust your $500 cellphone/tablet to a generic car USB charger?For a few bucks, I'll add a TVS. I find most chargers are very cheap and using old IC's with little headroom on Vin.The TVS I mention is prolific in the auto industry, it's in many if not all ECU's and BCM's, ABS and in my car. I will confirm the 27V part but it's odd SM8A27 specs compared to a 26V SM8S26A. The boost is a 24V spec and I think in the SAE standards, not ISO. Where do you see it? In reality many automakers have their own vehicle transient standards, not all following ISO or SAE. It's perfectly fine to pop the fuse here with load dump or 24V boost, which are extremely rare occurrences in the life of a car.A problem with going to a 33V TVS is most voltage regulators (LDO or buck) can't take the 53V clamp (vs 40V), and the TVS dissipates more energy. It's a tradeoff. You want the lowest possible clamping voltage, including over automotive temperatures (a TVS tempco is large).Many people want to run an Arduino, Raspberry Pi, ESP32/8266 in their car. There is a need for a basic recipe.But any TVS is going to clamp fairly high and that eliminates all of the usual jellybean regulators out there.https://www.emtest.com/what_is/glossary/standards/ISO-7637.phphttps://www.teseq.com/product-categories/automotive-electrical-disturbances.php

author: jfiresto
author_rank: Frequent Contributor
timestamp: January 08, 2020, 09:05:45 am
content: Quote from: DBecker on January 08, 2020, 06:31:58 amIt may not be as much as one might hope. I asked a manufacturer about their 12/24V vehicle USB charger before I added it to a car that has no central overvoltage (load dump) suppressor like the OP's. Up to 36V was the number they gave me.The best I could do was to add a fused MOSFET switch, upstream, that cuts out at 22–24V, followed by a 5kW 5KP24A TVS diode if the switch doesn't open or is a little slow. I can dig up and post the circuit if someone needs an example of how (or how not?) to do it.

author: DBecker
author_rank: Frequent Contributor
timestamp: January 08, 2020, 05:46:25 pm
content: Quote from: floobydust on January 08, 2020, 08:06:23 amYour lead-off argument is an appeal to emotion, rather than a technical point.Billions of people trust their phones to car USB chargers. The production volume of those chargers is so high that most are using recent purpose-designed chips. They are optimized to work in harsh conditions with the cheapest external components, and they do an excellent job of it.The specific TVS I listed, the SM15T33/33C, is an appropriate one to use with auxiliary equipment. ST numbers their TVS as the nominal breakdown voltage, not the operating voltage. The Vishay chart listed above shows that their "28" part actually has a 33V typical breakdown voltage, with a minimum breakdown of 31V, so it's quite close.ISO 16750-2 is a short, easily read standard. It's worth a quick read-through.

author: floobydust
author_rank: Super Contributor
timestamp: January 08, 2020, 08:18:00 pm
content: Your technical point relies on faith unless you disassemble the car USB charger and see what chip is used and if there is a TVS. I've seen enough of them to know they aren't always good products. My philosophy is not to trust it unless I've taken it apart.Billions of people are not driving cars from 1949 with mechanical regulators. Modern alternators incorporate zener diodes for rectifiers, the system transient voltages are lower.One employer has product using a78M05on 24V truck electrical systems, with aSMBJ33ATVS. How do you think it would do? Vin max. is 35V and the TVS clamps well above that. About 20% of the power supplies failed in the field. Many with the Vreg IC dead or 22uF 35V tantalum input cap shorted.If noobs can understand to make sure the TVS highest clamping voltage is below their voltage reg's maximum input voltage, then they are mostly covered. Another series diode to cover reverse-polarity spikes and best to have a some line resistance in the form of a polyfuse or resistor, to limit TVS current.

author: m3vuv
author_rank: Super Contributor
timestamp: January 09, 2020, 12:36:06 am
content: my friend had a 1935 derby bentley,the fuel pump was electric on that made by su.

author: amyk
author_rank: Super Contributor
timestamp: January 09, 2020, 02:58:30 am
content: It's interesting to see that early import cars, particularly UK ones, used electric fuel pumps; the customary American layout is a mechanical one driven by the camshaft, which was used from the 20s through at least the 70s until fuel injection started becoming common.

author: robzy
author_rank: Regular Contributor
timestamp: January 09, 2020, 12:46:53 pm
content: Quote from: DBecker on January 07, 2020, 08:19:54 pmJust got the new ESP32 today - and confirmed that it killed the rest of the circuitry.It was only a TC74 temperature sensor, but it was a righteous pain-in-the-backside to solder it to the end of a cable, and also has my only appropriately-sized magnet epoxied to it already.

author: robzy
author_rank: Regular Contributor
timestamp: January 13, 2020, 11:22:09 am
content: Thanks everyone! It worked an absolute treat! I now have the cleanest 5V supply attached to Lucas electronicsI ended up with an LC filter feeding a voltage regulator with a TVS protecting the input pin. Between the LC filter and the voltage regulator was a resistor to help the TVS bleed some power if need be.I was going to put a diode between the filter and the regulator to protect against negative spikes, but I forgot. It shouldn't be necessary though, because the filter should be beefy enough to absorb any negative spikes, and even if it isn't the TVS should catch it.Photo attached. Don't judge my soldering. Will clean it up and apply liberal amounts of hot snot when I'm happy with the circuit.Just FYI components were:2.2 mH inductor, ferrite/750mA/880mΩ0.47uF film capacitor, X2 275V0.1Ω wirewound resistor, 3.75WON Semiconductor LM2931DT-5.0GSM15T36CAY TVS, bidirectional 36VIn all cases I chose those components because they were cheap(-ish) and readily availableIf I were to do it again I might use a higher value resistor, given the low current of my application, and only a unidirectional TVS to clamp the negative voltages even closer to 0.

author: jfiresto
author_rank: Frequent Contributor
timestamp: January 13, 2020, 05:36:09 pm
content: Quote from: robzy on January 13, 2020, 11:22:09 amIf you do, you might check what wattage resistor you will need if someone hooks up a battery, backwards, so that +12V becomes -12V for a few minutes. That is one of the faults people design for, from the standard catalog of automotive electrical horrors.

author: trobbins
author_rank: Frequent Contributor
timestamp: January 13, 2020, 09:18:55 pm
content: robzy, you didn't identify where you connect to the car's voltage supply (eg. direct to battery, or some distant point in a harness with some of those other noise sources on the same feed)? You also didn't indicate if there was a possible ground loop concern, depending on if your load is isolated or somehow connected to other parts/equipment/chassis.