|
Post by beatstick on Feb 14, 2021 6:05:40 GMT
This is probably a dumb question, but even though I've worked with tons of digital circuits and embedded coding I've always been a dunce when it comes to the analog side of things.
What would be the standard way to adapt a 3.3V audio signal to the AE Modular's 5V level?
Basically I'm building my first DIY module out of a Teensy and a Teensy Audio Shield. So the audio will come out from a SGTL5000 codec, but its line level is referenced to 3.3V. I need to shift that up to the 5V, 2.5V center, that the AE modules expect.
I'm sure it's just a basic op-amp circuit or something like that, but again I'm a total analog dunce. If anyone can point me in the right direction that would be amazingly helpful.
|
|
|
Post by keurslagerkurt on Feb 14, 2021 10:13:21 GMT
Nothing dumb about your question! The standard solution is called 'ac coupling', and is pretty simple, so would be a nice way to start in analog circuitry. This video explains it way better than i ever could: From 20:00 onward is exactly what you need: offset voltage is needed to set your 2.5V center. Ac coupling is needed to be sure your center is fixed at this 2.5V. I'd suggest watching the whole video tho, it is well well worth your time and really built from the ground up for ppl without analog circuitry knowledge! Helped me a lot in the past So you'll need a capacitor in line with your signal, and a (rather big) resistor going to 2.5V (we call this our 'virtual ground' in AE, as it is the center of our waveforms). To get this 2.5V, you'll need to set up a voltage divider, in this case 2 equally large resistors between 5V and 0V. The center point of these two resistors will give us 2.5V. I think that should do the trick. You waveform afterwards should be somewhere between 1.33V and 3.666V, which is just fine, no need to be from 0V to 5V exactly. However, if you feel like the volume is too low, you might want to build a opamp circuit to boost the levels a bit further. If you wish to do so, i suggest you search for 'simple op amp gain circuit', it should be one opamp and just two resistors (or a pot if you want to controll the gain). Just remember that where there is usually 'ground' or '0V' in circuits online, that should mostly be our 'virtual ground' ie 2.5V in AE Modular. Good luck!
|
|
|
Post by keurslagerkurt on Feb 14, 2021 10:20:45 GMT
Just to be clear: in the video Moritz Klein talks about 'removing offset', ie setting the offset to his 0V (or ground). Setting the offset to 2.5V requires the same method as setting it to 0V. The only difference is that the resistor in his AC-coupling circuit goes to 0V, you would want it to go to 2.5V.
|
|
|
Post by beatstick on Feb 14, 2021 20:32:28 GMT
You're a legend. Thank you! I'll do some breadboarding and see how things go.
|
|
|
Post by beatstick on Feb 17, 2021 0:35:10 GMT
I did some breadboarding and made progress, but also got a bit of an odd result. I used two 10K 1% resistors to divide the 5V down. The Teensy Audio Shield has a 2.2uF cap on its lineout output, so all I added on the breadboard was a 100K 1% resistor from the output of that 2.2uF cap to the middle of the voltage divider.
Indeed, that worked to offset the audio signal! However my scope measures the mean at 2.36V when the divider is putting out 2.60V (measured with multimeter and scope). The divider's 2.60V is correct; I'm just testing with USB voltage right now so it's a little over 2.5V. I verified the divider by measuring each resistor's drop as being roughly equal.
Did I do something wrong?
|
|
|
Post by keurslagerkurt on Feb 17, 2021 8:41:43 GMT
I think the mean of 2.36V will be just fine for your audio signal, it's not that critical that its exactly 2.5V as far as I know. Did you connect your audio output point to something? Or only to your scope? My guess would be that maybe your scope is 'loading' the output point a little bit, meaning that its dropping the voltage a little bit because its 'using' some of that voltage. The better your scope, the less it would do that. Just a wild guess, might be something else that i'm overseeing! Anyway, I think your little circuit should do the trick now to bring audio from the teensy into your AE system!
|
|