Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 16 of 16

Thread: Teensy with a 5V step-up transformer?

  1. #1
    Junior Member
    Join Date
    Mar 2019
    Posts
    7

    Teensy with a 5V step-up transformer?

    Hi,

    I'm planning out a project and I was wondering if there would be any limitations or issues with using a 5 volt step-up transformer with analog output signals from a teensy.

    What I want to make is a CV sequencer (like for analog synthesizers). My understanding is that the standard CV signal is 0-5v.

    I was going to try using a teensy for this because:

    A) I have a teensy 3.6 on hand and

    B) It has an onboard sd card reader, and my plan is to store banks of sequences on there.

    So this is why I would not be using a normal 5v arduino board.

    Anyway... I was wondering if there is any reason something like that would mess with the power on the board or overload it or something.

    Thanks.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,452
    Normally opamps are used for this, not transformers.

  3. #3
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    OK. by 'transformer' I mean those little 3v to 5v logic level converters. Is there an advantage to using an op amp over one of those?

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,452
    Quote Originally Posted by Mfich View Post
    those little 3v to 5v logic level converters
    Maybe you could be more specific, like a link to a product page, or a manufacturer and specific part number?

    Most of the products I've seen are for digital signals, not analog like CV.

    In general, we can help you much better if you explain the context of your project and when you give more specific details. There are a lot of people on this forum with a tremendous amount of experience with synths. But when you give so little background and no specific details, it's hard to help...

  5. #5
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    OK, so I have some of these step up/step down converters that I used on another project:

    https://www.adafruit.com/product/757

    Basically I'm going to make a CV step sequencer that will move incrementally through 8 or 16 steps, and on each step it will send a 5v 'gate' signal to one 1/8" jack, and a variable voltage signal to another 1/8" jack between 0 and 5 volts, and that signal will determine the pitch of what the synth or whatever will play at on that step. I think I will try to use it on something like this:

    https://www.rakits.co.uk/product/metal/

    I don't know anything about Op Amps. On the internet, I see a lot of diagrams that have a 5v input and 3.3v output, but not the other way around. Also, what type of circuit this would be? Is it a 'non-inverting amplifier'? The uses of an Op Amp seem pretty abstract to me at this point, and I'm not finding much out there that is application-specific.

    Let me know if this still sounds vague, or if there are any other details I'm leaving out.

    Thanks.

  6. #6
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,266
    The golden “Moog” standard for control voltages (CVs) in the analogue synth world since the early 1980s is as follows:

    Volume: 0V (mute) to 5V (full volume)

    Pitch: 1V/octave centered around “middle C” or midi note 60 which corresponds to 0V. Thus, the full midi note range is covered with a CV going from -5.0V to +5.4983V.

    Generating these for example with a Teensy whose DACs can output 0 to 3.3V would require an additional bipolar analog power supply with at least +/-6V, 2 opamps and a reference voltage to handle the pitch offset in a differential amplifier configuration.

  7. #7
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,266
    Quote Originally Posted by Mfich View Post
    OK, so I have some of these step up/step down converters that I used on another project:

    https://www.adafruit.com/product/757

    Basically I'm going to make a CV step sequencer that will move incrementally through 8 or 16 steps, and on each step it will send a 5v 'gate' signal to one 1/8" jack, and a variable voltage signal to another 1/8" jack between 0 and 5 volts, and that signal will determine the pitch of what the synth or whatever will play at on that step. I think I will try to use it on something like this:

    https://www.rakits.co.uk/product/metal/

    I don't know anything about Op Amps. On the internet, I see a lot of diagrams that have a 5v input and 3.3v output, but not the other way around. Also, what type of circuit this would be? Is it a 'non-inverting amplifier'? The uses of an Op Amp seem pretty abstract to me at this point, and I'm not finding much out there that is application-specific.

    Let me know if this still sounds vague, or if there are any other details I'm leaving out.

    Thanks.
    These converters are for simple digitalsignals which occur in the analog synth world as gate or trigger signals which are either low(0V) or high(5V).

    CVs are much more complex, since (let’s take a pitch CV example) they can take any value between -5 and +5.5V and the step from one halftone to the next is only 0.08333V. This requires high resolution DACs and a sophisticated differential amplifier circuit, including temperature compensation.

    From what you write, I conclude that you have not much experience and knowledge about CVs. You should really master the concept and have some experience with analog CV gear before you try to “digitalize” it.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,452
    Quote Originally Posted by Mfich View Post
    On the internet, I see a lot of diagrams that have a 5v input and 3.3v output, but not the other way around.
    For a gate pulse (not analog CV), use this to go from 3.3V to 5V.

    https://www.adafruit.com/product/1787

    Don't forget to put a resistor between that chip and the output jack. If someone plugs another output into it, the resistor will (hopefully) prevent the 2-output-together conflict from damaging that chip.

  9. #9
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    That rakit synth I posted the link for (and I assume atari punk consoles and most baby 8 sequencers) are 0-5v.

    https://electronics.stackexchange.co...-3-3v-to-0v-5v

    Reading that thread, it looks like I would need 6v to power the OP amp in order to get 5v of voltage out. So... this 5v cv thing isn't looking feasible.

    Something else I found out... korg monotrons can be modded to receive 0-3.3v of cv input, I might give that a shot.

    Not buying a moog in the foreseeable future.

  10. #10
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    Actually... I see that the Vin on the teensy 3.6 is 3.3-6v. Would a 6v ac adapter work for powering it, or is that too close to the tolerance for the power input?

  11. #11
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,953
    crappy AC adaptors can have 6.1 volts sometimes. plus spikes. Always refrain from hitting the max thresholds...

  12. #12
    Senior Member
    Join Date
    Feb 2013
    Posts
    552
    Quote Originally Posted by Mfich View Post

    I don't know anything about Op Amps. On the internet, I see a lot of diagrams that have a 5v input and 3.3v output, but not the other way around. Also, what type of circuit this would be? Is it a 'non-inverting amplifier'? The uses of an Op Amp seem pretty abstract to me at this point, and I'm not finding much out there that is application-specific.
    fwiw, the "metal synth" you linked doesn't even seem to track V/oct, so from that perspective whatever you end up doing probably won't matter too much ... (i can see a "cut-off" input, which i'd assume at best vaguely tracks V/oct). chances are you'd be fine just by amplifying the 3.3v DAC signal to cover whatever is the input range of that cut-off input (let's say 5V). if you wanted to power the whole thing from 5V, then yes, a suitable (non-inverting) op-amp with ~1.5 gain will mostly get you there.

    if on the other hand you wanted to build a (proper) step sequencer that works with a variety of synths or oscillators (those that do track V/oct), the considerations mentioned by Theremingenieur do apply. it'll be slightly more involved, because you'd typically want more than a 5V output range (more typical would be 10V = 10 octaves); you'd typically want better than 12-bit resolution (to be able to properly calibrate the thing); and things will absolutely benefit from having bipolar supplies, even if you'd go for a fully positive (0-5V / 0-10V / whatever) output range, because (among other things) you'll want to be able to cancel out any offset at 0V. in this case, a/the most common thing to do would be using a suitably biased inverting amplifier.

    for example, here's a fairly straight-forward teensy-based sort-of sequencer type thing: http://doboz.audio/tsnm3u/ ... note the bipolar supplies, 16-bit DAC, and inverting op-amp. in this case, the DAC outputs 2.5V max, the gain is ~3, and the bias voltage ~ 1.84V; the resulting range effectively will be 0-7V, namely -0.14V / +7.36V (V_out = - gain * V_dac + (gain+1) * V_bias), giving you enough head-room for offset-cancellation and calibration. also note there's a 1k resistor (R15) inside the feedback loop, a lot of things you'll find in the interwebs get this wrong and put a series resistor outside the feedback loop. (the same approach would work for the onboard DAC, of course, but it won't work quite as nicely)

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,452
    There are opamps which have "rail to rail" output, meaning the output voltage is able to go all the way down to zero volts (or whatever power you connect to the amp's negative power rail) and all the way up to the positive power.

    LMV358 is an inexpensive one I often use.

    Some also have rail to rail input, meaning they can take input voltage across the full voltage range. But you don't need that here, since the input is only up to 3.3V.

    If you need more than 5V, there are inexpensive DC-DC step-up converters. For example:

    https://www.amazon.com/eBoot-Convert.../dp/B06XWSV89D

    This sort of thing is much safer than trying to run Teensy near 6V, and it can make 10V or 12V if needed. But they do place quite a lot of load on the 5V line, so make sure you have a good USB cable and PC or powered hub capable of delivering plenty of 5V power.

  14. #14
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    Ah cool, this is a lot of good info, thanks.

    I do have an interest in actual synthesizer cv stuff, but my experience primarily comes from circuit-bending, and making any kind of weird noises. Basically I'm just focusing on not spending a whole lot, making something that works and sounds weird, and learning a little bit in the process. So in that sense, yeah, it probably wouldn't be a big deal if I don't get the full 5v range, but I might try that lmv358 booster anyway. I'll have to think through how I will have this thing configured.

    Thanks again.

  15. #15
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,452
    Definitely use that opamp and put a resistor between the opamp output and any wire you try randomly experimenting "circuit bending" other stuff.

    The Teensy 3.6 pins are *not* 5V tolerant. If you accidentally touch the DAC pin to something that's over ~3.8 volts, it could damage or destroy your Teensy 3.6.

    Those opamps have much more rugged outputs, especially when you have a resistor like 470 ohms to 1K in series. The opamps are also much less painful to replace than destroying a Teensy 3.6.

  16. #16
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    Paul, I'll take your warnings to heart.

    This extra teensy I have was a gift, but FWIW, I started initially using the teensy because I was making trigger sequencers for toys, and most toys run off of 2 batteries, with 3v logic levels. That plus all the analog pins make the teensy a good option for stuff like that.

Posting Permissions

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