Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 2 1 2 LastLast
Results 1 to 25 of 32

Thread: Teensy 3.2 DAC -> full AC signal generator / LFO for audio

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    18

    Teensy 3.2 DAC -> full AC signal generator / LFO for audio

    I've looked at the existing threads that mention LFOs and signal generation, but haven't been able to get what I think is a solid enough answer for my specific application. I've linked to appropriate sources for some of the acronyms that people might not be familiar with.

    I'm going to be creating a Teensy 3.2 controlled LFO for use in a Eurorack modular synth. It will accept CV (0-8v in this case) input to set things like speed, have a reset trigger etc, but most importantly, it will output either -2.5V/+2.5V or -12V/+12V (or maybe 10. Or potentially 8. The Eurorack "standard" is not so much standard as wildly ignored)

    In any case, I've no problems with outputting any signal I like, so long as it's between 0 and VDD, but I'm trying to determine the absolute smoothest way to, using the onboard 12 bit DAC (or, an external 24 bit DAC... really, just a DAC in general), output a dead smooth, no jitter or stutter at the zero crossing AC waveform that will be nearly as nice as one of those fancy true analog waves. In reality, I know that there will be stepping, and given that I expect to drive this thing as slow as one cycle per 30 minutes and as fast as 5300Hz, the stepping will either be vaguely noticeable or completely invisible.

    I understand that the clock speeds, other mcu tasks and misc other "stuff" will impact the signal generation, and I'm fine to work around that.

    I'm sure an op amp feeding off the appropriate (once someone decides what the heck "appropriate" means in eurorack) rails, and driven by the output of the DAC is the right solution, but I'm reasonably unversed in this type of circuit, and would appreciate any advice you might have!

    TL;DR:
    I want to take the output of a table based waveform and convert it from 0V-VDD to an arbitrary +/- voltage using, I would assume, an op amp or similar.



    Name:  k8LtFL6.jpg
Views: 2860
Size:  38.8 KB

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,808
    I'm trying to determine the absolute smoothest way to, using the onboard 12 bit DAC (or, an external 24 bit DAC... really, just a DAC in general), output a dead smooth, no jitter or stutter at the zero crossing AC waveform that will be nearly as nice as one of those fancy true analog waves.
    First, use an audio codec or DAC chip, not the built-in DAC. Those chips have oversampling and interpolation filters. They still produce some stepping and ultrasonic output, but it's much less and only at much higher frequencies, which is much easier to remove with an opamp-based analog filter. Pretty much all the high-end DAC chips recommend such a filter. After the filter, you should have a very high quality waveform.

    From there, it's a pretty simple matter to use another opamp to increase the signal level.

    For receiving CV, there's a few approaches. It can be done with moderate quality results using only resistors.

    http://www.dorkbotpdx.org/blog/paul/...alog_input_pin

    Or you can use opamps for higher impedance input and better low impedance drive of the ADC.

    https://forum.pjrc.com/threads/28423...ll=1#post71314

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    Quote Originally Posted by PaulStoffregen View Post
    First, use an audio codec or DAC chip, not the built-in DAC. Those chips have oversampling and interpolation filters. They still produce some stepping and ultrasonic output, but it's much less and only at much higher frequencies, which is much easier to remove with an opamp-based analog filter. Pretty much all the high-end DAC chips recommend such a filter. After the filter, you should have a very high quality waveform.
    Would the Teensy audio board be a good start? I THINK in the end, I'm going to be releasing a proper product that would be sold open source with a Teensy socket, and would be focused on hackability. That said, I'm trying to keep the board size small so as only to take up a maximum of 6HP space on the rack, so if the teensy audio board WOULD work very well, I'd just end up throwing a SGTL5000 and associated required bits on my PCB to save space as I wouldn't need a lot of the extras, but it would be ideal for prototyping, and the SGTL5000 is cheap, so it would be nice if it was a good candidate. The only other chip I've worked with that's similar is the Wolfson WM8741GEDS/V, and that was in an entirely different application that wouldn't really give me any head starts here. All of that said, I believe I read somewhere that the SGTL5000 would have issues creating a 0.1Hz style super low frequency output, though I might have imagined that.


    Sadly, I'm not familiar with opamp-based analog filters - if you have a link handy, I'd appreciate it. If not, I'll do my own damn googling and probably find the right thing.


    Quote Originally Posted by PaulStoffregen View Post
    From there, it's a pretty simple matter to use another opamp to increase the signal level.
    At this stage, assuming I'm using a codec chip like the SGTL5000, I'm still looking at a ~0V to ~3.3V output with the pseudo zero crossing at about 1.6V, and I'm not entirely sure the best op-amp circuit to use to convert that to my desired (settled on, regardless of actual correctness) output voltage range. If you, again, have HANDY a link to a good circuit and op-amp for this, I'd appreciate it, otherwise I'll start testing some of the circuits I've found out in the world. I don't have my teensy3.2 + Audio board handy, so I can't put it on my little pocket scope, but looking at the block diagram, I didn't see any inverters or similar. Sadly, I'm just inexperienced in this area, so please forgive my ignorance!

    On the other hand, looking through the thread you linked below, I do see the link to the Mutable Instruments Yarns, which I understand to be well designed. I see this block in there, and that seems straightforward:
    Click image for larger version. 

Name:	ewVEFkL.png 
Views:	197 
Size:	43.3 KB 
ID:	6674
    The channel comes from the DAC8564 16 bit DAC. That said, it appears to be DC only, so modifications would obviously be needed. I'm not worried about the component cost on this, so long as it works well.


    Quote Originally Posted by PaulStoffregen View Post
    For receiving CV, there's a few approaches. It can be done with moderate quality results using only resistors.

    http://www.dorkbotpdx.org/blog/paul/...alog_input_pin

    Or you can use opamps for higher impedance input and better low impedance drive of the ADC.

    https://forum.pjrc.com/threads/28423...ll=1#post71314
    Here, I'm in much more comfortable territory, so I think I'm solid.


    Thank you for your patience, and for making the Teensy. I believe I have around 50 of them in various projects at the moment, and from my Burning Man LED displays to my home automation, I rarely use anything else!

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,808
    The audio shield would certainly be a good point to start experimenting. Maybe get some opamps in DIP package so you can experiment with the extra circuitry on a solderless breadboard.

    I know this is stating the overly obvious, but be extremely careful while playing with circuits powered from +/- 12V. Touching 12V accidentally to any pin on Teensy, even for the slightest moment, will almost certainly kill it.

  5. #5
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    fwiw, there's plenty of open-hardware MCU based modules around, so it'll probably be a good idea to check out those.

    generally speaking, for DC stuff (such as LFOs, envelopes), typically you won't see audio codecs being used (ES "Disting" would be an exception, i suppose); but DACs such as DAC8654, as seen on Yarns. Yarns isn't the best example for an output filter though, as it's a midi-to-CV interface, so there's somewhat different design considerations at work. for LFO type stuff, i'd suggest you take a look at, say, the Tides output; downside is this type of output filter won't work very well for pitch applications (if that's part of the equation), and it won't work with the teensy audio library at this point.

  6. #6
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    Quote Originally Posted by PaulStoffregen View Post
    The audio shield would certainly be a good point to start experimenting. Maybe get some opamps in DIP package so you can experiment with the extra circuitry on a solderless breadboard.

    I know this is stating the overly obvious, but be extremely careful while playing with circuits powered from +/- 12V. Touching 12V accidentally to any pin on Teensy, even for the slightest moment, will almost certainly kill it.
    My apologies for not getting back to you sooner, but I was following your advice and did a test using the audio board. By editing some of the library code, I've been able to get the arbitrary waveform code to spit out arbitrarily low frequency (within reason based on the nature of the codec chip) output, and while it looks a bit unstable at the lowest speeds, I've got some ideas about how to solve that. Thanks so much! I also cobbled together a breakout board for one of the SMD op-amps I had laying around (tssop is annoying as heck) and through the miracle of etching, have my circuit outputting the correct (again, arbitrary it seems - standards don't seem to be enforced at all) -/+ 10V.

  7. #7
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    Quote Originally Posted by mxxx View Post
    fwiw, there's plenty of open-hardware MCU based modules around, so it'll probably be a good idea to check out those.

    generally speaking, for DC stuff (such as LFOs, envelopes), typically you won't see audio codecs being used (ES "Disting" would be an exception, i suppose); but DACs such as DAC8654, as seen on Yarns. Yarns isn't the best example for an output filter though, as it's a midi-to-CV interface, so there's somewhat different design considerations at work. for LFO type stuff, i'd suggest you take a look at, say, the Tides output; downside is this type of output filter won't work very well for pitch applications (if that's part of the equation), and it won't work with the teensy audio library at this point.
    I have indeed been looking closely at the mutable modules for inspiration / guidance because I quite like their engineering, and in fact use Braids as my favorite source. I'm going with an AC LFO as opposed to DC for more flexibility.

    For anyone not familiar with why you might want an AC LFO as opposed to DC, here's a quick video I made in my favorite "quick and dirty" daw: AC VS DC LFO Demonstration

  8. #8
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by brucethehoon View Post
    For anyone not familiar with why you might want an AC LFO as opposed to DC, here's a quick video I made in my favorite "quick and dirty" daw: AC VS DC LFO Demonstration
    what is this showing though? i see/hear a sub audio range waveform that's either offset by some amount or not. that doesn't have much to do with the choice of converter.

    in my book, most synth people seem to identify "DC" with sub-audio range signals, "AC" with audio signals; or "DC" with DC coupled signals and "AC" with AC coupled signals. so basically you could say what you don't want is an "AC" LFO, because that'll mean you have an high pass filter somewhere. integrated in the codec and/or as part of the output stage; so it'll depend on the cut-off how useful that LFO will be for LFO duties.

    where the choice of converter comes in is the way very slow variations or pitch signals will be affected; and codecs don't excel in that area, because they're designed for audio range signals. so in terms of flexibility, it's the other type of converter (= "precision" DAC) that could be argued to be superior, depending on what applications you want your thing to cover. they'll be far less suitable for audio while being way more expensive.

    of course you could always DC-couple an audio codec, and it's likely to work just fine, but it doesn't make it an "AC" LFO.
    Last edited by mxxx; 03-17-2016 at 09:08 PM.

  9. #9
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    I apologize if I've been unclear. In this instance, I'm just saying that the output will be +/- 10V as opposed to 0-10V.

  10. #10
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by brucethehoon View Post
    I apologize if I've been unclear. In this instance, I'm just saying that the output will be +/- 10V as opposed to 0-10V.
    no need to apologize. i was just saying that's got nothing to do with "AC" as it the term is typically used in this connection.

    fwiw, basically any LFO is bipolar, meaning the signal swings around 0v. Tides, for instance, will do that (take a look at the output labelled "+/-5V"); it does so because the waveform is 1) inverted and amplified and 2) offset by a constant 5V (or AREF = -10V). and it has a low pass filter which is somewhere around 7kHz.

    the snippet from the Yarns schematic you've shown yields -2.5V/10V on the other hand, so that won't work. and the cut-off is somewhere around ~37 kHz, so that's less suitable either.

  11. #11
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    Quote Originally Posted by mxxx View Post
    no need to apologize. i was just saying that's got nothing to do with "AC" as it the term is typically used in this connection.

    fwiw, basically any LFO is bipolar, meaning the signal swings around 0v. Tides, for instance, will do that (take a look at the output labelled "+/-5V"); it does so because the waveform is 1) inverted and amplified and 2) offset by a constant 5V (or AREF = -10V). and it has a low pass filter which is somewhere around 7kHz.

    the snippet from the Yarns schematic you've shown yields -2.5V/10V on the other hand, so that won't work. and the cut-off is somewhere around ~37 kHz, so that's less suitable either.
    Thank you so much for taking the time to educate me on this! I have somehow managed to be in electronics and embedded development for 10 years without ever needing to deal with outputting any sort of negative voltage, and I'm trying to be sure I do things right from the start. As it is now, I've been using the DAC which already outputs +/-V. Now that I'm starting to understand what you've been saying, it seems like I'm going to want to go back to using a high quality DAC (I've got several handy in the 12-16 bit range. I've also got several precision voltage references of varying values.

    I'm going to be heading out shortly, and will be near my neighborhood electronics supply store. Assuming I'm going to be outputting 0-vref my DAC (also assuming a 2.5V voltage reference), and feeding into an op amp, and assuming that I have a -10V supply, would this circuit from Tides work well? In this case, I note that they only have a 100ohm resistor on output, as seems suitable for audio more than CV applications, but as I might very well want to modulate this into audible range, it seems like not too big of a problem. In the envelopes I've made, I've used a 100k on output, but I understand why you'd want to

    Click image for larger version. 

Name:	KEJqKaf.png 
Views:	201 
Size:	30.0 KB 
ID:	6728

    ideally, there would be a common drop in replacement for the TL072 that would be available from someplace such as Frys, but I've got no problem ordering that directly if it means that I won't have to worry too much about recalculating the resistor values to get the desired outcome.

    Thanks again!

  12. #12
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by brucethehoon View Post
    it seems like I'm going to want to go back to using a high quality DAC (I've got several handy in the 12-16 bit range. I've also got several precision voltage references of varying values.
    in that case, i'd definitely give it a try. a downside in using a SPI DAC is the pjrc audio lib doesn't support any, so you couldn't use the library as is. the voltage reference is mainly to isolate things somewhat from the power-rails, as you can't be sure they're very clean.

    if your DAC outputs 2.5v, you can basically copy those values. for a -10/10v range, you'd have to, say, lower R20 to 15k. and R21 should be 100k + 20k (or just use 120k, without the rheostat).

    i remembered it wrong btw, the cut-off of that filter is 21kHz; for a LFO, you could probably lower it. say use 680p for the caps (which should be of the NP0/C0G type); that'll bring it down to 7kHz.

    second downside of that circuit is it won't work very well for pitch CV, but introduce a (very smallish in this case) voltage error owing to the 100R series resistor (R22) (in conjunction with the input resistor of the module downstream). to avoid that, you could move it into the feedback loop. and maybe add a another small cap in parallel to R23 (similar to the Yarns output).


    In this case, I note that they only have a 100ohm resistor on output, as seems suitable for audio more than CV applications, but as I might very well want to modulate this into audible range, it seems like not too big of a problem. In the envelopes I've made, I've used a 100k on output, but I understand why you'd want to
    100k at the output is way too much! the "rule" is 1k output/100k input impedance, but there's no real rationale to it. that said, it'll be ok for audio and LFOs/envelopes etc. it's problematic when used for pitch (see above)

    TL072 will work ok; it's very common so they'll probably stock it.
    Last edited by mxxx; 03-18-2016 at 12:08 AM. Reason: grammar

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,808
    I'm curious if a circuit like this could allow the SGTL5000 to output a reasonable DC coupled +/- 10V control voltage?

    Click image for larger version. 

Name:	cv.png 
Views:	235 
Size:	200.8 KB 
ID:	6729

    Edit: oh, those 4.7K resistors probably need to be 10K, so a 2Vp-p line out can become a 20Vp-p signal.

  14. #14
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by PaulStoffregen View Post
    I'm curious if a circuit like this could allow the SGTL5000 to output a reasonable DC coupled +/- 10V control voltage?
    i don't see why not.

    i'd tend towards trying something like this, ie after that LPF (and assuming the line out is 0-2v? and VAG = 1.65v); ... but maybe VAG needs the buffer.

    edit. output range is 0.65v-2.65v, so V_bias should be 1.375V:

    Click image for larger version. 

Name:	xx.jpg 
Views:	417 
Size:	44.4 KB 
ID:	6741


    the 20p is probably not needed. so that's for -5/5v (6* 1.375V - 5*DAC_out)
    Last edited by mxxx; 03-18-2016 at 10:45 PM. Reason: see below

  15. #15
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,808
    I believe VAG is supposed to be the center voltage, or "zero" value. So when LINEOUT is configure for 2Vp-p, and VAG is 1.65V, the LINEOUT pin should range from 0.65V to 2.65V.

  16. #16
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    oh, i see. that makes it easier. corrected the bias / resistor values above...

  17. #17
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    Well, I'm lost on the moon, but I'm hitting the books to make sure I understand everything you've both said. Thank you both, so much, for spending the time to help with this project!

  18. #18
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by brucethehoon View Post
    Well, I'm lost on the moon, but I'm hitting the books to make sure I understand everything you've both said.
    oh, sorry, i guess we weren't very verbose ... so the idea there i guess is to DC couple the SGTL5000 codec. i never actually used that particular codec, but i suppose all the equalizing and high pass filter stuff can be disabled / set to bypass, so that should be ok.

    anyways, i wasn't quite sure i fully understood Paul's suggestion either (the divider after the filter?); my suggestion was the circuit could be simplified a bit by simply using an inverting configuration and biasing the positive terminal. ie you probably could get away without the buffer for the VAG reference voltage so things would reduce to just 2 op amps, or 4 for both channels, if you'd add a/the LPF as Paul's drawing suggests.

    basically, what happens in the circuit (the one i've posted) is that the bias voltage produces a constant positive offset (V_bias*(Rf/Rin+1) = 8.25V); and that's summed with the inverted output from the codec:

    DAC_out*(- Rf/Rin) + V_bias*(Rf/Rin+1), or DAC_out*(-5) + 1.375V*6

    as DAC_out seems to swing from 0.65-2.65V, you'll end up with -3.25V + 8.25V = 5V, and -13.25V + 8.25V = -5V.

    so basically that's just an alternative way to achieve what the Tides output circuit does, only the offset is derived differently; in this case you don't need a negative voltage reference but use the positive reference voltage from the SGTL5000.

  19. #19
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,808
    An idea I've toyed with involves making another audio adaptor board, specifically for people building Eurorack modules. If this ever happens, which is a pretty big "if", a realistic time frame would likely be early 2017. After the 180 MHz Teensy is released, and after the audio lib gets a granular synthesis engine and wavetables and more effects and more signal-modulated features, this sort of thing might make more sense (where "sense" means maybe enough of market... maybe?)

    Such a module would have two SGTL5000 chips, with 4 DC coupled inputs and 4 DC coupled outputs. All 8 would be capable of +/- 10V signal range, or 8V or 5V, software configurable using the adjustable line-level in/out of the SGTL5000. Lower ranges like +/- 2.5V would need to be done in software, using only a portion of the hardware's analog range. Unipolar CV would just use the positive half. Of course, all 8 signals would have the full 16 bit, 44.1 kHz audio sampling and integrate with the audio library data flows.

    I'd probably put a tiny EEPROM chip on the board. During testing here at PJRC, we'd do a room temperature characterization of the DC offsets and maybe also the exact signal gain. These would take into account both SGTL5000 level and resistors & offset voltages/currents in the opamp circuits. For applications that need to get very low DC offset voltage and precise signal levels, that info could be read and used for software-based correction.

    It would probably also have a place to solder a 10 pin Eurorack power header, and it'd have a 12V to 3.3V step-down power supply to power the Teensy and codec chips. Filtered, reverse polarity protected +/- 12V would be passed through the pins to allow the rest of the module to get its power.

    This wouldn't be a complete Eurorack module board. The idea is it's be a component used in one. It'd be the same 0.7 inch wide as Teensy, and probably 1.2 to 1.5 inches long. It and a Teensy would fit onto the back side of another board or stack of boards that provide the user interface, plus any other signal inputs or outputs.

    Realistically, such an audio board would retail around $20 to $25. Together with a Teensy, that's about $40 to $50 for the DSP analog I/O infrastructure on the back layer of a module. By the time another board, pots, buttons, front panel and other stuff are added, it's not such a cheap way to make a Eurorack module. But maybe it'd be worthwhile, for the many DIY possibilities it might open up?

    I know several Eurorack module builders are here, and please feel free to link to this thread from forums like MuffWiggler. I'm curious to hear any feedback. But please remember, this is only hypothetical so far, and if it does ever happen, the earliest likely timeframe would be in 2017.
    Last edited by PaulStoffregen; 03-20-2016 at 05:49 PM.

  20. #20
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by PaulStoffregen View Post

    This wouldn't be a complete Eurorack module board. The idea is it's be a component used in one. It'd be the same 0.7 inch wide as Teensy, and probably 1.2 to 1.5 inches long. It and a Teensy would fit onto the back side of another board or stack of boards that provide the user interface, plus any other signal inputs or outputs.

    Realistically, such an audio board would retail around $20 to $25. Together with a Teensy, that's about $40 to $50 for the DSP analog I/O infrastructure on the back layer of a module. By the time another board, pots, buttons, front panel and other stuff are added, it's not such a cheap way to make a Eurorack module. But maybe it'd be worthwhile, for the many DIY possibilities it might open up?
    that'll be neat. there isn't much like this and if it could be done < $50 total, even better. that'll still be fairly cheap! (comparable MCU/codec combinations that come to mind would be this or this).

    difficult to say though what the market is for such a thing. i'm one of the couple of people making available "reprogrammable" (in theory) teensy-based eurorack modules, and i spend vastly more time explaining how to upload code than accepting pull requests and so on. (admittedly, the user base for those is fairly small; but from what i can gauge that'll be similar for the various through-hole teensy-based modules and other open-source/hackable modules, too).

    from that perspective, i'd say a single 'DSP' core "component" that would integrate both, MCU and codecs (and maybe SD and some extra SRAM) might be a more attractive option than a semi-full-blown eurorack component, in as much as it (basically an outsized DIP part, much like teensy) would appeal not just to modular synth people, but DIY audio folks in general. ie most of the remaining/peripheral circuitry involved in making a digital synth module (op amp buffers, reverse polarity protection, etc) would be considered "easy" by most (in as much it's doable in through hole), so it wouldn't necessarily have to go onto the "core" board. but i guess a dedicated "DSP-teensy" might be even more unrealistic...

    an alternative would be to simply make an official pjrc eurorack module, which would appeal to the type of person who can code, but not solder; it would be only a small step up from the kind of component board you propose. there's a few atmega328 based precedents (ardcore, euroduino, etc), but they're kind of dated now, hardware wise. the downside of such "generic" modules is that the "generic" UI/panel layout will never feel quite right, of course, for the specific thing somebody might want to implement.

  21. #21
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    Quote Originally Posted by mxxx View Post
    oh, sorry, i guess we weren't very verbose ... so the idea there i guess is to DC couple the SGTL5000 codec. i never actually used that particular codec, but i suppose all the equalizing and high pass filter stuff can be disabled / set to bypass, so that should be ok.

    anyways, i wasn't quite sure i fully understood Paul's suggestion either (the divider after the filter?); my suggestion was the circuit could be simplified a bit by simply using an inverting configuration and biasing the positive terminal. ie you probably could get away without the buffer for the VAG reference voltage so things would reduce to just 2 op amps, or 4 for both channels, if you'd add a/the LPF as Paul's drawing suggests.

    basically, what happens in the circuit (the one i've posted) is that the bias voltage produces a constant positive offset (V_bias*(Rf/Rin+1) = 8.25V); and that's summed with the inverted output from the codec:

    DAC_out*(- Rf/Rin) + V_bias*(Rf/Rin+1), or DAC_out*(-5) + 1.375V*6

    as DAC_out seems to swing from 0.65-2.65V, you'll end up with -3.25V + 8.25V = 5V, and -13.25V + 8.25V = -5V.

    so basically that's just an alternative way to achieve what the Tides output circuit does, only the offset is derived differently; in this case you don't need a negative voltage reference but use the positive reference voltage from the SGTL5000.
    Thanks so much for the clarifications! I apologize for not responding sooner. I have been reading up and doing some testing, and it looks like I'm pretty darn well set. While I've not used the audio board for the "finalish" design, Paul's comment below has given me some ideas for future modifications that will make it really interesting. The biggest challenge now is getting less of a stepped output when going EXTREMELY low frequency (e.g. one cycle in 20 minutes) Even the 16 bit DAC I'm using has a (albeit barely) noticeable stepping effect even when calculating the sine wave instead of using a table. In the end, it's either going to be tables all the way (or portions of tables) or I'm going to have to get a hell of a lot better at math :P Being dyslexic is extremely, extremely frustrating given that I'm also in love with EE and programming. Uphill battles all the way, but I'm getting there, and you helped immensely!

  22. #22
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    Quote Originally Posted by mxxx View Post
    difficult to say though what the market is for such a thing. i'm one of the couple of people making available "reprogrammable" (in theory) teensy-based eurorack modules, and i spend vastly more time explaining how to upload code than accepting pull requests and so on. (admittedly, the user base for those is fairly small; but from what i can gauge that'll be similar for the various through-hole teensy-based modules and other open-source/hackable modules, too).
    Which module(s) have you made? I'd be very interested to see what you've come up with!

  23. #23
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    Quote Originally Posted by PaulStoffregen View Post
    An idea I've toyed with involves making another audio adaptor board, specifically for people building Eurorack modules. If this ever happens, which is a pretty big "if", a realistic time frame would likely be early 2017. After the 180 MHz Teensy is released, and after the audio lib gets a granular synthesis engine and wavetables and more effects and more signal-modulated features, this sort of thing might make more sense (where "sense" means maybe enough of market... maybe?)

    Such a module would have two SGTL5000 chips, with 4 DC coupled inputs and 4 DC coupled outputs. All 8 would be capable of +/- 10V signal range, or 8V or 5V, software configurable using the adjustable line-level in/out of the SGTL5000. Lower ranges like +/- 2.5V would need to be done in software, using only a portion of the hardware's analog range. Unipolar CV would just use the positive half. Of course, all 8 signals would have the full 16 bit, 44.1 kHz audio sampling and integrate with the audio library data flows.

    I'd probably put a tiny EEPROM chip on the board. During testing here at PJRC, we'd do a room temperature characterization of the DC offsets and maybe also the exact signal gain. These would take into account both SGTL5000 level and resistors & offset voltages/currents in the opamp circuits. For applications that need to get very low DC offset voltage and precise signal levels, that info could be read and used for software-based correction.

    It would probably also have a place to solder a 10 pin Eurorack power header, and it'd have a 12V to 3.3V step-down power supply to power the Teensy and codec chips. Filtered, reverse polarity protected +/- 12V would be passed through the pins to allow the rest of the module to get its power.

    This wouldn't be a complete Eurorack module board. The idea is it's be a component used in one. It'd be the same 0.7 inch wide as Teensy, and probably 1.2 to 1.5 inches long. It and a Teensy would fit onto the back side of another board or stack of boards that provide the user interface, plus any other signal inputs or outputs.

    Realistically, such an audio board would retail around $20 to $25. Together with a Teensy, that's about $40 to $50 for the DSP analog I/O infrastructure on the back layer of a module. By the time another board, pots, buttons, front panel and other stuff are added, it's not such a cheap way to make a Eurorack module. But maybe it'd be worthwhile, for the many DIY possibilities it might open up?

    I know several Eurorack module builders are here, and please feel free to link to this thread from forums like MuffWiggler. I'm curious to hear any feedback. But please remember, this is only hypothetical so far, and if it does ever happen, the earliest likely timeframe would be in 2017.
    I think this could be EXCELLENT. I would imagine that you might see some very broad appeal if you were to also break out any unused pins to an easily accessible location on the board, especially to be used for pots, buttons, etc., even including a nice ground pad/hole to pair with each pin. You might also release a version of the patch building tool that would come with defined, named inputs (e.g. assuming that all 4 inputs would be broken out to the front panel) and generically called inp1-4 and highlighted some specific features that people would be interested in such as a V/oct converter in code and other such useful common bits. Dragging an LFO object into the builder, linking it to an input, and setting a multiplier based on the value of a pot (drag in ADC input, define it as a pot).

    I know that's veering dangerously into the Pure Data world, but if you look at such devices as the Axoloti (http://www.axoloti.com/product/axoloti-core/) which I enjoy the very hell out of, or the (sadly expensive) Organelle (https://www.critterandguitari.com/pages/organelle) the Axoloti uses a modified (vastly more friendly) Pure Data app, and the Organelle uses bog standard Pure Data. The Axoloti is not at all far from what you'd be releasing, though it has luxuries like MIDI in/out and full size TRS jacks that would be meaningless for these purposes. Heck, even then, breaking out some of those IO pins to a midi daughter board or even a USB panel jack for MIDI IO would be trivial.

    I clearly get overly excited, so I'll shut up now

  24. #24
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by brucethehoon View Post
    Which module(s) have you made? I'd be very interested to see what you've come up with!
    simple things. most of them are here: https://github.com/mxmxmx?tab=repositories

    this one i like best, i guess:

    Click image for larger version. 

Name:	24162923324_f602309a0b_b.jpg 
Views:	136 
Size:	94.6 KB 
ID:	6805

    a quad quantizer / CV generator type of thing.

  25. #25
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    Very cool! I'll take a look more thoroughly this evening!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •