inductive position sensor sine to square wave conversion
inductive position sensor sine to square wave conversion
(OP)
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.
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.





RE: inductive position sensor sine to square wave conversion
Also, a decoupling capacitor (say 0.1 uF) between 5V and Gnd is good to have.
Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
RE: inductive position sensor sine to square wave conversion
Thanks a lot
RE: inductive position sensor sine to square wave conversion
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):
http://www.rmcybernetics.com/projects/DIY_Devices/...
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.
RE: inductive position sensor sine to square wave conversion
"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
RE: inductive position sensor sine to square wave conversion
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
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
RE: inductive position sensor sine to square wave conversion
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.
RE: inductive position sensor sine to square wave conversion
Z