Jump to content

Control software using an rotary encoder (like a mouse wheel) connected to an arduino?

Is it possible?

I recently had the Idea from various videos about productivity peripherals. What If I could get an rotary encoder from an old mouse or sound system and wire it to an arduino (I have limited knowledge of coding in arduinos) so that it acts like a mouse wheel and then interface it to autohotkey such that I can reprogram it to do other stuff.  

Link to comment
Share on other sites

Link to post
Share on other sites

Yes you can set the arduino to act as a human interface device, aka a keyboard. Then any input can be translated into key presses.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, r4tch3t said:

Yes you can set the arduino to act as a human interface device, aka a keyboard. Then any input can be translated into key presses.

WAIT. I can add buttons? that open so much more possibilities. but a more specific question I have is can it turn the variable voltage? current? resistance? (excuse my limited knowledge on how analog controls stuff work) into inputs?

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, NoTxtWhileDrive said:

WAIT. I can add buttons? that open so much more possibilities. but a more specific question I have is can it turn the variable voltage? current? resistance? (excuse my limited knowledge on how analog controls stuff work) into inputs?

I suggest you research potentiometers and rotary encoders. Both are knobs, yet their electrical function is very different. Potentiometers output analogue voltage. Rotary encoders output a digital signal for every 'click' the knob is turned. There are plenty of examples and tutorials about programming both of them, give it a google. Rotary encoders will interface better with PC hardware, as keyboards and mice send clicks rather than analogue voltages.

 

Use an arduino with a atmega 32u4 to emulate keyboard and mice input. It can be done on the oldr ones, but is a bodge, so not as reliable (bitbashed.) The 32u4 has a natiuve usb interface, so works much better.

Sync RGB fans with motherboard RGB header.

 

Main rig:

Ryzen 7 1700x (4.05GHz)

EVGA GTX 1070 FTW ACX 3.0

16GB G. Skill Flare X 3466MHz CL14

Crosshair VI Hero

EK Supremacy Evo

EVGA SuperNova 850 G2

Intel 540s 240GB, Intel 520 240GB + WD Black 500GB

Corsair Crystal Series 460x

Asus Strix Soar

 

Laptop:

Dell E6430s

i7-3520M + On board GPU

16GB 1600MHz DDR3.

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/6/2017 at 8:31 PM, unknownmiscreant said:

I suggest you research potentiometers and rotary encoders.

Ok thanks for the tip, I'll research this when I find the time.

 

On 12/6/2017 at 8:31 PM, unknownmiscreant said:

Use an arduino with a atmega 32u4 to emulate keyboard and mice input. It can be done on the oldr ones, but is a bodge, so not as reliable (bitbashed.) The 32u4 has a natiuve usb interface, so works much better.

I lost you there, and googling led me to more questions than answers. Is it a specific chip that newer arduinos have that gives native HID support? is it a firmware of some kind? or it a different kind of flavor or arduino or something?

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/13/2017 at 5:58 AM, NoTxtWhileDrive said:

I lost you there, and googling led me to more questions than answers. Is it a specific chip that newer arduinos have that gives native HID support? is it a firmware of some kind? or it a different kind of flavor or arduino or something?

An arduino is basically a microcontroller on a breakout board. The microcontroller used on the board determines the functionality of the arduino.

 

Most arduinos (such as the uno) are based off the atmega 328p microcontroller. This does not natively support USB communication (for purposes other than the bootloader. However in the case of the uno, there is a smaller 8bit microcontroller which is programmed to bitbash (emulate the signals) for a USB to serial converter to provide the terminal and programming support.

 

The 8-bit microcontroller can be reprogrammed to act as a USB HID device. However since the USB signals are bitbashed (so the timings are slightly off), the result is not very reliable.

 

Newer arduinos such as the leonardo use the 32u4 microcontroller which has native USB support. This means they can act as USB devices much more easily, as bitbashing the USB signals is not required.

Sync RGB fans with motherboard RGB header.

 

Main rig:

Ryzen 7 1700x (4.05GHz)

EVGA GTX 1070 FTW ACX 3.0

16GB G. Skill Flare X 3466MHz CL14

Crosshair VI Hero

EK Supremacy Evo

EVGA SuperNova 850 G2

Intel 540s 240GB, Intel 520 240GB + WD Black 500GB

Corsair Crystal Series 460x

Asus Strix Soar

 

Laptop:

Dell E6430s

i7-3520M + On board GPU

16GB 1600MHz DDR3.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×