A simple project to build and learn electronics and embedded design at rLab
- Develop individual and shared electronic design skills
- Learn PCB design and build techniques with Kicad and external PCB manufacturers
- Improve surface mount and through hole soldering skills
- Familiarise members with rLab electronics tools, equipment, and knowledge
- Make a fun device
Derived from the previous 555 Synth Punk construction project
- design should be Microprocessor based rather than 555
- It should have a keyboard. This could be buttons, stylophone, touch sensor, or other. Probably single octave.
- Cost components and board under £10
- Improved Audio output using proper amplifier IC and board mounted speaker, possibly I2S codec
- A couple of knobs and buttons to change sound settings
- USB powered
- Audio output jack
- Mixture of surface mount and through hole components
- LCD display integral
- Expansion connector to add new personalised features v
- C++ or Python programming.
The design is built of modules which can be independently sourced, designed and prototyped before integration into a complete design.
The following modules are proposed to be in the design, being available and at reasonable cost:
The Raspberry Pi Pico module is based on the RP2040 microprocessor. The module includes flash memory, power supply, crystal clock and a USB interface. It is an easy way to to integrate this processor without detail PCB layout and at attractive cost. The Pi Pico Module have different variants which are pin compatible. They offer different USB Connectors(Micro-B, USB-C), Wireless and bluetooth integrated, and a higher performance version in the RP2350. Pi Pico Data sheet
The RP2040 is an ARM Cortex M0+ 32 bit processor which operates at 133MHz and includes a wide range of integrated peripherals. RP2040 Data sheet
High quality software support for the RP2040 and Pi Pico Modules is available in C/C++ (C SDK, and Arduino Pi Pico), and Python(Micropython, and CircuitPython)
A number of different keyboard switch types were considered including push butttons, stylophone type stylus and capacitive touch. The later was chosen for simplicity and the capability to play chords with multiple notes simultaneously.
A few different alternatives for the capacitive touch keyboard layout and interface were tested. The keyboard was prototyped with copper tape covered in kapton tape to simulate the PCB pads and solder mask in the final PCB. The Pi Pico does support direct connection of GPIO pins to interface capacitive touch switches using the CircuitPython touchio library, However it uses a lot of GPIO pins for a 12 key keyboard. It was decided to us a specialised Capacitive touch chip with and I2C interface MPR121. This chip is very small and will present a good challenge in construction, however it is available already mounted on low cost modules for prototyping. The chip supports up to 4 different I2C addresses allowing additional octave to be added.
The Pi Pico supports PWM output to a GPIO pin for audio tone output. The resulting output is rather noisy as described in section 3.4.1 of the RP2040 hardware interface manual. It was chosen to implement the low noise 3.3V audio supply, the buffer, and the filter circuit.
In addition to the PWM a I2S audio DAC is included for higher quality stereo output. The PCM5102 DAC analog part is also powered from the low noise 3.3V supply
Low cost audio power amplifiers with 1W output power baaed on the LM386 are available. LM386 module
The LM386 IC can operate with few external components with a gain of 20 which is suitable for our application.LM386 Data sheet
The loudspeaker is proposed to be board mounted.30mm Loudspeaker
Audio Output to an external amplifier is provided via a 3.5mm stereo jack.
A colour LCD display was chosen for the device. Limited space allows for a 240 by 240 pixel 1.3 inch IPS display. The module is based on the ST7789 display IC and is supported by both Micropython and CircuitPython grahics libraries.
To interact with the device and display, two potentiometers and six push buttons are included.
The board provides spare GPIO connections and power supplies on 2.54mm female headers for external experimental devices. The I2c Bus is also brought out to a connectors to daisy chain octaves or add other I2C devices. The connectors can be male or female and mounted vertically or horizontally on the board
Derived from Kicad BOM. All including VAT and shipping.
- PCB, 2 layer 100mm * 100mm JLCPCB £0.75
- Pi Pico 2040 module with micro USB £1.75
- 1.3in LCD Display 240 * 240 pixel £1.75
- Integrated circuits £1.25
- Connectors £0.75
- Buttons, Potentiometers £0.50
- Resistors, capacitors £0.75
The software is in early stage of test and development. The following capabilities have been tested:
- Display colour rLab logo on LCD display in Circuit Python
- SImple one octave piano with output to internal speaker
- Polyphonic synthesiser with output via audio codec
- Nintendo style games (Tetris, Flappy Bird) with display and sound