Wind Direction Using Optocoupler

Hello.

I have some problems. I want to make a wind direction sensor. I have 3 optocouplers and 1 encoder that have 22 holes. How can I make a wind direction sensor with that material?

This is for my final project. please.. help me :""

Thankyou

You go first.... what have you thought of so far?- in concept, never mind the details for now.

When you say "optocoupler" do you really mean these, or do you mean more like an opto-interrupter.

Here is a hint.

How are you going to use the encoder, presumably connected to the wind vane shaft to give direction?

If you have an interrupter as above, how are you going to use it to sense direction using the encoder?

Another hint, you may need to rethink the encoder and interrupter usage or use more complex coding.

Weedpharma

Place the three optical sensors so your software can work out the direction of rotation (including when the direction of rotation changes).

The OP is obviously a beginner so this method, while possible, may be too advanced.

Using interrupters around a circle is probably more the level of programming for OP.

Weedpharma

weedpharma: The OP is obviously a beginner so this method, while possible, may be too advanced.

Using interrupters around a circle is probably more the level of programming for OP.

Weedpharma

Are you responding to my post?

I understand this is for a wind direction indicator, not an anemometer, so it will be necessary to detect rotation in both directions.

The three optical sensors I referred to would be optical interrupters, or at least function as optical interrupters.

Hello thankyou for your answer :slight_smile:

For JimboZA, weedpharma, and archibald:

In concept, I make a wind direction sensor where I arrange the optocouplers in equilateral triangle around the encoder. So, in the specific position the optocoupler show the configuration like 000, 001, 100, etc.

Yes, like opto- interrupter. Usually, this sensor called optocoupler type U

And… I’m a newbie and still learn about hardware and programming :slight_smile:

Moowl: In concept, I make a wind direction sensor where I arrange the optocouplers in equilateral triangle around the encoder. So, in the specific position the optocoupler show the configuration like 000, 001, 100, etc

You seem to have answered your original question about the optical devices.

What accuracy do you envisage?

Do you have link or picture of the parts you are using?

Weedpharma

Moowl: In concept, I make a wind direction sensor where I arrange the optocouplers in equilateral triangle around the encoder. So, in the specific position the optocoupler show the configuration like 000, 001, 100, etc.

I can't envisage that... why will it give a different code for different positions? You'll need to draw a pic and show us how the wind position will affect the code from the 3 sensors.

JimboZA: I can't envisage that... why will it give a different code for different positions? You'll need to draw a pic and show us how the wind position will affect the code from the 3 sensors.

I think I can see how the sequence of changes in the outputs from the optical sensors could enable the direction of rotation of the vane to be determined, but I don't see how it's going to be possible to determine what angle the vane is pointing when the unit is first switched on!

With two sensors spaced appropriately around a circle of holes, you can make a quadrature encoder which will tell you both the direction of rotation and the relative angle rotated from the start position (in steps of 360/22 degrees in this case).

An index hole placed off the circle and a third sensor will allow the absolute angle to be determined. Of course, the third sensor has to "see" the index hole before absolute indexing becomes possible.

jremington: With two sensors spaced appropriately around a circle of holes, you can make a quadrature encoder which will tell you both the direction of rotation and the relative angle rotated from the start position (in steps of 360/22 degrees in this case).

An index hole placed off the circle and a third sensor will allow the absolute angle to be determined. Of course, the third sensor has to "see" the index hole before absolute indexing becomes possible.

This is possible but as a newbie? I made my previous comments with this in mind.

A simple direction indicator for newbie would probably be best to have a ring of interrupters and a vane cutting the relevant one. This would give reasonable accuracy and simply require reading the sensors.

KISS method.

Weedpharma

This is for my final project.

I wonder what level of education?

weedpharma: What accuracy do you envisage?

Do you have link or picture of the parts you are using?

Weedpharma

My concept is like concept in this link http://yoctopuce.com/EN/article/how-to-measure-wind-part-2

but, I don't use a phototransistors but opto-interrupter. And I use 3 opto so I have 8 positions (north, north-east, east, south-east, south, south-west, west, and north-west).

Why did you not give this information in the beginning?

We have been trying to figure out how you where going to get the information using a 22 hole encoder as said in the OP.

What a waste of our time!

Weedpharma

JimboZA: I can't envisage that... why will it give a different code for different positions? You'll need to draw a pic and show us how the wind position will affect the code from the 3 sensors.

My sensor is like this picture

https://imageshack.com/i/hl7NlN5fj

If the opto catch the hole, the configuration is 1. If dont, the configuration is 0. So, in 1 rotation there is many configuration like this link

http://yoctopuce.com/EN/article/how-to-measure-wind-part-2

Ah, not 22 holes, but 3 slots.....

So, what's your actual question now?

Have we upset him?

Weedpharma