Automotive Power Cleaning

I've been reading a lot of posts and articles on cleaning up the transient voltages of the automotive system. I am using an arduino pro mini to read a Tach signal from a computer PCM. This signal source may or may not have a 680 ohm pull up installed in the harness. It floats and pulls to ground to make the signal, so it needs a pullup resistor to make the signal present.

The schmitt trigger runs off 5v and the input cannot be greater that the source voltage so i used an NPN transistor to interface the signal with the schmitt trigger. I implemented a schmitt trigger to clean the input signal and its done wonders to produce a steady input at high RPMs. Though there is still an occasional hiccup in the input signal so I am trying to clean the 12v power source and input signal a little further.

Here is my new schematic that seems to do what I need when simulated. I am looking for any input on improvements before I proceed with further prototyping.

What is really needed is an oscilloscope trace of the "hickup". How do we know what your hickup looks like? Is it a voltage drop or is it a very short spike in voltage, or is it another signal merging with the tac signal, or what?

Paul

Hello borntoski,

Please read 'how to use this forum, please read', especially part 9 about about posting images. A lot of people, myself included, are not keen on following links to random web sites we know nothing about. Please post your schematic on this web site in accordance with the instructions.

Thank you.

Perry - I tried attaching and embedding the image, but it wasn't working. Its working now. Seems that I just used the wrong link for the picture.

Paul - I don't have a image of the actual transient power from the car. But thorough research, these are the common disruptions in an automotive environment.

I have several of these modules running in vehicles. A few of them have this "hiccup". It is resolved when I instruct the users to hook the module directly to the battery leads. When they power the module off the ignition power that is also powering the engines electronics and sensors, it seems to have this "hiccup". I don't have physical access to these vehicles that are having issues, I just know that changing the power source to the battery "which acts essentially like a massive capacitor" fixes the issue. I'm trying to make this module robust and work in all noisy environments, not just "the perfect" environment.

I do have a scope of the tach signal disruptions I was originally experiencing. These disruptions made the module useless above 2500 rpm.

The blue signal is the input to arduino, the yellow is the output. The green arrow points to the start of the "hiccup" caused by the spike in the red circle. It would only last for one cycle of the code.

I used an RC circuit of 330 ohm and 1uf to absorb the spikes and create the following signal.

I then used a schmitt trigger to condition the signal further with fast rise and fall times pictured below.

Here is the current schematic I designed that is having the hiccup issue.


[R1 100 Ω] and [D5 40v diode] create a 5v pull up in case the 680Ω 12v pull up is not present.
[R2 330 Ω] and [C1 1uF] create the RC circuit to absorb the spikes
[R3 330 Ω] to ground paired with the 680 Ω 12v pullup makes a voltage divider to make the signal going into the schmitt trigger under 5v.

I am redesigning the tach circuit input to accept any signal from 5-12v by using an npn transistor.
I am also trying to condition the power coming in to the module to protect it from all those +- spikes shown in the first image.

I tested the previous circuit and I'm pretty sure it burned up my transistors. Is it a problem to have 5v at the collector of the transistor and 12v at the base?

What if I were to use a mosfet instead of a BJT?

So there is a 12v square wave signal coming in on the "Tach" port that is switched on and off to ground. That drives the mosfet (Q1). The mosfet should then switch the schmitt trigger (U9) from 0v to 5v because of the (R2) pull up resistor right?

Thank you Borntoski, that's much better.

I'm afraid I don't have much to offer but here goes...

At the risk of being annoying, circuit diagrams are normally drawn with the highest voltage at the top and the lowest at the bottom, so ground at the bottom, +12V at the top. I assume your diagrams correctly represent the circuit, but they are hard work to follow.

I don't understand what D5 is for, a resistor on its own would be fine, unless D5 is doing something I can't understand.

The wiring to your 74HC is all wrong. There should be 0V to pin 7, +5V to pin 14. Pin 2 is an output but you seem to have wired it as an input. You have an output from pin 4, the corresponding input, pin 3, is connected to ground. I suggest you try the 40106 Schmitt trigger as this works quite happily at 12V.

Is it a problem to have 5v at the collector of the transistor and 12v at the base?

If you have 12V at the base of an NPN BJT you very soon won't have a BJT. The base - emitter junction is a forward biassed diode, so the maximum voltage on the base is about 0.7V, and should always be limited by something, such as a resistor. In any case, unless there is a compelling design reason to use a BJT, I would always prefer a MOSFET.

I think the filter you have with R2 and C1, and the divider could be improved. The values are too low, I'd try values around 10k ohms. You don't need 3 resistors, just use 2 resistors as the voltage divider and put a capacitor across the bottom resistor.

Your 7805 needs a capacitor wired close to the input and another close to the output, see datasheet.

I hope something in that helps, perhaps someone else can help too.

Thankyou Perry for the input. I've organized and updated the schematic.

I am using the MOSFET Q2 to interface the signal with the schmitt trigger now.

R3 as a pullup incase R1 is not present.

R2 and C3 create the RC circuit to keep frequencies and noise above 2000 Hz from passing to the schmitt trigger.

R2 is also a pullup for the schmitt trigger input.

D2 is to protect against reverse voltage

D1 is a TVS diode to protect against the very large voltage spikes 100-25kV spikes in an automotive environment.

C4 and C5 were added as per Grumpy_Mikes decoupling capacitor recommendations.
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
Have I put them in in the right spots with the right values?

The wiring to your 74HC is all wrong

I am using a 1 channel 74HC1G14. I named the pins and included a part number. I am using the 7805 to power the schmitt trigger so this 5v version should be fine right?

I would always prefer a MOSFET

I have changed form the BJT to a MOSFET after doing some research.

Your 7805 needs a capacitor wired close to the input and another close to the output, see datasheet.

I included the recommended Cin 0.33uF capacitor (C1) on the Vs. What value should I use for the Co (C2) capacitor? It says,

"CO is not needed for stability; however, it does improve transient response. Values of less than 0.1 uF could cause instability"

So should I just use 0.1uF? or 1uF?

I've organised and updated the schematic.

Much better :slight_smile:

I am using a 1 channel 74HC1G14

OK, but that isn't what was on your original diagram, very frustrating giving advice based on incorrect information >:(

D2 is to protect against reverse voltage

D2 needs to be right back at the 12V input, at the moment it does not protect C5 or D1.

"CO is not needed for stability; however, it does improve transient response. Values of less than 0.1 uF could cause instability"

So should I just use 0.1uF? or 1uF?

I don't believe it matters much, 0μ1 is recommended, something bigger will be fine.

What you have is much better, whether it will work is down to you to test. There may be other improvements but based on what you have provided and what I know I can't think of any. Someone else might be able to suggest things I've not considered, then I will learn something too!

D2 should be in the right spot now.

I've added another TVS diode (D3) to the tach signal input.

I also added C4 as another RC buffer.

I've made C2 0.1 uF

As a general rule it probably wouldn't hurt to add some electrolytic filter caps on the 12V (1000uF to 3300uF/20V) and even more 0.1 uF decoupling caps.

Are you sure you don't need a schmitt trigger (noninverting) on your "Source" input signal to the mosfet ?

Hi,
Circuit layout has a lot to do with suppression and generation of interference spikes?

Can you please post a picture of your project please?

Make sure you do not have a daisy chain of gnd connections, in this case you would be better to have a central gnd and star type connection to your input devices and the controller gnd.

Placing R1 between the drain of Q1 and the CATHODE of D2 will probably help too.

Tom.... :slight_smile:

Can you please post a picture of your project please?

Make sure you do not have a daisy chain of gnd connections, in this case you would be better to have a central gnd and star type connection to your input devices and the controller gnd.

Is this what you mean by a central ground plane with star type connections?

Placing R1 between the drain of Q1 and the CATHODE of D2 will probably help too.

R1 is in some circuits and not in others. My project is the enclosed gray box. I cannot change what's outside the box.

As a general rule it probably wouldn't hurt to add some electrolytic filter caps on the 12V (1000uF to 3300uF/20V) and even more 0.1 uF decoupling caps.

I've changed C5 to a 1000uf electrolytic capacitor. I also added C7 0.1uF cap to decouple the schmitt trigger. Any other places I should be adding them?

Are you sure you don't need a schmitt trigger (noninverting) on your "Source" input signal to the mosfet ?

Are you suggesting is have another schmitt trigger? I am using the mosfet to protect the schmitt trigger from voltages higher than 5v as that would damage the IC. I thought of using a 12v schmitt trigger to drive a transistor that inputs a 5v signal to the arduino but figured it was better to have the schmitt trigger run off the clean 5v from the 7805.

Also the inverting/non inverting should not matter as it is a simple square wave triggering an falling interrupt on the arduino.

Hi,
I would suggest you increase the width of ALL your traces, to minimize volt drops, especially around the voltreg.
If you have groud plane then that is fine, good move.

I'm not sure what you are trying to accomplish, input and supply but no output?

Tom... :slight_smile:

Also the inverting/non inverting should not matter as it is a simple square wave triggering an falling interrupt on the arduino.

Are you suggesting is have another schmitt trigger?

Unless you can show us scope traces of :

A. Q1 input
B. Q1 output
C. Q2 ouput (Schmidt trigger input)

Pleased post the scope traces AFTER adding the schmidt trigger again only this time identify the EXACT
point where it was captured. I'm confused by all the information you posted . Can you post a schematic
of your latest circuit and a identify the scope trace capture point for the last scope screenshot after adding the RC filter (I still can't locate those components)

I used an RC circuit of 330 ohm and 1uf to absorb the spikes and create the following signal.

The cutoff frequency of that RC LOW PASS filter is 482 Hz.
Are you sure that's what you want for an automobile tach ?

MATLAB

R=330

R =

330

C = 1e-6

C =

1.0000e-06

fc = 1/(2piR*C)

fc =

482.2877

I built another prototype and it seems to be working.

TomGeorge,

I would suggest you increase the width of ALL your traces

I've increased the trace width from .25mm to .5mm. Think I should go bigger or would that be overkill?

I'm not sure what you are trying to accomplish, input and supply but no output?

The rest of the circuit is simple high, low signals output to another automotive computer and some LEDs. That part is working fine. My issue is the interrupt on pin 2 will sometimes trigger twice on a pulse when it should only have triggered once, making the output signal seemingly double for a cycle of the code.

Raschemmel,

The cutoff frequency of that RC LOW PASS filter is 482 Hz.
Are you sure that's what you want for an automobile tach ?

Yes that was a little low. I've adjusted it. An automotive tach signal could output 8 pulses per revolution. So at 7500 RPM * 8 ppr, we get 60,000 pulses per min. Or 1000 pulses per second or 1000 Hz. So I've adjusted the RC circuit to cut off at 3386 hz using a 4.7k ohms pullup resistor and a 0.01 uf capacitor
fc = 1/(23.144700*.00000001), fc = 3386 hz

Q1 is my assumption of how this engine PCM works. I've pulled apart the computer and traced the lead to a chip whose part number goes nowhere (09384744)(zip-23 pin IC). Must be proprietary? All I know is that this wire is pulled to ground to create a square wave signal and needs a pull up resistor to be present.

Here is a schematic of my most recent prototype I tested today. It seems to be working fine on my vehicle. I did not add in the second schmitt trigger yet. Could you please explain why I would need a second schmitt trigger between Q1 drain and Q2 gate?

I have also included CH1 CH2 and CH3 nodes that correspond with the following oscilloscope screenshots channels

borntoski:
The rest of the circuit is simple high, low signals output to another automotive computer and some LEDs. That part is working fine. My issue is the interrupt on pin 2 will sometimes trigger twice on a pulse when it should only have triggered once, making the output signal seemingly double for a cycle of the code.

Hi,
I'm glad to hear the track widening helped.
Don'y be scared to go to 1mm on your positive power supply tracks.
The capacitance between the positive track and the ground plane will help quite a bit.
Sorry you are only single sided PCB.
Where on your PCB and schematic are the outputs located.
Thanks.. Tom.. :slight_smile:

Why are you feeding 5V to the raw?

BurntChip:
Why are you feeding 5V to the raw?

Good catch, I must be going blind.
Tom.... :o

I figured I would run the power through the raw to ensure clean power to the chip. I thought that it might have a voltage drop because that's how regulators work, but on the arduino website, it states
"Board Power Supply| 3.35 -12 V (3.3V model) or 5 - 12 V (5V model)"

I just checked my voltage at RAW and VCC and found 4.985v and 4.625v respectively. So it turns out that I shouldn't be using the RAW I guess. I was thinking of integrating the chip directly to the board actually so I Think i'll pursue that.