The PiOSCBOX project is an attempt at creating a low-cost, stand-alone effects processor and synthesizer using a small display, rotary encoders, a usb audio device and a Raspberry Pi 3.
The software is written in a combination of c, python and pure data.
I'm sure there are many many improvements that can be made to this design, but I'll document it here as it's sort of usable now.
Step 1: Order (or Source Obtainium For) the Parts.
Graphic ST7565 Positive LCD (128x64) with RGB backlight + extras - ST7565: https://www.adafruit.com/products/250
Raspberry Pi 3 - Model B: https://www.adafruit.com/products/3055
Nullsom proto breadboard pcb: https://www.amazon.com/gp/product/B00XBP8472/ref=o...
RPi GPIO Cobbler Plus Breakout Board Kit with 8" 40 Pin Ribbon Cable: https://www.amazon.com/gp/product/B00OJEKNUK/ref=o...
6 x Rotary Encoders (20 position or better, these are 24): https://www.adafruit.com/products/377
25cm Dual USB 2.0 A female socket panel mount to 2 USB A male extension cable: https://www.amazon.com/female-socket-panel-mount-e...
25CM RJ45 Cat5e Male to Female Screw Panel Mount Ethernet LAN Network Extension Cable: https://www.amazon.com/CocoFang-Female-Ethernet-Ne...
USB 2.0 Virtual 7.1 Channel Audio 3D Sound Card Adapter: https://www.amazon.com/Virtual-Channel-Audio-Adapt...
2 X RCA Female connectors: https://www.amazon.com/iExcell-Female-Socket-Conne...
2 X 1/4" Female connectors: https://www.amazon.com/Switchcraft-11-Female-4-Inc...
various nuts, washers and bolts for enclosure.
Step 2: Create Enclosure
layout your enclosure in http://www.makercase.com/
Tab Width set to 0.4
material is .25" birch plywood I purchased from the local Home Depot.
If you don't have access to a laser cutter, you can make a box just as easily from some other materials using the same w/h/d
Critical minimum dimensions are defined by the size of the Proto PCB board and the placement of the display and encoders.
The trick I used was to mark the center-point of each encoder after soldering them to the PCB, then drilling holes for them through the top piece.
For the display, either measure and lay out, or trace to lay out the front on one side, then the trapezoidal back section on the other (making one side top and the other the bottom).
Use a dremel (with the router attachment if you have it) to notch out the sections you need recessed - the back side of display area, the openings for the PI rear connectors (hdmi, usb, headphone).
Re-enforce the box by placing rectangular wood blocks in the corners of the box. These can then be used to screw into. Be sure to leave room for the PI.
For countersinking the encoder nuts, I used about a drill bit about twice the diameter of the hole and cut into the wood around the area of the holes for the encoder shafts. This trick also works well for countersinking the heads of the screws used to assemble the rest of the case. You may also need to make a notch on the underside of the top for the encoders, depending on the type you use.
For mounting the PI, I used M3 screws connected to the encosure using m3 stand bolts ( like motherboard stand-off bolts) and M3 sized T-Nuts. T-Nuts and screws seem to work great for connecting electronic components to wood. Use these also for the enclosure mount UBS and RJ45 extensions.
Re-enforce the box by placing rectangular wood blocks in the corners of the box. These can then be used to screw into.
Step 3: Attach Audio Device
Simply plug the usb connector into the PI.
Drill through and solder 1/8" headphone connectors to the 1/4" jacks and RCA jacks. place them wherever you see fit in the enclosure.
Step 4: Assemble Pi Cobbler, Encoders and Lcd
using the nulsom pcb, we assemble and solder the encoder and display board together.
Here are the wiring connections for these components to the pi cobbler.
ST7565 ---> pi cobbler (also works for pi header, if you're not using the cobbler)
B- --> R100 --> 21 G- --> R100 --> 20 A+ --> 3.3V R- --> R100 --> 16 GND --> GND VDD --> 3.3V SID --> MOSI SCLK --> SCLK A0 --> 24 /RST --> 25 /CS --> CE0
encoders (left center right) to pi
12 GND 6
23 GND 22
4 GND 26
13 GND 19
27 GND RXD
TXD GND 18
Trim the tabs from the encoders before soldering to the board. I spaced them 8 holes apart in the pcb for about 1.25" of space between each horizontally.
The display rgb backlight leads need resistors to operate correctly - I've used +/-5% 100Ohms. Leave a bit of room on the board for attaching these and wiring to and from them.
I don't attach the display pbc to the main pcb machanically. The nuts from the encoders hold the main board in place, and the screws through the enclosure to the display pcb hold the display in place.
As you can see, there are a number of connections - it helps to make the jumper wires as close to length as you can so that the board remains traceable and practical.
Step 5: Build and Install the Software.
The software running on the pioscbox can be found here:
This repo should be cloned to the following location:
After cloning to a directory on your PI Linux installation, run the build script. This will compile the rotary encoder components. External dependencies are WiringPI and Liblo. I don't remember, but I think both are already installed if you're running noobs.
Install Pure Data: https://puredata.info/docs/raspberry-pi
Copy the scripts located at /home/pi/PiOSCBox/etc/init.d/ to the system init directory /etc/init.d
Make links to the default runlevel:
ln -s /etc/init.d/box_display /etc/rc3.d/S04box_display
ln -s /etc/init.d/encoders /etc/rc3.d/S03encoders
ln -s /etc/init.d/pd-main-patch /etc/rc3.d/S05pd-main-patch
This will make the device boot into the audio, display and encoder driver softwares so that an external kb mouse and display are no longer needed.
Step 6: Using It!
The audio affects are implemented in Pure Data, and there are only a few simple ones coded as an example of how to communicate with OSC components and to implement features like paging (performed via the first encoder - top left)
There's included the DIY2 library. I'll post more pd effects after I've integrated it. Feel free to code your own based on the examples and post them if you like!