Sine to pulse conversion - Page 1
Forum section: electronics / beginners

author: Nikola
author_rank: Newbie
timestamp: January 23, 2016, 09:10:25 pm
content: Hello,I have a hydraulic flow meter with -26V DC sine output signal with respect to GND. I have already made a frequency to voltage converter part for analog data acquisition but I do not understand which circuit I should use for converting DC sine signal to DC pulse.I was thinking about using OpAmp but a separate power supply would be needed?Any suggestions ?

author: andre_teprom
author_rank: Regular Contributor
timestamp: January 23, 2016, 09:18:36 pm
content: Quote from: Nikola on January 23, 2016, 09:10:25 pmDo you mean converting AC sine signal to DC pulse, right ?As you mentioned, an OpAmp could do that, although I woud prefer a Comparator.Anyway, you can easily make a simple IC based inverting circuit to generate a low power negative bus.

author: Dave
author_rank: Super Contributor
timestamp: January 23, 2016, 09:28:12 pm
content: What exactly are you trying to achieve? Give us more information, preferably schematics, datasheets.What do you mean by -26V DC sine output? A sine wave superimposed on a -26V DC signal?Why do you need to convert it to DC? Directly measuring the frequency would be much more accurate than any frequency to voltage conversion.What frequency range are we talking about? Couple of kHz?

author: alsetalokin4017
author_rank: Super Contributor
timestamp: January 23, 2016, 09:42:57 pm
content: Sounds like a perfect application for an Arduino and a voltage divider.

author: Psi
author_rank: Super Contributor
timestamp: January 23, 2016, 10:05:56 pm
content: hehe yeah,A voltage divider and MCU ADC channel would be my go-to method as well.Unless there was some special need to do it in hardware.As others have said, we need more specs, what is the frequency range of this -26V signal?

author: TerminalJack505
author_rank: Super Contributor
timestamp: January 24, 2016, 12:32:14 am
content: If I understand the requirements then an AC-coupled Schmitt trigger might do the job.In this case I'm using a separate 5V supply for the comparator. Mostly because I don't know the rest of the details.

author: andre_teprom
author_rank: Regular Contributor
timestamp: January 24, 2016, 12:59:59 am
content: The circuit above has the big advantage of eliminating the need of a symmetrical power supply, but considering that the net C1//(R1//R2) yields a time base of ~0,5s, additional care should be taken in regards to the frequency variation in order to prevent unwanted shift on the biasing line base of OpAmp reference.

author: Nikola
author_rank: Newbie
timestamp: January 24, 2016, 08:25:11 am
content: The flow meter is a turbine with two, 90 degrees out of faze light or induction sensors. In theory it produces square signal but in reality it is more like sine (therefore sine DC). Frequency ranges between 250Hz and 2500Hz. Sorry, I forgot to add that to my first post.My f-U converter is 0.1% linear tested (that is excellent) and it is needed for interfacing to TI`s DAQ panel that we use. Only problem is that it does not work with any signal form except square. Problem is that you can set whole DAQ for just frequency or voltage inputs and as we have everything else working with voltage outputs a converter is needed.I was thinking about Arduino but using one uC for this single operation seems wasteful for me. In my opinion it would be good replacement for IT DAQ as it can connect to matlab but we must use #proffessional equipmentJack505- thank you ! I will test your circuit on breadboard...

author: SL4P
author_rank: Super Contributor
timestamp: January 24, 2016, 08:54:12 am
content: You don't need an mcu at the basic level to convert sine to pulse, but if you want to modify the pulse timing withing the sine waveform period (timing, stretch, retriggering etc), it would probably be easier as a starting point.

author: Psi
author_rank: Super Contributor
timestamp: January 24, 2016, 09:11:10 am
content: Quote from: Nikola on January 24, 2016, 08:25:11 amI always go for the lowest parts count. Which often means MCU, even for simple stuff.

author: Zero999
author_rank: Super Contributor
timestamp: January 24, 2016, 09:23:33 am
content: Quote from: andre_teprom on January 24, 2016, 12:59:59 amYes, I'd advise making C1 10nF and some diodes connected from the -input to the supply rails would be a good idea to protect against overvoltage.

author: TerminalJack505
author_rank: Super Contributor
timestamp: January 24, 2016, 05:26:24 pm
content: Good suggestions, andre_teprom and Hero999. For the sake of completeness, I've attached the updated schematic.Note that the input signal's amplitude is still unknown so I used 1V peak-to-peak.

author: Nikola
author_rank: Newbie
timestamp: January 24, 2016, 07:55:26 pm
content: Stupid me...Signal is offset sine wave (actually it should be a square pulse but it is smooth because of induction sensor) between output and 26V supply. Nothing fancy. Sorry for confusion but I was given some weird data and got confused.So I have the rest of the circuit at supply voltage (via 7815) +15V and suply to meter is 26V. I hope there is all info for solving the problem. Jack505 can you correct the circuit in SPICE with that in mind for me please ?

author: TerminalJack505
author_rank: Super Contributor
timestamp: January 24, 2016, 08:39:03 pm
content: So something like this then?Note that the output is inverted with respect to the input signal. This might be a problem when there's no flow. (And the input is grounded?) The output would be held high in that case.Edit: It looks like R1 and R2 can be eliminated in this circuit since the biasing is no longer necessary.

author: Nikola
author_rank: Newbie
timestamp: January 24, 2016, 08:57:05 pm
content: Signal is negative. It is between output and +26V.

author: TerminalJack505
author_rank: Super Contributor
timestamp: January 24, 2016, 09:17:55 pm
content: Sorry. I guess I don't understand.

author: Nikola
author_rank: Newbie
timestamp: January 24, 2016, 09:56:40 pm
content: Reference of a signal generator Vin1 in not tied to ground but to +26V

author: Zero999
author_rank: Super Contributor
timestamp: January 24, 2016, 10:52:34 pm
content: Post a schematic.It shouldn't matter if the sine wave is floating on top of +26V or -26V, if the comparator is AC coupled, it will just see the AC part of the signal, with the DC being rejected.

author: TerminalJack505
author_rank: Super Contributor
timestamp: January 24, 2016, 11:39:09 pm
content: So we're back to something like this. (See attached.)I changed the size of the feedback resistor used for hysteresis. You get about +/- 100mV of hysteresis with this circuit. You might want to change this based on the magnitude of the input signal.Note that this circuit doesn't have a defined output when the signal stops oscillating. It will be either high or low but there are no guarantees which.

author: Nikola
author_rank: Newbie
timestamp: January 25, 2016, 02:40:04 pm
content: Thank you very much !