Thursday, October 20, 2022

AD9833-RP2040 VCO--Volt/Octave is Working.....

Hello again, quick post.  

Last time I was working on an Analog to Digital equipped RP2040 carrier board (a development board to expand the capabilities of an even smaller development board--the SEEED XIAO RP2040).  

The initial carrier design had some stupid mistakes. I had to send off the gerbers again.  

Now, I am waiting for the improved dev boards to come back from fabrication, from my generous and patient sponsor, PCBWAY.

In the meantime I have a working volt per octave VCO made from bits and pieces left over from my last post--centered around an AD9833 programmable waveform generator IC driven by an RP2040 MCU running firmware I wrote in embedded C.


Here are a couple of videos from the bench--first up: basic volt per octave CV, coarse pitch control, and ramp LFO modulation. My MIDI controller (Alesis Q49) is wired to an Intellijel uMIDI volt-octave generator. Next, a Tiptop MIXZ Euro mixer module is used to sum it with additional CV sources. Yes, that works. The AD9833 based VCO can track high frequency modulation well. Cool!



\\

Let's go riffing!


Here is how the SEEED RP2040 carrier PCB is wired to the AD9833 breakout board:



The confusing thing here is "Pin 6/SDA".  This is used for chip select for the AD9833 BoB. 

Since I was programming in C, I had to refer to the RP2040 SEEED schematic to get the GPIO pin number (in this case, GPIO6) used for chip select.  

This is not confused with "D6" pins in the more in SEEED pin out diagrams.  How Arduino abstracts the GPIO Pins in shown in green; the Micropython pin numbers DO match the schematic and thus can be used for C:

For embedded C, the GPIO pins in your code must match the Micropython pins you see here, not the green pins, which represents Arduion Sketch GPIO. 


Assuming the link still works, the "little Blue 9833 BoB" can be purchased on Amazon US. here.  I have seen it referred to as "GY-9833" but this is a generic no-name made in China BoB, folks. 

I tried getting some from AliExpress where they can be purchased for less than $3USD (wow!) but after shipping and charging my PayPal they vanished like the wind. I called USPS and US Customs--sorry, no help there--they are gone. I will probably never see them, lesson learned?

If you want to see the Embedded C code, the github repo for this project is now public. It's a work in progress but the basic embedded C code for RP2040 works. Go here.  

How it works...straightforward as VCO's go? Nope. Main.c runs a loop on the RP2040 and sends data grabbed from an MCP3201 ADC to a frequency lookup table; results are transmitted to an AD9833 on a cheap breakout board as "play these pitches" SPI commands.

The lookup table was written in python, then the STDOUT from that was copied as a static array into the C code for the VCO. You can get the python script to generate the lookup table from Github, here.

SPI, UART, AD9833, MCP3201 etc., are included in the project as libraries, as the goal creating these libs was to reuse these libraries in future projects--well, here they are.

Good news, it all works--normal 1V/octave tracks over several octaves.  



The VCO's V/octave performance is not fully rock solid--nor is it for the analog VCOs I've built. For instance, jumping to a given note a few times from an octave away results in a pitch that is a few hertz off from the last time the same note was played. I am pretty sure this is a lack of repeatability in the ADC section--the MCP3201 is not a high end chip, but regardless, I don't want this VCO sounding too "digital"--maybe as-is it's good enough.  

I will next create an output buffer/waveform conversion board to supplement the VCO triangle/sine core, (update 12-17-22--works, see the post here) as well as a Eurorack format front panel for the VCO, in the coming weeks.  once everything works I will post the schemos, gerbers etc....but not yet, I am still working out design quirks.

There are certainly easier ways to make a V/octave VCO, and using an AD9833 function generator IC controlled by a microprocessor for volt per octave synthesis is--unusual? Whatever.  My goal was to see if I could make an AD9833, with an MCP3201, RP2040, mutable instrument style input buffers, etc,.work, as a musically useful VCO. So far, so good.

Update 3-5-23: VCO using this board is working! See the post here.

No comments:

Post a Comment

Anything to Clock Subcircuit

Readers:  If you want to build the project featured in today's post, please go to  PCBWAY's  Community pages --a gerber ready to dow...