Announcement

Collapse
No announcement yet.

Rotary Encoder question...

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

  • #16
    That square solder pad is tied to that pour (plane) surrounding it which is most likely a ground plane but could also be Vcc. The other two round solder pads are plated through holes that tie to traces on the other side of the pcb (or an internal trace if it'a a multi layer pcb). You don't just touch two together to make the volume change. That's not how encoders work. It will send a series pattern of closures as you rotate cw and a different series pattern as you rotate ccw. A small decode logic circuit interpets the pattern and differentiates the encoder's direction.
    Craig

    The lowest possible F3 box alignment is not always the best alignment.

    Designing and building speaker projects are like playing with adult Lego Blocks for me.

    Comment


    • #17
      Originally posted by Billet View Post
      I think the square pad usually indicates pin1. If I remember correctly, the center pin of a three line mechanical encoder is the common.
      I agree. Use a multimeter to see if the center pin has continuity to ground or Vcc
      My Builds - Overnight Sensations w/ Voxel - Speedsters in surplus boxes - Zaph B3N's in bamboo - Classix II in BR-1 cabinets - Dual TPA3116 D2 amp in an old music box - Mariposas

      Comment


      • #18
        Originally posted by PWR RYD View Post
        That square solder pad is tied to that pour (plane) surrounding it which is most likely a ground plane but could also be Vcc. The other two round solder pads are plated through holes that tie to traces on the other side of the pcb (or an internal trace if it'a a multi layer pcb). You don't just touch two together to make the volume change. That's not how encoders work. It will send a series pattern of closures as you rotate cw and a different series pattern as you rotate ccw. A small decode logic circuit interpets the pattern and differentiates the encoder's direction.
        I was under the impression that connecting A then B to ground usually meant up volume as it indicated clockwise rotation... and B then A to ground indicated counterclockwise motion, or volume down. Leaving out details of course.

        Yeah, I don't really know how these things work as I've never messed with them. I think what I need to find out is if this device is ready to accept only the actual encoder itself, or does it also require the associated circuitry, debounce stuff, etc. to work. I asked a question several times at the site I purchased it at, but an understandable response is unlikely.

        TomZ

        Last edited by tomzarbo; 12-23-2019, 07:26 AM.
        *Veneering curves, seams, using heat-lock iron on method *Trimming veneer & tips *Curved Sides glue-up video
        *Part 2 *Gluing multiple curved laminations of HDF *Cello's Speaker Project Page

        *Building the "Micro-B 2.1 Plate Amplifier -- Part 1 * Part 2 * Part 3 * Part 4 * * Part 5 'Review' * -- Assembly Instructions PDF

        Comment


        • #19
          Rotary encoders are a rotary switch with 2 wipers and usually 24 to 32 contact areas. The contact areas are arranged so that as you rotate the shaft, only one wiper changes state at a time ("Gray code"). So if you start in the area of the switch where both contacts are "off", you will read "00" at the two pins. Then you will see 01, then 11, then 10 and then 00 again as you rotate the shaft. But if you rotate the shaft in the opposite direction, you will see 00, then 10 then 11 then 01 then 00. By using a microprocessor or a state machine, you can easily determine the direction of rotation--you just need to know the previous switch state and compare it to the new one.

          As Craig pointed out, the pin one is ground. For a 3 pin connection like that, there have to be pull-up resistors on the board, and there will probably be the debouncing logic, since that is the standard circuit required for just about any mechanical rotary encoder.

          You can use a pair of switches to test the device. Connect one side of each switch to ground, and the other side of each switch to one of those two pads that aren't ground. Only change one switch at a time, and alternate between the switches (and don't change the same switch twice in a row). You should be able to quickly figure out how to make the volume go up or down.
          Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

          Comment


          • #20
            UPDATE: I soldered three wires to each of the tabs and wired up two switches to them in the manner Neil describes above. The square pad was indeed ground as it had continuity to the power input ground as well as the audio ground terminals.

            Unfortunately, no combination of push-button strokes had any effect on the volume or anything for that matter. It looks like it needs the additional circuitry to work as a functional rotary encoder. I was hoping the components were already in the unit.

            I'd be happy to order up the parts to make the rotary encoder work if anyone is willing to provide a best guess "Tom-compatible" schematic with accompanying 'dumbing-down' of the process so I can handle it.

            The good news is that it's really quite a nice player, not buggy... the alert tones are not obnoxiously loud, Bluetooth works fine, remote control has good range, and the sound quality is fine. Also, it remembers the last volume position when disconnected from power instead of reverting to full volume like a few other players I've used. In other words, it's worth messing with in my opinion.

            I've included a few shots of it in use, with a top-down view to show how deep it is... less than 1" deep, like 7/8" at most -- which is nice, because I have this pegged to go into a super-small radio in the future.


            Click image for larger version  Name:	Front View.jpg Views:	0 Size:	315.7 KB ID:	1427576 Click image for larger version  Name:	Top Down Depth View.jpg Views:	0 Size:	363.9 KB ID:	1427577

            If we can get the rotary encoder details worked out, I'll post this information as clearly as possible on the website that sells it as feedback, and before long, I'm sure all of the sellers will include it in their product pics. That will really help many others figure out how to get it to work, which is one of my goals with whatever I work on. Last time I posted a schematic picture of a small spectrum analyzer that few could figure out how to hook up, many of the sellers 'borrowed' it with a few even using it as their main product picture. As long as it helps others, that's all that matters.

            Thanks for any help or guidance with this. BTW, even if the rotary encoder doesn't work out, it's still a nice enough player to be a contender, especially for about $10 with a real remote. Hoping PE picks this up, especially if the rotary encoder aspect works out.

            I should also add in case anyone will be picking one up, that it does not include the cables to hook it up... none of the sellers seem to include them, why I don't know. it is hard to solder those little leads and connecters make life easy. The audio output connector for example, is the same one that the 50 watt amp board that PE sells uses, which makes life really easy. Just a caveat there I wanted to mention.

            TomZ
            *Veneering curves, seams, using heat-lock iron on method *Trimming veneer & tips *Curved Sides glue-up video
            *Part 2 *Gluing multiple curved laminations of HDF *Cello's Speaker Project Page

            *Building the "Micro-B 2.1 Plate Amplifier -- Part 1 * Part 2 * Part 3 * Part 4 * * Part 5 'Review' * -- Assembly Instructions PDF

            Comment


            • #21
              Well, that didn't work out .

              Check the two pins that aren't ground. If they are both 3.3V or 5V, it is most likely a connection for a mechanical rotary encoder, but maybe there isn't software written to respond to the 1's and 0's from a rotary encoder. The fact that there are pads on the board but no connector suggests that the encoder interface might not be implemented in the software. It seems unlikely that they would provide pads for a rotary encoder but no software, since the software to read a rotary encoder is fairly simple. But who knows...

              It's possible that the connector is providing an analog input to the CPU, as most modern CPU's have plenty of analog I/O. In that case, one of those pins will be a reference voltage (3.3V or 5V) and the other would be an analog input to the CPU. If it is an analog input, you would simply need to use a potentiometer from the reference pin to ground, with the wiper connected to the analog input. The CPU would read the analog input and set the volume accordingly.

              Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

              Comment


              • #22
                I put the multimeter on the pins to see what was going on...

                Black lead on the square pad connection and the red lead on the pin next to it... that gave me fluctuating readings from around -0- volts to around 3.3 volts oscillating every second to second-and-a-half (hard to tell on the multimeter how fast this was happening)

                Black lead on the square pad and the red lead on the other lead furthest from the square pad showed basically no voltage.

                Should I try your suggestion with a pot and see what that does?

                Click image for larger version

Name:	Encoder pads voltages.JPG
Views:	191
Size:	31.8 KB
ID:	1427610

                TomZ
                *Veneering curves, seams, using heat-lock iron on method *Trimming veneer & tips *Curved Sides glue-up video
                *Part 2 *Gluing multiple curved laminations of HDF *Cello's Speaker Project Page

                *Building the "Micro-B 2.1 Plate Amplifier -- Part 1 * Part 2 * Part 3 * Part 4 * * Part 5 'Review' * -- Assembly Instructions PDF

                Comment


                • #23
                  Hmmm...those voltages don't make any sense to me. It the pads were for a standard rotary encoder, pin #1 would be ground and #2 and #3 would be pulled high. So that rules out a mechanical rotary encoder. If they were for a potentiometer, #1 would be ground, #2 would be an input, which could fluctuate if nothing was connected, but #3 would be a reference voltage--like 3.3V. So it doesn't look like the pads were intended for a potentiometer, either. I can't think of any other way someone would use these connections to control the volume.

                  It might be helpful to determine whether pads #2 and #3 are inputs or outputs. You could tell by trying to pull them up or down with a 1K to 5K resistor. It would be useful to know whether that fluctuation is generated by the CPU on the board (as an output) or whether it is just due to noise (and where the pin is an input).
                  Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

                  Comment


                  • #24
                    Sometimes the high level Chinese translations aren't technically correct. It might not be a rotary encoder. Try a regular pot (10K, 25K). Perhaps the module's chips read the resistance and translate that to the stereo output volume. A long shot - but Tom can easily test that.

                    Comment


                    • #25
                      So, I hooked up a potentiometer to the three leads. Nothing I did had any affect on the sound/volume.

                      Out of curiosity, I pressed 'pause' on the player and the voltage that had been fluctuating stopped; it stayed at 3.3 volts between the first (square) pad and the one next to it. When I pressed play again, it began to fluctuate as previously.

                      Then, I hooked up a small full range speaker to those two terminals to see if that would give me any indication of what was going on... as it was playing, it made a little 'click' sound about every second or so.

                      So Neil... you said: "
                      It might be helpful to determine whether pads #2 and #3 are inputs or outputs. You could tell by trying to pull them up or down with a 1K to 5K resistor. It would be useful to know whether that fluctuation is generated by the CPU on the board (as an output) or whether it is just due to noise (and where the pin is an input).
                      "


                      I'm not sure how to do this... Just connect the ground and the next closest one with a 1k resistor in between for a second? Then retest? Repeat for the third lead?

                      All of the functions on the player seem to be working fine, but I wonder if in my 'testing' this unit I didn't goof up the associated circuitry on those three lines somehow. Wonder if I should wire up the backup unit and see if that performs the same on any future experiments.

                      It's such a shame... someone went to the trouble of designing this little player, and it's quite nice... but somehow, the details of how to wire up these things always gets left out of the descriptions by the sellers.... And it's not like it has a model number that you could do some kind of search for... every seller calls it something different. This happens all the time on Aliexpress, it's one of the 'pains in the buttox' of ordering from them. And asking nearly any of the sellers for clarification or schematics... forget it.

                      TomZ
                      *Veneering curves, seams, using heat-lock iron on method *Trimming veneer & tips *Curved Sides glue-up video
                      *Part 2 *Gluing multiple curved laminations of HDF *Cello's Speaker Project Page

                      *Building the "Micro-B 2.1 Plate Amplifier -- Part 1 * Part 2 * Part 3 * Part 4 * * Part 5 'Review' * -- Assembly Instructions PDF

                      Comment


                      • #26
                        It would help to know what those pads are hooked up to. Are there any markings on the ICs on the board? Can you trace the pads back to specific pins on the ICs?

                        Comment


                        • #27
                          Originally posted by devnull View Post
                          It would help to know what those pads are hooked up to. Are there any markings on the ICs on the board? Can you trace the pads back to specific pins on the ICs?
                          I think it will be easy enough to remove the board from the frame. I'll give that a try later today to see what I can see.
                          Thanks for the input and for helping. I appreciate everyone's help.

                          TomZ
                          *Veneering curves, seams, using heat-lock iron on method *Trimming veneer & tips *Curved Sides glue-up video
                          *Part 2 *Gluing multiple curved laminations of HDF *Cello's Speaker Project Page

                          *Building the "Micro-B 2.1 Plate Amplifier -- Part 1 * Part 2 * Part 3 * Part 4 * * Part 5 'Review' * -- Assembly Instructions PDF

                          Comment


                          • #28
                            Also, if you could provide some more info on those three soldered connections just below the unused pads...
                            Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

                            Comment


                            • #29
                              The three soldered connections below are for the IR receiver on the other side.
                              My Builds - Overnight Sensations w/ Voxel - Speedsters in surplus boxes - Zaph B3N's in bamboo - Classix II in BR-1 cabinets - Dual TPA3116 D2 amp in an old music box - Mariposas

                              Comment


                              • #30
                                Found this site with more info, but not exactly what we need. https://alexnld.com/product/bluetoot...decoder-board/
                                My Builds - Overnight Sensations w/ Voxel - Speedsters in surplus boxes - Zaph B3N's in bamboo - Classix II in BR-1 cabinets - Dual TPA3116 D2 amp in an old music box - Mariposas

                                Comment

                                Working...
                                X