# Making a potentiometer flexible?

Discussion in 'The Projects Forum' started by jean28, Oct 31, 2013.

1. ### jean28 Thread Starter Member

Sep 5, 2012
76
0
Hey guys,

I have a project where I have to make an analog wind direction sensor. My professor explained to me that those sensors are simply a potentiometer whose little joystick is turned by the wind and the difference in voltage is used to find the angle (and therefore, the direction) of the wind.

Here is a picture of a sample potentiometer. Note the joystick in the middle that we turn to change the value of the Resistance. How can I make that joystick extremely smooth so that it can be turned by the wind, given that there is something connected to it in the top?

Thank you

Apr 5, 2008
15,534
2,300
3. ### MrChips Moderator

Oct 2, 2009
12,228
3,282
I would say that your professor is wrong. There is too much frictional resistance in a regular potentiometer for it to work in a wind vane. You need an optical rotary encoder.

4. ### John P AAC Fanatic!

Oct 14, 2008
1,611
217
That pot doesn't look hopeful for something turned by the wind. But in the past I have used a continuous rotation potentiometer which had very low friction, and if you could live with a small dead zone where the wiper crosses from maximum to minimum, I think a wind vane could operate it. Here's a catalog page:
http://www.bourns.com/ProductLine.aspx?name=precision_pots_singleturn

I'd be dubious about an optical encoder. The most common type won't give you an absolute position--there's a kind that has a coded output, but they're expensive--and if you need to know exactly where the shaft is, you need to make it visit a fixed point and then count from there. That would only work if the wind would blow on cue!

But you could use a magnetic system, if you had a disk magnet with the north and south poles across the diameter from each other, not north on one face and south on the other. Then with two Hall effect sensors, you could get voltages that you could calculate the position from. It wouldn't be high precision, but the wind direction isn't precise either.

5. ### wayneh Expert

Sep 9, 2010
11,906
2,851
You could overcome that by simply making the vanes as large as needed.

I think full rotation is the bigger problem. You don't just need 360°, you need "infinite" degrees.

The knobs on my car radio come to mind as a solution - they're digital and can be turned endlessly in either direction. I suppose the clicks are counted. It wouldn't be too hard to convert to an analog voltage.

6. ### John P AAC Fanatic!

Oct 14, 2008
1,611
217
Chips and Wayneh--you're both proposing an incremental sensor for a job that requires an absolute sensor.

7. ### MrChips Moderator

Oct 2, 2009
12,228
3,282
No one said anything about incremental encoders. Absolute position encoders are available.

8. ### wayneh Expert

Sep 9, 2010
11,906
2,851
I suppose you could use two axles with a generic pot. One axle could orient the pot to face either north or south, and then the pot could cover ±135° from either pole. Not sure how you'd force the north/south vane into position while allowing it to switch. Maybe just build two vanes, one facing north and one south.

9. ### MikeML AAC Fanatic!

Oct 2, 2009
5,450
1,066
My store-bought weather station uses a crude (4bit?) optical absolute encoder. In the wind, the vane constantly oscillates back and forth about 30deg. I think this is done on purpose.

I believe they average the constantly changing readings from the encoder for several seconds to display a wind direction that appears to be more "precise" than 360/16 degrees... There is a microcomputer between the encoder and the LCD readout.

10. ### RichardO Well-Known Member

May 4, 2013
1,157
360
I have used a sine/cosine pot for 360 degree operation. Visualize this as two pots on the same shaft with the elements rotated for 90 degrees offset from each other. When one pot is going through the discontinuity, the other one is reading the correct angle.

The commercial pots have a sinusoidal change with angle and have low friction bearings. The bad news is that even at surplus prices they were nearly \$100 each when I bought them a number of years ago.

11. ### jean28 Thread Starter Member

Sep 5, 2012
76
0
Thank you so much for all the replies guys. I am considering the optical encoder option mentioned above.

Thanks!

12. ### THE_RB AAC Fanatic!

Feb 11, 2008
5,435
1,305
Old kit designs etc used 8 reed switches and one magnet on the shaft, with a bit of overlap you can easily get 16 distinct compass positions.

13. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,320
1,571
Excellent; right off I could see how a 360 degree pot could do this except at that one point of discontinuity. Going to two pots makes things so much simpler.

jean28: Do you have a pot like you show? If so, bend back those metal tabs from the base going over the top deck and as Dave Jones says, don't turn it on, take it apart!

You'll see a circular band of resistive material going between the outer two tabs, and the middle tab connecting to the wiper. See if you can adapt that so you have 2 pots running on your shaft that the wind turns.

You don't need 360 degree coverage with 2 pots: standard 270 degree pots will do if you put the dead zones 180 degrees apart.

14. ### DickCappels Moderator

Aug 21, 2008
2,582
607
Another possible solution is to use a large wind vane so that it develops a lot of torque for the amount of wind so it doesn't matter as much how much friction the pot has. Also, you can gear down the wind vane so that a full 360° covers a smaller portion of the pot's rotational range; this will also help with the friction question. The remaining problem is when the wind vane tries to rotate more than 360° -ask your professor how that should be handled (I suspect its a fatal flaw that will force you into another type of rotary encoder).

15. ### MrChips Moderator

Oct 2, 2009
12,228
3,282
I have one of these from La Crosse in my backyard. There is very little friction. I have not taken it apart to see what encoder technology is used.

16. ### John P AAC Fanatic!

Oct 14, 2008
1,611
217
As I said before, you can get a continuous-rotation pot, which would be linear over some rage that's almost 360 degrees (355, maybe) and has a small dead zone where you won't see an output, but at least you'd know pretty much exactly where the wiper is when it hits it. The one I've used is very low friction, so if the wind vane were any reasonable size, I think it would be usable.

Jul 18, 2013
10,246
2,262
Have you checked out some of the encoder technology that is out there?
Digikey have a whole range of items that are mostly below \$10.00 one that looks interesting is the AS5132 360° contact less compass encoder, \$7.00.
There are several means of communication in the selection such a I2c if needed.
BTW, one method of reducing friction is to have the vane shaft come to a point at the bottom and rest on a ball bearing.
Max.

18. ### John P AAC Fanatic!

Oct 14, 2008
1,611
217
Wow, that "contact less compass encoder" Max found sounds like the perfect solution, and it doesn't cost much. Back on 10-31-2013 I was advocating something similar, but I was thinking of a rotating magnet with two Hall sensors spaced 90 degrees apart, which would produce something like analog sine and cosine outputs, but it would have to be calibrated. This seems to bring that concept into the digital age!

19. ### tcmtech Well-Known Member

Nov 4, 2013
1,891
1,446
What level of realistic precision are you looking for?

From my years of playing with wind power I have come to know our general wind directions to be X +- 180 degrees at any one instant. X being the primary average wind direction but overall short term change can go everywhere else on the circle.

20. ### THE_RB AAC Fanatic!

Feb 11, 2008
5,435
1,305
They normally use a very cheap multi-slotted disk IR interrupter with quadrature encoder (incremental, like in an old ball mouse) and another indexing slot where the light only passes at one position (north).

The microcontroller indexes on the north slot, then just updates incrementally from the main encoder disk.