Hi,
For my first project with arduino (Nano) I'm trying to build a kinda "random" CV out to change the pitch of my synth (an Arturia Microbrute). If I understood well CV is a value between -5V and 5V the lower the voltage the lower the note.
Because this is my first project I don't mind precision and high pitch range.
void loop()
{
Serial.print(AW,2); Serial.print("\t");
analogWrite(CVPin,AW);
}
In the Serial.print I can read values varying from 40 to 140. In my anologue write I was expecting the voltage of the PWM to vary from 0.8V to 2.8V. I add a filter (a 1uF capacitor and 10k resistor) hoping to have a rough DAC (that would convert PWM to analogue).
So my question is :
Why the varying analogue.write don't follow with a pitch variation (the pitch of the microbrute don't change).
Ps: I attached the schematic. Also I have a DAC (4822) could this solve my problem ? I though it would only add precision to the cv out
Ps2 : I havn't spoke english for a long time so I'm not 100% about everything is say.
I add a filter (a 1uF capacitor and 10k resistor)
Sorry no, that is not a filter.
( well it is a sort of high pass filter, exactly the opposite of what you need )
Read this:-
http://www.thebox.myzen.co.uk/Tutorial/PWM.html
See the filter schematic at the end.
Thank you, that was a really good read (quite hard to be honest, First I was confused and it took 30min to understand that RC = 1/2piF and F = 1/2piRC, it was two different Frequencies).
I tried to design the same filter but i'm not sure I did it rigth because it doesn't change the pitch (I had my schematics in the attachments)
To simplify my project the code now consist in mainly :
float AW = random(250);
and
analogWrite(CVPin,AW);
The goal of the project being having a random CV note out of the microbrute (or any anologue synth with CV in)
Well it looks OK, there is no need to use a float, just use an int.
It could be that the signal is changing too fast, put a delay for 100mS after the analogue write.
Measure the output with a digital volt meter and see if it is changing. If it is changing then there is something wrong with the connection into your synth.
Hi again and thanks a lot for your interest and help.
Before i read your message i tried to connect the circuit to a monotron instead of the microbrute same result : no pitch change. I also tried multiple delay() from 1 to 2000.
Then I did use a voltmeter and the output is stuck at 60/70mV (I used the DC position,it doesn't change when the arduino is unplugged so that's weird).
So I guess the problem is in the circuit or in the code so here is the full code and a picture of the circuit in the attachment (which i tried to clean as much as I could)
int CVPout=3;
void setup()
{ Serial.begin(9600);
}
void loop()
{
int AW = random(250);
Serial.print(AW); Serial.print("\t");
analogWrite(CVPout,AW);
delay(100);
}
I got it and it's so stupid from me :
I used the Analog 3 instead of digital (PWM) 3.
I found out when I plugged the arduino Uno instead of the Nano (because it's writtend analogue in)
1 Like
I got it and it's so stupid from me :
Well done.
Stupid mistakes are the only ones I make these days too. :o