Continue to Site

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.

  • 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.

wind direction indicator

Status
Not open for further replies.

MrDEB

Well-Known Member
plan is basically an up down counter I think.
a six inch disc with 180 slots
two photodarlington optical slot switches mounted 180 degrees apart
when one is high the other switch is low
problem is determing rotation direction?
thinking :
if true sw a = 1 and sw B = 0 then directionA = directionA +1
if true sw b = 1 and sw A = 0 then directionB = directionB -1
I know this isn't correct but maybe its a start.
count up going CW direction and count down going CCW
need to count pulses to determing actual wind direction.
example using the 180 slot disc
if we get 45 pulses then the wind is blowing 90 degrees from starting position.
Plan to aim locked wind vane at target then unlock.
amount indicated on LCD display wil indicate wind direction in degrees referencing on position of beginning vane position.
 
You want the optical sensor out of a mouse, or at least a home made varient. These have two detectors and one transmitter. So when sensor 2 goes high after sensor 1 it is direction e.g. CCW or 1 high after 2 then CW. No need for two seperate packages 180 degrees apart then!
 
Basically just like a mouse

Problem is developing code for a PIC
then determing if the thing is gong CW or CCW.
The optical interrupter switches have a 1mm beam width.
so placing exactly 180 degrees apart but sensors are offset by 1 mm so one will be ON while second sensor is OFF
still configuring CW or CCW?
 
Yep. You can make one with your disk and 2 sensors if you want to stick with the 6" disk.

You only need 2 sensors, positioned out of phase per slot. So one sensor is in the centre of a slot, the other one it at the edge of a slot. Kindof hard to explain but its very simple.

This will make your disk into a simple optical quadrature encoder. Have a look in a mouse (or google for mouse photos).
 
...
You only need 2 sensors, positioned out of phase per slot. So one sensor is in the centre of a slot, the other one it at the edge of a slot. Kindof hard to explain but its very simple...

As olly_k said.
With this setup one of the two sensors will see the hole first. Which one sees it first is you direction indicator.

for CW each hole would generate this where |XXXX| is the sensor seeing the hole.
sensor A: _____|XXXX|__________
sensor B: _______|XXXX|________

for CCW
sensor A: _______|XXXX|________
sensor B: _____|XXXX|__________

It is a bit easier to think about both sensors seeing the same hole but on an evenly spaced set of holes they can be set to any hole so long as one sees a hole just a bit prior to the other.

3v0
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top