Sunday, October 30, 2022

EURO SEM style Attenuverter

The best thing about DIY: you can make things the way you want! I already have a DIY attenuverter in my rack, in FRAC format (+/- 15V). My Modular Synth geek group have been telling me: stop it, the only format left is Euro and large format

I have a bit of space in my Eurorack setup, so, let's get building--let's port last post's design to Euro.

Previous posts for this SEM style attenuverter are here (prototyping), here (Skiff depth attenuverter) and here (improving the module's bias control).  

To summarize those posts, because, who reads blog posts anyway? I always liked the sound/feel/response of the attenuverters found in the Oberheim SEM

The legendary Tom Oberheim confirmed via email that his design used a center tap pot

I bought a few ( ALPS RK11K114) and built a few.

....so for all you Doepfer smokers--Part IV--same thing for Eurorack:  

Finished module

Boards were already laid out in Eagle; I only needed to change power connectors and add a  few 100 mil test points to gang 2 attenuverters in series.  

I also needed to design a Eurorack sized front panel:

I used the previous board and paper templates to create a new front panel.  But--would everything fit?
 
Next I sent the gerbers off to the blog's trusty sponsor, PCBway.  

BAM!! they are back:

Happy weekend--new boards from PCBWAY.  Thanks to those guys for helping out this blog.



Next I got soldering. 

The design had 2 SOIC op amps, but those aren't too hard to solder. Use a fine tipped solder pen, flux, and patience.

Beyond that, this is all through-hole. Happy day.



The design required a standoff board for the center tap pot. Otherwise its threads won't stick up far enough through the front panel. I included this small standoff in the gerbers and sch/brd files you can get here.
I had 2 pulled standoff boards from earlier projects so i reused those......


Only a couple mistakes, which i corrected in the gerbers uploaded to the PCBWAY project page (here); I forget to silk "red stripe" on the back of the PCB (oops) corrected below with a p-touch label. Wow, dumb error.



Beyond that everything worked first time!  Front panel fit fine, everything lined up.

The CON xxx connector sets from All Electronics are inexpensive handy for connecting signals between modules.  2.54mm spacing...nice.

As far as new features: after having this module (I have built two) in my rack for several months, I found I was patching the output of module 1 to the input of module 2 frequently to get complex inverted CVs, audio phase shifts and whatnot.  

Using CON-242's from All Electronics I wired two Euro attenuverters  together from the back, so the output of 1 hit the switched input of module 2:

Rear view--two attenuverters chained together


I also added another CON-242 male to each module's output.  This will allow me to wire up something new to the module's output in the future.  I will build an output expander for this next month--let's hope it works.

Update 11-4-22: I have created an expander module for 2x of these attenuverters, adding simultaneous inverted outputs with level and bias control. Project here. Blog post here.




All in all this was a fast and fun build.  

If you want to play along, get BOM, gerbers, PDFs of schematics, eagle files, from PCBway's community page here


2x Attenuverters with Expander (right)



Remember: If you have to vert, go up and down not back and forth.  See ya next time.

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.

Monday, October 3, 2022

SEEED XAIO 2040--New Development Board, Will it Explode?

Update 7-1-23: I have revised this board a few times--making further small improvements....notes about the revisions as well as how to calibrate the board can be found in the PCBWAY project page here.

Hello again! 

Back to posts about embedded C and digital. 

From previous posts: I've been working with Raspberry Pi's RP2040 MCU's and the Pico dev boards; unlike Raspberry Pi SBCs, the RP2040 is not backordered everywhere.  

I set up a RP2040 development and debug platform for C using an Ubuntu VM; posts about this start here, then ported an AD9833 library I wrote for AVR MCUs to RP2040 (here).  

I wanted to embrace a smaller RP2040 Development board for upcoming projects--the Pico dev board is relatively big; I found something small from SEEED--the XIAO RP2040:

As big as a toenail?  

Let's motorize this pursuit!

I needed some buffered and clamped ADC inputs--almost all my MCU projects use these. Using the seeed XAIO RP2040 dev board as the parent, I drew up a carrier board in Eagle with buffers and an addition ADC:


I sent this off to this blog's faithful and surprisingly low key sponsors, PCBWAY (get-yer-gerbers here)--whammy bammy, thank you cslammy; boards are back:

As always, a shameless plug for my sponsors: please help out this geeky blog and check PCBWAY's site next time you have DIY and maker needs. 

What's Added

....a SPI ADC because I read (here and elsewhere) the built in 12 bit ADCs for the RP2040 are noisy.  I plan to experiment with V/octave with this dev board; V/O is sensitive to noise. I also thought it'd be useful to have a 5th ADC available for upcoming SEEED 2040 based projects.

For the ADC IC I used an MCP3201 SPI 12 bit chip; the inverting buffers were inspired by ideas visible from Mutable Instrument's open source designs.   

Next step: build it and see if it works:




To make the daughter development board plug into breadboards I brought all pins out to an 100mil edge connector....

ready to test!

SACRIFICIAL OP AMPS

Once stuffed and powered up, my new dev board worked--for about a minute--then it shorted out.  

Nice!

I dug in and found a design stupid mistake:



My design provided the MCP6004 op amp with ground to Vss and +12V to Vdd but the IC's maximum rating is 7V (helps to read the data sheet right? I didn't!).

After a few minutes of operating outside its maximum limit the op amp blew up and shorted between its Vdd and Vss pins, which halted everything else on the board, including the SEEED mini-dev board.

I destroyed two MCP6004's getting to the bottom of this issue. Fortunately the MCU was spared.

Trace fix....

This issue was pretty easily fixed by cutting the Vdd trace and soldering a wire between the output of the 7805 regulator and Vdd. I will need to get the board fabricated again, however.  

I will post a (hopefully) fixed and improved version soon. 

UPDATE: Another mistake is that the 78L05 can't source enough current for the RP2040--it sources 100mA but the MCU alone needs more like 130mA.  I am replacing it with an L4931 in newer designs, we will see if that helps....

UPDATE!! revised buffer board is back and works...fixes the two issues above and other problems, see the post here. I am not why the board above was drawing so much current--probably a solder blob or some other snafu due to the trace cut--the rev2 board does not have this issue..

With the voltage rail issues sorted, a blink sketch now works...indefinitely. 

Does the world need more blink code?  probably not. You can get the simple C blink code for the SEEED XAIO 2040 at github, here.

Next up, I want to see if the board will work with the RP2040 ADC, SPI, UART and AD9833 libraries I wrote. I think they will--why wouldn't they; but in my world things almost never work the first time. update--10-5-22 works!  RP2040 + AD9833 volt-octave VCO to 7-8 octaves with pretty good accuracy is working on my bench. uses many of these libraries....post is here; embedded C code is here

I will post again when I make progress or lack thereof. Until then, enjoy spreading your SEEED.


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...