Generating CV/Gate with Arduino

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: luketeaford, Joe., lisa, Kent

chrismuller86
1-Post Wiggler
Posts: 1
Joined: Fri Mar 02, 2018 11:13 am
Location: Leipzig

Post by chrismuller86 » Fri Mar 02, 2018 11:32 am

Hi all,

:help:

I seem to have problems interfacing the DAC8565 using my ESP32 dev board. Using a multimeter I measure 3.2V at all 4 outputs constantly, though in my code I try to change between 2 voltages:

LDAC, ENABLE, RSTSEL connected to GND

I've connected the DAC8565 like this:

ESP32 -> DAC8565

IO5 (SS) -> 9, SYNC
IO18 (SCK) -> 10, SCLK
IO23 (MOSI) -> 11, DIN
IO15 (RST) -> 13, RST
GND -> LDAC, ENABLE, RSTSEL, GND
3V3 -> AVDD, IOVDD,VREFL

Would be amazing if someone can help me out!

Seele
Learning to Wiggle
Posts: 3
Joined: Sat Aug 01, 2020 4:37 am
Location: Berlin

Re: Generating CV/Gate with Arduino

Post by Seele » Sat Aug 01, 2020 4:59 am

Hi there,

as a short introduction - I‘m pretty new to eurorack, not so very new to arduino and a huge fan of everything involving keys, strings and making noise ;)

I know this is an old thread, but it‘s probably the best place to ask:
I‘m currently building a cv/trigger sequencer using an arduino and several adafruit neotrellis put together as a led matrix controller.

My plan is to have eight independent trigger outputs for triggering eurorack drum modules.

I already experimented with generating triggers from a quad channel DAC (MCP4728), simple filtered PWM signals and also plain unfiltered PWM signals from the arduino.

So far, I can‘t see any difference in the results of these three methods for generating very short (approx. 5ms) cv/trigger signals.

I have however noticed that for generating cv/pitch or cv/control signals (which I did in another project) you have to use a DAC or otherwise your synth will do all kinds of funny stuff.

Can anyone explain to me, why I should maybe use a DAC for cv/trigger anyway, or if it‘s maybe okay to use plain PWM signals in this case?

Best, S.

User avatar
Sandrine
Super Deluxe Wiggler
Posts: 2252
Joined: Tue Jun 09, 2015 10:28 pm
Location: BC Canada
Contact:

Re: Generating CV/Gate with Arduino

Post by Sandrine » Sat Aug 01, 2020 10:53 am

Perhaps he should have used a union instead of those shifts which may be causing an issue:

Code: Select all

union z_tag {
  byte u[4];//lsb to msb "little endian"
 unsigned long uval; // example Serial.print(z.fval,HEX);
} z;
Can anyone explain to me, why I should maybe use a DAC for cv/trigger anyway, or if it‘s maybe okay to use plain PWM signals in this case?
A DAC is needed only for the analog CV, the Gate/Trig portion can be purely digital (preferably buffered first!)
Using a DAC for a trigger is inefficient as it's slower (amp slew) and requires more code...unless the outputs are multi-purpose configurable...
PWM is way too slow for changes in level (because of the PWM-DC filtering circuit) only useful for LED brightness or vactrol control stuff.

nrrrd
Common Wiggler
Posts: 157
Joined: Wed May 23, 2018 2:47 pm
Location: Oxford

Re: Generating CV/Gate with Arduino

Post by nrrrd » Sat Aug 01, 2020 12:35 pm

I don’t think I’ve ever seen an example of using 8 to 12 of the digital pins on an Arduino, plus a r2r ladder dac, for an analogue or CV output. Is there a reason for this? Does it just use too many pins?
It seems like a good solution, using 1% resistors, but there may be something I’m not getting.

nigel
Veteran Wiggler
Posts: 689
Joined: Wed Jan 16, 2013 6:49 am
Location: Melbourne, Australia

Re: Generating CV/Gate with Arduino

Post by nigel » Sat Aug 01, 2020 8:55 pm

nrrrd wrote:
Sat Aug 01, 2020 12:35 pm
I don’t think I’ve ever seen an example of using 8 to 12 of the digital pins on an Arduino, plus a r2r ladder dac, for an analogue or CV output. Is there a reason for this? Does it just use too many pins?
It seems like a good solution, using 1% resistors, but there may be something I’m not getting.
I suspect that using up that many pins on a single output seems a bit inefficient. If you only need a single output though, it should work.

One problem may be the accuracy - 8 bits is 256, so the bottom bit would be less than 1/2% of the full range. I'm not sure exactly how the output of a resistor ladder depends on the accuracy of the resistors, but intuitively I would expect that you would need 0.1% resistors to get anything close to linear. 12 bits would require 0.01% or better. At some point it's easier to just buy a decent DAC chip.

Seele
Learning to Wiggle
Posts: 3
Joined: Sat Aug 01, 2020 4:37 am
Location: Berlin

Re: Generating CV/Gate with Arduino

Post by Seele » Sun Aug 02, 2020 4:28 am

Sandrine wrote:
Sat Aug 01, 2020 10:53 am
A DAC is needed only for the analog CV, the Gate/Trig portion can be purely digital (preferably buffered first!)
Is a voltage follower sufficient for buffering the trigger signals or do you need something special for this?

nrrrd
Common Wiggler
Posts: 157
Joined: Wed May 23, 2018 2:47 pm
Location: Oxford

Re: Generating CV/Gate with Arduino

Post by nrrrd » Sun Aug 02, 2020 4:34 am

Seele wrote:
Sun Aug 02, 2020 4:28 am
Is a voltage follower sufficient for buffering the trigger signals or do you need something special for this?
An opamp will have some slew, the amount depending on the model of the opamp. A simple alternative solution is to use a npn transistor as a switch, like in the CGS Gated Comparator module (and countless others, but this is where I saw it first)

Seele
Learning to Wiggle
Posts: 3
Joined: Sat Aug 01, 2020 4:37 am
Location: Berlin

Re: Generating CV/Gate with Arduino

Post by Seele » Sun Aug 02, 2020 4:56 am

nrrrd wrote:
Sun Aug 02, 2020 4:34 am
Seele wrote:
Sun Aug 02, 2020 4:28 am
Is a voltage follower sufficient for buffering the trigger signals or do you need something special for this?
An opamp will have some slew, the amount depending on the model of the opamp. A simple alternative solution is to use a npn transistor as a switch, like in the CGS Gated Comparator module (and countless others, but this is where I saw it first)
Thank you!

Source: https://sdiy.info/wiki/CGS_gated_comparator

Image

Post Reply

Return to “Music Tech DIY”