Tuesday, December 19, 2023

DSP-G1: ARM based 4 Voice Synth on an 8 pin DIP

 Readers: If you want to build the project featured in today's post, please go to PCBWAY's Community pages--a gerber ready to download and/or fabricate as well as KiCAD files, PDFs, a BOM, links to Github etc. are here. A quick sound demo of the finished project is here.

Also please visit PCBWAY's site using the link here--it will help this blog immensely. Thanks.

======

A colleague from my geeky audio meetup group sent me a link to the DSPG1 and I thought--$20USD and some jellybean parts gets you an entire 4 voice synthesizer?

The DSP-G1 from Synthetic Sound Labs--datasheet is here


Cool!!

Let's motorize this pursuit....in this post I lay out and populate a DSP-G1 based single-board synthesizer and get it up and running.

ABOUT THE DSP-G1

This is an older IC--a decade old post about the DSPG1 is here.

It's apparently based on an NXP LPC 81x MCU--an ARM Cortex M0+ inside an 8 pin DIP MCU.

I've heard about synths created with Arduino and the Mozzi library--I figured this was the same idea but with a different MCU and proprietary firmware.

MIDI and OPTOS

The DSPG1 has no analog CV in; everything is controlled by MIDI.

In the years I've been pondering audioDiWHY hard to believe this was my first MIDI project. 

Yep. 

I knew very little about MIDI other than: Roland, Obeheim and Sequential invented it, it's 8 bit, it's pretty slow, and it's been around forever. 

Wikipedia knows more, go here.  

A good Hackaday article about how incoming MIDI can be opto-coupled, to eliminate ground loops and other gremlins, is here

I hate ground loops and thus incorporated optocoupled MIDI into the DSPG1's PCB.

I didn't read the Hackaday document carefully enough and consequently Revision 1 came back from PCBWAY and it didn't work (at all).  

After some head scratching it turned out the Opto chip I incorporated in Revision 1 of the PCB was too slow. 

Six pin optocoupler IC designs are not created equal--not even close. You have to choose the right opto IC to get the desired results--if the DSP-G1 couldn't see a decent MIDI signal containing appropriate continous controller values it made no sound at all.


Live and learn?  


Rev 1 of the board. looks OK??


Um...nope. I had to kludge a PC900 optocoupler in place of the 4n25 opto IC. The PC900 had different power requirements and a different pinout. The resulting module "worked" but was unreliable.


The devil in the details: the MIDI spec wants rise times less than 2uS.  The MIDI rise time for a 4n25 opto on my bench was about 45uS! No wonder REV1 didn't work pre-kludge.

I redesigned a REV2 board to accomodate faster opto IC's: PC900 (got some NOS from Ebay)  PC900V (got some cheapees from China) and H11L1M (got some from Tayda); all had the same pinout and roughly the same specs. 

In revision 2, all three six pin optos worked and I got sound out of the module.

Subcircuit for the MIDI optocoupler IC's used in REV2 of the board. Hint: with MIDI sending current to  pin 1, scope pin 4. If you don't see < 3us ups and downs you have a problem.


 Build photos:

New boards from this blog's friendly sponsor, PCBWAY. You can help out this blog by checking 'em out.

Rev 2 Board is a mix of through hole and 1206 SMD.  For some DIY applications--for example, when swapping parts as I hone in on a sound I like--SMD seems easier than through-hole; heat up the part and it comes right off; clean up the pads and drop in a different component.

Rev2 uses surface mount 10uF caps. First time I've incorporated those. Thanks to Elton from Otter Mods for showing me how to incorporate them into Euro SKIFF designs.


The toggle switch in the center is for power-cycling, necessary to fix stuck notes.

Dumb, dumb! Rev 2 still isn't quite right, it incorporated a switched TRS mono jack for MIDI. I needed a true stereo jack. I ordered the right part from Tayda ("A6685")....this mistake is corrected on the gerber and KICAD files I uploaded to the PCBWAY community site.


Testing and recording the DSPG1 module in with a TipTop Happy Ending power; MIDI CC is provided by Reaktor. Still need to design the front panel...maybe later.


TRS MIDI 

At its physical level, MIDI forms a current loop; if you are using a 180 degree 5 pin DIN jack, pin 4 is "source" for the loop, while pin 5 is "sink". 

This is ideal for driving an LED in an opto-isolator. 

However, MIDI DIN jacks take up a lot of space; in the world of Eurorack space is the thing we never seem to have enough of.  Thus, a lot of Euro designs use TRS 3.5" jacks instead of DIN.    

Let's motorize that pursuit as well:

Bench notes: MIDI DIN to TRS Type A MIDI

I built my own TRS A male to female cable--easy--I got some TRS male to male 3.5mm jumper cables and cut one end off, then soldered it to a DIN5 female using the pinout above.

A good page for different wiring configurations for DIN, TS and TRS MIDI is here. A more in-depth view of the whole enchilada is here.

USING THE DSP-G1

There may be an existing public source MIDI Continuous controller generator for the DSPG1 online but I couldn't find it. 

Therefore I conjured a Reaktor 5 ensemble to generate the MIDI CC's:

Get the DSPG1 ensemble from Github, here.

The ensemble was then opened as a VST plug-in Ableton, using 3 Ableton tracks. 

The Ableton configuration ended up being harder to set up than anticipated.

The leftmost track contained the Reaktor DSPG1 ensemble in a VST (Reaktor VSTs--even if they are MIDI only--can only exist in Ableton audio tracks); a second MIDI track merged note on-offs from a Roland A series controller into the MIDI stream. This allowed me to play notes and adjust sounds at the same time. 

A third MIDI track sent the CC's from track 1 to my studio's MIDI controller, an iConnectivity Mio.


I had to carefully dial in the Ableton configuration above, otherwise I could send Midi note-ons and CV's and whatnot directly to my studio's master bus out, creating potentially eardrum- and speaker-destroying thumps and bumps. If you try something like this at home, be careful!

With everything set up I could make some interesting sounds with the DSPG1, a super-short/super-quick demo recording is on Soundcloud here.  

If I get more time I will expand on this.... everything you hear is all DSP-G1; only plugins used were EQ and reverb.

I created a Reaktor 5 ensemble to generate the CC's (get that from Github, here) but Max for Live or any decent MIDI controller that can generate 19 independent, simultaneous CC values should work.

The filter is 24db, it sounds a bit crunchy but not bad. 

The DCO detune gave me a nice, sort of late Juno-ish sound.  

The paraphonic nature--one VCF and VCA for everything--didn't bother me as much as I thought it would.  

The DSPG1 does not support MIDI portamento, transpose, velocity, or sustain CC's--it does not have memory slots to store your favorite sounds--what you see in the data sheet its what you get. But again, what do you want for $20?

The only issue I had, and it might be my MIDI rig, is stuck notes every now and then. The DSPG1 does not support MIDI CC123 or CC120 "all notes off"....power cycling silenced stuck notes, but I had to dial in my sound again.

So what's next?  Not sure. The DSPG1 is now 10 or so years old, maybe older; I can't find any DSPG1's for sale as I am writing this post. When they are back in stock I might create a front panel for the PCB. 

In the meantime, it's been a good learning experience, especially on the MIDI side of things.

Many thanks to Synthetic Sound Labs' Doug Slocum for invaluable assistance with this post.

Thursday, December 7, 2023

Son of Warm Floater: Intro to FreeCad 7

 Readers: If you want to build the power expander featured in this post, please go to PCBWAY's Community pages--a gerber ready to download and/or fabricate as well as KiCAD files, stl for 3D printing, FreeCAD files, and so on are here

Also please visit PCBWAY's site using the link here--it will help this blog. Thanks.

======

I had so much fun getting started Kicad, why stop there? I needed to replace Fusion 360 whose license fee will go up by  >700% in a few years with something more affordable.

After some looking around I chose FreeCad, a popular open source choice for 3D modeling. 


As a first project I created a tray for an improved Warm Floater (initial post here). The Warm Floater is a small PCB allowing 3 Euro modules to be powered by a single 16 conductor ribbon.  

The update employs box headers in an effort to make it nearly impossible to orient the power cables incorrectly.

FreeCad seemed difficult to grasp at times but after a few evenings I got it working. There are endless youtube tutorial videos about it that got me me out of most jams. 

And I need to remember: it's free. No whining!

3D printed tray printed by my patient sponsor, PCBWAY

Like Fusion360, Freecad starts with 2D sketches and allows you to extrude them (FreeCad calls this "pad") to a 3D shape.  

A few of  the issues I had with FreeCad: 

I was unfamiliar with "constraining" my sketches, locking down proportions. A good video about sketch constraints is here. This makes sense, we don't want our dimensions drifting all over, but at times the sketch looked constrained to me but I still got at least one "DOF" ("degree of freedom") and found I was "under constrained" (since I married my psychiatrist girlfriend, no, but in the world FreeCad, perhaps?)

Doh!! still one DoF!

I couldn't figure this one--I could tug and pull and my sketch would stay put, so what was underconstrained? but--my tray still printed OK. 

Everything with different Z extrusions had to be its own sketch. Maybe. Still trying to figure that one out.  

To make the tray edges for this post's project I had to craft a rectangle sketch on the XY plane, extrude or "pad" it, then "pocket" it, making the tray's Z access edges. So far, so good. 

Next I created a second sketch and constrained two 3mm holes. The second sketch was superimposed on the first. Then I could "pocket" the holes (sketch 2) to push them though the tray (Sketch 1). I could find no other way to do this, and this seemed like a lot of steps to create an extremely simple 3D shape. 

Again, once I figured it out it made sense, but I kept trying to get the holes cut out of the tray within the same sketch--nope.

I printed one of these out on my 3D printer but needed more of them. 

With my tray STL file in hand, I whipped up a simple PCB uploaded both to PCBWAY, yes they do 3D printing, and wham, it was back. The 3D print jobs looked great. I am not saying that because they're my sponsor, really, the quality of the print was top notch. 


Let's build!




3mm nylon screws and nuts fastens the PCB to the tray


This got mounted in my bench rack, now I can put more modules with low current draw in there....much needed improvement.

I figure I will get better at Freecad over time....this still feels very new to me.

See ya next time. 

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