Maker Pro
Maker Pro

0-5V square wave to sine wave with zero crossing?

B

Barbarian

Jan 1, 1970
0
If the sensor has three wire it IS a Hall Effect.

The signal is an open-collector output, so you will HAVE TO pull it up
(usually about 1K ohm) to either 5 volts or (more often) to 12 volts.
 
I would have to use a non polarized cap right? I would scope the ECU
but its chained to the table at my school.

Actually I don't think you would. As long as your square wave is
unipolar with repect to ground and unless you have substantial
inductance in the system the driving side of the cap will never be
substantially negative compared to the driven side.

Speaker crossovers often use nonpolarized caps, but that's to allow
them to use amplifiers which drive both wires - sort of "H bridge"
topology - instead of a single unipolar driver working against ground.

When I did my impedance calculation for 150 hz, that was for highway
speed, and I doubt you tested it at that, so it could be even worse -
your 100 uF cap experiment could easily have been effectively a 500k
ohm series impedance.
 
J

Joerg

Jan 1, 1970
0
Hello Jim,
How about LM339? I believe it's spec'd below ground, but beware, too
far below and one input causes the output to switch polarity :)

I know it would work but the data sheet says 0V. Foot note 6 states that
neither input shall be allowed more than 300mV below. However, that
cannot be considered a guarantee that it will remain fully functional
while below 0V. So, in a heavily regulated field you can't really do it.
Until they change the data sheet or give it to you in writing. Which
they don't. Been there, tried that, didn't fly...

Regards, Joerg
 
J

Jim Thompson

Jan 1, 1970
0
Hello Jim,


I know it would work but the data sheet says 0V. Foot note 6 states that
neither input shall be allowed more than 300mV below. However, that
cannot be considered a guarantee that it will remain fully functional
while below 0V. So, in a heavily regulated field you can't really do it.
Until they change the data sheet or give it to you in writing. Which
they don't. Been there, tried that, didn't fly...

Regards, Joerg

Hmmm? The data sheet I'm looking at says, in Absolute Maximum
Ratings...

Input Voltage -0.3VDC to +36VDC

...Jim Thompson
 
J

Joerg

Jan 1, 1970
0
Hello Jim,
Hmmm? The data sheet I'm looking at says, in Absolute Maximum
Ratings...

Input Voltage -0.3VDC to +36VDC

Yes, but proper circuit function is not guaranteed over the abs max
ranges. All the abs max says is that it won't fry within the stated
limits. For example, on the LM339 both V+ and Vin are allowed to 36V per
abs max, single supply. If you supply it with 36V then the device is
guaranteed not to function with Vin at 36V because its common mode range
doesn't include the positive rail. You'd have to take V+ to 38V to do
that, probably followed by a pop and a puff of smoke.

In regulated industries you can only go by what's under "Electrical
Characteristics". And even there you cannot use the "Typ" columns but
the circuit around the chip must tolerate any chip that is between "Min"
and "Max".

Regards, Joerg
 
J

Jim Thompson

Jan 1, 1970
0
Hello Jim,


Yes, but proper circuit function is not guaranteed over the abs max
ranges. All the abs max says is that it won't fry within the stated
limits. For example, on the LM339 both V+ and Vin are allowed to 36V per
abs max, single supply. If you supply it with 36V then the device is
guaranteed not to function with Vin at 36V because its common mode range
doesn't include the positive rail. You'd have to take V+ to 38V to do
that, probably followed by a pop and a puff of smoke.

In regulated industries you can only go by what's under "Electrical
Characteristics". And even there you cannot use the "Typ" columns but
the circuit around the chip must tolerate any chip that is between "Min"
and "Max".

Regards, Joerg

What brand data sheet are you looking at? I'm looking at National's
and I'm not seeing that to which you refer.

But that's all right, I've probably designed in more LM324's and
LM339's than you are days old ;-)

...Jim Thompson
 
J

Joerg

Jan 1, 1970
0
Hello Jim,
What brand data sheet are you looking at? I'm looking at National's
and I'm not seeing that to which you refer.

National. Page 4, input common-mode voltage range: Min 0V, max V+ minus
1.5V. Note 6 says 300mV but not that it will work properly down to that.
(Yes, I know it will...)

I know that these are just legal technicalities but if you have the FDA
and other agencies constantly breathing down your neck it's better to
stick to the rules. If something goes wrong, and that can be totally
unrelated (unit fall on someone's foot, whatever), those are the tiny
things that lawyers may ask their expert witness EEs to go going looking
for. Just to attack the design engineer's reputation.

In med electronics you've got to have it in writing. It's the same with
other chips, like the MSP430. Looking at the graphs it is easy to see
that they have 30ohm devices at the port pins. Yet TI specs 2mA as the
limit (even in the abs max). So I called. "Yep, they can drive a lot
more" ... "Could I have an email to that effect?" ... "Nope." So I
didn't design it in.

But that's all right, I've probably designed in more LM324's and
LM339's than you are days old ;-)

It wasn't too many LM339's on my side. Main reason is that you can often
do the same with a free 1/4th of an LM324 plus a diode if you need OC
output.

But the number of LM324's shipped for production on my designs is quite
huge. It's my staple amp. The sole reason is cost and the fact that it's
input CM range includes the negative rail.

Regards, Joerg
 
J

Jim Thompson

Jan 1, 1970
0
Hi, I was wondering if you guys could help me with a little problem. I
am swapping transmissions in my car and the new transmission uses a
different type of speed sensor. My original transmission uses a
variable reluctor that generated a sine wave. My new transmission uses
a sensor that generates a 0V to 5V square wave. I was wondering if
anyone know how i could convert me 0V to 5V signal to a sine wave with
a approx 10Vpp. My freshman year i play with a XR2206 function
generator IC. But I have no idea how to make it work to solve my
problem. I was also thinking about using a op-amp summer with a gain of
about 2 and adding a negative offset. Any advice would be helpful.

It's likely that the original speed _indicator_ clips the sine VR
signal anyway.

You might look into the _indicator_ specs.

What will likely work is a variation on Blogg's post, but I'd do 2x2
diodes (2 each in series, then back-to-back parallel) and add an R in
series with the C. (Real men don't do ASCII... if it's not clear to
you I can post a _real_ schematic on A.B.S.E ;-)

...Jim Thompson
 
J

Jim Thompson

Jan 1, 1970
0
Hello Jim,


National. Page 4, input common-mode voltage range: Min 0V, max V+ minus
1.5V. Note 6 says 300mV but not that it will work properly down to that.
(Yes, I know it will...)

The version I find DOESN'T have the "0" in the LM339 column, just for
the LM2901 and LM3302.
I know that these are just legal technicalities but if you have the FDA
and other agencies constantly breathing down your neck it's better to
stick to the rules. If something goes wrong, and that can be totally
unrelated (unit fall on someone's foot, whatever), those are the tiny
things that lawyers may ask their expert witness EEs to go going looking
for. Just to attack the design engineer's reputation.

In med electronics you've got to have it in writing. It's the same with
other chips, like the MSP430. Looking at the graphs it is easy to see
that they have 30ohm devices at the port pins. Yet TI specs 2mA as the
limit (even in the abs max). So I called. "Yep, they can drive a lot
more" ... "Could I have an email to that effect?" ... "Nope." So I
didn't design it in.



It wasn't too many LM339's on my side. Main reason is that you can often
do the same with a free 1/4th of an LM324 plus a diode if you need OC
output.

But the number of LM324's shipped for production on my designs is quite
huge. It's my staple amp. The sole reason is cost and the fact that it's
input CM range includes the negative rail.

Regards, Joerg


...Jim Thompson
 
J

Joerg

Jan 1, 1970
0
Hello Jim,
The version I find DOESN'T have the "0" in the LM339 column, just for
the LM2901 and LM3302.

Hmm..., mine does. Shows up first at the bottom on page 2, Electrical
Characteristics, 4th row, 2nd columns:
http://www.national.com/ds/LM/LM139.pdf

Unless there is a special Arizona version of it ;-)

Page 4 of the online version actually doesn't have it on page 4. Must be
a printing error because it is on hardcopies and also on the tables
above it.

Regards, Joerg
 
J

Jamie

Jan 1, 1970
0
I just tired a 22, 47, 100 and 150uF caps with no luck. This is
starting to get discouraging.
i think i was the one that told you to try a transformer
your looking a sine wave, a transformer should suppress the
fast slew/skew to give you a more rounded pulse..
it's just a throught.
P.S.
i think you stated that you needed a 10v P-P ?
 
Jamie,
That's on my list stuff to try, I'm just doing the easy stuff first.
What type of transformer do you recommend? I need something with a
decent level 10Vpp is just a random number i made up.
-Rich
 
Jim,
Thanks for replying. I tired drawing out what you wrote but i couldn't
figure it out. Could you please send me a schematic.
-Rich
 
J

Jim Thompson

Jan 1, 1970
0
Hello Jim,


Hmm..., mine does. Shows up first at the bottom on page 2, Electrical
Characteristics, 4th row, 2nd columns:
http://www.national.com/ds/LM/LM139.pdf

Unless there is a special Arizona version of it ;-)

Page 4 of the online version actually doesn't have it on page 4. Must be
a printing error because it is on hardcopies and also on the tables
above it.

Regards, Joerg

Aha! You're fretting over Common Mode Voltage Range. I thought we
were worrying over flame ;-)

...Jim Thompson
 
J

Jim Thompson

Jan 1, 1970
0
Jim,
Thanks for replying. I tired drawing out what you wrote but i couldn't
figure it out. Could you please send me a schematic.
-Rich

I'll post a schematic at a URL so all can see.

What frequency range are we talking?

...Jim Thompson
 
F

Fred Bloggs

Jan 1, 1970
0
i think i was the one that told you to try a transformer
your looking a sine wave, a transformer should suppress the
fast slew/skew to give you a more rounded pulse..
it's just a throught.
P.S.
i think you stated that you needed a 10v P-P ?

Right- an audio step-up transformer to which the sensor is coupled by a
capacitor to block DC will probably work into a high impedance ECU input.
 
R

Rich Grise

Jan 1, 1970
0
Jamie,
That's on my list stuff to try, I'm just doing the easy stuff first.
What type of transformer do you recommend? I need something with a
decent level 10Vpp is just a random number i made up.

Well, you're never going to get anywhere if you're just making stuff
up. What signal is the gauge actually looking for? What is the actual
output of the sensor you're trying to simulate? Have you looked at
it on a scope?

Good Luck,
Rich
 
Lets see 8000 pluses per mile means if i want to go 60mph, one mile per
min. So 8000/60=134 Hz but im always in a hurry so 134*2= 268Hz. Does
that look right?
-Rich
 
Top