Analogue to digital signal converter

Thread Starter

Nubaroo

Joined May 28, 2011
11
Hi guys.

I am new to this forum and need some help please.

I have some electronics knowlege - from 20 years ago LOL!

I have a sensor (magnetic type 2 wire) sensing from some metal "teeth" off a disc metal disc..... I have mounted the sensor in close proximity of the teeth on the disc and get a fairly clean sinewave from it - approx. 400mV peak to peak only though, with the frequency going higher as the disc speeds up. I will measure the frequency and advise.

My other electronic circuitry needs from what I can understand a 12V square wave to operate So I need advice or preferrably a circuit diagram that would use a single 12V DC power supply to convert the 400mV sinewave to a useable 12V square wave??

I have tried using an Op-Amp in the comparator configuration but for some reason this does not work....?? Maybe my circuit I pulled off the internet was not correct or I made an error building it LOL.

I am now thinking of using a VF converter( Voltage to frequency) that I saw on the internet - NJM4151. This will take a 0-10V signal on the input and generate a 12V square wave 1HZ to 10KHZ on the output.

My thoughts are to push the sinewave from the magnetic sensor through a small bridge rectifier, and then to utilise the DC voltage derived from this into the VF converter. Surely the DC voltage should rise as the AC frequency rises as the disc speed up, or would the generated DC voltage only be amplitude related - any thoughts about this??

I have tested it and the DC voltage rises - at low disc speeds the DC is around 0.04VDC, and at higher disc speeds the voltage is around 0.6mV. The result is non linear so the VF converter does not sound like it would work.

So yes a sinewave to square wave converter would be a better option

Any other suggestions would be greatly appreciated!

Thanks in advance.

Nubaroo
 

hgmjr

Joined Jan 28, 2005
9,027
How about posting a diagram of what your circuit looks like so far. Also a part number for the magnetic pickup would be helpful.

hgmjr
 

Ron H

Joined Apr 14, 2005
7,063
I have tested it and the DC voltage rises - at low disc speeds the DC is around 0.04VDC, and at higher disc speeds the voltage is around 0.6mV.
This doesn't make sense. Was the 0.6mV a typo?
You need to tell us the range of frequency, and the corresponding peak-to-peak voltage range. We should be able to use a real comparator (not an op amp) to derive your digital signal.
 

Thread Starter

Nubaroo

Joined May 28, 2011
11
Hi bud.

Here is a rough schematic of the cct I built....please dont laugh as I do not know much about OpAmps.....

I will post a pic of the sensor tomorrow.

Please have a look and advise??

Kind regards

Nubaroo
 

wayneh

Joined Sep 9, 2010
17,498
As drawn, it looks to me like the signal from your sensor never drops below ground, below your inverting input. Since that old 741 cannot sense down to near ground, your probably never getting clean flopping of the output state. Using a split supply would help, or a better op-amp, or best of all, a genuine comparator such as the LM339 quad (available even at Radio Shack).

Squaring up an input is a common application for a comparator, so you're on the right track. A Schmitt trigger is another possibility.
 

Ron H

Joined Apr 14, 2005
7,063
Hi bud.

Here is a rough schematic of the cct I built....please dont laugh as I do not know much about OpAmps.....

I will post a pic of the sensor tomorrow.

Please have a look and advise??

Kind regards

Nubaroo
You didn't answer my questions:

You need to tell us the range of frequency, and the corresponding peak-to-peak voltage range.
 

Thread Starter

Nubaroo

Joined May 28, 2011
11
As drawn, it looks to me like the signal from your sensor never drops below ground, below your inverting input. Since that old 741 cannot sense down to near ground, your probably never getting clean flopping of the output state. Using a split supply would help, or a better op-amp, or best of all, a genuine comparator such as the LM339 quad (available even at Radio Shack).

Squaring up an input is a common application for a comparator, so you're on the right track. A Schmitt trigger is another possibility.
Hi Bud.

Thanks for the feedback - -will try a LM339. Split supply is not an option unfortunately. The AC wave from the sensor is 400mV peak to peak, and applying it on the comparator input with the reference to ground I thought that the Comparator should switch high for the positive part of the cycle and low for the negative part of the cycle as the input would be negative for that part of the cycle with reference to ground - does this make sense??

Thanks again for the input

Nubaroo
 

Ron H

Joined Apr 14, 2005
7,063
Nubaroo, did you see post #6? I know you said it is 400mV p-p, but then you implied that it varied with frequency.
We still need to know the range of frequencies, from minimum to maximum.
 

Ron H

Joined Apr 14, 2005
7,063
You can do it like this if your frequency doesn't go to zero, and your amplitude does not go too high or too low.
If you want to drive an LED, you will have to restrict its current to less than 6mA, or use an LM311 or an external transistor. You could get a little more current with an LM358 (op amp) if the frequency is relatively low.
 

Attachments

Last edited:

Thread Starter

Nubaroo

Joined May 28, 2011
11
You can do it like this if your frequency doesn't go to zero, and your amplitude does not go too high or too low.
If you want to drive an LED, you will have to restrict its current to less than 6mA, or use an LM311 or an external transistor. You could get a little more current with an LM358 (op amp) if the frequency is relatively low.
Hi bud thanks for the circuits.

Please just clarify the following:

1) The 1 x sensor leg will tie to ground(0V), however I do not have a dual power supply available so on the circuit +V will be 12V positive and -V will be 0V?? - will this still work??

Thanks

Nubaroo
 

lightingman

Joined Apr 19, 2007
374
Hi.

Use an LM311, single comparator. It has an open collector transistor for the output stage, and it can sink or source 50mA. It is also in an 8 pin DIL package.

Daniel.
 

Thread Starter

Nubaroo

Joined May 28, 2011
11
Hi guys.

Just some more feedback regarding the magnetic sensor output.

The output would be a 0.2V/1HZ sinewave just as the disc starts to rotate(minimum disc speed), and at maximum speed it is around 1.2V/1KHZ(maximum disc speed).

Oh yes and the impedance of the sensor is 2.3 kOhm

Thanks again for the input

Regards

Nubaroo
 
Last edited:

Thread Starter

Nubaroo

Joined May 28, 2011
11
Follow Lightingman's advice. Here's a schematic.
As he said, you can drive a moderate load, like a relay, directly.
Thanks Ron H - but the schematic shows a dual supply voltage....+12V and -12V and I am not sure if I can just take the -12V as ground on that cct??

I was thinking of using the circuit you provided earlier - the one where I can use both signal wires to the input of the opamp??
 

Ron H

Joined Apr 14, 2005
7,063
Thanks Ron H - but the schematic shows a dual supply voltage....+12V and -12V and I am not sure if I can just take the -12V as ground on that cct??

I was thinking of using the circuit you provided earlier - the one where I can use both signal wires to the input of the opamp??
Dang, I misread your previous post. I thought it said you did have a dual supply.:(
I didn't post a circuit with both signal wires connected to the "op amp" (it's not an op amp, it's a comparator).
Did you mean the circuit on the left?
 

Thread Starter

Nubaroo

Joined May 28, 2011
11
Dang, I misread your previous post. I thought it said you did have a dual supply.:(
I didn't post a circuit with both signal wires connected to the "op amp" (it's not an op amp, it's a comparator).
Did you mean the circuit on the left?
:p yes I meant the one on the left?? :confused:
 

Thread Starter

Nubaroo

Joined May 28, 2011
11
Hi guys. Just some feedback.

The left hand side cct of Mr RonH utilising both sensor wires on the input of the Comparator works! The frequency of the pulses was too high though so I put the output of the comparator into a ripple counter - this devived the clock pulse in half using the first output. Then I fed the clock pulse into a darlinton transistor config to drive some heavier device! All is well - thanks again for the assistance everybody !!!
 

SgtWookie

Joined Jul 17, 2007
22,230
Glad you got it working - thanks for letting us know!

By the way, the LM339 has four comparators in a single package, and you only seem to be using one of the comparators. To prevent odd oscillations from occurring, you should ground all of the inputs of the unused comparators - otherwise, you might experience strange problems later that will be hard to track down.
 
Top