# Rotation speed detection circuit (Wind turbine)

I need to determine the rotation speed a wind turbine generator. To do this i'd like to measure the frequency of the three-phase signal provided by the PMG generator

The three-phase signal tension range is 0V - 300V and the frequency range is 0-70Hz.

i use stm32 microcontroller to compute the frequency so i need a 0-3.3V square shape signal input.

I designed a circuit to turn the AC signal into a squared shape 3.3V signal:

I send one phase of the generator to a rectifier 1n4007 diode to remove the negative tension. Then a 3.3V zener clip the signal. The opto-isolator protect the stm32 from high tension and create a beautiful 3.3 square shape signal

question: is it safe, is it reliable ?

Thank you !

• What limits the current through the zener when the generator produces 300V? – Brian Drummond Dec 1 '17 at 10:55
• Ooops, The power dissipation of the diode is 500mW and Vz = 3volts. The maximum current inside the diode is 166mA (I = Pz/Vz) so i just need a serial resistor to ensure that the curent stay below the maximum value? – joseeee Dec 1 '17 at 11:25
• First decide what current you need for U1. If you can get that down to 1mA, ... good. Then decide what you can waste in the monitoring cct ... say, 20mA. Then add R in series with D1 (300V/20mA = 15k, 300V * 20mA = 6W). If that wastes too much power, try again with lower current (but you'll need a higher input voltage to get 1mA in U1). – Brian Drummond Dec 1 '17 at 11:46
• This all needs to work from close to zero volts out to 300V. at 300V and 10mA the voltage drop will dissipate 3W... with a 30K resistor, at 10v the LED will only get 0.3mA – Trevor_G Dec 1 '17 at 14:55

Because of the wide voltage range, and the conflicting power vs current requirements to keep the opto-coupler in saturation, I would go with a rather more analog circuit as shown below.

Here you can use a much large series resistor, R4, of 1Meg. That will only dissipate a peak of 90mW. D1 simply protects the opto-coupler from minus voltages.

On the receiver side, I would amplify the current from the opto-coupler then feed the voltage generated across R1 into a 3.3V CMOS output comparator with some hysteresis to get a nice square edged signal for your micro. One that does not hover in the grey zone when the wind dies down.

Simulated it works from about 5V - 300V up to ~ 3,600Hz.

• I'd be really leary of using this circuit, since the 4N25 is in a completely uncharacterized regime. At 5 volts in, the LED current is on the order of 4 uA, and CTR will be well under 0.1 (since CTR curves are normalized to a value of about 0.4 at 10 mA) and this is getting perilously close to the hi-temp leakage currents. Not to mention the unspecified Q2 hfe at these currents. – WhatRoughBeast Dec 2 '17 at 0:18
• @WhatRoughBeast using them in linear is common, it may take a little tweaking to get the R values right though. – Trevor_G Dec 2 '17 at 14:11
• @WhatRoughBeast but I agree in part with your sentiment. For something like this I would trust a proto-type evaluation more than simulator data. – Trevor_G Dec 2 '17 at 14:18

I choose 15k resistor as you mentionned in your comment but my problem was that for low generator input voltage (20-30V) the resulting current was too low (100uA) to supply the opto-isolator

I found a way to generate enough current at low-voltage. I use a constant current sink.

This circuit generate a constant current I = Vz/R2 (for my circuit 3/150 = 20mA)

Now i'm able to measure the frequency of a 20V-300V signal

• What is the max frequency of this thing? – Trevor_G Dec 1 '17 at 15:51
• If you're talking about the generator, the max frequency of the three phase signal is 100Hz – joseeee Dec 1 '17 at 16:41
• @joseeee: This isn't a forum and posts float up and down with votes or user sorting preference. (In my display your answer comes before Trevor's. If anyone else answers it won't be clear who you are talking to.) If you are referring to another post you need to specify which one. If this post is the correct solution then you can accept it to mark it. You can also upvote Trevor's answer if it helped you. – Transistor Dec 1 '17 at 17:32

Why don’t you consider a toothed wheel (reluctor) on the shaft direct and use an optical or hall effect sensor to pick up the pulses and get the speed that way... Just a thought...