Blueprint

oscillator beat generator

Oscillator Beat Generator Oscillator Beat Generator is a guitar/bass effects pedal designed to generate rhythmic amplitude patterns by combining a microcontroller-driven Euclidean rhythm engine with analog signal control circuitry. While the concept takes inspiration from the HY-ESG software effect, this project reimagines it as a standalone hardware pedal, replacing digital envelopes with a fully analog envelope generator and voltage-controlled amplifier (VCA). At its core, the pedal uses a microcontroller-based sequencer to calculate and output rhythmically distributed trigger signals. An Arduino Nano is used for this purpose, selected primarily for convenience and availability. The timing and pattern logic are handled digitally, while the shaping and modulation of the audio signal remain strictly analog, resulting in a responsive and musically expressive output

Created by ajengineer407 ajengineer407

Tier 2

3 views

0 followers

Timeline

ajengineer407 ajengineer407 submitted oscillator beat generator for review ago

koeg koeg 🚀 requested changes for oscillator beat generator ago

Hi really cool project! You are missing the files for one of your PCBs, and your cart screenshot doesn't match with your design. You should also add a final total price to your BOM, and update your BOM.CSV to be the same as the BOM in your README.

ajengineer407 ajengineer407 submitted oscillator beat generator for review ago

Iamalive Iamalive 🚀 requested changes for oscillator beat generator ago

Please include the actual part screenshots from the retailer you’re buying from

ajengineer407 ajengineer407 submitted oscillator beat generator for review ago

ajengineer407 ajengineer407 added to the journal ago

..

Complete circuit
This is still missing the mcu to generate the actual sequence data, but it seems to be functional aside from this from my testing.

ajengineer407 ajengineer407 added to the journal ago

Designed Circuit

Circuit Design

Time to start the circuit design.
For this, I'm going to begin with what I think is the simplest part, the envelope generator.

ar-envelope

Even just looking at the desired change, it seems obvious that the solution for this will be some kind of capacitor based circuit, and thats absolutely correct.

A really interesting way to view this problem is using summed sines. A square wave is (theoretically) the sum of an infinite number of sine waves, as shown below.

Sum Of sines

Each sine wave added has to also increase in frequency, and as we remove the higher frequency sine waves, it looks less and less like a square wave and more like a curved sine wave. So, given our square electrical signal, which we can consider to be composed of near infinitely many sine waves, if we can find a way to filter out the higher frequency sine waves, we will be left with just the low frequency ones, which look far more like what we want than just a square wave.

Handily, there is a super simple circuit which can do this for us. A low pass filter.

Low pass filter circuit

Using this incredibly simple setup, just a resistor and a capacitor, we can filter out a reasonable accurate range of frequencies just by changing the values of R1 and C1 through the simple formula:
Fc = 1 ÷ (2π[R1][C1])

This also means that by changing the value of R1, via a potentiometer, we can control the cutoff frequency of the lowpass filter and thus how sharp or round the envelope output is.

So a very basic A/R envelope might look something like this:
Basic Attack / release envelope generator
$^You can click on the image to test the circuit yourself$

The only problem is that when you change the value of the potentiometer, both the time of the attack and release change simultaneously. Instead what we want is to make individually adjustable attack and release times.

Adjustable Attack / Release

When we charge up the capacitor, current flows through the top potentiometer and diode, and when releasing the charge, it flows backwards through the bottom diode and potentiometer. So now we have an effectively complete A/R envelope.

Amplifier

I'm not going to go into too much detail for the amplifier circuit, but it follows a very standard long tailed pair design, which Moritz Klein has a great video explaining.

I had to make several changes to the circuit as well, because the design shown in the video used a dual supply rail of -12v, 0v, and 12v. Unfortunately the entire supply range I have available is 0v-9v, so I needed to do something a bit different.

The ac signal input oscillates around ground with an amplitude of around 40-50 mV. Because there is an op amp in the circuit, with a VSS of gnd, all signals that go below ground will just be clipped to ground. Instead what we can do is offset the signal by 4.5v, a new virtual ground. Then we can bias all of our transistors as well, and when we amplify it we have a decent amount of headroom. After this we can just use a basic capacitor to filter out the dc offset.

Long tailed pair amplifier

ajengineer407 ajengineer407 added to the journal ago

COMPLETE CIRCUIT

Combining these two parts together with a bit of buffering and the power circuitry, we get the (near) complete circuit.

Complete circuit

This is still missing the mcu to generate the actual sequence data, but it seems to be functional aside from this from my testing.

So that makes this stage of design effectively complete. I'm currently breadboarding it to check that it does work in reality, and once that's done I'll make some tweaks and start on the pcb design.

ajengineer407 ajengineer407 added to the journal ago

Layout Schematic + Routed PCB

Today I quickly laid out the schematic, which consisted of just effectively copying the circuit sim.
I did have to spec some parts like the transistors, but I mostly just tried to stick to bits I had laying around.

Heres the completed schematic:
Schematic

I did also chuck in the mcu and surrounding circuitry, for which I chose an arduino nano, again because I have one lying around. I was going to use an attiny chip, but lack of pins and i2c support for the display convinced me otherwise. I've got three rotary encoders to control pulse, step and speed. The Arduino and all the encoders aren't mounted on the board just to save space.

Next I laid out all the components on the pcb, which was a bit of a challenge, but after a couple attempts I settled on this layout:
Component Layout

And after that, I quickly routed the pcb, and ended up with an almost finished product!
Routed

ajengineer407 ajengineer407 added to the journal ago

PCB DESIGNING

designed the PCB to fit within a standard 1590b guitar pedal case, and after a bunch of consideration I've decided that I'd like to go with a metal bottom enclosure with a wooden top case.

This is because plastic is simply not durable enough for a guitar pedal, excluding longer chain polymers like HDPE or PVC, which are simply not feasible to have produced. In contrast, it's reasonably easy to find metal cases online for pretty cheap, so theres really no detriment.

1590b case

ajengineer407 ajengineer407 added to the journal ago

FELLING SLEEP

case top

This plate was super simple, but lots of double checking spacing between knobs to make sure I had enough space. I'm pretty sure it all fits, but I'll make sure to double check before cutting the holes.

ajengineer407 ajengineer407 added to the journal ago

RETOUCH TO A 3D MODEL

I eventually decided to move to a 1590BB case rather than a 1590A case, just a bit bigger and it would allow me to add a tap tempo button :)

Here's the sizes for comparison:
1590a vs 1590bb enclosure sizes

Not only is it a bit wider, but it's also significantly deeper, which should help with fitting all the parts.

After this, I laid out all the knob locations and the led matrix, and was left with a bit of a problem.
Pcb Layout
Yeah.. no way I was fitting all of those components on the pcb. I had a couple options here:

  • Bigger Case
  • No LED Matrix
  • No Tap Tempo button I really didn't want any of these, so I went with the secret fourth option: Make all the small components smd and have it assembled by jlcpcb.

I also decided to put the led matrix and max7219 chip on the pcb rather than on a seperate board, so that I could also fit the arduino on the pcb.
My final component layout looked like this:
component layout

Not too shabby!
Then routing:
Routed board

Then realizing the arduino is on the wrong side of the board so rerouting half of it:
Re-routed board

And that's the new design done!

I quickly chucked everything in 3d to double check all the sizes in the actual enclosure:
3d Board top
3d board bottom
board in case

And its all looking pretty decent! Next up is to get a quote from JLC for pcba, hopefully under 30ish bucks.

ajengineer407 ajengineer407 added to the journal ago

MAKE IT AFFORDABLE

I whipped up a couple BOMS quickly, and got my quotes from jlcpcb!

For the pcba + pcb + shipping it came to $28.30, which is pretty decent (especially for shipping to nz lol). Then I went onto aliexpress and tried to find a bunch of parts. This was a bit more rough :(

I already had my original links (I build a bom as I work on the pcb) but after adding them all it came to like 70NZD (40ish US i think) which wasn't great. I tried to cut down on shipping by optimizing for the 'choice' parts, and I managed to find some cheaper options for some of the parts, but unfortunately, a lot of the cost is just in the shipping. Eventually, I managed to get it down to 60NZD (30ish usd).

Not terrible, but not amazing either. I'm going to try and hunt some more and see if I can source parts locally instead for footswitches, etc.

My BOMS
My boms, top is ideal, excl. shipping and pcb/pcba costs, so components only, bottom is actual quoted numbers.

ajengineer407 ajengineer407 added to the journal ago

Re-double checked the circuit

Given the very large amount of changes I'd made to the circuit since my last breadboarding session, I decided it would probably be good to once again double check that everything still worked (also there were a few issues on the first breadboard I wanted to iron out). After a couple hours and one blown up potentiometer (don't ask how) I am happy to report a resounding success. I constructed the entire vca and envelope generator section, including power supply but skipping over the digital circuitry, and everything (eventually) worked perfectly :)

It took a couple rejiggings of the bias potentiometer and also halving the v-ground to account for the transistor activation current (forgor what its called) so that at 0v cv, it would be at full volume rather than cutting out at around 1v.

Unfortunately my phone is dead and takes hours to charge, so you'll have to cope with webcam photo sorry.
WIN_20251101_18_51_25_Pro

ajengineer407 ajengineer407 added to the journal ago

## 11/3/2025 5:22 PM - Re-did the top art

I decided that actually I hated the current art I'd made for this project, so I decided to draw up a new design. This time I got to showcase a bit more actual artistry (still terrible i know lol) but I'm overall pretty happy with the results, did take a decent amount of time unfortunately, but I'll still try to push through and ship this today.
3d_render

ajengineer407 ajengineer407 started oscillator beat generator ago