Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

inductive position sensor sine to square wave conversion 3

Status
Not open for further replies.

serbar

Automotive
Oct 1, 2012
37
Hi.

I installed an external inductive sensor atacched to the crankshaft of a car with a tooth wheel with a two teeth gap to detect top dead center.

I converted the sine output from sensor to square wave with the atacched squematic using a LM 393. I am monitoring it with an arduino mega 2560.

Everything works fine except when i turn off the engine the arduino breaks and the routine is interrupted.

I went to see with an oscilloscope whats the cause and the problem is a very high frequency wave that overflows the arduino and it freezes and does nothing. I hope you guys to give a look and point me in some direction to eliminate this high frequency noise (i think its noise).

Thanks.

PS: I think its note related to ems noise in engine compartement. Before instaled in the car i tried the sensor with a small electric motor from a car toy in my room and it did the same.

The engine/motor are standing still for minutes and the lm393 output is sending this noise to the arduino, i observed with osciloscope.


 
 http://files.engineering.com/getfile.aspx?folder=ae8a46e7-776f-4cd0-ba49-90fb90ebfa43&file=comparator.png
Replies continue below

Recommended for you

When you stop the engine, the sinewave goes to zero. The reference input is already at zero. So the LM 393 (not 339?) amplifies the noise and that (plus possible feedback via supply) produces the HF on the output. Try a moderate hysteris (add 100 kohms) between output and signal input. With the 1 k input resistor you will get around 1% hysterisis.

Also, a decoupling capacitor (say 0.1 uF) between 5V and Gnd is good to have.

Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
Will try and report.

Thanks a lot
 
Hi.

It works fine.

The osciloscope doesnt show the noise anymore with inductive sensor.

Thanks a lot.

But now i have another issue: I am doing a DYI automotive ignition coil driver.

I made the circuit exactly like in this link (first picture):


the input signal in T1 is from the emmiter of a bc547c transistor whose base pin is connected to pin 1 of lm393 (output of comparator) from the same circuit in the first post of this thread with the alterations you suggested.

i am using that same circuit because The signal generator to fire the coil is from an inductive sensor inside an ignition distributor, just to convert sine wave to square wave.

My problem is that when i simply connect the battery the spark plug fires sparks even when the distributor is not spinning.

I have to avoid this, but even with your alterations i cant. Do you have any clue to what may cause this? Thanks.
 
First, you probably want resistance between the base and the LM393 output (i.e. base resistance). Similar to R1 for T2. Perhaps a shunt capacitor too to implement a low pass filter.

"when i simply connect the battery the spark plug fires sparks even when the distributor is not spinning" - if the distributor is stopped in a position that it is connecting a spark plug to the ignition coil it will do this. What is the issue?

Z
 
I don't think that a base resistor is needed for transistor 1. It is connected as an emitter follower and base current is quite low.

I don't like the free-wheeing diode. It is detrimental to the intended fast switch-off and will not allow more than around -1 V instead of -100 V. There are other issues with this diagram as well. I think that you shall try and find something a little better engineered.

Nice to have positive feed-back, BTW. Did it work with my recommended components? Or did you have to change anything?

Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
zappedagain,

Thanks for tip.

Im sorry, but even if is what you say i think the distributor should not be doing this because the current is not changing versus time. Plus the distributor has no mechanical contact breaker in primary circuit, it has just and inductive sensor inside, and that converted to square wave triggers the coil. In my opinion something must be switching the transistor even when its stoped.

Skogsgurra

Yes i could solve the problem exactly with the components and values you mentioned. But then i connected this circuitry to another inductive sensor and saddly it does the same with your set up.

So conclusion: with original inductive sensor works fine, with the one i am connecting now the noise appears again.

Thanks.
 
If your circuit is stopping with the transistor on (switch closed) then maybe your power supply is getting clobbered and cycling? Look at the input to the coil; as you say it must be cycling. Work back from there to figure out why.

Z
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor