Clipping an input signal

Status
Not open for further replies.

Steevo25

Member
Hi All,

I just need a bit of advice for my on-going project.

I have a requirement where I have to interface a digital pin on a Teensy (3.6) with a stator to obtain RPM. The stator outputs a rising and falling signal I am only interested everytime the stator signal falls to zero (via a FALLING interrupt). When this happens a counter is incremented by 1 and using that I can work out an RPM value.

The code is simple and trying it with a signal generator running at the same frequency as the stator, it works perfectly.

Now my problem is the voltage that the stator is capable of outputting. The stator voltage depends on revolution speed and at an idle speed can go as low as 4-5v but at high RPM, the stator can output 40v+. Obviously this would blow the Teensy to bits.

I was thinking of using a 3v Zener diode and resistor (probably 10k) on the input to clip the max voltage to 3v as there will be virtually no current involved as it will just be a signal in to a digital input pin on the teensy and I am only interested when the signal moves from high to low.

Does this sound a viable solution to the issue? I have not tried it yet and it's theory at the moment but it does seem a viable solution.

So to summarise, the stator will output voltage pulses proportional in frequency to RPM in a square wave type of effect that will go from high to low then back to high and can rise to around the 40v mark at peak or as low as 4v. I am just trying to measure when the pulse goes from high to low via a digital pin on the teensy via an interrupt routine. Pulses will be 6 pulses for every complete revolution. I am proposing limiting the high voltage to 3v using a Zener diode clipping circuit.

Any advice much appreciated or a better way of doing it.

Many thanks in advance.
 
I am by no means an expert, but I was working with another project that also had a wide voltage range, but was only looking for an on or off, high or low signal.
I did some research and came to the conclusion that an op amp comparator circuit was what I needed to buffer the signal.
There are many designs and applications, but essentially whenever the signal goes above your reference voltage you will get a high output. It can also be configured to provide a low output, and your reference voltage could be 3.3v for example.
May provide you with a cleaner signal than the Zener would, and you could add filter caps to the comparator to really smooth things out.
 
Many many thanks for your reply. I must confess to not being an expert either and any experience I have had with op-amps have been bad ones. Mainly because I didn’t know enough about what I was doing to use them properly. More than happy to try that solution if someone can give me guidance at a very basic level.

Anyway, I thought I would try the Zener clipping method so built a small circuit on a proto board. All it consisted of was a 10k resistor in series with the input signal and a 3v Zener. I then put a 5k6 load on the other side. I have not connected it to a teensy yet for the reason described below, but I did run it on the oscilloscope.

It sort of worked. At 40v, I had about 2.8v coming through and at 4v it was about 2.4v coming through and anything less than about 2.8v matched the input voltage. So it did accomplish what I needed even though the voltages were not exactly what I expected. I had to pump in 50v to get 3v out. Nothing got hot.

But this highlighted another problem which is why I have not connected it to a teensy. When I plugged it on to the stator, I discovered that the stator was putting out +27v to -27v wine wave. The clipping circuit was keeping that down to between 2.5v and -0.7v but thats still not right as a negative voltage of that magnitude would kill the teensy.

Then I put a schottkey diode in series with the input to try and prevent the negative voltage but even with that, -0.3v still gets through.

So how do I completely get rid of this negative voltage?
 
There isn't any perfect solution using only diodes and resistors. Diodes have forward voltage drop. The zener effect where the diode begins conducting at certain reverse voltage is also far from ideal, a gradual increase in conduction as the voltage increase, rather than a sudden change from not conducting at all to fully conducting nearly any amount of current if the voltage goes slight over the zener voltage.

Some diodes, especially schottky types, also conduct a slight current when they shouldn't. If your circuitry is all low impedance, maybe not an issue. If you have higher impedance, so there's very little current in your circuit, that unexpected diode reverse current can really rain on your parade.

There are ways to use opamps to greatly improve diodes. Often these types of circuits are called "super diode" or "precision rectifier". Hopefully knowing those terms can help you find info with searching. Of course, using opamps adds quite a bit of complexity. Generally those sorts of circuits need the opamp to be able to drive its output at least 1V above and 1V below the max and min output the circuit will have, because the opamp is compensating for the diode's behavior. That means you would generally need, even if using rail-to-rail opamps, power supplies for the opamp that provide a negative voltage and a positive supply higher than the max signal.
 
Status
Not open for further replies.
Back
Top