Peaks with added CV control

hi
i’am using modulars since about 4 years now and from time to time i try to build some modules by myself, mostly replicas of already existing schematics.
i also own a few mutable modules and i like the fact that all schematics/codes are available and i think that mutable instruments is the most innovative module maker out there by the way :slight_smile:
lately i felt the need for a cv’able peaks module and i tried to modify my peaks to get this missing part added.
I divided the middle pin of the pot (0-3.3v) and used a basic cv mixer (tl072 as 2 stage inverting mixer) to mix the 0-3.3v and the incoming cv and connected the output back to the pcb where the middle pin of the pot was connected.
it works pretty well so far on my bench but i have a question because i don’t want to destroy the smt32 chip…:
what is the max +/- voltage the stm32 is able to handle on the pot_1 - 4 pins?
i know, peaks is 0 -> 3.3v and minus won’t do anything but i just don’t know if i have to protect the stm32 from minus voltage.
also the max plus voltage is not clear to me.
it’s 3.6v or 5v according to the datasheet, was not able to find the correct max value for pin 10-13…
I used a zener diode after the mixer to limit the voltage and a standard diode to prevent minus voltage till now but maybe it’s not needed if the voltage limit is higher than 3.3v and minus voltage is not a problem for the smt32…it means i can save a view parts for the final build.

would be cool if someone could help me with this.

I would not recommend going more than 0.3V above or below the supply rails.

This gives you two options:

  • The simple and “bad” solution is to use diodes to clamp the signal. Check in cell D3 of the frames schematics.
  • The better one is to use a rail to rail op-amp powered by 0V and 3.3V, in inverting configuration, which will serve both as a CV summer and as a clamp (pretty much all modules). If you go this route, you’ll have to modify the code to invert (65535 - x) the voltage read from the ADC (Line 45 of adc.h). Pot dividing a -12V (or better: -10V) voltage, into a 100k resistor, 33k gain resistor and we’re good to go.

Peaks’ code might not support fast and constant modulation of the parameters (might cause glitches and/or CPU overload)

ok cool, will try that :slight_smile: i have a few lm324 spare chips.
instead of modifying the code, is it possible to use a 2nd inverting stage?
i have no clue about code hacking to be honest…

"Peaks code might not support fast and constant modulation of the parameters"
i don’t need audio frequency modulation so it should be fine.

> instead of modifying the code, is it possible to use a 2nd inverting stage?

Yes if the V+ input is biased to 1.65V.

LM324 does not have rail to rail outputs.

> I don’t need audio frequency modulation so it should be fine.

Even a slow LFO will create a continuous change of the ADC value.

ok i will order some mcp6002/4 op amps and try to modify the code.
many thanks for your time and help :slight_smile: