Here are the build notes for my Forbidden Planet "Krell" Display PCB. This post just looks at building the PCB for standalone use. Further posts will look at the physical build to get it into one of my Forbidden Planet "Krell" Displays and how to build it for use with a EuroRack module.
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
If you are new to microcontrollers and electronics, see the Getting Started pages.
Bill of Materials
- Forbidden Planet "Krell" Display PCB (GitHub link below)
- Waveshare Zero format board (more here).
- 10x APA-106 through-hole programmable RGB LEDs pinout: IN-VCC-GND-OUT.
- 1x 500uF electrolytic capacitor (or thereabouts).
- 1x 47uF electrolytic capacitor.
- Optional: 2x 9-way header sockets (full or low-profile - see notes).
- Pin headers
For the MIDI circuit:
- 1x H11L1 optoisolator.
- 1x 1N4148 or 1N914 signal diode.
- Resistors: 1x10Ω, 1x33Ω, 1x220Ω, 1x470Ω.
- 1x 100nF ceramic capacitor.
- 2x 3.5mm stereo TRS sockets - pcb mount (see photo and PCB for footprint).
- Optional: 1x 6-way DIP socket.
For potentiometer circuit:
- 1 or 2 x 10K pcb-mount potentiometer (see photo and PCB for footprint).
- 1 or 2x 100nF ceramic capactiors.
For the CV input:
- 1x Thonkiconn style mono PCB mount jack socket.
- Resistors: 1x22K, 1x33K.
- 2x BAT43 Schottky diodes.
Build Steps
This posts describes a standalone module with two potentiometer controls and a MIDI circuit. For a EuroRack-style module with CV inputs refer to a follow-on post.
Taking a typical "low to high" soldering approach, this is the suggested order of assembly:
- All diodes and resistors.
- DIP socket (if used) and TRS sockets.
- Disc capacitors.
- LEDs on rear of the board.
- 9-way headers (if used).
- Additional pin headers (if used).
- Electrolytic capacitors.
- Potentiometers on rear of the board.
Here are some build photos.
When it comes to adding the LEDs it is critical to get them in the correct pin order. These boards are designed for LEDs with two long and two shorter legs, with the pins in the order:
- Short: IN
- Short: VCC
- Long: GND
- Long: OUT
The pins need to be slightly bent to fit in the staggered footprint which means it isn't possible to push the LEDs flush with the PCB. It is worth taking a little care to get them all to approximately the same height and vertically aligned.
Hopefully it goes without saying to be careful of rubbing the hot soldering iron tip on any of the existing plastic components.
As the footprint for the Waveshare Zero is 2.54mm too wide, it is advantageous to use a Waveshare Zero format board to help angle-in the pin headers prior to soldering.
If using full height headers there will probably be enough flex to do this afterwards. If using low-profile headers then it will be necessary to get the angle correct prior to soldering.
In the following note how the large capacitor has been bent over to lie flat.
Also, I didn't have a 500uF or higher, so used a 470uF in a 10mm diameter package.
Testing
I recommend performing the general tests described here: PCBs.
Here is some test CircuitPython code that will check the functionality of the board with a Waveshare Zero type device. This was used with a Pimoroni Tiny2040 (which has two less pins to the Waveshare Zero devices).
Analog Input
This tests the potentiometers:
import time
import board
from analogio import AnalogIn
analog_in1 = AnalogIn(board.A2)
analog_in2 = AnalogIn(board.A3)
while True:
print(analog_in1.value,"\t",analog_in2.value)
time.sleep(0.1)
On turning each of the potentiometers a value between 0 and 65536 should be printed to the serial console. Note: Mine never seems to get below 256...
LEDs
This can be used to test the LEDs. Requires the following libraries from the Adafruit Circuitpython Library Bundle:
- neopixel.mpy
- adafruit_pioasm.mpy (presumably only required on RP2040 based boards)
- adafruit_pixelbuf.mpy
import time
import board
import neopixel
pixel_pin1 = board.GP2
pixel_pin2 = board.GP3
num_pixels = 5
pixels1 = neopixel.NeoPixel(pixel_pin1, num_pixels, brightness=0.3, auto_write=False, pixel_order=neopixel.RGB)
pixels2 = neopixel.NeoPixel(pixel_pin2, num_pixels, brightness=0.3, auto_write=False, pixel_order=neopixel.RGB)
while True:
for col in [(255,0,0),(0,255,0),(0,0,255),(0,0,0)]:
for pix in range(5):
pixels1[pix] = col
pixels1.show()
time.sleep(0.5)
pixels2[pix] = col
pixels2.show()
time.sleep(0.5)
time.sleep(3)
This will light each LED in turn alternating between the upper and lower sets of LEDs and then leave them off for three seconds.
MIDI IN and OUT
This requires the Adafruit MIDI library, which requires the following directory from the Adafruit Circuitpython Library Bundle:
import board
import digitalio
import busio
import adafruit_midi
from adafruit_midi.note_off import NoteOff
from adafruit_midi.note_on import NoteOn
uart = busio.UART(tx=board.GP0, rx=board.GP1, baudrate=31250, timeout=0.001)
midi = adafruit_midi.MIDI(midi_in=uart, midi_out=uart)
while True:
msg = midi.receive()
if (msg is not None):
if (isinstance(msg, NoteOn)):
print (msg)
print ("Note On: \t",msg.note,"\t",msg.velocity)
midi.send(msg)
if (isinstance(msg, NoteOff)):
print ("Note Off:\t",msg.note,"\t",msg.velocity)
midi.send(msg)
This will print out any received NoteOn and NoteOff messages (and only those) on the MIDI IN port and send them back out over the MIDI OUT port.
PCB Errata
There are the following issues with this PCB:
- The aforementioned Waveshare Zero footprint error.
Enhancements:
- It might have been useful to position the Waveshare board so that the USB connector could be presented to the edge of the board and thus left exposed when used with a case.
Find it on GitHub here.
Closing Thoughts
That is the basics of the board covered. Next will be a discussion of the alternative EuroRack supporting configuration and the physical builds for both versions.
Kevin
No comments:
Post a Comment