HELP - Frequency to Voltage Convertor using a Retro-Reflective Sensor to Measure RPM

Thread Starter

JustinG_KNF

Joined Jan 6, 2020
16
Hello Everyone,

I am using an MCS-655M Retro-Reflective Sensor that outputs an NPN signal. I am looking to convert this output signal to a 0-10V Analog Signal. My maximum frequency I will see is 200Hz.

My thought was to first use an off the shelf frequency to voltage convertor, but my issue seems to be that the NPN output signal was too low to read. The High/Low were measured and I was getting 730mv High & 350mV Low. So I decided to purchase a LM331 Frequency to Voltage Convertor (This is labeled as a Voltage to Frequency Convertor but can be used in the opposite direction as shown in Figure 18 of the datasheet). I've had to adjust resistor & capacitor values to achieve a Vout of close to 10V @ 200Hz., one thing I realized is the capacitors I purchased are non-polarized so I'm not sure if this has an effect. I am powering the LM331 using 24V, my thought was that the two resistors at pin 7 act as a voltage divider so I adjusted this to divide the voltage down to 500mV in order to sense the low/high change.

I've confirmed with an Oscilloscope that the Frequency Output of the Retro-Reflective Sensor is accurate.

Can you recommend where I may be going wrong or recommend an alternative to convert this output signal to 0-10V analog?

See table at end of post for purchased Components. I've attached my circuit diagram & all related datasheets.

Please let me know if you need any additional information

Thanks!
Item DescriptionSupplierSupplier Part No.
Voltage to Frequency & Frequency to Voltage PREC VLTG-TO-FREQ CONVERTERMouser926-LM331N/NOPB
Metal Film Resistors - Through Hole .4watt 2.4Mohms 1% 1/8watt body sizeMouser594-5063JD2M400F
Metal Film Resistors - Through Hole 1/2W 100Kohms 0.5%Mouser71-CMF55100K00DHEB
Metal Film Resistors - Through Hole 10K ohm 1% 0.4WMouser756-MFR3-10KFC
Metal Film Resistors - Through Hole 1KOhm 3/5W 50PPMMouser279-LR1F1K0
Metal Film Resistors - Through Hole .6watt 47Kohms 1%Mouser594-MRS25000C4702FCT
Multilayer Ceramic Capacitors MLCC - Leaded 50V 1uF X8R 10% RAD LS:2.5mm AECQ200Mouser810-FA16X8R1H105KRU6
Multilayer Ceramic Capacitors MLCC - Leaded 100V 0.010uF 5% AEC-Q200 Radial C0GMouser810-FA28C0G2A103JRU6
Multilayer Ceramic Capacitors MLCC - Leaded 100VDC 470pF 5% CCG AEC-Q200 In CrimpMouser81-RHS7G2A471J0M2H1A
 

Attachments

ericgibbs

Joined Jan 29, 2010
9,546
hi k,
An open Collector NPN output , needs a pullup, say 4k7 to 5V would be a starting value.

EAAA 109 17.57.gif
 
Last edited:

Thread Starter

JustinG_KNF

Joined Jan 6, 2020
16
What is the reason for using this method for RPM detection? Cannot pulse count be used?
Max.
I am using this in a LABVIEW application that a has a Voltage Input Module NI-9209 which reads analog voltage 0-10V. I am using this sensor in conjunction with other sensors that output 0-10V, so I was hoping to achieve the same output range for compatibility with the module.
 

ericgibbs

Joined Jan 29, 2010
9,546
hi KNF,
Which ever method you use for conversion, the sensor output must have a pull up resistor, else you will not get a signal.
E
 

Thread Starter

JustinG_KNF

Joined Jan 6, 2020
16
hi KNF,
Which ever method you use for conversion, the sensor output must have a pull up resistor, else you will not get a signal.
E
Sorry I am very new to this -
So I should connect the 4.7KOhm resistor from the Signal Output to the Supply Voltage? Since I am powering this chip to 24V, can I attach the resistor to this 24V supply or does it need to be 5V?
 

ericgibbs

Joined Jan 29, 2010
9,546
hi K,
The sensor datasheet says +10v to 30V operation so a 24V supply could be used, increase the resistor value to say 10K or 15K.
Make sure the F to V converter can accept a 24v input signal.
Do you follow OK.?
E

Update:
The LM331 should be OK at 24V signal input , power the LM331 from 24v
AAA 110 18.16.gif
 

MaxHeadRoom

Joined Jul 18, 2013
20,014
The output current is equal to or less than 100ma, so concievably you could go down to as low as 240ohms @ 24vdc, for a load resistor if it were needed. but 1k to 10k is the average load value..
Max.
 

Thread Starter

JustinG_KNF

Joined Jan 6, 2020
16
The output current is equal to or less than 100ma, so concievably you could go down to as low as 240ohms @ 24vdc, for a load resistor if it were needed. but 1k to 10k is the average load value..
Max.
Ahh, that makes sense now. I was wondering where the 10k to 15k came from.

Thanks for the help from both of you thus far, I will add the resistor and send a photo of a breadboard if anything else seems odd.

Is my logic correct in thinking that Pin7 of the LM331 should be set to a voltage (by the Voltage Divider) that is the Average of the High and Low voltage value of the Signal Output?
 

Dodgydave

Joined Jun 22, 2012
8,820
Sorry I am very new to this -
So I should connect the 4.7KOhm resistor from the Signal Output to the Supply Voltage? Since I am powering this chip to 24V, can I attach the resistor to this 24V supply or does it need to be 5V?

Just connect your sensor output to pin 6 of the LM331, ignore the capacitor input..and it should work with the 10K resistor as in the circuit...
 

Thread Starter

JustinG_KNF

Joined Jan 6, 2020
16
WOW! Looks like Mouser sent the wrong resistors. I measured them and they definitely are 270k!

Thanks guys! I will be ordering some 10k resistors soon. In the meantime I found some 8.7K resistors lying around, would there be any issues using these for a quick test?
 

Thread Starter

JustinG_KNF

Joined Jan 6, 2020
16
Woops, typo - 8.2K* and yes, I confirmed the measurement and the color code!

Thanks!

I will try this and report back the results.
 
Top