• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

frequency signal adjusting, 0 crossings

Status
Not open for further replies.

bonanz

New Member
Hello all,
I'm using an LM2907 frequency to voltage converter to measure a frequency coming from some optical sensors. The only problem is that the lm2907 is a ground referenced chip so that it measures freq by zero crossings. and the optical sensors I am using output low (or off) of about .4v and high to whatever amplitude, currently set at 5. So my frequency to be measured basically looks like a square wave from .4 to 5v. The problem is it never goes to 0. Is there a simple way to shift the whole waveform down so some of it goes negative and crosses 0 for the lm2907? I was pulling out my old textbooks and was thinking maybe i could use some sort of opamp summing circuit as a step inbetween the sensor and FTV converter. Any help/suggestions would be appreciated.
thanks
bonanz
 

spuffock

Member
Connect a capacitor in series with the signal and a resistor to ground on the 2907 side. 100nF and 4k7 is a good start, see what happens.
 

bonanz

New Member
hmm that doesnt seem to have the desired effect... I don't really understand how that setup would achieve that anyways? wouldnt there always be a voltage drop across the resistor therefore always having a positive voltage on the input to the 2907?
 

Roff

Well-Known Member
The LM2907 comes in 2 flavors. The 8 pin part has the reference pin internally grounded. The 14 pin part has the reference pin brought out on pin 11, so you can adjust the threshold.
What is the range of frequencies you expect from your sensor? What is the duty cycle? AC coupling, as suggested by spuffock, will work under certain situations.
If you have a negative supply available, you can make a level shifter to interface your signal with the 8 pin part. Is your optical sensor a phototransistor with an external pullup resistor? If so, what is the value of the pullup?
 

bonanz

New Member
Thanks for the responses :)

Ron you brought up a good point, I have both the 14 pin and 8 pin variety available to me, but i just grabbed the 8 pin first and didnt really study the difference. I will play around with the 14 pin this evening, hopefully that'll solve it.
Also here is a link to the datasheet of the sensors we are using

http://www.optekinc.com/pdf/OPB620.pdf

we will have a circular pattern of sensors and just want to get a simple frequency/speed reading. I believe the pullups on the sensors are ~400ohms I'm not sure if they can be adjusted as the sensors have another purpose just wanted to "steal" the speed from their outputs.

Let me know if you can forsee any problems or tricks of the trade to simplify something. I appreciate the help.

bonanz
 

bonanz

New Member
pfft i am such a n00b

I was playing around with the ac coupling and noticed that i didnt have a resistor in, and realized i had pulled out the pot i was using to adjust the time constant when i put the cirucuit up, put that back in and the ac coupling worked like a charm, just gotta tweak it now,
thanks a bunch

bonanz
 

bonanz

New Member
Okay i got it to work using the ac coupling (thanks!) but i have a problem still.

basically i want to display the speed of a model train, the optical sensors shown above are placed around the track, and i am using the lm2907 to pick up a frequency off of them and change it to a voltage. then i was feeding that voltage into some cascaded LM3914 bargraph drivers to display the speed on 20 led's.

I got the freq input going and had the LED's rigged up before, but now when i try to integrate them the resulting display on the row of LED's is really noisy and there seems to be a huge burst of voltage at low speeds, like if the train is going slow, whenever it trips a sensor the voltage leaps and lights almost all 20 led's for a split second and then drops back down. Just overall the response of the LED's seems too sensitive to fluctuations in speed, when i measure the output votage with a DMM and fluctuate the speed, the output voltage seems to increase/decrease appropriately without any wild fluctuations.

So my question is how can i get the LED's to not be so sensitive it seems and read the voltage more like the voltmeter. Or can someone suggest another method to display the speed. Could i use a ICL7107 and a 3.5 digit display with a voltage divider to display the speed in like inches/sec or something. Would the ICL7107 have the same sensitivity problem? I guess i could probably also use an analog voltmeter and "redraw" the tick marks on the meter, but i'd like to have a nifty digital output of sorts.

The max freq i anticipate is about 30Hz maybe 40. so i want to display speed from stop to about 30 Hz.

Thanks
Bonanz
 

bonanz

New Member
nobody has any ideas? here is a schematic of the circuit. I tried a panel ammeter today and it was slightly better but still fluctuated to much. maybe i should multiply the freq coming in? since its low? btw on the circuit vcc is 5v.



thanks
bonanz
 

Roff

Well-Known Member
Bonanz, F to V converters don't work well at low frequencies. Either the ripple or the delay tend to get excessively large. The best way to measure speed is to measure how long it takes an object to pass through two sensors placed a known distance apart. The problem is, it's a reciprocal function, i.e. the lower the speed, the bigger the number. A microcontroller is generally used to perform this function. Here is an analog circuit that uses an ohmmeter as a readout. You should be able to adapt it to your train.
 

bonanz

New Member
Thanks Ron
would it be possible to use some sort of frequency multiplier circuit that fits in between the sensors and the ftv converter? I did some searching around and found this circuit:

http://users.otenet.gr/~athsam/frequency_multiplier.htm

Do you see any folly in attempting this approach? I looked at the link you gave and I see where it could help but i don't think i will be able to go with a whole new approach at this point, so hopefully i can salvage what i have at this point.

I'd be happy to hear what you think about the freq multiplier or maybe if you would know of some IC that might help... :/ getting a little discouraged.

Thanks
Bonanz
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top