|
Post by saltatempo on Feb 11, 2024 10:06:43 GMT
Update: 2DAC in 2U module: see the post below. Hi people, Here it is an ATmega328p (same on Arduinos shields) on breadboard, with MCP4725 DAC. Temporary LFO 0,8 Hz triangular wave works well ![;)](//storage.proboards.com/forum/images/smiley/wink.png) I upload the sketch using CP2102. Many pins are visible on the ATmega (naked!), digital out and analog in for creative ideas. ![](//storage.proboards.com/6962053/thumbnailer/fwVzVMXgiRimlwqBtTIh.png) ![](//storage.proboards.com/6962053/thumbnailer/IbOVYlEyyjXyGDqNobAN.png) Clear skies with AEM
|
|
gerif
Junior Member
![*](//storage.proboards.com/forum/images/stars/star_yellow.png)
Posts: 69
|
Post by gerif on Feb 20, 2024 23:22:38 GMT
There is the AD5593R 8-Channel, 12-Bit, Configurable ADC/DAC with On-Chip Reference, I2C Interface! Do you think this chip can be used for 8 audio outputs together with the ATmega328p?
|
|
|
Post by saltatempo on Feb 21, 2024 7:16:50 GMT
Hi, I haven't used that specific chip yet but with I2C interface you can use ATmega328p without problems.
Maybe also with ESP32, to expand CV outputs...
These cheap solutions are massive alternative to Eurorack Expert Sleepers modules...
|
|
|
Post by saltatempo on Feb 21, 2024 7:25:00 GMT
About upgrading the module on this thread, I'm thinking about put a "SYNC IN" to start the 0,8 Hz LFO with and external clock (like that in SEQUENCES MODULE of Volca Modular), any suggestion?
|
|
|
Post by saltatempo on Mar 1, 2024 17:32:22 GMT
|
|
gerif
Junior Member
![*](//storage.proboards.com/forum/images/stars/star_yellow.png)
Posts: 69
|
Post by gerif on Mar 1, 2024 22:00:04 GMT
Hi people, Here it is an ATmega328p (same on Arduinos shields) on breadboard, with MCP4725 DAC. Temporary LFO 0,8 Hz triangular wave works well ![;)](//storage.proboards.com/forum/images/smiley/wink.png) I upload the sketch using CP2102. Many pins are visible on the ATmega (naked!), digital out and analog in for creative ideas. View AttachmentView AttachmentClear skies with AEM Will it work with audio freuquences too e.g. for VCO with sinus, triangle, square output? Will it work with more than one audio output? What are the limitations for audio outputs (processor, communication...)?
|
|
|
Post by saltatempo on Mar 1, 2024 22:09:30 GMT
Well, I haven't studied yet this module for audio output... Only focused for CV modulation. Anyway I'm open to hear answers from others more expert in this forum.
|
|
gerif
Junior Member
![*](//storage.proboards.com/forum/images/stars/star_yellow.png)
Posts: 69
|
Post by gerif on Mar 1, 2024 23:09:27 GMT
Hi people, Here it is an ATmega328p (same on Arduinos shields) on breadboard, with MCP4725 DAC. Temporary LFO 0,8 Hz triangular wave works well ![;)](//storage.proboards.com/forum/images/smiley/wink.png) I upload the sketch using CP2102. Many pins are visible on the ATmega (naked!), digital out and analog in for creative ideas. View AttachmentView AttachmentClear skies with AEM Could you change the frequency to 1 kHz or more instead of 0,8 Hz? What is coming out?
|
|
|
Post by saltatempo on Mar 4, 2024 18:32:23 GMT
I'll try and post news here. Thanks
|
|
|
Post by saltatempo on Mar 6, 2024 20:25:19 GMT
Hi, this is the minimal sketch I used
#include <Wire.h> #include <Adafruit_MCP4725.h>
Adafruit_MCP4725 dac;
void setup(void) { dac.begin(0x60); // 61 or 60 }
void loop(void) { uint32_t counter; for (counter = 0; counter < 4095; counter++){ dac.setVoltage(counter, false); } for (counter = 4095; counter > 0; counter--){ dac.setVoltage(counter, false); } }
Sorry but I cannot modify this code to run the LFO speeder than 800 mHz.
I'm open to suggestions...
|
|
|
Post by duddex on Mar 11, 2024 5:24:27 GMT
Not sure if this is helpful, but you could limit the range of the counter. Instead of counting from 0 to 4095 you could for example count from 1024 to 2048
|
|
|
Post by duddex on Mar 11, 2024 5:26:42 GMT
Or you could increase/decrease the counter by 2 or 3 instead of 1. The “curve” is probably less smooth. But it is possible that this is not noticeable
|
|
|
Post by saltatempo on Mar 11, 2024 20:24:44 GMT
Thanks!
|
|
|
Post by saltatempo on Mar 16, 2024 12:43:54 GMT
Hi, upgrade! Now I have a 2U "ATmega328p on the breadboard" module with 2DACS (the other is PCF8591, the only one I have in my lab with different I2C address from that of MCP4725).
_![](//storage.proboards.com/6962053/thumbnailer/ImjkxrCaD0mJifmfKZhT.png) Here it is in this very bad recorded video
We have a 2LFO module modulating two different Square Wave from my 3VCOdiy. One LFO is a slow triangle wave (the yellow line), the other a sawtooth (blue line) The purple and green lines are the audio sources, mixed in 4VCA module.
Many possible upgrades, from coding to using the AD5593R 8-Channel DAC proposed by gerif . How many DACs at the same time could the ATmega handle?
This is the code (I used your trick, duddex ): // Two DAC at the same time - I2C addresses must be different #include <Wire.h> #include <Adafruit_MCP4725.h> #include <Adafruit_PCF8591.h>
Adafruit_MCP4725 dac;
Adafruit_PCF8591 dac2 = Adafruit_PCF8591(); uint8_t dac_counter = 0;
void setup(void) { //Serial.begin(9600); dac.begin(0x60); dac2.begin(0x48);// 61 o 60 dac2.enableDAC(true); }
void loop(void) { uint32_t counter; for (counter = 0; counter < 2048; counter++){ dac.setVoltage(counter, false); dac2.analogWrite(dac_counter++); delay(1); } for (counter = 2048; counter > 0; counter--){ dac.setVoltage(counter, false); dac2.analogWrite(dac_counter++); delay(1); } }
/* // i2c_scanner
#include <Wire.h> void setup(){ Wire.begin(); Serial.begin(9600); while(!Serial); Serial.println("\nI2C Scanner"); } void loop(){ byte error, address; int nDevices; Serial.println("Scanning..."); nDevices = 0; for(address = 1; address < 127; address++ ){ // The i2c_scanner uses the return value of // the Write.endTransmisstion to see if // a device did acknowledge to the address. Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0){ Serial.print("I2C device found at address 0x"); if (address<16) Serial.print("0"); Serial.print(address,HEX); Serial.println(" !"); nDevices++; }else if (error==4){ Serial.print("Unknown error at address 0x"); if (address<16) Serial.print("0"); Serial.println(address,HEX); } } if (nDevices == 0) Serial.println("No I2C devices found\n"); else Serial.println("done\n"); delay(5000); // wait 5 seconds for next scan } */
|
|
gerif
Junior Member
![*](//storage.proboards.com/forum/images/stars/star_yellow.png)
Posts: 69
|
Post by gerif on Mar 16, 2024 17:17:53 GMT
When adding 2 or 4 instead of 1 inside the loop the frequency should be higher accordingly!
|
|