|
Post by keurslagerkurt on Dec 10, 2021 15:25:03 GMT
Hey all!! Lately i've been having fun with a Raspberry Pi Pico, a fantastic new, low budget microcontroller board (4€ for a legit board at Mouser!). It's a super easy to boot, plug and play microcontroller which can be programmed in MicroPython (ie basicly normal Python) or C/C++ (but haven't tried that yet). For me it has been superfun: I'm most proficient in Python, and I find it a very easy to learn and an easy to read language. It's tons of fun really. The inspiration, and basic firmware comes from the open-source EuroPi project for Eurorack, by Allen Synthesis. I have been in touch with Rory Allen, who was super nice & helpful with all questions I had. Underneath I have included the draft version of my input & output stage for analog in/out, digital in and push-button. I have build the complete module in about 1h30min on the breadboard, and I hope some people follow my lead I plan on making a small first prototype batch for an AE module with 3 analog ins, 1 digital in, 6 analog outs, 2 buttons and one OLED screen. People who would be interested in alpha testing this one, let me know! I hope to find some testers that are motivated and hyped to build some firmware functionality already before this would launch. Things like a clock, a gate generator, an euclidean sequencer, a more complex sequencer with probability, an lfo bank,.. seem well within reach with the Pi Pico tbh! Lets gooo! Edit: input pot is 100k, forgot to add that to the schematic.
|
|
|
Post by pt3r on Dec 10, 2021 16:13:26 GMT
Please oh please I would love to test this.
|
|
|
Post by m4vrick on Dec 10, 2021 17:04:45 GMT
Nice project ! I love the idea. Would love to help too, but I never succeed in learning Python
|
|
|
Post by pt3r on Dec 10, 2021 17:16:40 GMT
I am proficient in python, I do a lot of python development for a living, so yes this would be a very exciting addition.
|
|
|
Post by reductionist_earth_catalog on Dec 10, 2021 17:27:34 GMT
This is awesome. My first thought was a firmware somewhat similar in functionality to Pam’s new workout in eurorack, and it seems that you are thinking along the same lines. I have played around with Python a lot (working on Project Euler and Project Rosalind in my free time), and I have written some arduino sketches for a teensy-based Eurorack module, but I haven’t done things like generate LFOs and envelopes yet. Seems like a lot of fun though!
Edit: one thing I wonder about: there are gpio pins that are unused, correct? Would adding a digital in be as trivial as replicating that circuit on an additional pin? It might be nice to have another digital input, to have both start/stop as well as 24ppqn clock for a tempo synced modulation firmware.
|
|
|
Post by keurslagerkurt on Dec 10, 2021 18:18:49 GMT
This is awesome. My first thought was a firmware somewhat similar in functionality to Pam’s new workout in eurorack, and it seems that you are thinking along the same lines. I have played around with Python a lot (working on Project Euler and Project Rosalind in my free time), and I have written some arduino sketches for a teensy-based Eurorack module, but I haven’t done things like generate LFOs and envelopes yet. Seems like a lot of fun though! Edit: one thing I wonder about: there are gpio pins that are unused, correct? Would adding a digital in be as trivial as replicating that circuit on an additional pin? It might be nice to have another digital input, to have both start/stop as well as 24ppqn clock for a tempo synced modulation firmware. Yep, you can add as many of them as you like I believe. Have not delved in the RP2040/PiPico datasheet yet to see whether some pins are hardwired/occupied/.. like in the Arduino/Atmel case. But you could use the Digital Input circuits on any GPIO afaik. Same with the PWM, I've read that there are 16 PWM outputs possible as well, so you could basicly use the output circuit on any pin of these of your choice. If you really want to be quick/lazy and if an output range of 0-3.3V is fine for you, you can even use just use the very first part of the output circuit with the resistor + capacitor (= RC filter), and leave the opamp out. Only thing limited is the analog inputs, because there are only 4 ADC channels on the Pico, and one can't be used (because its used for the pico already). Thats why I used an input stage with a switch which lets me choose whether to use the pot to dial in a voltage, or to use the pot as an attenuator of the incoming voltage. -> In the future I think it might be interesting to add an extra ADC to the PCB that communicates maybe with I2C (if thats fast enough?) to the Pico. -> Another path would be to install the pots to make a voltage that gets summed together with the input CV/audio, that way you wont need the switch and can basicly choose whether you want to use the pot, CV, or both. Edit: I do not have Eurorack but heard about Pam's new workout. Don't know exactly what it does / how it works tho. Would def be interesting to have some users/community/programmers on board that have inspiration and ideas like this. I'm still relatively new to modular, so could def use input like this!
|
|
|
Post by keurslagerkurt on Dec 10, 2021 18:23:22 GMT
I am proficient in python, I do a lot of python development for a living, so yes this would be a very exciting addition. Well when I said proficient, I meant that I used it in Uni and programmed/calculated/rendered a lot of machine learning / statistics / plots / interactive graphs with it. Not really the stuff that makes you real good at programming for audio-rate, efficiency and using lower level stuff Would be great to have someone with this knowledge on board of the project! In my head I really believe it could be a cool, community driven project, much like Grains. But I hope it can be a bit more accessible than Grains even! And with more outputs & inputs!
|
|
|
Post by pt3r on Dec 10, 2021 18:56:07 GMT
I'm wondering whether python is able to do this without the help of c/c++ libraries. And how easy is it to integrate existing libraries in micropython.
|
|
|
Post by mrkoggs on Dec 10, 2021 20:12:38 GMT
Nice work! I would love something like this in AE format.
P.s. I'm in awe of how tidy you manage to keep your breadboards
|
|
|
Post by admin on Dec 10, 2021 20:31:02 GMT
Wow this will be the 4th programmable module for the AE system! It's amazing that the little analog noisemaker has grown into a digital powerhouse! There are seemingly no limits.
I would love to be an alpha or beta tester, but alas, shipping to Australia takes forever ... I'm still waiting for the delivery of Zeno's last batch of modules which have been more than 4 weeks on the boat.
|
|
|
Post by keurslagerkurt on Dec 11, 2021 9:20:21 GMT
I'm wondering whether python is able to do this without the help of c/c++ libraries. And how easy is it to integrate existing libraries in micropython. For CV handling, Python should be fine i think. For audio handling/generation, it will def be needed to look into the C++ side of things. From someone comparing the same interrupts in Python and C++ on the Pico, I saw that Python takes about 60 usec, C++ only 6 usec. Interesting tho: Pico has two cores. So it should be possible to use one to poll the inputs, do some calculations,.. while the other one can handle tight audio generation.
|
|
|
Post by pt3r on Dec 11, 2021 9:35:59 GMT
Better start refreshing my c skills
|
|
|
Post by loopier on Dec 11, 2021 16:27:59 GMT
I'm in!
|
|
|
Post by dizzeesatchel on Aug 8, 2022 10:26:41 GMT
It works! (Mostly) Really need some of those little right angle connectors, cos this is chaos. Think we can fit all this on a 2U size perfboard?
|
|
|
Post by dizzeesatchel on Aug 9, 2022 19:16:42 GMT
keurslagerkurt one question about your (excellent) diagram - on the buttons circuit, is that a 47ohm resistor leading from the switch? Its a little hard to make out. And a 1nf cap down to ground?
Also is there a particular reason to favour the 6002 op-amp? It seems to be popular; i've been using this one from the Pi Hut which seems to be much the same thing (same pin out) but not sure if that 6002 has some advantage i don't know about
|
|
|
Post by keurslagerkurt on Aug 9, 2022 22:15:06 GMT
keurslagerkurt one question about your (excellent) diagram - on the buttons circuit, is that a 47ohm resistor leading from the switch? Its a little hard to make out. And a 1nf cap down to ground?
Also is there a particular reason to favour the 6002 op-amp? It seems to be popular; i've been using this one from the Pi Hut which seems to be much the same thing (same pin out) but not sure if that 6002 has some advantage i don't know about The resistor is 470 ohm (written down as '470R'), and a 1nF cap indeed. Well any Rail-to-rail op-amp that works on 5V would do, so I had a quick glance at the website you sent, and yours seems to be just fine! I ordered a ton of MCP6002's because these were the cheapest at the time. Not sure what the situation right now is with all the chip shortages. If you have any troubles with the build/calibration/.. Feel free to post here or shoot me a message of course! (best to tag me in the post, that way i get an email so I'll notice quicker)
|
|
|
Post by keurslagerkurt on Aug 9, 2022 22:15:43 GMT
Oh and great job on the breadboard build!! That's an impressive amount of cables
|
|
|
Post by dizzeesatchel on Aug 24, 2022 0:30:11 GMT
It's taking shape... the button i touched with the soldering iron is taking on a different shape entirely...
Current roadblocks:
I think i messed up the button wiring, something screwy is going on with them, something in that bit of circuit is making the Pico freeze up
When i connect the Pico via USB some voltage (2v ish) comes back out of the bus connector, which definitely isn't good, I put a diode between the bus and the rest of the circuit, but it was just whatever diode i had lying around. I thought that would be enough to prevent reverse powering, but maybe not.
Totally forgot to ground all the LEDs, easy fix at least
Also forgot to wire the pots to the Pico, oops (that explains why they don't work)
Double-sided board would have been a wise investment!
Wiring should have been better planned out, it's chaos under there
Just about squishing together as a sandwich:
V2 will be better
|
|
|
Post by pt3r on Aug 24, 2022 7:45:27 GMT
Make sure that the pins that have buttons connected are not 'floating' i.e. if the button is not pressed they should be pulled low to GND. I feel you on the sandwich squeezing, I had the same issues trying to get an arduino micro integrated in the diy module of tangible waves. Not pretty at all but eventually worked out.
|
|
|
Post by dizzeesatchel on Aug 24, 2022 8:36:50 GMT
Ooh i think you might be onto something with the floating pins. Will take a closer look at the board. There’s something about the writing of buttons i find really confusing even though on the face of it they’re a really basic component… With the arduino, did you do anything to alleviate voltage fluctuations caused by the microcontroller? I read a lot about it so threw the biggest cap i had between +5 and ground right by where power goes into the pico. Seems fine but i wondered if it’s actually necessary. It’s really squeezed in there!
|
|
|
Post by pt3r on Aug 24, 2022 12:46:15 GMT
I did not foresee something to cope with voltage fluctuations cause by arduino do you have some documentation on that issue?
|
|
|
Post by dizzeesatchel on Aug 24, 2022 14:24:05 GMT
There's some discussion in this thread about TechnoBear's experience with the Bela Mini. I can't find my other sources anymore
|
|
|
Post by reductionist_earth_catalog on Aug 24, 2022 17:27:25 GMT
Hmm the +2v issue makes me worry about my diy arduino module since I have it connected by usb to an rpi—what exactly is the issue and how would I go about seeing if I have the same issue? Thanks!
|
|
|
Post by dizzeesatchel on Aug 24, 2022 21:14:28 GMT
Honestly - it's probably my shoddy soldering. I rigged up this little circuit to make testing easier - dropping a 9v battery to 5v for safe-ish testing. Threw an LED in series to remind me to unplug the battery when done.
After first test i took out the battery but left the proto module wired to +5 and gnd on my test board while i plugged USB into my laptop and the LED lit up That's when i got the multimeter out and realised a little power was leaking backwards somehow. I'm sure there's just a dodgy connection somewhere since there are wires all over the place.
|
|
|
Post by reductionist_earth_catalog on Aug 24, 2022 22:01:28 GMT
Hmm I think I have encountered something similar then. I am still new to electronics—what would be the risks of backpowering my ae system unintentionally with power from a USB connection to an arduino-based module?
|
|