The idea of listening to the power supply noise is a nice one. Maybe a piece should be done around the concept.
Thank you for the schematics (I saw the update in the other thread), very useful.
I still designing to understand the power consumption of the whole thing. I am considering now to go with an external 12V/2-3A since I am adding an LCD running also from a 5v source.
Do you have an opinion about demultiplexing one of the analog inputs with something like the 74HC4051PW to add extra pots. Or is it better to add an extra mcu. I would like to reserve all the possible cpu for audio.
Eurorack Input
Hypasus do you mean multiplexing the inputs ? The multiplexer capelet does just that. Schematics are here https://github.com/BelaPlatform/bela-hardware/tree/master/capelets/multiplexer/mux_capelet_A2 .
I have no idea what current is required by your LCD, but 3A seems a bit overkill for this application... Rather, unless you are using an LDO regulator, I would go for 15V AC transformer if you plan to use ±12V DC supply rails. I used to have troubles with 12V AC to be used for 12V DC supply rails because of fluctuations in the power grid in my area. Power outlets are normally rated ±10%.. When I had this issue, my synth would be unstable at random times of the day, or depending on the location, depending to what the mains voltage was in the area at the time.
Using two 1n4007 in a bridge rectifier configuration, you get a combined voltage drop of about 1.4V, so you get an unregulated DC voltage of
(12V - 1.4V)*sqrt(2) = 15 V
But if your mains voltage is 10% below the nominal value, you effectively get 13.5V. Considering the LM78xx/LM79xx series has a dropout of about 2V, an LM7x12 would not be capable of producing a regulated 12V output from an unregulated 13.5V input. 15V AC gives you a better safety margin on this. Again, your power requirements should not be huge and you should be able to comfortably fit in the 500mA provided by standard LM78xx series. Otherwise, I believe there must be a high-current version of these regulators
Yes, the multiplexer of course by 64 inputs is a bit too much for what I had on mind (4 extra pots and 4 encoders).
Well, I will keep playing maybe the 8 analog inputs will be enough for this project.
For the power supply, the real issue is sourcing the Beaglebone rated at 2A and the opamps for the synth level shifting: 500mA will be enough. I am experimenting with a small oled display, so that shouldn't be a big extra load.
That's why I initially thought to start with a strong 5V power supplyy and the boost, invert and regulate the 12/-12v
I am expecting the DC-regulators to make some measurements.
In between I put in a strip board a test circuit for 1v/octave input a trigger input, one unipolar and two bipolar inputs for LFOs, with another technic: generating a negative offset with a MAX1044 from the 3.3v supplied by the beagle, seems to work.
https://drive.google.com/file/d/0BxadeX5mevFULVpfRjFtZDgyT28/view?usp=sharing
The dac outputs are unipolar, will be enough to use a decoupling capacitor for bipolar signals? I tried with a 100uF and got a bit distortion.
Decoupling capacitors are useful for generating audio but not for CVs where you want response down to DC.
One way to get a bipolar output from a unipolar DAC is to use an op-amp mixer circuit. This is an inverting amplifier configuration with one feedback resistor and two input resistors. One of the inputs goes to the DAC, the other goes to a low-noise, regulated negative voltage, say -5V. The op-amp sums the two signals together at the output. Try, say, a 20k feedback resistor, 20k to -5V, and 10k to the DAC. This will turn the 0-5V range of the DAC into +5V to -5V (inverted), i.e. 0V from the DAC = +5V out, 2.5V from the DAC = 0V, 5V from the DAC = -5V out.
Strangely enough,the problem I have with "spikes" in the signal is not bound to the source. I tried a simple connection, taking the 3.3 from the Bela, into a 10k pot, into the analog 0.
The reading is dead flat, until I move the pot. Then some spikes emerges, until I stop making the signal varying. then dead flat again.
What can be the issue here ?
It sounds like a scratchy pot to me. have you tried with different pots?
Can you post a still of the scope? If you set it to single trigger mode you should be able to capture your noise.
Ok I'll do that when I get home
Sorry for the late answer, but I ran in this problem again, not having interfacing anything lately. The spikes are not occurring when I move the pot, but at random. It affects everything. I linked a video of it, the blue line is the sin output from the examples project, the red line is a simple 10k pot into Analog 0 wired to the 3.3v from the Bela. I simply multiply the reading from AnalogIn 0 with the output from the sine wave.
As you can see, the blue waveform is affected without me touching the pot. I tried a lot of them too. And also to change basic settings like sample rate, but it's always like this.
http://ovh.to/iw9ZH5g
Soundwise, you can hear pops now and then when it's strong enough, but you can hear it when modulating, ie using a pot to FM an oscillator in SC can get quite messy.
So I tried with just the simple sinetone project, and added a scope, and there are tiny spikes too:
http://ovh.to/Mkwp775
Is it me not understanding something ?
Interesting.
Where are you taking the ground signal from the board?
Is there anything else connected to the board?
Is your computer powered by battery or power supply?
Can you try instead of using the 3.3V source to use one of the analog outputs as your voltage reference? For instance, add this at the bottom of your render()
function:
analogWrite(context, 0, 0, 0.66)
This should give you 3.3V out of analog 0.
- Edited
For the recording of the two clips, ground was the pin right under the 3.3v supply. Nothing else was connected but 3.3, grd and analo in 0. I tried with my laptop wired or only on battery, and without the battery and only wired, same issue. I used to power it to get the amplifiers, but even without PSU and input/output (so nothing but the patch running), the sine get spikes.
I tried with the 3.3 from analogWrite, same issue. Also I have to write it every frame, only 0 makes it goes back to 0 every other frames. Here with the audio input on, a tiny one
thanks, what is the line in green?
Oh...I'm seeing this also. I thought it was my code or my CV source. I've spent the past 2 days tracking this down.
- Edited
what is that? where does it come from? is it an input ? Could you share your code ?
UlrichH are you using a BeagleBone Black? or a BeagleBone Green? or a BeagleBone Green WiFi?
I'm seeing a semi random spike on the scope and hearing it on the headphone output. Randomly my waveforms just act...weird. I'll record a demo, sounds great. The next day...Noise or random math failures (I'm making an additive synth and the waveforms get funky looking and sounding). All of which I had attributed to noise on the CV input or floating voltages on my Beatstep Pro and/or my Korg SQ1.
We are looking forward to investigate these issues , but we'd need some code and precise setup description in order to be able to reproduce and tackle the issue ourselves.
code can be pasted here if you are ok with sharing it with the web, otherwise email to info@bela.io thanks
giuliomoro the BBB sold with the Bela cape. I'm coming home in a few hours, I'll upload pictures of the setup and the code.
giuliomoro so, the green line is the output of Korg Volca going into the audio in of the Bela. The connections are as follow:
Analog Out 0 to 3.3V as you asked, into a 10k pot, ground to the analog out ground. The output of the pot is going to Analog In 0.
The code is the sinetone example, with a scope on with 3 inputs, red analog 0 reading, green audio in reading and blue sine out reading.
Do you mean you are connecting the analog out 0 to the 3.3V pin on the board? If that is the case, then DON'T ! What I meant was replacing the 3.3V source in your circuit with the output from analog0.