audio-adapter-board-as-eurorack-module (sort of)

Status
Not open for further replies.

mxxx

Well-known member
since this thing is nearing completion, i thought i might as well post it here, too:

15369323528_430af263f9_c.jpg

basically, it's an adaptation of the audio shield (exact same pins being used), made for use with modular synthesizers; it's focusing on the wav-subset of the API only though (hence the display).

15408455192_b39d37517c_c.jpg

the main difference are: PCM5102a rather than SGTL5000; separate power supply (ADP150); plus all the peripheral circuitry needed to make it play nice with modular synthesizers (mainly a bunch of op amps and transistors). (apart from the left/right outputs (10VPP), there's 4 ADC inputs (+/- 5v) (file start/stop 2x), two encoders w/switches, two digital inputs (trigger L/R) and two digital outputs (end-of-file L/R)); here's a (much) simplified diagram (missing the spi flash, which is there, too):

14578353597_4d15867075_c.jpg

the atmega328 is there to avoid the oled to interfere with the SD card; here's some more info, i'll post the code as soon as i've cleaned it all up:
https://github.com/mxmxmx/eurotrash
http://www.muffwiggler.com/forum/viewtopic.php?t=118378
 
I was reading that long thread on muffs the other day. it looks interesting as a general platform (regardless of whether the SD reading is being used) for an audio-output-only module. Audio out is DC, so it can do LFOs, yes?

I saw there was no equivalent to the SGTL5000 object so wondered how you initialized the PCM5102a. Having to program a bare-bones 328 (over ICSP?) was also a bit off-putting. I would have been tempted to delegate display duties to a Teensy 2 myself (more expensive, obviously).

Looking forward to seeing some example code in your github.
 
I was reading that long thread on muffs the other day. it looks interesting as a general platform (regardless of whether the SD reading is being used) for an audio-output-only module. Audio out is DC, so it can do LFOs, yes?

I saw there was no equivalent to the SGTL5000 object so wondered how you initialized the PCM5102a. Having to program a bare-bones 328 (over ICSP?) was also a bit off-putting. I would have been tempted to delegate display duties to a Teensy 2 myself (more expensive, obviously).

Looking forward to seeing some example code in your github.

the PCM5102a isn't initialised at all. there's no i2c; in theory, there's a few pins (de-emphasis, audio-format, soft-mute, filter latency) that can be pulled high or low, but that didn't seem to be worth bringing out, so that's all done in hardware. when there's no MCLK signal, the PLL goes into action a little while after it starts receiving on the BCLK/LRCLK lines. and yes, it's DC (datasheet says "no DC blocking capacitors required"), but I haven't tried tbh. for all i know, LFOs should work though.

as to general platform: well, yes and no. i just wanted something to play wav files, so i didn't bother that much about the ADC part of things; basically meaning there's no provision made for an external (shunt) reference. there's the op amp and a low pass filter right before the ADC pins, so
it's not too bad but i'd imagine for sensitive parameters (pitch etc) things might get a little wobbly. that said, it's no big deal to substituting the 79L05 with a lm4040 (offset - the inputs are centred at ~ 2048 counts) and the ADP150 is (as they say) 'ultra low noise' and can be tapped easily for AREF, though you'd need to remove that 470 resistor.

anyways, i still think it would be cool to have a more general general platform for teensy 3.1 (also with an eye on 3++) but sounds as if neutron7 was taking care of that. or else, i'd be happy to contribute though i'm not sure how one would go about it ... SMD will put people off but all the nice parts are SMD. speaking of -- yeah, i'm not happy about the atmega either but everything else would have required a bigger board or sandwiching. it was more of an after thought, anyways; one might have off-loaded much more of the UI to the atmega. programming it per se isn't a big deal though and it only has to be done once. there's an ISP header, i usually just use the arduino-as-isp thing.
 
Thanks for the replies. Okay, no initialization needed, great. Yeah SMD puts me off a bit but I'm having to deal with it.

Yes, Neutron7 has done a great job with the Orgone Accumulator, and I have a board/panel/pile of components in my (ahem) backlog; but it is using direct, tight interrupt-driven writes to DAC/A14. Not intended to use the Audio library at all (and the design predates it).
 
Looking forward to seeing some example code in your github.

here it is now; or i guess it's a start. (not CVable yet though, but that'll be just a few more lines).

seems to work pretty ok; only issue i can foresee for the wav stuff is latency when opening the file.
 
Last edited:
Good to see flash SPI support in there. I ordered a few of those chips yesterday. I plan to put one on one of your modules and one on the PRJC audio adapter. Apart from the CS pin number those should be compatible, right? So that code could end up in a pull request on the Audio library?
 
oh, it's not really supported yet, i just put it there because of the differing CS pin. i didn't get round to looking into it all that much other than running the flash_test sketch every now and again (which works). i recall someone in the audio library thread mentioned he/she had come up with something? couldn't tell what though. well, i imagine (hope) it won't be too tricky to derive some class from play_memory or play_sd_raw or synth_sine...

where did you get them? they seem to be a bit difficult to get hold of compared to everything else, except digikey. i got mine somewhere on alibaba, rather cheap though.


Good to see flash SPI support in there. I ordered a few of those chips yesterday. I plan to put one on one of your modules and one on the PRJC audio adapter. Apart from the CS pin number those should be compatible, right? So that code could end up in a pull request on the Audio library?
 
Last edited:
here's a little follow-up project, this time with wm8731 (as slave). same pin out as the pjrc audio board, adapted for 10VPP signals. the codec inputs are DC-coupled, so they can double up for CV duties. in addition, there's 4 pots and two buffered CV inputs (-/+ 5V), two trigger inputs and two illuminated tact switches:


17264546385_cec048eaee_b.jpg

17087515509_77e956666b_b.jpg

17273208241_74be3518ae_b.jpg

software is still in the works ... the plan is to turn this into a simple eurorack recorder/looper
 
Are these PCBs available somewhere?

not yet. I tend to put up the gerbers on github, but i'd like to change 1-2 little things first, mostly re: tact switches, so there'll be more choice; the ones i meant to use turn out to be hard to get.
 
fwiw, i've put up all the hardware files now ... if it saves anyone some time. [edit: namely here]

as mentioned above, this is basically the pjrc audio adapter, adapted for modular synth levels / eurorack. so the audio i/o is for 10VPP signals and there's some CV options. it includes the microSD socket (on the back), as well as the SPI flash/RAM soic-8 IC. plus some basic UI. i'll provide some documentation as soon as i get around to it. the main difference is: wm8731, not STGL5000; and the inputs to the codec are DC coupled.

for anyone who'd actually consider building one ... you'll note there's 4 files in the folder called "hard", the control pcb, the 3U panel (6HP), and two "core" pcbs, which contain the actual circuitry. the one called "mini-trash-core" is tested + confirmed working; "mini-trash-core-6002" is identical, except with a mcp6002 for the CV inputs (not a TL072 or the like). there shouldn't be any issues but i'd wait for me to try first.


btw -- using the wm8731 (the ADC, that is) seems to need a little addition to control_wm8731.h/cpp. somewhat like so, otherwise things remain quiet:


Code:
bool AudioControlWM8731::inputLevel(float n)
{
	// range is 0x00 (min) - 0x1F (max)

	int _level = int(n * 31.f); 

	_level = _level > 0x1F ? 0x1F : _level;
	write(WM8731_REG_LLINEIN, _level);
	write(WM8731_REG_RLINEIN, _level);
	return true;
}
 
Last edited:
btw -- using the wm8731 (the ADC, that is) seems to need a little addition to control_wm8731.h/cpp. somewhat like so, otherwise things remain quiet:


Code:
bool AudioControlWM8731::inputLevel(float n)
{
	// range is 0x00 (min) - 0x1F (max)

	int _level = int(n * 31.f); 

	_level = _level > 0x1F ? 0x1F : _level;
	write(WM8731_REG_LLINEIN, _level);
	write(WM8731_REG_RLINEIN, _level);
	return true;
}

Please send this as a pull request on github.
 
Are you running the WM8731 in master or slave mode (MCLK, BCLK, LRCLK from Teensy to WM8731, or from WM8731 to Teensy)?

it's slave (ie teensy is master). i meant to try with master, but the board is already quite crammed and considering the average noisefloor with modular synths ... the quality is more than adequate even so.

and ok, will send a pull request for inputLevel
 
... and last and final variation of this thing #3 (sorry i'm sick in bed and bored, so i post stuff)


20884465664_e5d1006e4a_c.jpg

21563741656_93ddc254bd_c.jpg


same principle as above, but simplified design. some info (code, hardware files, etc) can be found here and here.
 
Status
Not open for further replies.
Back
Top