Could you describe the noise? When I experimented with audio in on teensy, there was a tonne of clipping/ distortion, because my scaling circuit was wrong (it was channels 2&3 of a maths!). Are you hearing that, or hiss (white noise) or something else. Are you able to check the noise is there in the analog realm, before it gets to the teensy?

1 Like

Here’s the power circuit I’m using. Adapted from the Radio Music. I’ve tried with both a bench supply and a Eurorack power lead.

It’s white noise I’m getting. When I look at it on my (crappy £10 kit) oscilloscope, I can’t see much noise, but there’s definitely some there. I’m going to try some more filtering on the 5V supply next.

I’m actually using 10uF for C6 instead of 1uF. Not sure how much difference that makes.

I wonder (this is just speculation, thinking through what I’d do in this situation) if there’s a gain issue somewhere - like you have to turn up the output mixer, so that’s causing the background noise to be much higher.
I remember someone having trouble with a noisy Radio Music module, and realised eventually that they’d just recorded their samples really quietly, so were turning everything else up really high.
Your circuit looks basically OK to me, so I’d think somewhere else - unless maybe you’ve put in a wrong resistor when building the circuit, so one stage is really low gain.

It won’t be that - that’s just doing filtering.

1 Like

One other really dumb question - are all the opamps definitely connected correctly? Sometimes EAGLE is funky about connecting nets; I tend to pick up components and jiggle them around on the SCHematic screen just to check that it’s not neglected one of the green lines.

My other question would be: what, specifically, is the -5V coming in top left coming from? Is it a LM4040-5, or just something like a 7805?

1 Like

But if the noise is on the 5V line (to be confirmed), would choice of caps here not affect that?

I’m fairly confident it’s connected correctly in Eagle, although I’ll double check. Voltage regulator is just a 7805, yeah.

Yes, although bigger should lead to less noise there - like, if you’re using 10u instead of 1u, I’d expect less noise. Let us know how you get on with filtering the PSU.

Alternatively, am happy to take a look at EAGLE files. My other question would be whether the grounding is behaving itself.

1 Like

I modelled it here, didn’t get 0-1.2v output from +5 / -5v input - I get a signal of about 250mv point-to-point, centred (rightly, I think) around 600mv.
http://tinyurl.com/y8ez5z6a
I wonder if it might be better to use the 3.3v reference than the 1.2v - so you’re only cutting the 10v point-to-point signal down to 3.3v point-to-point?

  • Playing with the simulation, changing R2 to 39k, R1 to 10k, R3 to 13k turns +/-5v into 0-3.3v (you might want to leave some headroom)
1 Like

Thank you for taking the time to do that, Tom! It confuses me that the outputs aren’t correct (they do seem correct when I test the board).

I was basing the circuit on this http://www.electronics-tutorials.ws/opamp/opamp_4.html

opamp13

So at +5V in

-Vout = 5*(1 / 8.3) + 5*(1 / 8.3) = -1.2V

at -5V in

-Vout = 5*(1 / 8.3) - 5*(1 / 8.3) = 0V

which is then inverted by the second op-amp. I guess something must be wrong with my understanding here?

According to the Teensy docs https://www.pjrc.com/teensy/gui/?info=AudioInputAnalog if you use the built in ADC you should use a 1.2V reference voltage.

I did some further debugging tonight. Unfortunately it raised more questions than it answered! I seem to be finding analogue electronics rather tricky :slight_smile: I’ll document my investigations here incase it’s of interest. I plan to go back to my breadboard tomorrow to try and reproduce the problem there. Here are some fun images from my Fisher Price oscilloscope :slight_smile:

Here’s a 440Hz square wave going into the input jack

and here it is after the first capacitor C1

I was not expecting it to distort like that? I would have thought a 0.1uF capacitor would discharge much faster than that, to only filter out very high frequencies.

Here’s the 5V line with the sensitivity turned up to 10mV. You can see a lot of noise, but the amplitude is reasonably small (less than 10mV), although it will get amplified by the output stage. I may try experimenting with a voltage reference like this http://uk.farnell.com/texas-instruments/lm4040ciz-5-0-nopb/voltage-ref-shunt-5v-to-226aa/dp/1564659

I use this very simple R-C filter calculator: http://www.muzique.com/schem/filter.htm
On quick glance, it shows your input HP filter’s cutoff frequency is around 200hz which is certainly much higher than usual for audio. Try a 1u cap to get it down to around 20hz.

2 Likes

Oh, right, 200Hz would be rather high, thanks! I got that value from one of the audio circuits in Ray Wilson’s Make: Analog Synthesizers book, but maybe there’s something else going on there that I’d missed. How did you enter those values into the calculator though, as I don’t have a resistor going to ground? What value did you use for resistance?

I’ve had some small success. I went back to my breadboard, where it turned out the noise still existed. I disconnected the 5v offset, and the noise went (albeit replaced by a much quieter, high pitch noise, but one problem at a time!) I’ve ordered some 5v reference ICs, so maybe they will be noise free. Thanks for the help everyone, I’m learning a lot!

yeah, I think the 7805 isn’t doing you a huge amount of favours - a 5V reference might help a lot more. good luck - keep us posted!

1 Like

As a follow-up to this, I tried a couple of approaches to create a 5V offset (rather than using the 5V regulator), using a passive voltage divider from 2 resistors and using a 5V reference IC but both had the same problem with noise.

In the end it turned out that it really was just a gain staging problem as @TomWhitwell had suggested. The output from my guitar pre-amp module (which I was using to test) is very low (even though it’s intended for eurorack), when compared to something like the Radio Music. So the signal to noise ratio was quite high. My circuit is designed to deal with -5v to 5v. I was having to amplify the signal to the point where the noise was noticable (see video below for an example of the noise). With a hotter signal, the noise is barely noticeable. The problem was I don’t have very many modules, so didn’t have much to compare it to. I’ve added a trim pot onto the offset resistor so I can decrease the offset for low signals now.

Is it normal for eurorack modules audio levels to vary quite significantly? Maybe I should be adding an input gain knob.

1 Like

I’ve found that perceived audio levels vary significantly - most obviously a 10v p2p squarewave will sound louder than a 10v p2p sine wave of the same frequency, even though I think the sine is physically moving more air. A musical signal at 10v p2p will probably sound quieter still - perhaps because there is so much going on in terms of phase relationships, and because of the gaps between the peaks. I guess a super-compressed '90s rock album would sound subjectively loud.
So - once you start processing real audio (chords coming out of filters, drum loops) the signal levels will vary a bit

2 Likes

Yeah, that makes sense. But when I was measuring the voltage output on a multi-meter, the output of the guitar module was considerably less than 1V AC, whereas the voltage output of the Radio Music (with default samples) was much higher. I realise a multi-meter isn’t the perfect tool for measuring an audio signal, but should give some indication I would have thought…