XVA1 User Interface build progress

The XVA1 is a virtual analog DIY synthesizer, which is built upon the same platform as the XFM2 Synth. You can control the Synth via MIDI CC and SysEx messages, but it has no user interface. It is possible to make your own User Interface with an Arduino board, because you can also control the synth with an UART connection.

I really wanted to make my own User Interface and because I also like how easy it is to control my Hydrasynth, I decided to model my UI after the Hydrasynth. I’m not an experienced Arduino developer and this is my first “big” project, so the progress will be a bit slow, but it is really fun to work on it.

There will be one main screen with a digital Rotary Encoder which will be used to select the patches and for displaying a menu system. Because I don’t like extensive menu-diving, there will be shortcut-buttons which will take you to a specific menu page or task, like Oscillators, Filters, Envelopes, LFOs etc. When you have selected a page like Oscillators, you can change up to eight parameters with the eight Rotary Encoders in the middle. The screen between each pair of rotary encoder will display the names and values of the corresponding parameters. When there are more than eight parameters for a specific task, you can use the Up and Down buttons to scroll. For the Up, Down and Shortcut buttons I will use buttons with a built-in LED, so you can easily see which shortcut you selected and if it’s possible to scroll.

Above you see the first prototype on a bread board. I used an Seeeduino XIAO board, because it is very cheap, very small and also is a lot faster and has more memory than an Arduino Nano. I managed to select the patches with the rotary encoder and also read the selected patch from the Synth, so I can display the name of the patch.

After that I made a small prototype of two rotary encoders and a 0.96 inch black/white OLED screen in the middle.

In the next iteration I switched the main display with another one, which is smaller, but has a bigger resolution and I think it looks nicer with the black/white OLED display. The big chip you see on the top-left is a MCP23017, which expands the IO ports of the Seeeduino XIAO by 16. Because 9 rotary encoders with push-button, 13 buttons and 10 LEDs will use up a lot of IO pins, I think I’ll end up using three MCP23017 chips. The OLED displays has two possible addresses on the I2C bus, but you will have to desolder/solder a very small SMD resistor to make the change (which I have never done before) and the XIAO board only has one I2C bus, I will use an I2C multiplexer to connect the four displays.

The next thing I will do is actually make the two rotary encoders work, because the two values you see is actually just a static value. After that I will do some experimenting with a button matrix and LED matrix, because when I just connect each button and LED to an IO pin, I think even three MCP23017 chips will not be enough.

When I make some progress, I will make another post in this thread.

9 Likes

The artix 7 35T fpga is where the synth resides. What’s the price of the hardware?
And is its code open source?

1 Like

Very nice! I look forward to this since the main reason my XFM doesn’t get more use is the lack of a UI and me having too many projects to start one and a lack of patience for dealing with manual sysex messages.

I even have a spare XIAO board on hand. I’ll need a few more OLED screens and a multiplexer to follow along…but those are no big deal.

The Artix board is about $80-$90 IIRC, the DAC is $7, the rest of the hardware is only a few bucks, an optocoupler, a diode, a resistor and a i2c memory chip. You can also eliminate the DAC for a full digital version if you’re setup for that kind of thing.

It’s a fun easy build and the FM version sounds really nice, I’m sure the analog version sounds good as well but I haven’t tried loading it on mine yet.

Unfortunately the XF2 is free as in beer but not open source - only the binary is shared by the developer. So it’s not great for learning FPGAs :frowning: But it is a really nice sounding little synth you can build for about $100 which isn’t bad at all.

1 Like

I bought mine at digishop for € 79. Together with the Adafruit DAC, EPROM chip and octocoupler it was € 88. But because it was an import from the USA, I also had to pay € 22 for taxes. Robot shop sells them for € 91.27 incl VAT.

Unfortunately René has not open-sourced the software, but nevertheless I think it’s a nice synth platform.

1 Like

I have made some progress on my prototype: The rotary encoders are working now, and I can use them to change some parameters like filter cutoff. I also managed to add a i2c multiplexer, so I can address a second oled display and I added a button, which allows me to change another set of parameters.

So I think I can now start with designing a pcb :grin:.

My code is on Github: GitHub - MacMannes/XVA1-User-Interface. There’s no documentation yet and the code may be a bit dirty, but I am really happy I got the prototype working this far.

4 Likes

Looking good! I really need to try loading the XVA1 code on mine one of these days. I’m definitely down for beta building a board when you reach that point :+1:

1 Like

My first steps into Kicad :smiley:

At first I found Kicad difficult to use, because I’m using a Mac with trackpad and scrolling was really weird, so I started with EayEDA, which behaved much more to my likings. But in EasyEDA I couldn’t get the bus lines for the I2C bus working, so I went back to Kicad and I discovered the setting Use trackpad for panning and now Kicad is behaving much better :-). I even got the Bus lines working.

I have still some troubles finding the right footprints for Kicad. The only footprint I could find for the Seeeduino XIAO was one without drillholes (the XIAO has castellated holes and apparently Seeedstudio thinks that’s the best way to mount a XIAO board to a pcb).

I stil have a lot to learn, but now I think Kicad is a very nice program and very powerful. Below is the beginning of the circuit for the XVA1 user interface (unverified).

2 Likes

Drawing up your own footprints is pretty straightforward, and modifying an existing footprint is even easier. Give it a shot.

2 Likes

I started with modifying the existing schematic symbol with footprint for the Seeeduino XIAO, and once you got the hang of it, it is not so difficult indeed. So far I made symbols and footprints for the oled display, tft display, button with led, i2c multiplexer and Adafruit DAC. Now I only have to make a footprint for the MIDI DIN connector. I’m sure there must be an existing footprint somewhere, but I really enjoy drawing the footprints, so I will make it myself.

I verified the footprints by printing them and sticking the real components in the paper .

4 Likes

The schematic is ready (I still have to verify it) and I am quite happy with the layout of the PCB. The dimensions are 285mm x 130mm. Next I will draw all the copper lines and hopefully it will work :wink:. I didn’t design a front panel, because I like to see all the components and I think it’s also to difficult for my first PCB.

I have drawn labels for the buttons on the front copper and mask layers, so they should appear in silver. The Italic texts above the buttons are the functions that are selected when you press the shift button. I think the labels should be sufficient for operating both XFM2 and XVA1 synthesizers. Oscillators are called operators in FM synthesizers, so this will be the same button. And I just realized FM synthesizers don’t have filters, but maybe I will assign that button for quickly assigning the algorithm. Most FM synthesizers like the Yamaha DX have a fixed number of operators, but in the XFM2 uses a variable modulation algorithm: for each of the six operators you can specify what other operators are effected, so I think a shortcut button for this would be nice.

Schematic:

2 Likes

I think the PCB is ready now. All nets are connected and Kicad doesn’t report any errors. I generated the gerber files, uploaded them to JLCPCB and when I look at the PCB in the online gerber viewer it looks ok too :smiley:. Tomorrow I will take a fresh look at the results and when I’m still happy with it, it’s time to finalize the order.

Front side

Back side

Edit: I just noticed the mounting holes are gone, so I’ll have to re-add those before I order.

3 Likes

I have built the first prototype PCB of the XVA1 User Interface.

There were a few mistakes in the PCB, but after cutting two traces and soldering two correction wires on the back I got it working. Next I will be working on the software part, and correct the mistakes in the PCB layout.

The mistakes were:

  • The drill-holes of the MIDI DIN connectors were 0.1mm too small, so I had to make the pins smaller with a file.
  • Pins 4 and 5 (and probably pins 1 and 2 also) were switched, so MIDI wasn’t working.
  • The values for R2 and R3 were switched on the silkscreen, which caused another error in the MIDI input.
  • I overlooked the fact that the LED buttons had two small plastic pins on the bottom, so they would not fit nicely on the board. I corrected that by just clipping them off and make the bottom surface flat with a small file.

But so far I’ve got a working prototype, which looks very nice :slight_smile: :sunglasses:. Today I worked on the shortcut buttons and made it so only one button can ever be active.

Last week I made some classes for the LED buttons, so they are much easier to work with and I switched from the Arduino IDE to PlatformIO together with the IntelliJ CLion IDE, because I think it is a much better way to code and I also use the IntelliJ toolset for my work. CLion is not free to use, but you can also use the free PlatformIO IDE for Visual Studio Code.

5 Likes

Ohhh, I hadn’t noticed before that you’re incorporating the XVA1/XFM hardware right into the board as well. Clean! Are you going to make any updates to the PCB layout to fix the errors? I’m tempted to order a run of boards to try out if you do…

Really looking forward to seeing it fully powered up!

1 Like

One question looking at that board. I can’t quite tell but is there going to be room for a front panel? It looks like the daughter cards are sticking up higher than the tops of the encoders.

I almost wonder if it would work better with the UI components on one side of the board and the jacks/daughterboards on the other side.

Thanks!

Yes, I’m going to update the PCB layout and then I’m going to build another board with the new layout. I already have all the parts I need for it.

No, at the moment, there’s no room for a front panel. At first I wanted to make a front panel and a main board, but as this is the first PCB I have ever made, I decided that it would be too difficult for me and went for a single board with all the UI and other components on it, just like the Teenage Engineering Pocket Operators.

But now that I’m more confident of my PCB designing skills, I think I can make a nice front panel, a main board and probably a daughter board for the LED buttons. But that will have to wait, because I want to make a good working firmware first. My plan is to concentrate on the XVA1 version first and when most of the basic stuff is working, the XFM2 version will not be so difficult to make.

Well, if you want a beta tester on the next round let me know. I’d be willing to pay for a board and build it up to give feedback (even knowing that there’s a high probability of the next board having it’s own issues, and not having a panel yet.)

I’m not a fan of VSC and don’t have IntelliJ…but I have used PaltformIO in Sublime for a project in the past. So should be able to get a build environment up and running for the code.

Separate daughter board could work when you’re ready to do a panelized version…but it really looks like just moving the taller components to the rear and doing some re-routing could solve it. Unless your end plan is to eliminate the daughter cards entirely and have everything right on the main board - then the daughter board for some I/O components would make a lot of sense. Either way I love where you’re going with it. Have you shared it with the XFM/XVA developer yet? I’m still convinced theres a forum of users somewhere that I just haven’t found :smiley:

Cool. I’ll let you know when the boards are ready.

Yes, that should work too. I think the minimal setup is PlatformIO core, which you can run from the command line.

No, not yet. Maybe I’ll send him an email tomorrow.

There is a group of users on slack, but it’s usually very quiet. I think I can send you an invite, if you like.

I’ve made some progress with the software. Most of the parameters are defined. I’ve organized them in sections and subsections. You can select the section with the shortcut buttons, e.g. Oscillators. Because there are four oscillators, there are four subsections which are displayed on the main screen. The main rotary encoder is used to switch between the subsections. When there are more than eight parameters in a subsection, the down button is lit. For the Envelope section there are actually three pages which are shown below. On page two, the up and down buttons are both lit.

Envelope Page 1

Envelope Page 2

Envelope Page 3

Effects / Distortion

It’s beginning to work very well, but unfortunately I have some memory issues. Some sections are very big and not all memory is released as expected. I am trying to figure out what I’m doing wrong with the c++ objects. Currently my main programming language is Kotlin, which has a garbage collector whose responsibility is to clean up unused memory. C++ does not have this, so I have to do it myself and because I never have programmed in c++ before, it’s a little hard for me.

I thought the 32 KB memory of the Seeeduino XIAO would be enough, but know I’m beginning to think it’s not, so I’m thinking to replace the XIAO with an ESP32.

6 Likes

The brain :brain: transplant for my XVA1 UI works :blush:. The startup time with the ESP32 is much better now and also the main display works much faster. Now I have plenty of free memory and even some free pins, so I think I’m going to use interrupts for the rotary encoders and switches in stead of polling. Maybe it’s even possible to connect the audio signal to the ESP32 so I can make a built-in oscilloscope.

Next, I will solder a small prototype board, so I don’t have to use the error-prone breadboard all the time.

7 Likes