EuroPi: A reprogrammable Eurorack project based on the Raspberry Pi Pico

Overview

EuroPi

The EuroPi is a fully user reprogrammable module based on the Raspberry Pi Pico, which allows users to process inputs and controls to produce outputs based on code written in Python. The entire project is open-source.

This repository relates to the EuroPi module, however some users may be expecting to see what is now referred to as the 'EuroPi Prototype'. The repository for this (now deprecated) module can be found here

You can find more about this (including a project diary) and other projects of mine on my website

Imgur

New Features

Obvious Improvements

  • Outputs are now capable of providing 0-10V (previously 0-3.3V)
  • 6 outputs, all capable of either digital or CV output (previously 4 digital and 4 analogue)
  • All outputs have an indicator LED for easy visualisation of outputs (previously only LEDs on the digital outputs)
  • One analogue (CV) input is now available, which can 'read' 0-12V (previously no CV input)
  • One digital (clock, trigger, gate) input is now available (previously no digital input)
  • A 128x32 OLED display has been added to allow for further menu control and usability when changing patches often

More Technical Changes

  • The buttons have hardware debouncing to allow users to change out capacitor values for reduced accidental 'double click'
  • A 10 pin Eurorack shrouded power header is now used to prevent accidental reverse powering of the module
  • The 5V supply for the Pico is now regulated down from the +12V supply, so no 5V rail is required from your Eurorack power supply
  • The power supply is now diode protected to prevent back-powering your rack when the module is connected via USB
  • All jacks are protected from overvoltage input (previously the Pico GPIO pin was directly exposed to any input, potentially leading to damage)

Please see the README.md files in the hardware and software folders for more specific information about each, including hardware specifications and how to use the europi.py library.

Issues

If you find any bugs, either in the software, the hardware, or the documentation, please create an Issue by clicking the 'Issue' tab along the top.
Please feel free to create any issue you see fit, I'll either attempt to fix it or explain it.
There are Issue templates available, so please choose whichever is most relevant, depending on if your Issue is a hardware or software bug, if it's a documentation error or suggestion, if it's a question about the project as a whole, or a suggestion about the project as a whole.

License

This module, and any documentation included in this repository, is entirely "free" software and hardware, under the Creative Commons Share-Alike 4.0.
Anyone is welcome to design their own versions of the idea, or modify my designs. The only thing I would ask is that you refrain from using the brand name 'Allen Synthesis' on your DIY builds if they have modified my files in any way, just to prevent any confusion if they end up being re-sold or distributed. This is in line with section 3. A) 3. of the CC BY-SA License. You may use the brand name if you have simply copied the files from this repository to replicate without modification.

Disclaimer

Recreate any of the files found in this repository at your own risk; I will attempt to solve any issues that you might have with my designs, but I can't guarantee that there are not minor bugs in any of the documents, both hardware and software.

Comments
  • EuroPi firmware refactor

    EuroPi firmware refactor

    My primary goal with this refactor was to make the firmware more "Pythonic" from a documentation and style guide perspective. I want to keep the firmware accessible to beginners, but also take advantage of some of Python's object oriented nature to share common behavior among similar classes. This also introduces the new more accurate calibration script from Rory.

    I have updated the README docs to match the changes to the firmware.

    All of the contrib scripts have been tested and updated to work with the firmware changes.

    Firmware change:

    • Created AnalogueReader and DigitalReader base classes so inputs can share methods. This gives a consistent interface with components and shares code!
    • AnalogReaders have a consistent interface for reading values with percent, range, and choice. I went with simple generic names that apply to both knob and cv input. Names can change, but those 3 methods yield the most value in my opinion.
    • Samples default is set by the class instance and can be overridden any time with set_samples. All AnalogueReader methods take optional samples or use current instance default.
    • AnalogueInput overrides percent and applies calibration
    • AnalogueInput provides additional read_voltage method with calibration
    • Display centre_text has minor refactoring of variable names to better match the underlying text method.
    • Output class hides “duty” and only works with voltage
    • reset_state() function turns off all outputs, displays, and resets handlers. Very helpful when first running a script!
    opened by awonak 13
  • Add two apps: Bernoulli gates and Euclidean rhythm

    Add two apps: Bernoulli gates and Euclidean rhythm

    Two new apps:

    1. Bernoulli gates A dual Bernoulli gates motivated by Mutable Instruments Branches.
    2. Euclidean rhythm Six independent Euclidean gate generators with internal/external clock and cv controllability.
    opened by Bridgee 12
  • [Project Suggestion] Program selection menu

    [Project Suggestion] Program selection menu

    Project Suggestion: Program selection menu

    As we add user contributed scripts we will (hopefully) end up with a large enough collection that the module will be useful 'out of the box' and not require that the user write their own scripts. In this case it would be nice to be able to switch amongst these scripts without connecting a computer and re-writing main.py.

    I think that a proper menu system will require that we design two major pieces:

    • hardware UX: the actual menu that the user experiences via the OLED, buttons, and knobs
    • software API: The menu program and API that allows programs (apps?) to be included in the menu easily.

    I believe that some work had already be done towards this, at least with the prototype module (https://github.com/awonak/EuroPiAlt). I suggest that we use this issue to focus these efforts and gather input on what this menu should be and how it should behave.

    software suggestion 
    opened by mjaskula 12
  • Use constants for PWM and CPU frequency

    Use constants for PWM and CPU frequency

    ~~In order to get more stable dc voltage out of the PWM output, the PWM frequency needs to be set to a higher value.~~

    ~~This PR also removes the machine freq settings from all user contribution scripts and moves that command into the EuroPi firmware to ensure consistent cpu performance across all scripts.~~

    ~~Note: this is a continuation of PR #166 and includes changes in that branch too.~~

    Define constants for CPU Freq and PWM Freq. Centralize the machine.freq() call to overclock the pico.

    This PR and #154 contain lots of good discussion of our efforts to make better sense of how to best use PWM to get a stable control voltage for the EuroPi.

    opened by awonak 9
  • EuroPi Script Save/Load State

    EuroPi Script Save/Load State

    See #102 for design details.

    This introduces an interface for saving a script's state variables to be loaded the next time the module is powered back on.

    There are 3 supported persistence formats, string, JSON, and bytes. It is up to the script author to handle the encoding/decoding of their script's state into the persistence formats.

    Scripts should be mindful of the size of data being persisted and the frequency of calls to save state (maintainers should look out for this during code review).

    New docs:

    https://awonak.github.io/EuroPi/generated/europi_script.html

    https://github.com/awonak/EuroPi/blob/polyrhythm-save-state/software/contrib/menu.md#saveload-script-state

    opened by awonak 8
  • DigitalReader last_pressed and last_triggered

    DigitalReader last_pressed and last_triggered

    • Refactor handler debounce code to use recommended ticks_diff()
    • Rename DigitalReader.last_pressed to better DigitalReader.last_rising_ms
    • Added wrappers last_pressed and last_trigger to the Button and DigitalInput classes.
    • Updated README docs

    This addresses the first part of #60 with the last_pressed() etc methods. A future PR will address the falling edge handler.

    software documentation 
    opened by awonak 8
  • [Bug Report] Max output voltage capped at 9.12v?

    [Bug Report] Max output voltage capped at 9.12v?

    Bug Report

    Testing the Output class, I am unable to get the output voltage above 9.12v.

    To Reproduce
    Steps to reproduce the behavior:

    From a MicroPython shell running on the pico, I am testing setting the cv1 output duty cycle to the maximum value and I am only seeing 9.12V max.

    > cv1.pin.duty_u16(65535)
    

    On my oscilloscope I am reading 9.12v.

    Expected behavior

    I would expect to see a maximum output of 10v.

    hardware 
    opened by awonak 8
  • [Project Suggestion] Make EuroPi firmware pip installable

    [Project Suggestion] Make EuroPi firmware pip installable

    Project Suggestion

    To further simplify the setup process for EuroPi users, create a upip distribution package for the EuroPi firmware.

    This would allow Thonny users to "install" the EuroPi firmware using the same Tools > Manage Packages process to install a "EuroPi firmware" library.

    One missing requirement is defining a version scheme for differentiating between releases.

    Official documentation: https://docs.micropython.org/en/latest/reference/packages.html#distribution-packages-package-management-and-deploying-applications

    https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/

    Practical example: https://github.com/stlehmann/micropython-ssd1306

    suggestion 
    opened by awonak 7
  • Re-write calibration process

    Re-write calibration process

    Calibration process now detects USB connection and informs the user to only use rack power All instructions are given via the OLED rather than the console Button 1 is the only input rather than Enter

    software documentation 
    opened by roryjamesallen 7
  • [Project Suggestion] Add support for alternative OLED pin configurations

    [Project Suggestion] Add support for alternative OLED pin configurations

    Project Suggestion

    Describe your suggestion or idea
    The current PCBs only support one pin layout for the I2C bus of the OLED display, meaning that alternative displays using the same driver which may be more accessible to other customers cannot be used. The PCB could contain some hardware to allow the pins to be switched for alternative layouts.

    Images
    The Pi Hut OLED image

    CPC OLED (theoretically compatible but alternate pin configuration) image

    suggestion hardware 
    opened by roryjamesallen 7
  • [Project Suggestion] Create custom firmware image that enables drag and drop setup

    [Project Suggestion] Create custom firmware image that enables drag and drop setup

    Project Suggestion

    I suggest to add a custom firmware image (.uf2) file to the repo that allows users to setup a fresh pi pico just by connecting it to usb while the bootsel is pressed and drag-drop the custom firmware image on the device. I think this would improve the experience for non tech-savvy people and increase the audience for the EuroPi project. Also it would speed up the programming step for build-workshops or small scale production.

    I created such a firmware as proof of concept and I will document the steps needed here soon. The question is, if that could be automated or if it needs to be done manually for every new major release.

    suggestion 
    opened by redoxcode 6
  • Add dead zone to knobs

    Add dead zone to knobs

    This fixes the issue https://github.com/Allen-Synthesis/EuroPi/issues/209 by implementing deadzones for the knobs. Please see the discussion in the issue for details. This PR does not change:

    • Anything about ain. I opened an extra issue for that (https://github.com/Allen-Synthesis/EuroPi/issues/211)

    This PR does change:

    • The deadzones are implemented in the percent() function of the AnalogueReader class.
    • Also the Knob class now actually makes use of the percent() function in the AnalogueReader class instead of completely reimplementing that part.
    • Also the _sample_adc() function of AnalogueReader was changed for better performance without changing the results
    • Tests have been modified to account for the deadzones
    opened by redoxcode 1
  • [Project Suggestion] Update calibration routine and implementation

    [Project Suggestion] Update calibration routine and implementation

    Update calibration routine and implementation

    As mentioned in other issues (e.g. https://github.com/Allen-Synthesis/EuroPi/issues/209) and the discord channel multiple times, the way the calibration works could be improved. I hope we can use this issue to collect our ideas and requirements and maybe find a good solution together.

    I will start with these points:

    • As mentioned in (https://github.com/Allen-Synthesis/EuroPi/issues/209) calibration of ain should be at least 2 points (0V and 10V) with multiple samples to account for noise. Especially the 0V measurement will be influenced by noise as the noise can't occur symmetrical around 0 (no values below 0 possible)
    • Maybe more people have voltage measurement equipment (multimeter) than rescission voltage sources. So maybe calibrate the outputs first and then use that for the input? Maybe don't use the output to calibrate the input or vice versa?
    • Maybe have calibrate all outputs independently? I guess they use the same parts on most builds, but there can still be differences due to the tolerances of the parts or bad connections.
    suggestion 
    opened by redoxcode 0
  • Consequencer updates dec 22

    Consequencer updates dec 22

    • Added a hard upper limit to the number of CV Patterns (35) to avoid a memory allocation error
    • Updated generateNewRandomCVPattern() to capture a memory allocation error in case it ever happens again
    • Added code to pull the button pins up to (hopefully) avoid phantom long button presses
    • Updated the behaviour of B2 in Mode 3. B2 no longer changes the selected CV pattern in mode 3 - this is now only done using CV, but only in mode 3
    opened by gamecat69 0
  • [Hardware Issue] Noise on knob values and analogue inputs

    [Hardware Issue] Noise on knob values and analogue inputs

    Hardware Issue

    Describe the bug
    There is noise present when sampling the analogue inputs or knob values. This noise offsets the value read at the extremities of the readings, e.g 0 will never read 0 and the max value will never read the max value.

    This issue causes the the percent() value to never read 100% on some modules. The issue also causes the analogue input to never read 0 Volts.

    To Reproduce
    Steps to reproduce the behavior: Read any value from k1 or ain to more than 1 decimal place several times.

    Expected behavior
    It would be great if something like a deadzone was implemented. e.g. if really close to 0 the value returned is 0 or of close to the max the value returned is the max value.

    hardware 
    opened by gamecat69 9
  • Add link to contrib/README.md and youtube tutorials by nik

    Add link to contrib/README.md and youtube tutorials by nik

    This PR was suggested by d’Composer and mjaskula on discord. It adds a link to the excellent youtube tutorials by nik and also to the contrib/README.md file on the landing page. I guess this would make it easier for people to get started and get an impression for the capabilities of europi. Since the link is to the playlist, there is no need to update it if new videos are added there. Happy to accept any feedback.

    opened by redoxcode 0
  • Minor improvements to the DigitalReader class

    Minor improvements to the DigitalReader class

    I made some improvements to the DigitalReader class. Before it was reading the hardware pin twice in a row on a falling edge signal and could in theory (very unlikely, but still) miss falling edge signals (if the pin would change between these reads). Also I found it some times unintuitive or failed to trigger the 'both buttons' action. I propose to reduce the time needed to hold both buttons and in turn add a check how long the 'other' button has been down to avoid accidental triggering (I am open to adjusting the timing values). I am still not happy with the DigitalReader class or more precisely the _bounce_wrapper. De-bouncing is not optimal yet, as it will prevent double triggers of the same event (a bounce after a rising wont trigger an other rising) but not of the counter event (a bounce after a rising can trigger a early falling event). But for now I have no elegant way to to fix that without the risk of dropping legit events. So this PR only fixes the other things for now.

    opened by redoxcode 0
Releases(v0.7.1)
  • v0.7.1(Dec 6, 2022)

  • v0.7.0(Dec 4, 2022)

    New Scripts

    • Master clock #162
    • Piconacci #187

    What's Changed

    • Add list of scripts with descriptions and links to the contrib readme by @djmjr in https://github.com/Allen-Synthesis/EuroPi/pull/165
    • Version Info Bootsplash by @awonak in https://github.com/Allen-Synthesis/EuroPi/pull/166
    • Trying to get the summary line to render as a separate paragraph. by @pcurry in https://github.com/Allen-Synthesis/EuroPi/pull/169
    • Fix doc generation error due to framebuf by @roryjamesallen in https://github.com/Allen-Synthesis/EuroPi/pull/171
    • Add new Display methods and use constants for HIGH and LOW digital states by @atulrnt in https://github.com/Allen-Synthesis/EuroPi/pull/168
    • move the display of the bootspash to the menu by @mjaskula in https://github.com/Allen-Synthesis/EuroPi/pull/174
    • Master clock by @gamecat69 in https://github.com/Allen-Synthesis/EuroPi/pull/162
    • Fix incorrect PCB header link by @roryjamesallen in https://github.com/Allen-Synthesis/EuroPi/pull/182
    • Add documentation to allow upgrading MicroPython/Firmware by @roryjamesallen in https://github.com/Allen-Synthesis/EuroPi/pull/170
    • Add noise source to the Harmonic LFOs script by @atulrnt in https://github.com/Allen-Synthesis/EuroPi/pull/186
    • Master clock v2 by @gamecat69 in https://github.com/Allen-Synthesis/EuroPi/pull/180
    • Fix usb connection issue by @roryjamesallen in https://github.com/Allen-Synthesis/EuroPi/pull/183
    • Add additional documentation for the use of custom images on the oled. by @redoxcode in https://github.com/Allen-Synthesis/EuroPi/pull/195
    • Re-word calibration instructions to make sense with the menu by @roryjamesallen in https://github.com/Allen-Synthesis/EuroPi/pull/190
    • Add App: Piconacci by @seanbechhofer in https://github.com/Allen-Synthesis/EuroPi/pull/187
    • MicroPython 1.19.1 doc by @mjaskula in https://github.com/Allen-Synthesis/EuroPi/pull/197
    • Add documentation for creation of custom firmware uf2 files by @redoxcode in https://github.com/Allen-Synthesis/EuroPi/pull/199
    • Use constants for PWM and CPU frequency by @awonak in https://github.com/Allen-Synthesis/EuroPi/pull/167
    • Create Release and publish uf2 asset upon version tag creation. by @awonak in https://github.com/Allen-Synthesis/EuroPi/pull/198

    New Contributors

    • @pcurry made their first contribution in https://github.com/Allen-Synthesis/EuroPi/pull/169
    • @atulrnt made their first contribution in https://github.com/Allen-Synthesis/EuroPi/pull/168
    • @redoxcode made their first contribution in https://github.com/Allen-Synthesis/EuroPi/pull/195

    Full Changelog: https://github.com/Allen-Synthesis/EuroPi/compare/0.6.1...v0.7.0

    Source code(tar.gz)
    Source code(zip)
    europi-v0.7.0.uf2(764.00 KB)
  • 0.6.1(Aug 28, 2022)

    What's Changed

    • Black formatter setup by @Didah in https://github.com/Allen-Synthesis/EuroPi/pull/148
    • Create FAQ by @roryjamesallen in https://github.com/Allen-Synthesis/EuroPi/pull/152
    • Create programming_limitations.md by @roryjamesallen in https://github.com/Allen-Synthesis/EuroPi/pull/160
    • strange attractor init by @mjaskula in https://github.com/Allen-Synthesis/EuroPi/pull/157
    • experimental: LockableKnob and KnobBank by @mjaskula in https://github.com/Allen-Synthesis/EuroPi/pull/155
    • turing machine by @mjaskula in https://github.com/Allen-Synthesis/EuroPi/pull/114
    • Consequencer updates june 22 by @gamecat69 in https://github.com/Allen-Synthesis/EuroPi/pull/158
    • Smooth random voltages script by @awonak in https://github.com/Allen-Synthesis/EuroPi/pull/153
    • Probapoly init and CVecorder performance improvements by @gamecat69 in https://github.com/Allen-Synthesis/EuroPi/pull/161

    New Contributors

    • @Didah made their first contribution in https://github.com/Allen-Synthesis/EuroPi/pull/148

    Full Changelog: https://github.com/Allen-Synthesis/EuroPi/compare/0.5.0...0.6.1

    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Dec 1, 2022)

    [Release] version 0.5.0 [New Script] PolySquare 6 oscillator contrib script https://github.com/Allen-Synthesis/EuroPi/pull/141 [Bug Fix] Updated display to show pattern number, decrease loading times #146 [Bug Fix] Cvecorder bank clear remediation #139, [Documentation] Contributing updates #138, #125 [Documentation] Update hamlet.md to align gate/CV ports with code #135 [Other] Add a new test fixture called MockHardware #137 [Other] Add missing test mocks #143

    Source code(tar.gz)
    Source code(zip)
Owner
Allen Synthesis
Allen Synthesis
A simple portable USB MIDI controller based on Raspberry-PI Pico and a 16-button keypad, written in Circuit Python

RPI-Pico-16-BTn-MIDI-Controller-using-CircuitPython A simple portable USB MIDI controller based on Raspberry-PI Pico, written in Circuit Python. Link

Rounak Dutta 3 Dec 4, 2022
a library for using WS2812b leds (aka neopixels) with Raspberry Pi Pico

pico_ws2812b a library for using WS2812b leds (aka neopixels) with Raspberry Pi Pico You'll first need to save the ws2812b.py file to your device (for

null 76 Nov 25, 2022
A Python class for controlling the Pimoroni RGB Keypad for Raspberry Pi Pico

rgbkeypad A Python class for controlling the Pimoroni RGB Keypad for the Raspberry Pi Pico. Compatible with MicroPython and CircuitPython. keypad = RG

Martin O'Hanlon 43 Nov 11, 2022
Raspberry Pi Pico development platform for PlatformIO

Raspberry Pi Pico development platform for PlatformIO A few words in the beginning Before experimental please Reinstall the platform Version: 1.0.0 Th

Georgi Angelov 160 Dec 23, 2022
Raspberry Pi Pico support for VS Code

Pico-Go VS Code Extension Pico-Go provides code auto-completion and allows you to communicate with your Raspberry Pi Pico board using the built-in REP

Chris Wood 114 Dec 28, 2022
A Raspberry Pi Pico powered Macro board, like a Streamdeck but cheaper and simpler.

Env-MCRO A Raspberry Pi Pico powered Macro board, like a Streamdeck but cheaper and simpler. (btw this image is a bit outdated, some of the silkscreen

EnviousData 68 Oct 14, 2022
A Macropad using the Raspberry Pi Pico, programmed with CircuitPython.

A Macropad using the Raspberry Pi Pico, programmed with CircuitPython.

null 15 Oct 14, 2022
Raspberry Pi Pico and LoRaWAN from CircuitPython

Raspberry Pi Pico and LoRaWAN from CircuitPython Enable LoRaWAN communications on your Raspberry Pi Pico or any RP2040-based board using CircuitPython

Alasdair Allan 15 Oct 8, 2022
A Raspberry Pi Pico plant sensor hub coded in Micropython

plantsensor A Raspberry Pi Pico plant sensor hub coded in Micropython I used: 1x Raspberry Pi Pico - microcontroller 1x Waveshare Pico OLED 1.3 - scre

null 78 Sep 20, 2022
Raspberry Pi Pico Escape Room game.

Pico Escape Room Raspberry Pi Pico Escape Room game. Parts Raspberry Pi Pico Set of 2 x 20-pin Headers for Raspberry Pi Pico 4PCS Breadboards Kit Incl

Kevin Thomas 5 Feb 2, 2022
An open source operating system designed primarily for the Raspberry Pi Pico, written entirely in MicroPython

PycOS An open source operating system designed primarily for the Raspberry Pi Pico, written entirely in MicroPython. "PycOS" is an combination of the

null 8 Oct 6, 2022
Turn your Raspberry Pi Pico into a USB Rubber Ducky

pico-ducky Turn your Raspberry Pi Pico into a USB Rubber Ducky Install Requirements CircuitPython for the Raspberry Pi Pico adafruit-circuitpython-bun

Konstantinos 5 Nov 8, 2022
Play music on Raspberry Pi Pico Without CPU involvement

MicroPython_PIO_Music_DMA Play music on Raspberry Pi Pico Without CPU involvement This is based on PIOBeep (https://github.com/benevpi/pico_pio_buzz)

null 3 Nov 27, 2022
Raspberry Pi Pico as a Rubber Ducky

Raspberry-Pi-Pico-as-a-Rubber-Ducky Kurulum Raspberry Pi Pico cihazınız için CircuitPython'u indirin. Boot düğmesine basılı tutarken cihazı bir USB ba

Furkan Enes POLATOĞLU 6 Dec 13, 2022
A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost.

distance sensor cube timer A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost. How to

null 3 Feb 21, 2022
USB Rubber Ducky with the Rasberry Pi pico microcontroller

pico-ducky Install Install and have your USB Rubber Ducky working in less than 5 minutes. Download CircuitPython for the Raspberry Pi Pico. Plug the d

AnOnYmOus001100 3 Oct 8, 2022
Hourglass on the pi pico using circuitpython

hourglass-on-pico "Hourglass" on the raspberry pi pico using circuitpython circuitpython version 7.0.0 Components used: Raspberry Pi Pico ADXL345 acce

null 4 Jul 18, 2022
This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.

This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.

Stanford Student Robotics 1.2k Dec 25, 2022
Home solar infrastructure (with Peimar Inverter) monitoring based on Raspberry Pi 3 B+ using Grafana, InfluxDB, Custom Python Collector and Shelly EM.

raspberry-solar-mon Home solar infrastructure (with Peimar Inverter) monitoring based on Raspberry Pi 3 B+ using Grafana, InfluxDB, Custom Python Coll

cislow 10 Dec 23, 2022