×

Hello and Welcome! If you have a technical question please check out our Forums. If you have an order or shipping question please refer to our Customer Support page. Please see all COVID-19 updates here and thank you for your continued support.

×

SparkFun will be closed on Tuesday, November 3rd because we are out voting! Orders placed after 2 pm MT Monday, November 2nd will ship on Wednesday, November 4th.

Rotary Encoder - Illuminated (RGB)

Rotary encoders can be used similarly to potentiometers. The difference being that an encoder has full rotation without limits (It just goes round and round). They output gray code so that you can tell how much and in which direction the encoder has been turned. They're great for navigating menu screens and things like that.

This encoder is especially cool because it has a common anode RGB LED built in, as well as a push-button. This version has an updated material that is heat resistant and slightly changed dimensions, but should still work well with our rotary encoder breakout board.

  • Switch Travel: 0.5mm
  • Shaft Diameter: 6.0mm
  • Shaft Length: 18mm
  • Vertical Through-Hole Mount
  • 24 Pulses per Rotation
  • Red/Green/Blue LED
  • Pushbutton

Rotary Encoder - Illuminated (RGB) Product Help and Resources

Getting Started with the LilyPad MP3 Player

May 8, 2013

The LilyPad MP3 Player is an amazing little board that contains almost everything you need to play audio files. You can use it to create all kinds of noisy projects, from MP3 hoodies to talking teddy bears. Your imagination is the only limit! This tutorial will help you get started.

Core Skill: Soldering

This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.

2 Soldering

Skill Level: Rookie - The number of pins increases, and you will have to determine polarity of components and some of the components might be a bit trickier or close together. You might need solder wick or flux.
See all skill levels


Core Skill: DIY

Whether it's for assembling a kit, hacking an enclosure, or creating your own parts; the DIY skill is all about knowing how to use tools and the techniques associated with them.

1 DIY

Skill Level: Noob - Basic assembly is required. You may need to provide your own basic tools like a screwdriver, hammer or scissors. Power tools or custom parts are not required. Instructions will be included and easy to follow. Sewing may be required, but only with included patterns.
See all skill levels


Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

3 Programming

Skill Level: Competent - The toolchain for programming is a bit more complex and will examples may not be explicitly provided for you. You will be required to have a fundamental knowledge of programming and be required to provide your own code. You may need to modify existing libraries or code to work with your specific hardware. Sensor and hardware interfaces will be SPI or I2C.
See all skill levels


Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

1 Electrical Prototyping

Skill Level: Noob - You don't need to reference a datasheet, but you will need to know basic power requirements.
See all skill levels


Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Is there a pinout somewhere that I can use?

  • I would love a version of this without detents, or maybe a guide on how to remove the detent mechanism

  • Is there example code for use with raspberry pi? I'm interested in using this in place of a KY040 rotary encoder on a pi project. Thanks!

  • This is possibly a ridiculous request, but is a 3D model of this part available? Its pins fit into the footprint of the Bournes PEL12T devices but the body is slightly different.

    • Unfortunately, we do not have the resources for that; however, you can find a dimensional drawing (aka mechanical drawing) for the part under the Documents tab, just below the product pricing.

      • Yeah, I figured as much. The dimensional drawing is nice but I can't import it into Fusion 360. The manufacturer of the part, Top-Up, doesn't have any 3D models on its website.

        But it turns out that these parts are copies of the TE Connectivity DPL12 parts (https://www.te.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Data+Sheet%7F1-1773449-0%7FG%7Fpdf%7FEnglish%7FENG_DS_1-1773449-0_G.pdf%7F2-1879314-1) and TE provides models.

        (edit: not an exact copy! Dang it!)

        • I am pretty sure Fusion360 doesn't operate in the manner, in which you described. You would have to use the mechanical drawing as a reference, for the part's dimensions, to create your own 3D model. That being said, it sounds like you were able to sort things out on your own.

          (As a note, the comment section uses markdown... to add a hyperlink, use the following syntax: [text](web address).)

          • I know that F360 "doesn't operate in the manner, in which I described," hence the question: do you have a proper 3D model?

            Anyway, I created one. Use at your own risk. it's here

            I should have just bought the Bournes encoders I originally specified -- Bournes provides models.

  • **Prior to Arduino 1.0.1, it was possible to configure internal pull-ups in the following manner:

    pinMode(pin, INPUT); // set pin to input digitalWrite(pin, HIGH); // turn on pullup resistors

    this syntax is used in the example encoder code, but no longer works: digitalWrite(ROT_A, HIGH); // turn on weak pullup

    remove these lines for ROT_A and B, and just declare pinMode(pin, INPUT_PULLUP); for pulled-up inputs on ROT_A, ROT_B

  • ** warning ** The sample code for both RG and RGB encoders instructs connecting the LED contacts directly to the Arduino:

    // Rotary encoder pin 1 (red anode) to digital pin 10

    // Rotary encoder pin 2 (green anode) to analog pin 1

    A series current limiting resistor should be used between the anodes and the Arduino pins.

  • Looks like a fun part. I've ordered a few, and am working on an Eagle Layout now.

    I think this part would be much improved if the switch pin connected to 'C' rather than Pin 5 when pressed. Many microcontrollers have built in pull-up resistor capability, but far fewer have built in pull down capability. For those micros, an external pull down resistor looks to be necessary.

  • For every rotary encoder you sell you should add 'how many pulses / 360°' in the description, so your customers don't have to look up the datasheet. It is 24 for this one...

Customer Reviews

No reviews yet.