Digital LFO(3) – finally

Here is where this project has landed to. Quite happy with it actually. Might be useful.

Two lfos with several waveforms, both can be transformed into an attack/decay enveloppe generator. There’s also a random voltage output and a squarewave output. All those work independently of each others.

I’m using a very little amount of processor in the atmega328 so I think I’ll switch for a 88 (but will still have lot of room for other things).

One can add hundred of waveforms but the issue is how to represent them for the user without display ?

Anyway, the barebone is done and I think it is nice as it.

8BIT8LFO_jpg_2Few notes :

I ran out of pins for the led display so I used a shift register into the SPI interface. I used dual packaged led (no led = slow lfo, red led = fast lfo, green_led = enveloppe generator). Although I’d prefer switches with internal LEDs they require pcb mounting.

The transistors out of the DAC are here to compensate for the offset. Out of the dac, the signal is moving from 0 to 4V whereas you want 10V p-p, the first op amp produce x2 gain and the trimer gives an offset voltage to put the output at 0V. BUT, the enveloppe generator has its rest state at 0v which became higher because of the offset compensation introduced. Transistor switches on when the led indicating the enveloppe mode is on, bringing the voltage at “+” pin to ground. At moment it seemed to be the quickest way of doing it, maybe there’s a sofware trick. The final design won’t have trimers but cheap voltage reference made of leds (the offest is about 1.5V).

About a thing that I din’t try, maybe the dac could be powered up with +2.5V and -2.5V to have a 0V crosspoint. But this will require regulators with huge loss.

The LFO can go from very low (somekind of 0.0003hz) to 125hz. It is made in two modes to have a better variation over the pot rotation.

As mentioned on the schematic, one can modify the RC time constant for the random voltage to get some kind of “glide”. A pot can be substitued or a selector for the cap. Or even add an buffered op amp with a second output for this “glide”.

This output random noise can be offset as well (full range, 2V5-5V, 0V-2V5).

I’m not very happy with the enveloppe generator code as It process the 256 values of the ramp, but even in its fastest speed it’s more than useable (~20msec per segment), so…Currently at max the attack and decay portions can be veryyyyyyyy long (certainly minute) (I may reduce the values). This could be changed (and certainly will) in the near futur. This is the beauty of this, you can re-write the code as many times as you want whereas the hardware doesn’t change.

I was tempted to add a low pass filter after the DAC but it works as it in my synth. However, it’s terrible for vibrato…

the C code : https://github.com/ThebigDickhead/AVR_PROG/tree/master/LFO

At that point, I think the hardware won’t move far from this. I’ll certainly do a PCB for my next PCB order.

Advertisements

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s