Announcement

Collapse
No announcement yet.

Optical rotary absolute encoder project.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Optical rotary absolute encoder project.

    It is no easy task to build a remote reading wind vane although a search of the internet will show a plethora of idea for the masthead sensor.

    The obvious one is a 360 degree potentiometer and many commercial units use these. They are not all bad but they are not ideal, most will have a dead zone (which may not be significant) and all except the expensive ones will involve a sliding contactor and hence friction, wear and limited life.

    Reed switches are another common idea, they have long life and no sliding contacts but a lot of reeds are required if you desire fine resolution output.

    Nowadays we can buy a magnetometer chip and use that with a magnet on the wind vane shaft. This had great promise until I found they (or least the chip I have) require calibration every time they are turned on and having low lever signal output they need more than a simple connection to the display system. The chip has I2C output but this does not have the required range to reach the display unit.

    Some commercial systems use an optical system with a Gray encoded disk. The only disadvantage I had with these is that it was hard to find one at a reasonable price and it appeared beyond my level of skill to make one.

    The 'gold standard' for these systems used to be a pair of Selsyns. I happen to have a selection of these in my store and I could use a pair of these but I am keeping them in case I need them in another project!

    It is about now that you are thinking "Rotary encoders are just a couple of dollars from China". Yes that is true but a wind vane requires an 'absolute' encoder or some system to locate the zero position.

    So I looked in my junk stash and found what I needed for a quadrature encoded absolute encoder..

    Click image for larger version

Name:	opticalencoder_small.jpg
Views:	254
Size:	10.0 KB
ID:	1928568
    The principle is easy enough. As the eccentric disk rotates more or less of the LDR is uncovered and exposed to the light of the LED. Current through the LDR is processed by the display unit Arduino to give the wind direction. It works quite well and is sensitive to the slightest movement of the wind vane. The sensors are at 90 degree offset so a graph of the sensor outputs is a sine cosine pair.

    But then my parcel arrived and I now have a Hall effect absolute rotary encoder! The unit looks just like a potentiometer but of course has no internal moving contacts etc and has no blank gap. The unit outputs a voltage (which I can read with 10 bit ADC). The voltage is in the range 0 to 5V. The Arduino reads the voltage then maps it to a range of 1 - 384 which is the number of steps in the wind direction display unit.

    John






  • #2
    That's pretty clever. Who manufactured the encoder?

    Comment


    • #3
      I made the encoder.

      Comment


      • #4
        That does look clever. I have worked with rotary encoders. One such system used a glass disk with 8 or 10 tracks on it which provided a binary value with each track producing one bit. It was used to position a wheel with 24 bins on the OD which contained video tape cartridges. That was good enough to get to the approximate position but a final track had just 24 clear and 24 dark segments and a final LED and sensor would position it to split the line between a dark and clear segment. It usually worked well but if one of the tracks had some dirt on the LED or the sensor, the whole thing would oscillate between two positions. And it was heavy enough that the floor would shake.

        One way to provide a fixed reference position with a rotary encoder is with an additional ring in the encoder disk with just one hole. When the light shines through that hole, you have your absolute position.

        If you want just one encoder disk to play around with, make up some stationary with a company letterhead and write to the manufacturer asking for an engineering sample or two. You can also make this kind of request through suppliers like DigiKey or Mouser or Newark. But then it helps if you have a business account established with them first. You don't have to have a record of many thousands of dollars of purchases, but don't abuse it or they will get wise and cut you off.
        Paul A.
        SE Texas

        And if you look REAL close at an analog signal,
        You will find that it has discrete steps.

        Comment


        • #5
          Thanks Paul.

          The challenge with finding the absolute position of a wind vane is that it may never pass the reference point!

          I do have one of the old multi track optical systems with a glass disk, I think it is from an ICL printer. Whatever, it is quite old, looks nice on the shelf and is not complete.

          Comment


          • #6
            Well, I just said it was one way. Obviously there are others.

            Wish I had saved some of the old parts from system I worked on. The sensor array was a bunch of LEDs that was custom assembled. They would age or perhaps it was the clear compound they were encased in that aged and when that happened, the output was too low for it to work. The replacement part was something like $1400 and the OEM simply labeled it as a "diode. I got called into the bean counter's office by a wise you-know-what there who thought he knew that NO DIODE ever cost that much. I started off with, "Well, this wasn't from Radio Shack." But in the end I had to show him the old part.



            Originally posted by The Artful Bodger View Post
            Thanks Paul.

            The challenge with finding the absolute position of a wind vane is that it may never pass the reference point!

            I do have one of the old multi track optical systems with a glass disk, I think it is from an ICL printer. Whatever, it is quite old, looks nice on the shelf and is not complete.
            Paul A.
            SE Texas

            And if you look REAL close at an analog signal,
            You will find that it has discrete steps.

            Comment


            • #7
              This is just thinking aloud, if that's ok.... it just occurred to me, that every single hard disk, CD-ROM, and DVD is an encoder. Meaning, they all have one special track that is encoded so that the computer "knows" it's position, in order to find the correct data. So I'm wondering if there's a way to burn a special track of one's own arbitrary design into a DVD and use that -- the readers are certainly cheap enough nowadays, often free from junked machines.

              Comment


              • #8
                I'd worry about what song it would play

                Comment


                • #9
                  Originally posted by elf View Post
                  I'd worry about what song it would play
                  Probably "dueling banjos" from the movie "Deliverance"

                  Comment


                  • #10
                    Originally posted by The Artful Bodger View Post
                    I made the encoder.
                    That's even better!

                    Comment


                    • #11
                      https://www.aliexpress.com/item/3242...%2315392%23321
                      Location: Helsinki, Finland, Europe

                      Comment


                      • #12
                        Yes MattiJ, that is the Hall effect sensor I now use.

                        Comment


                        • #13
                          Are the ones off Amazon $70.00 too steep?
                          They include the vane, electron sensor and RS485 output, which is ideal for long distance operation.
                          Max.

                          Comment


                          • #14
                            This is for our museum where we have old stuff and if we cant get old we make things 'in the old style'.

                            This is the control tower we built which is a replica of the one that was here when this was a WWII training base..

                            ...so you can understand we do not want any plastic anemometers on the building.

                            Comment


                            • #15
                              The one at AliExpress says "Cannot ship to Canada". First time I've seen that at AliExpress. Amazon Canada has what looks like the identical one, but at about 3 times the price!
                              "A machinist's (WHAP!) best friend (WHAP! WHAP!) is his hammer. (WHAP!)" - Fred Tanner, foreman, Lunenburg Foundry and Engineering machine shop, circa 1979

                              Comment

                              Working...
                              X