A simple dial (aka spinner) input control using arduino and a rotary encoder. The dial is shown in the computer as a mouse with X movement. The movement has been tuned to be "accelerated" so if you do small movements, you have precision, but if you move it kickly, it runs faster. Use a modified version of ClickEncoder library. See below for more details.
This project provides:
- The chassis' fabrication models (3D print) and assembly guide.
- The arduino sketch to control the encoder and pass the mouse inputs to the computer.
Table Of Contents
- Project Features
- Part List
- 3D Printing and Assembly
- Complete implementation for a dial (aka spinner) input control. Just print the files, wire it, download the sketch and play in MAME. The main motivation was to create a low profile, MAME compatible (in fact, it works in all computers that accept a USB mouse as input) input device to play
- Low profile device. Just about 3cm width, 8cm height.
- Easy to use. Just plug and play with minimum MAME configuration.
- Easy to build.
ArduSpinner you need the following things:
- Arduino Micro or similar, with the ATmega32U4 processor, so we can program the USB interface. Try to build the original one Arduino Micro (18 €) to support Arduino, or, if you're in budget, try this clone from Amazon (4.6 €), but you have to solder.
- Rotary encoder. I use the
KY-040rotary encoder, mounted in a PCB. Get it from Amazon (2,04€)
- Some wiring cable. I use
dupontwires (female-female. You need 4 of them), again, a pack from Amazon (6,19€, lots).
- A simple Micro USB cable (DATA, no the stripped version for charge). Just like these Amazon (7,99 €)
- Two small (3mm x 5mm or similar) screws if you want to mount the arduino holder in the back.
- Total: 34,22 € if you buy the "original" kit.
- Total: 6,64 € if you have some dupont cables and the micro USB cable. (just buy the arduino and the rotary encoder)
- Also, you need a 3D Printer, of course, if you plan to print the parts.
3D Printing and assembly
There are 4 parts that you have to print. The STL are ready positioned in the "right" way to be printed, so just print them as is. I use a Ender-3 Pro with Marlin Firwmare, and PLA, and get good results. I use CURA for slicing with the following major configuration settings:
|Initial Layer Height||0.32|
|Wall Line count||3|
|Printing temperature initial layer||195|
|Build plate temperature||55|
|Build plate temperature initial layer||75|
|Initial Layer flow||100|
|Initial Layer Print Speed||15|
|Initial Layer Travel Speed||30|
|Avoid Supports when travelling||checked|
|Z Hop when retracted||checked|
|Enable Print cooling||checked|
|Initial Fan Speed||0|
|Regular Fan Speed at Height||0.72|
|Regular Fan Speed at Layer||3|
|Support Overhang Angle||47|
|Support Z Distance||0.2|
|Suport X/Y Distance||0.88|
|Build plate adhesion type||None|
|Enable Bridge Settings||Checked|
This table resumes the printing times for my Ender-3 configuration:
|part name||cuantity||color||printing time hh:mm|
(I print the wheel in black, alone, and the rest of them...Read more »