Arduino Quantizer (Hagiwo)

Another build from Hagiwo

DIY eurorack modular synth $8 Quantizer with TB-303 type slide function / arduino synth projects

11 Likes

Hi

I can’t find my post regarding this module from Hagiwo so I respond on this post :slight_smile:

Can’t seem to get it working. Only high pitch audio coming out of the vco when connecting cv out to the 1v/oct input (5 octaves). No scaled notes or melodies. Cv input not processed i guess but ive tried different dac addresses. Still not working. Only the rgb led is doing something. Of course I’ve added the Adafruit mcp4725 library too. no error’s during compiling and/or upload to the Nano.
To protect the nano a little bit against over voltage, I never connect +12v to the vin pin, but I use a 9v voltage regulator (lm7809). from the +5v pin of the Nano I power the rest of the components that needs +5v.

This is the dac i used

Pins as follows:

Vcc, Gnd, Sda, Scl, Out

So no A0 or ADDR pin to set address. Only in the code i can set it.

What else did I forget to do? Thanks for your advice

Of course I’ve added the Adafruit mcp4725 library too.

Hagiwo does not seem to be using that library in his code, so that shouldn’t be necessary.

So no A0 or ADDR pin to set address. Only in the code i can set it.

There’s a solder jumper on the board that I’m pretty sure is used to set A0. In the picture it is set to “L”, which I assume means A0=0, so the device address should be 1100000 (0x60), which is what hagiwo uses in the code already.

I’d recommend starting trying to run some extremely simple code (like the trianglewave.ino example in the Adafruit_MCP4725 git repo) to verify that the DAC is working first before trying to debug a long complex program like Hagiwo’s.

1 Like

Hi thanks for your help. Can i test the dac even when its connected to the arduino?

This is what i fabricated underneath the Nano

So can i test the dac via the arduino in its current configuration?

1 Like

You can test the DAC in 2 ways, run the i2c scanner sketch and this will tell you which address your DAC is sitting at.

Write a value to the DAC in the setup, so if its a 12 bit dac then write a value of 2047 and that should be half the voltage at the DAC output.

1 Like

Hi Craigyb.

Thanks, gonna try this as soon as i get home.

I get access denied error on com6.
Restarted IDE, restarted PC, reconnected Arduino.

Failed uploading, exit status 1

Ok, i had too many instances opened apperantly. Com6 port was in use. I tried i2scanner but not sure where to look at. Serial monitor? Serial plotter? It doesnt show anything besides a lot of small squares.

Yes!! Finally i got an device found on 0Ă—61

Serial monitor is used, it should show you the addresses it finds on the i2c bus, so if your dac is correctly connected to the i2c and functional then it will show the address number it is on.

Something is interfering with your serial or you have baud rates wrong.

1 Like

So you know the address and can modify the code to talk to that address.

Hi Craigyb

Ok, dac is operating on 0x61 according the i2sscanner sketch.

I adapted it to the hagiwo quantizer code. ( lwas 0x60), so lets take it to my studio. Hook it up and see whats happening. Be back in a bit with the results.

Hi Craigyb

It worked!! I’m happy. Now i can continue finishing it.
strange thing is that I tried all dac addresses before and didnt work.
why it works now beats me, but hey who cares, it works now!
now I’ve got 2 working quantizers :slight_smile:

Thanks for helping. Have a nice day

1 Like

No probs, when a sketch isn’t working its always good to have tools/sketches that test individual parts that can be ran standalone to prove the hardware/software. I have sketches that test the i2c, SPI, displays, shift registers, DACs etc, all useful when debugging

1 Like

Hi Craigyb

Do you know how to add more scales to the code? Doesnt seem that hard, just copy/paste lines in the code right? But how to calculate them? Or is there a website where i can copy them from? Thx

Hi Marty

Sorry I can’t help you there with calculations etc, but I guess if you do have multiple scales you will need a way of selecting them.