×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

inductive position sensor sine to square wave conversion
3

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.


Replies continue below

Recommended for you

RE: inductive position sensor sine to square wave conversion

3
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
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

(OP)
Will try and report.

Thanks a lot

RE: inductive position sensor sine to square wave conversion

(OP)
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):

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

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

RE: inductive position sensor sine to square wave conversion

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
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

(OP)
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.

RE: inductive position sensor sine to square wave conversion

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close