Saturday, September 17, 2016

Photoshop Controller: Prototype

I decided to make a small controller for my sister so that she would have more intuitive controller over some functions of Photoshop when drawing. It's rather cumbersome to have to press keys to control canvas rotation or brush size, when they are best mapped to a rotational input.

The basic idea was that the controller would emulate a keyboard, and by rotating encoders the appropriate key from before would be "pressed." If I can figure out how to map inputs directly to specific commands in a program (e.g. a volume control knob can't emulate a keyboard, it needs to send the right HID codes to control volume up and down), that would be better. For now, I'll just stick with the key presses.

I began drafting up some possible designs, and many of them really looked like MIDI controllers. I keep thinking of more and more functions, each bound to sliders, knobs, and buttons. I was even thinking of adding a small screen to... I'm not sure what it would be really useful for, but it could describe each input's configuration and show a list of presets so the controller could be used for different programs.

In the end the most important factor is user-friendliness. Someone was going to use this, and it had better not be uncomfortable to use.

For a future project.
More realistic.

She needed control over four commands:
  • Brush size
  • Brush density
  • Zoom
  • Undo (Ctrl-z!)
I planned to have three rotary encoders, and two buttons to the right of them. The first three commands are mapped to the encoders, and undo to one button. The last button could be be free for whatever other command might be useful.


I'm using the Beetle controller from DFRobot since it has a Atmega32u4, which has native USB and can emulate HID devices. It's has just enough pins broken out from the controller for my project, and isn't that expensive. (It's also because it was the only suitable controller that was cheap enough from Jameco, where I got the knobs and buttons from.) It's also programmable with Arduino, which is nice because keyboard emulation is already built in and this is only supposed to be a quick project. (I'm not too concerned that this isn't pure C code. I'll learn how to use and setup USB with C and register fiddling later when I have more time.)

Source: https://www.dfrobot.com/index.php?route=product/product&product_id=1075
The encoders are 50 mm apart, and the button on the right is 40 mm from the last encoder. I forgot that the encoders that I had on hand also could be pushed in as buttons, and realized how much better it would to be able to use the press function to use as coarse/fine adjustment toggle. As a result, I only have one I/O pin left for use with the external button. The ICSP pads are also exposed, and I think I can use some as more I/O but I'll come back to that another time.
6-pin ICSP pads exposed on the right of the PCB.
I'm also using the Beetle controller from DFRobot since it has a Atmega32u4, which has native USB and can emulate HID devices. It's has just enough pins broken out from the controller for my project, and isn't that expensive. (It's also because it was the only suitable controller that was cheap enough from Jameco, where I got the knobs and buttons from.)


I planned out a prototype by first using a scrap piece of plywood as the front plate.


The hole on the right is for one button. The button isn't installed because I didn't have a big enough drill bit for the button to fit.


I also got some sample pieces of purpleheart and black walnut wood from Woodworkers Source. At six inches long, they are the perfect size for a small project. The purpleheart looks really, really, reaalllly, nice.


The wood piece is just long enough for the three knobs. I might just stick with only the knobs. Without the other buttons there are still more than enough functions and I can use the remaining I/O to control LEDs for backlighting the knobs.

No comments:

Post a Comment