Rotary encoder + LED ring board

Started by free electron, April 08, 2016, 03:23:58 PM

Previous topic - Next topic

free electron

Here's a small thingy that might come handy in FV-1/DSP projects.
As you can see below, the encoders i have are not panel mount, no thread/nut, i needed something (=board), which would allow me to screw them to the front panel. There was a lot of wasted space and i decided to add an I2C controlled LED ring which i can use to show the parameter value and other things.



There are 16 leds, controlled by MCP23017 16 bit I2C IO expander. That means you can daisy chain up to 8 such modules using only two ports on microcontroller. Unfortunately the size of the board and the component density means i had to go down with the package sizes. Most components are 0603, the main chip is in QFN package. Solder paste and hot air will be preferable method to solder this board (and it's really not that hard!)



Each LED has its own current limiting resistor to adjust the brightness, useful when different colors are used.
The I2C slave address is set with small pad type jumpers, just put a blob of solder to set the bit to 0 or 1.

Pinout, encoder side:

  • ENB - encoder out B
  • ENA - encoder out A
  • GND
  • BTN1 - tactile pushbutton inside the encoder
  • BTN0 - as above.
JP1 is a pad type jumper to ground the BTN0 Line. I didn't want to fix one side of the switch to ground in case i will be using it in matrix configurations. But it's possible by putting a blob of solder on the JP1.

Pinout, LED ring side:

  • GND
  • VDD, range 1.8-5.5VDC, compatible with 3.3 and 5V busses
  • /RST - resets the MCP23017 chip, actually not really useful, maybe if you'd like to switch all LEDs off very quickly
  • SDA - I2C data in/out line, 100kHz - 1.7MHz
  • SCL - I2C clock line

Design files are HERE (github repo)

What you'll find there is the schematic, full KiCAD project (v.402 stable), gerbers and an example software project for Cypress PSoC4 Pioneer Kit.



PCBs can be obtained at OSH Park directly: https://www.oshpark.com/shared_projects/Tbhe3eJt



Here is the board in action:


For Arduino guys: you can use the ClickEncoder lib to read the encoder and the Adafruit MCP23017 library to control the LEDs.

I imagine hacking it to use with other types of encoder could be relatively easy: use longer standoffs if necessary, wire the encoder to the pads. Or use a simple pot instead of the encoder.
Actually it could be quite useful in MCU controlled FV-1 multi effect pedal, if you're not willing to use any display.
Parameter preset values could be shown with the LED rings, animated rotation effects used to show the LFO speed and even depth range. Lots of possibilities.

Enjoy!

--
Piotr

Ice-9

www.stanleyfx.co.uk

Sanity: doing the same thing over and over again and expecting the same result. Mick Taylor

Please at least have 1 forum post before sending me a PM demanding something.