Sunday, November 16, 2025

Canva Affinity and Kicad 9: Graphical Madness for DiWhy Projects

Many thanks Elton at Otter Mods for turning me onto Kicad and Affinity.

============

When I look at professionally created front panels, surrounding knobs I often see these "goes to 11" gradients:

                             




(What are these called? Dials? Tick marks? Gradients? I am not sure, but, I wanted to add them to my front panels. 

For this post I'll call them "dials").

Using the built-in graphics tools in Kicad 9 didn't get me far, but found I could import graphics into Kicad as footprints, then add them to PCB's used as front panels on the "silkscreen" layer. 

But how?

There are two imports methods in Kicad I could find:  

First--easy: through Kicad's "User Interface" main menu I could turn PNG graphics into bitmaps, using the "Image Converter" tool. 


Ifound at times the output to be grainy. 

Elton at Otter Mods, the resident Kicad expert in my geeky tech group, described a better way:

Use Affinity Designer to create SVG formatted files, then import the files into Kicad as footprints. Finally, place the graphic footprints onto your front panels.

Today's post outlines the workflow we came up with to do this--this may be documented somewhere, but I couldn't find it, and ChatGPT was out to lunch.

CANVA AFFINITY 

First I needed to get Canva Affinity, Elton's choice for creating SVG graphics. 

Tough choice? Pay enormous bucks for an Adobe Creative Cloud subscription, complete with hidden fees, a confusing cloud presence, and terrible tech support? 

Nope. I have to deal with Adobe at my day job, and I hate these guys--screw Adobe with a red hot poker.  Let's use Canva Affinity instead.




Good news: like Kicad 9, Canva Affinity is free

Or is it? I had to set up a Canva account, and last I heard the friendly Canva folks aren't a 501C, but then again, someone has to buy lunchroom donuts and more important: keep the shareholders happy.  

So--holding my nose, I set up a "free" Canva account, downloaded Affinity, and installed it on my W11 PC. 

So far, so good.

After a few hours of trying out the "new" Affinity: it felt like a true Adobe killer, combining features found in Illustrator, Photoshop, and InDesign, in one mega-graphics app. 

It can do most everything if not everything Adobe does, except perhaps grab you by your legs, flip you upside-down, shake the hell out of you, then pocket the change that falls out.

I focused on Affinity's VECTOR "Persona" which closely matched features found in illustrator.  

It had an Export > SVG feature--so far, so good.

CREATING THE DIAL

Knowing squat about Affinity vector I watched the video here, which looked a lot like what I wanted to do. 

An aside: I found that a lot of online documentation for Canva Affinity was out of date; it appeared that Affinity, like Microsoft, has no problem changing their UI early and often, like so many soiled chonies; the Internet documentation is slower to catch up.  

Where's that chair again?

After an hour or so I ended up with this:




A few notes, because I won't remember any of this 2 days from now, and, did I already mention, that when it comes to getting help for this latest version of Affinity Designer, most online docs and ChatGPT is butt?

  • I chose a 120mm x 120mm artboard and made sure the diameter of the outer circle had a 100mm diameter. How to set up artboards and canvases in Affinity is covered in this video (which is not the current UI). The 100mm diameter made the image size conversion (described below) easier to figure out.

  • I used grids/guides. Good video for that (for an earlier version of Affinity Designer but seems current?) is here.  This added general sanity to the project. However, there does not appear top be a way to save a custom grid setup, which is unfortunate. Here are the settings used:


  • To make the tick marks, a good video for Affinity's Vector "power repeat" feature is here. I watched the entire video, and I should watch it again. I had to make sure to set the checkboxes and adjust rotate points as described in the vid or  I'd end up with an ugly mess. 
  • The repeat settings used for the big ticks:


  • I then created a smaller tick over the large one at 12 o'clock, dragged its rotation point to center (red line and green guide lines visible) and repeated with rotation of 7.5 and number of copies of 64. 

Couldn't find anywhere: how I created the gap between 7PM and 5PM at the bottom of the dial. 

By trial and error--most everything I found online was out of date, since Affinity massively rearranged its UI: 
  • Use the Affinity Vector knife tool
  • If you zoom way in on the circle the knife tool becomes the scissor tool—yeh, I knew that.
  • make the start and end cuts on the arcs, where we need to get rid of parts of the circle, by left clicking with the scissor tool
  • From the main menu: vector > separate curves 
  • Using the move tool (not node tool!) click between 5 and 7; 
  • the arc to be deleted is boxed with a faint blue rectangle.
  • hit delete on your keyboard
  • Arc that was boxed is now gone
  • Use node tool to further clean up any ugliness.
Finally I exported the 100mm x 100mm dial using File > Export > Export > SVG > SVG (for export).

IMPORTING INTO KICAD

In Kicad 9 I used the footprint editor to create a new footprint library then a new footprint for the dial.  SVG's import: file > import > graphics.

Bammo, this dialog:



This seemed straightforward, until I discovered the "Import Scale" was linear but inaccurate. 

Meaning, if I set Import scale to .5 and imported a 100mm circle the resulting footprint was not a 50mm circle. Damn!

Not sure if this is documented anywhere--probably is, but, I couldn't it--from messing around I ended up crafting this formula:

X = Z/(A*3.08)

Where:

  • X is the # to use for Kicad's import scale
  • Z is final size you want
  • A is the original size of SVG
Why 3.08?  No idea, I figured it might be PI, which got me close, but no, 3.08 yielded better results.  

For instance, for a 100mm diameter, and 25 mm output, I used this.

X = 25/(100*3.08)

X = .0811

BINGO.



For 100mm source, and 15mm target:

X = 15/(100 * 3.08) 

so x = .0487 to use for import scale, here’s what I got in Kicad. BUTTER!



I found that for smaller inputs (e.g., 50mm circle SVG instead of 100mm) the outputs drifted a bit, not sure why, but was still good enough. In general, I figured why not start with 100mm SVG's?

Before wrapping up--one more thing. Affinity allowed me to jump between "Vector" ("Illustrator") and "Pixel" ("Photoshop") mode. Great, it meant that I had more edit tools at my disposal.  But--I found that SVG's modified in Pixel mode often created a file that Kicad couldn't import. I found it best to do all the work in Vectorland.

WHAT'S NEXT?

This whole SVG > Kicad thing can be used for more than dials. Line art?  Yep. Logos? Sure. Any single color or BW 2D graphic import should work. 

I uploaded my footprints from this SVG > Kicad silk workflow into Github (here) and will try to keep the repo current.

PCBWAY, the sponsor of this geeky blog, has a service to fabricate PCBs and other materials in 3 colors. Details here. (Also--please help this blog by checking out their site, here).  I figure Affinity and SVG export would be a great way to get into that. I'll cover this in a future post....

And of course, I will add dials and other graphics to future projects using the methods above.  

Overall, great fun, and many hours down the rabbit hole. More to come.






Monday, November 10, 2025

Small Dual LFO--OTA based--Works Great!

Readers: If you'd like to build the dual LFO featured in this post, please go to PCBWAY's Community pages--gerber file; KiCAD 9 project/pcb/schematic/library files, B.O.M.'s, and more, are here.  

You can also help out this blog immensely by checking out PCBWAY using the link here. Thanks!

==============

Hello again:

I needed a small dual LFO with edge connectors for a few upcoming projects. 

Done--fabricated--worked first time. Joy!



To review: I found a cool OTA-based LFO design on EFM's site, here. I built a single really small CA3080 version, see this post, but then realized for some projects I needed--more? 

I redesigned two LFO's in one small PCB--part I post is here

The Revision1 design had some stupid mistakes, which are corrected in the version you see in today's post. Everything now works. Go A's!

THE PCB


Thanks as always to PCBWAY for sponsoring this blog and coming through with perfectly manufactured PCB's. They do great work! You can help out the blog by checking 'em out, here

PCB remains pretty small, 48 x 63mm. Which means: You can get 10 of these for $5USD from PCBWAY.

This rev worked great the first time!

....doesn't happen often, but when it does 
I'll take it.


DUAL LFO SETUP AND PINOUTS

As with the earlier designs, the 10K trimmers set the minimum LFO frequencies when CV = 0V.  

On the bench I could adjust this trim to make the slowest frequency REAALLLLY slow--didn't figure out exactly how slow but maybe one full cycle every 5-10 seconds, something like that.


Because I want to use this design as a drop-in to future projects I broke the inputs and outputs of each LFO to 100mil edge pins:
  • TRI1, SQR, TRI2 and SQR2 are outputs.  
  • 11,12 are ground; 
  • 13 is Vcc (circuit should work with different rail voltages; I have only tested with +/-12);
  •  Bias (Pins 4,5,9,10) set the voltage offsets for each output independently, with negative voltages relative to ground driving the offset up. I used "inverted CV" to avoid needing another op amp stage for each bias offset.
You shouldn't have to do a lot of tweaking, except for R9 and R5. These 2 resistors set the overall frequency based on incoming CV.  I tried values from 10K to 100K, what you use here depends on your needs. 

On the bench 20K worked for me, but if you are adding more external CV you should put a 0 ohm resistor in there then follow the guideline laid out in step 3 in "ideas" section below.

IDEAS FOR PROJECTS USING THE DUAL LFO AS A DAUGHTERBOARD





First idea: output of LFO1 feeds input of LFO2.  Put a digitally controlled switch or VCA in here?  


Second idea:  Have bias controls for each output.  As mentioned above, to save op amp stages the bias is wired "backwards" so plan accordingly.  Also, the output of each waveform is about 12V P/P so to not clip a voltage divider at each triangle output may be needed.  

This bias offset could be clamped and then controlled by CV.  Why not?


Step 3: add more CV.  I found the LFO's respond well to wide swings in CV, from maybe -10V to 10V, going from EVENN SLOWWER to way into the audible range. Cool!  If I set R9 and R5 to 0 ohm resistors the CV input op amps become mixers, so it's easy to add as many CV's as needed....maybe a "master CV" pot  from -12 to +12 and a few CV inputs with a B100K in front.  The diagram above shows you how to set this up.


OUTTRO


Overall: glad this design is finally working.  I will use this and the 3080 miniLFO in upcoming projects.  Until then, modulate slowly, and don't breathe the fumes!

Monday, October 27, 2025

CEM3320 Based Voltage Controller Filter. RTFM.

"Read the freaking manual"--"freaking" may not be the right word.

This last week I built my second clone of the Sequential Pro-One VCF, reconfigured slightly for Eurorack:

After 2 revisions: works but more effort needed.


ABOUT THE IC

The CEM3320--the IC upon which this post's voltage controlled filter is based--is a strange beast. 

Read about its developer here; essential reading about the CEM3320 can be found on Electric Druid's page, here.


Specifics about the CEM3320 and the Pro-One, a classic mono synth that used this IC, are also found on Electric Druid's site, here

Mod wiggler pages focusing on this IC are found here and here.

PAIA (one of my favorites) made an experimenter's board for the CEM3320...cool! Get the PDF here.

And--didn't find this until a few days ago--a schematic for a complete DIY Pro-One VCF can be found on dslamnig's site, here.

Fortunately finding 3320's for sale is easy. Original early 80's CEM3320's are unobtanium, but there are clones and work-alikes available from CoolAudio and Alfa, and I read that CEM has reissued it.  

UNDER THE CERAMIC

To learn about what makes this chip go: two datasheets are found online--the 2 pager (here) and a 6 pager (here).  

At the heart of the 3320 lies 4 active filter building blocks--a current to current gain stage, whose input is held a diode drop above ground, feeding a pin to tie a capacitor to ground or to an input source, and after that, a buffer. 

A feedback resistor ties output to input. 

With no signal at input, the gain stage is set for .65V (diode drop) at input and .46*VCC at output. Ohms law reveals that for 15VCC, Rf should thus be 100K. Details here.

Resonance is taken from the IC's capacitor-coupled output and fed back into the initial gain stage. 


The amount of resonance feedback is controlled by an OTA--in this case, easier to implement than say a CA3080; current limit the OTA's resonance control voltage to a 0-12V DC signal and present it to Pin 9.

In general, even after reading, the 3320 didn't make a lot of sense until I redrew the layout for a few common use cases' resistor configurations. This information was already available online, but the exercise helped me better understand the IC.


Bandpass. Yes, the CEM3320's 4 active filter blocks have odd pin assignments.

Highpass


Lowpass


THREE TIMES' THE CHARM?


I have already created 2 revisions of a Eurorack Pro-One type VCF, sent them off for fabrication to this blog's ever-humble sponsor, PCBWAY, who sent PCB's back to me lickity-split, to see if my layout yielded a working filter or a smoking piece of charcoal.

For the first revision: sadly, its PCB layout turned out to be a non-starter because it contained a stupid error: the Pro-One schematic indicates that these 3 critical resistors get tied to the negative rail:


 .....but I tied them to V+.  

Very Nice!  

This foobar was indeed beyond all repair--it would have meant too many trace cuts and fixes. The REV1 build went into E-waste.

Fortunately after a redesign the good folks at PCBWAY rushed Rev 2 PCB's back to the USA.  

Double happiness is getting boards and stencils from the blog's patient sponsor, PCBWAY....please help this blog by checking them out.

 Stencil + paste + SMD parts, then I put the PCB on a hotplate. 150C > 215C > 150C did the trick.


Parts is parts

Testing....



More testing....


So--did REV2 work?  

Lo and Behold. Nope. 

If I had read the frigging datasheet with a bit more care it might have, but, well, I didn't.

In fact, looking over all the links above, what I was thinking? There was a ton of information about how to wire up a CEM3320 and I apparently ignored most all of it.

One critical detail missed: to control VCF's cutoff frequency you send the CEM3320 an inverted control voltage. Meaning: lower voltages meant higher cutoff frequencies while higher voltages meant a lower cutoff frequency. 

The suggested CV range is 155mv to -25mv. 

Did I read this before starting the layout and build?  Nope. 

For revisions one and two I had a CV mixer at input, then inverted the inverter:



For revision 2 I used a 24 gauge jumper wire to go from R4 to pin 6 of the TL074:

  


Which ended up looking like this:

                                                          



With this fix and some component value changes the filter now worked--it swept, got the famous shimmery resonance sound, and sounded funky with fast decay.

But the wiring fix bugged me; I finished a 3rd revision to clean up this mistake.

To not have to do a major PCB redesign I left a quad op amp on the PCB, even though only 2 op amp stages are used. Sorry.


The modified REV2 sounds pretty good, but not great, it may be a bit too bright with some unwanted grittiness when resonance is approaching oscillation.  

I noticed that changing the voltage rails (from -12V to -9V, from +12V to +15V, and so on), made the filter sound, well....different, and every now and then, to my ears, better; more tweaking of REV3 is in order. 

I'll do that in the next few weeks and post again. 

Until then avoid the CEM-icals.






Tuesday, October 14, 2025

AD5761: Arduino Library and S/H Mux--one worked, the other sucked

 

Two goals since last time: see if I could create an IC library for Arduino sketch, which was surprising easy, and breadboarding an Arduino based bipolar audio Sample &Hold multiplexer, which I never got working. 

A basic sample and hold circuit, aka S/H or just SH. The HOLD COMMAND is provided by a microcontroller switching multiples of this S/H circuit one after another in rapid succession, allowing a single DAC to produce multiplexed output voltages.

At the bench I used an AD5761 16 bit bipolar DAC IC (previous post here), an Arduino Micro, a library for the DAC I wrote for Arduino Sketch (get the library on github, here), and, for the mux switch, the ADG413 analog switch featured in previous post here.

Writing the sketch library took a lot less time than anticipated.  

I used the Helge Langehaug's sketch here as a starting point and combined it with embedded C code created previously--post is here

To get the C library working with an Arduino sketch IDE:

Worked first time--after initializing the DAC I could enter values into an AD6751_out() function and sure enough, correct voltages were present on my scope. 

You can get the working library file and a sample .ino sketch on github, here.

Whole thing took less than an evening to craft. Joy!

With confidence soaring I used the same library to create a 16-bit four-channel sample and hold. 

It's the idea found in this previous post, but employing Arduino sketch .ino/.h files instead of embedded C.

Guess what: the AD5761/ADG413 based S&H circuit never worked. At all.

I could get pretty steady sampled DC voltages out of the circuit, but the voltages at output were never close to being accurate, especially when voltages went below ground.  

I speculated that the issue was a combination of trying to breadboard the design (I read that accurate S/H circuits need to have caps and buffers close to one another which didn't happen here), using the AD5761 in bipolar mode instead of 0-10V, which I hadn't tried in a mux design before, and the lack of precise timing in the world of Arduino--I constrained my sketch to use only delay(), digitalWrite(), Serial.begin() function calls and the rest, in the best Arduino fashion; I could have called out Atmel registers in my code and slammed away, but I might have well have used embedded C for that.

And/or some really stupid mistake(s) I never figured out.  

After a too many evenings (four? five?) I gave up; easier to use unipolar dacs then level shift them with op amps.  

Or, use 3 AD5761's in parallel.

Or, buy a 4- or 8-channel DAC with the mux built in.  

Or, whatever.....

Thinking I had an issue with the ADG413 I tried a CD4051 Mux. Nope, that sucked too.  

The S/H worked, sort of, but the voltages were never close to accurate. I stripped things out and tried to use a Salae logic analyzer to sort the issue. Nope, it wasn't SPI.   


OMG, too many wires, too much mess.  

Overall: breadboarding is NO FUN

I am probably returning to ditching breadboards and getting small quantities of PCB's for experimentation from the blog's faithful and patient sponsor, PCBWAY

If said PCB's don't work because my design is crap, well, I will pitch them and try again.  

Even with the tariffs, I think time- and money-wise I would have come out WAY ahead this time. 

Overall a win in library land, but this was a lot bench time spent chasing what I thought was a cool idea with zilch to show for it. 

Enough! See ya next time.

Sunday, September 21, 2025

Analog Devices ADG413--Incredible Audio Switch IC

Two of my favorite social media (S&M) things: IMSAI Guy's Chip of the Day vlog and finding a great surplus electronics deal on the web. 

This time I do both: my own chip of the day (more like chip of the quarter?  I blame my day job...): an audio/video frequency switch IC I found online at a great surplus price, Analog Device's ADG413BR.



MUX AND FLUX


Audio/digital switch IC's--MUX'es or "multiplexers"--are extremely useful for what we do. The classics contain them; inside Roland's Jupiter 8 (schematic here) and Oberheim's OBXa (here) you find CD4053 and CD4051 mux IC's. 

Details about MCU control of this IC family can be found here and here

The ADG413 is a 4-channel switch with superb specs: 50V rail-to-rail supply range compared to the CD4051's 20V, for instance.  

The problem with these high performance switch IC's is their expense. Digikey US sells the ADG413BRZ for $9.08USD in small quantities, compared to 79c each for 4051's on Amazon. 

I'll stick with CD4051's?

Not so fast!! An AudioDiWHY favorite, The Electronic Goldmine, had ADG413BR's on sale recently for $1.79USD each. The 413BR is an obsolete version of the current BRZ IC. The only difference I could see was that the surplus parts were not RoHS compliant

(Better to use non-ROHS parts than throw them away--but if they have to go, please get rid of them sensibly....)

An aside: I love The Electronic Goldmine. Hobbyist-friendly surplus stores are a dying breed with many of the great ones like Haltek long gone. Goldmine keeps fighting the good fight. Sign up for their 4AM daily email flyer (here)--good way to start your work day. 


Lifetime buy....


The IC's arrived quickly. I got them ready for the bench.

SOIC: an adapter was needed for breadboarding





Ready to roll....


QUICK WORD FROM THIS BLOG'S SPONSOR


Many thanks to PCBWAY for sponsoring the AudioDiWHY blog and for all the help they've provided over the years. You can help out this blog in a big way by checking out PCBWAY, here


As soon as I get my first ADG413 based PCB laid out I'll send the gerber to PCBWAY along with any other fabrication needs, including 3D printing and assembly

PCBWAY is super fast, super friendly, and does great work. Please consider using PCBWAY for your next audio project. 

MAKING BALLOON ANIMALS


With two ADG413's soldered up, time to see if I could lay out basic switch circuits.

I still hate breadboarding....


....but I'm slowly getting better. I have found extreme patience, along with using a quality breadboard and checking my work early and often, gets the job done.

Using the 413 to switch LED's off and on (doh). Seems working!

 
Wiring used for ADG413 tests. "IN" represents logic inputs. Yes, the 10K pulldown was necessary; I used 12V for Vdd, GND for VSS, and 5V for logic but found the IC accepted a surprisingly wide range of voltages for rails and logic. Nice! Also, Pins 6/7 are one of 4 I/O pairs and for all I/O audio or DC voltage can flow source to drain or drain to source, makes no difference. 


For breadboarding sanity I used a CD4069 hex inverter for ADG413 pins "IN2" and "IN3". Using an MCU control I'd do this inversion in software.





 A few ideas....


The ADG413 let me create common switch configurations without needing a lot of logic signals:


1-to-4 multiplexer:



Dual SPDT's:




4 SPST's:



DPDT:



1:8 multiplexer using a 74HC595. Use more IC's and get as many channels as you want.


Good tutorial for the 74HC595 IC is here.


OUTTRO


OK enough for now. I bought a lot of ADG413's so (hopefully) they make it into future designs--hours of fun! 

In the meantime, ROHS well, AI well, and above all: when you breadboard you don't breathe the fumes.



Canva Affinity and Kicad 9: Graphical Madness for DiWhy Projects

Many thanks Elton at  Otter Mods  for turning me onto Kicad and Affinity. ============ When I look at professionally created front panels , ...