Hi, I'm trying to make an Electronic Wind Finder (Wind Vane) for a Sailboat.
Function
Wind Vane (spins freely) turns to face the direction of the wind; it does not need to be N/S/E/W oriented, as I do not care about the true direction of the wind, rather, I care for the wind direction relative to the front of the boat (bow).
Requirements
Small
Cheap
It needs to rotate freely
As accurate as possible
Supports a Wind Vane
What I Know So Far
I thought about a rotational encoder, but I was warned that they do not spin freely.
I know of magnetometers, and that they sense the most proximal magnetic field,
so I thought about this: adafruit Triple - Axis Accelerometer + Magnetometer.
The Idea
Place The magnetometer under a bearing, and the wind vane above the bearing, weight the wind vane with the magnet! As the wind blows it, the magnet will rotate. It is my imagination that the Magnetometer will pick up on the change in direction and output that data on the serial display.
Where I am, COVID is being taken seriously, and so all non-essential businesses are closed. So I cannot walk in and inquire, I hope you all can help me.
Please if i sound stupid let me know, I know very little about Electronics, Thank you.
alekokokkinias:
I thought about a rotational encoder, but I was warned that they do not spin freely.
Do some research on Your own. Don't rely on street talk, general judgements from home made experts. All those sensors are different. There are optical encoders running easily. Read their data specs for the torque needed.
The cheap knob encoders have that problem. Absolute optical or electrical shaft encoders can be found with ball bearings, but they tend to be expensive. It is cheaper to use an incremental shaft encoder, but you will have to calibrate it so that it knows where the bow is pointing, every time you go out to sail.
All of the wind speed gauges I see appear to be little propellers driving a little generator, and the voltage is used to obtain wind speed. Suppose you mount two of these, one facing directly forward, and one at a right angle. This would give you two wind speeds, at right angles, and a little trigonometry should give you both wind direction and speed, from which you can get any relative information you want.
bluejets:
Sail boats use tell tails for this exact purpose.
No batteries, nothing to fail, ..........
You're very right, unfortunately those indicators are for people to use; but I want the arduino to use the indicator. Perhaps I should mention, this boat is suppose to be as autonomous as possible, its not an RC boat, if things fail, I'm attaching a fishing line and reeling it back in.
I think your magnet and magnetometer idea is worth experimenting with.
I also think a difficult aspect will be that, whatever sensor you use, the vane will constantly oscillate around the true wind direction. You will need to figure out an algorithm to take those oscillating readings and turn them into an useable estimate of the true wind direction. Should be an interesting challenge!
I remember a series of analogue solid-state wind sensors in Electronic Design (? the one Bob Pease used to write in) based on self-heating of discrete transistors, but that was probably twenty years ago. Maybe there's an online archive.
bluejets:
Sail boats use tell tails for this exact purpose.
Tell tails, especially those attach to the sails, have a VERY different purpose. They don't show the wind direction; they basically show what in an aircraft would be called stall conditions.
For indicating the (apparent) wind direction, usually a wind vane is placed on top of the mast. That's pretty much the only place where the wind is not affected by the sails, and which is visible to the helmsman.
encoders are free spinning.
mechanical encoders for things like radios, have a special plate added with with holes and a spring and something like a ball bearing. when you move it, you need to have the resistance and you feel the click, (detent)
in CNC, you use ones without the detent.
the cost is typically based on how many positions per revolution. I would think 360 would be more than enough.
also, there will be a wind energy factor. under as few knots and it may not move the wind vane.
the rocking of the boat may have enough energy to move the wind vane as it would be unbalanced and on the top of a mast, it would move quickly due to the roll of the sea. move your hand back and forth and you get wind.
the reason the wind vane and the anemometer are found together is that under 5 knots (or some such value) of wind, you stop reading the direction. it eliminates errors.
you want to measure actual wind, not apparent wind. adding sensors sometime reveals that one reading is not enough.
they certainly are cheap enough.
the KY-040 is about $1 and, I am just guessing, but has 40PPR (pulse per revolution)
it has a button and detents.
you can open it up, remove the detent spring and make it free spinning.
buy a couple because you might damage it when opening it.
I have to agree that this is something you need to get one, play with it and see how well it works.
alekokokkinias, seems like the device in the link below was made for your application, using
Arduino's analog inputs you would get .3 deg resolution, if you used a 12bit ADC you could
get .08 deg resolution.
sub note: that device worked sweet for feeding steering wheel information into an Arduino