Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 26 to 50 of 69

Thread: XLR Input on Audio Shield

  1. #26
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    Nevin,

    1. The mic pre on the SGTL 5000 is MONO. It will have significantly worse noise and distortion performance than the THAT chip and it is VERY BAD practice to have a preamp and then reduce it to mic level again and re-amplify. You basically multiply the noise and distortion of the two preamp stages (ours, and the one in the SGTL) together.

    2. The THAT chip has an absolute max supply of +/- 20v so running it from the 48V supply won't work. While creating a virtual ground works OK in some circumstances, it is an additional source of design issues for a mic preamp. Routing from pin 1 on the XLR to the virtual earth becomes critical, as does making it very low impedance to ground and dampening supply noise. I can't see anywhere in the data that says +/- 5V will produce poor results (but also haven't tried +/-5v with this chip) - but happy to be directed to where it does! I will substitute the -5V converter for a +/- 12V one. No big deal, and likely a much better result.

    I'm also being careful not to run out of 5V USB supply - the switching supplies, have a no-load current and <100% efficiency (generally a design factor of 70 - 80% at light loads, is appropriate). We can rely on a total of 500mA, and 1000mA from some ports. Let's say 100mA for the Teensy, leaves us 400mA for our preamp, the Audio Board and any other draws on the supply. I'd be keen to keep our static draw < 100mA, and dynamic < 150. BTW, each phantom leg sources around 5 mA. So two preamps = x4 = 20mA.

    What's your thoughts on likely USB loadings?

    On other design matters:

    1. There is little need for an additional volume control on the THAT chip, and we will simply confuse users by having two gain controls for each channel. Mic outputs are 5 - 15mV RMS, with a gain of 50 that puts us in 250-750 mV RMS or ~1.5v p-p. The THAT chip will handle that OK with +/5V supplies, even more so on +/-12V. The volume control on the LM833 amplifier can reduce those, if needed, to appropriate levels. It's the mic preamp that is critical for noise performance - we're at instrument/line level after it. LM833s have a long history of working well in demanding line-level audio applications (5534's are the other chip that is often used, but they have a much lower p-p swing and about the same noise performance at line levels.)

    2. Why would we go for a GP opamp (Joemeek) in a mic preamp????? You selected the expensive THAT chip as it's the best available, specially optimised, microphone preamp chip around and rejected the cheap TS472 module as being below spec. Happy to go down the low cost/low spec path if you want to save $$$. the LM33078/OPA2604... simply do not have the noise performance required. 3.5 - 4.5 nV/root(Hz) is a good noise target.

    3. I'm keen to mount the switching regulator modules under the PCB - both to reduce the space they take up and to have a solid ground plane between them and the audio signals. Does this pose any mounting difficulties for you. The stand-offs needed would be about 1/2".

    4. BTW, I'm rethinking the capacitance multiplier idea - I re-read an old Analog Devices paper on the idea and they reduced phantom supply hash from 80mV p-p to around 4mV. I'll see how the module performs when it arrives, and make allowance for cap multiplication if the noise is more than the existing filtering and preamp's CMRR can handle with ease.

    5. We still haven't landed on a setting for the critical price-performance tradeoffs. Do you have a maximum, all-up, price ceiling for parts?

  2. #27
    Okay, great to know about the SGTL's mic pre. I think you may be thinking of @mhelin who suggested running the THAT chip from phantom power.

    For USB power, I think going off of USB 2.0 spec. sounds like a good idea. As USB 2.0 is pretty ubiquitous (I believe) and the max current draw on it is 5 unit loads (500 ma) which would leave us the 400 ma, as you said. The numbers you proposed for static and dynamic draw sound great, if we are able to stick around them. 250 ma should be enough to allow for people to use other peripherals they would like off USB after adding XLR/instrument input and phantom power support.

    In regards to your questions:

    1. I'm totally in agreement with you here. Simpler is better in my eyes. I like the idea of just having one input gain pot. I'd probably prefer it controlling both the instrument/XLR input gain. I'll leave it to your expertise on what that knob is controlling.

    2. I think the THAT chip is worth the extra money and the route we should go. Again, you better than me which amp to use.

    3. That sounds great to me.

    4. Awesome, can't wait to see what the results are!

    5. I believe the price range you suggested was a good one. Maybe a little higher ($30-35 for components?)

    Also one final question, if you may have missed this:
    Quote Originally Posted by Nebula525 View Post
    Would using one side of the line input per a combo jack lose stereo compatibility of signal going into the jack? For example, if I am using a guitar pedal that produces stereo effects such as a phaser. Would this signal be collapsed down to one channel into the SGTL5000 by using one side of the input?
    Much appreciated!

  3. #28
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    Oops! Sorry Nevin,

    I didn't look closely enough at the author, as this thread has just been us until now.

    Mhelin's comments were useful in challenging the design. I should have used +/- 12V supplies, particularly as the module is very little more expensive than the single supply -5 module.

    Re:
    Would using one side of the line input per a combo jack lose stereo compatibility of signal going into the jack? For example, if I am using a guitar pedal that produces stereo effects such as a phaser. Would this signal be collapsed down to one channel into the SGTL5000 by using one side of the input?
    Yes, to retain stereo outputs, you need to send each of the phaser pedals channels to separate inputs. The current design will allow that (both channels as instrument inputs), you'd just have to record the mic channel in a separate run.

    Here's today's iteration of the schematic. Mostly the +/-12v supply changes and a few more filter caps: now one on each rail at each IC.

    Click image for larger version. 

Name:	that1512 preamp v2.jpg 
Views:	25 
Size:	130.9 KB 
ID:	19987

  4. #29
    No problem at all! Itís looking great.

    One aesthetic related thing I was looking at was push buttons that internally illuminated but I couldnít find any and didnít know if they would complicate the design more than necessary. Anyway just a cool idea.

    Let me know if there is anything I can do to help. Very excited about this project 😁

  5. #30
    Quote Originally Posted by palmerr View Post
    Nevin,

    On other design matters:

    1. There is little need for an additional volume control on the THAT chip, and we will simply confuse users by having two gain controls for each channel. Mic outputs are 5 - 15mV RMS, with a gain of 50 that puts us in 250-750 mV RMS or ~1.5v p-p. The THAT chip will handle that OK with +/5V supplies, even more so on +/-12V. The volume control on the LM833 amplifier can reduce those, if needed, to appropriate levels. It's the mic preamp that is critical for noise performance - we're at instrument/line level after it. LM833s have a long history of working well in demanding line-level audio applications (5534's are the other chip that is often used, but they have a much lower p-p swing and about the same noise performance at line levels.)
    Capacitor and even dynamic mics can put out easily over 1V p-p, even more in front of lets say 100W guitar amp or drum set. With the gain of 50 that means 50V p-p output level. Output level depends on mic sensitivity. See http://www.sengpielaudio.com/calcula...sferfactor.htm for table 1. Zero (0) dBu level for an example is 0.775V.

    2. Why would we go for a GP opamp (Joemeek) in a mic preamp????? You selected the expensive THAT chip as it's the best available, specially optimised, microphone preamp chip around and rejected the cheap TS472 module as being below spec. Happy to go down the low cost/low spec path if you want to save $$$. the LM33078/OPA2604... simply do not have the noise performance required. 3.5 - 4.5 nV/root(Hz) is a good noise target.
    33078 has a 4.5 nV/root(Hz) noise spec, 2604 little bit more. On the other hand the current mode pre with adjustable gain works great considering it uses GP opamps instead vs the module designed for electret capsules in PDA devices. The ts470 module is nice module for some use like for measuring mics, though a discrete circuit performs still better there. The chip is tiny to solder.

    One another thing, the jack input impedance, is it high enough for instruments like an electric guitar (1M required)?
    Last edited by mhelin; 05-05-2020 at 07:20 PM.

  6. #31
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    @Mhelin

    Good points:

    I usually design mic preamps for a transfer factor of around 20 mv/Pa, which, using the useful table you have referenced, is 4dBu (or -56dBm) @130dB SPL. (Which, IMHO, is as high as any audio engineer should be allowing near their microphones, even for a short period!!!)

    Into 600 ohms that becomes 1.2mV RMS

    With Av = 50 that takes us to 60 mV RMS, or 170 mV P-P

    Given that we are now using THAT1512s with +/- 12v supplies, rather than the TS472 (thanks to a previous suggestion of yours), we have ~20v p-p max output swing - a safety factor of around 100 (40 dB).

    Please check my thinking and calculations here!

    A good point on the electric guitar input impedance. My first thought was to multiply all the values around the LM833 by 10 (470k pot...). I'll have a think about the impact on noise performance before executing it!

    While I take your point about current mode pre's being an interesting and useful idea, I'd rather use a manufacturer's published design here, notwithstanding how good (or not) one published by another source might be. I'd need to spend days proving such a design on the breadboard, before using it. That's $100's of my time invested for a few $$ possibly saved per board. That investment would pay off handsomely, however, if we were doing a 10,000 unit run.

  7. #32
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    I don't know of any small illuminated push button switches that are not momentary contact.

    I'm sure they're available. One trick that you can use is to make a sleeve to go around the pushbutton out of something transparent, and let the LED illuminate that. Have a look at the Focusrite Scarlett range - they use tricolor LEDS to great advantage. We could too, at the cost of one more GPIO per channel!

  8. #33
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    Here's a draft PCB layout. This version doesn't have tricolor Overload LEDs, as you haven't had a chance to confirm that item yet.

    The two power supplies are mounted underneath, as indicated by the red rectangles.

    Click image for larger version. 

Name:	preamp v2 bg.jpg 
Views:	12 
Size:	149.9 KB 
ID:	19999

    The main thing that's not really sorted is the (currently) 8 pin header to connect to the Teensy / Audio Board.

    Up to you about how this is arranged.

    It could be a two-row header so that the pins for the Line In match Paul's board:

    Click image for larger version. 

Name:	teensy4_audio_back.jpg 
Views:	3 
Size:	58.5 KB 
ID:	19997

    GPIOs and power would need to be sorted separately.

    The other option is to make this board stack under or over the teensy and audio board! Some rearranging would be required, but it would be feasible.

    Or, for flexibility, I could provide both the stacking and header options.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	preamp v2 bg.jpg 
Views:	3 
Size:	149.9 KB 
ID:	19998  

  9. #34
    Hi Richard 👋

    Looking pretty damn good 😱 I think we should leave out the tricolor LED. I feel as if it would be hard for people to manufacture enclosures correctly implementing the function even though it would look pretty sweet. I think a normal red LED will suffice here for the sake of simplicity, let me know if you think otherwise.

    Being able to stack the board sounds pretty awesome. I personally would have to use the two row header option, as I have limited project enclosure space and I donít think I will be able to accompany stacking inside my design.

    Perhaps providing both to the community might be a good idea so people may have flexibility in space requirements/positioning of the boards.

    Nevin

  10. #35
    I just found these really cool potentiometers. They have a clear shaft which can light up and models PEL12D & PEL12T have a built in push switch.

    Theyíre expensive at about $4 each from mouser and are momentary. Plus you have to add a filter circuit to run them. I donít have experience with them so I canít speak to the quality as well.

    An example configuration of them could be: push to toggle phantom power + LED and illuminate the pot red when clipping. This cuts out the cost of the switch and an LED but would also add the cost of a flip flop IC probably.

    Another proposed use case to get rid of all external LEDs and push buttons: When the pot is pushed, toggle on/off phantom power and light up red consistently if on. If clipping at any point, light the color blue or any other color. You could also use this as an indicator of how much to turn the knob- if using phantom power turn the knob down until the color becomes red again and then some for better dynamic range. It also has that nice rotary encoder clicky knob feel which I personally like in interfaces. This is also a downfall- that it is an encoder with infinite turning.

    Anyway, I donít know about this one as your design is based on a maintained switch and this part would introduce a lot of things that would need to be fixed. I donít necessarily think we should include it but just wanted to throw it out there and show you a cool part I found in case you find it interesting.

    http://www.potentiometers.com/PEL12.cfm?link=EN

    Video: https://youtu.be/0r2rL6gpETA

    Cheers!
    Last edited by Nebula525; 05-06-2020 at 08:53 AM.

  11. #36
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    Nevin,

    These are rotary encoders, rather than pots - so no use for analog volume controls, unless we change the design to include digital pots as well. Second issue is that rotary encoders have no reference point, so we'd need to add a display, and so on. Also, we need right angle mountings. Really cool though!

    Using a momentary PB would mean that we would need a latch as you suggest. We could use miniature relays to control the phantom power, or an Open collector latch and a PNP transistor. The LED would need additional driver components as it's very wasteful to run it from the 48v supply.

    With LEDs - I'd keep the phantom LED and the overload LED completely separate. Some input devices really don't like phantom switched on - so a clear indication is required.

    Another thought about the overload leds. We could use WS2812B single control line RGB LEDs - both channels could then be run from a single GPIO, with pretty colours!

  12. #37
    Okay, yeah I thought it would introduce a lot of design problems. Scratch that! The WS2812B sounds like a cool idea. In my opinion, if the WS2812B is being used to save one GPIO the cost might outweigh the benefit for me. I'm perfectly happy with using a single color indicator LED and don't mind using one of the many GPIOs. That could be a cool feature though so if you do implement it, I would throw it into my board build.

    Hope all is well!

  13. #38
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    I'm thinking of using the WS2812 idea on the 8 channel board, as it saves 7 GPIOs.

    Your call about including it on this one, it's a simple change - 5v is nearby and the control signal simply daisy chains from one to the other, and a couple of load resistors disappear.

    If you're not going to stack this board, let's not go to the trouble of adding the extra headers - it will make the board bigger. If there's a demand, I can quickly re-work the board - or someone else can, as I'll put the eagle files up on Github when we're done.

  14. #39
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    I'm thinking of using the WS2812 idea on the 8 channel board, as it saves 7 GPIOs.

    Your call about including it on this one, it's a simple change - 5v is nearby and the control signal simply daisy chains from one to the other, and a couple of load resistors disappear.

    If you're not going to stack this board, let's not go to the trouble of adding the extra headers - it will make the board bigger. If there's a demand, I can quickly re-work the board - or someone else can, as I'll put the eagle files up on Github when we're done.

    BTW, which country are you based in - when we get to manufacture, finding a good PCB house nearby, particularly one that has design sharing will be needed (if you don't already have one)

  15. #40
    I agree, letís not add the extra headers.

    I actually like the idea of using traditional LEDs simply for their shape. For me, it means I can make a small hole in my enclosure and stick the head of the LED through and maybe apply a little hot glue on the backside. This is a super simple quick way to indicate to the user we are clipping and it wouldnít require much more engineering to build the indicator housing.

    I do have to get some WS2182s for my project anyway, so I can go either way on this. I think sticking with the classic LED might be the way to go though here as I also canít really think of a use case for lighting them up any more than a single color. Let me know your thoughts on this.

    Iím based out of the US by the way, for finding a PCB house.

  16. #41
    Quote Originally Posted by palmerr View Post
    @Mhelin

    Good points:

    I usually design mic preamps for a transfer factor of around 20 mv/Pa, which, using the useful table you have referenced, is 4dBu (or -56dBm) @130dB SPL. (Which, IMHO, is as high as any audio engineer should be allowing near their microphones, even for a short period!!!)

    Into 600 ohms that becomes 1.2mV RMS

    With Av = 50 that takes us to 60 mV RMS, or 170 mV P-P

    Given that we are now using THAT1512s with +/- 12v supplies, rather than the TS472 (thanks to a previous suggestion of yours), we have ~20v p-p max output swing - a safety factor of around 100 (40 dB).

    Please check my thinking and calculations here!
    The table gives you the maximum output level which for said 20 mv/Pa sensitive microphone will be +4 dBu @130 dB.

    Please use the dB level to voltage conversion calculator here:

    http://www.sengpielaudio.com/calculator-db-volt.htm

    +4 dBu converts to 1.227652988 volts (V) RMS, 3.47232701 volts P-P

    Multiply that 3.47 volts by 50, that gives you 173.5 volts P-P. Not 170 mV.

  17. #42
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    Nevin,

    I'm thinking of using the WS2812 idea on the 8 channel board, as it saves 7 GPIOs. Going with normal LEDS on this project makes good sense, as one GPIO (particularly on a T4.1) is not a good trade-off for the extra code complexity.

    @Mhelin

    +4 dBu converts to 1.227652988 volts (V) RMS, 3.47232701 volts P-P
    I believe you've mixed up your milli-watts with your micro-watts.

    +4dbm converts to 1.23 V RMS.

    +4dBu converts to 1/sqrt(1000) of 1.23 V ~39mV.

    38mV x Av (50) = 1.9v RMS

  18. #43
    Quote Originally Posted by palmerr View Post
    I believe you've mixed up your milli-watts with your micro-watts.
    Nope. We are not handling power here but just bare voltages, thus the unit is dBu which is exactly 0.775V, and that's what the "Table 1. Maximum output level of microphone (dBu)" referenced earlier uses as the output voltage level measurement unit. Those levels are quite high though, but microphones can easily have a maximum output voltage over 1V even before they will distort badly.

    Once again, the u in dBu doesn't mean "micro" but it means "unloaded". Forget all power calculations, but never forget to put a gain adjustment potentiometer or multi switch into mic preamp. Yes, normal conversation level is like 70 dB and the mic sensitivity level is compared 94 dB to 1V output so you will normally need some gain but there are cases when not so much.

  19. #44
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    I eat my words! (and will re-think the front end of the design to avoid potential front-end overload).

    Thanks for being persistent in correcting my rookie error - one of the side effects of not touching a discipline for 20 years, is that some of the basics get lost.

    We're trying to keep things as simple as possible, so I'm not keen on adding any more switches or pots. Maybe a dual-ganged pot controlling both gains.

    More thinking required.
    Last edited by palmerr; 05-08-2020 at 12:54 AM.

  20. #45
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    Nevin,

    We could achieve the desired result with a switch / pot - Bourns PTM90 series, for instance. The switch would provide 20dB less gain on the mic circuit These are 9mm wide, so no difference to board dimensions, the switch is SPDT, so hard to add a (another!) LED indicator, without a relay to create a second switch, as RG on the THAT chip needs to float at both ends.

    There's an Alpha DPDT version RV16BF, but it's 16mm pot, which will add another 3/4" to the board width.

    Both are on Mouser's in stock list, and are about $8AUD each.

    Your call.

  21. #46
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    BTW, with the multi-coloured LEDs, Focusrite uses them for general gain adjustment:

    - off = very low signal
    - green = signal > -24dB(FS) - i.e. level is OK if this is coming on with the signal
    - red = clipping

  22. #47
    I think we should go the DPDT route if it will allow us to have two phantom separate phantom power switches. In my opinion, the space trade off here is worth it- if I am understanding that correctly.

    Oh wow the multicolored LEDs may be a great option to add then. Perhaps a simple RGB LED may be a good way to go while keeping cost down?

  23. #48
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    We already have separate phantom power for each channel, with switches S1 & S2.

    The discussion @Mhelin and I have been having is about overload on the microphone preamps with very loud inputs (such as close-miked guitar amps).

    The sound pressure can be up to 130 dB SPL in these cases, producing inputs of +4dBu (3.5 Vp-p) from a normal sensitivity mic. Multiplying that by desired the gain factor of the preamp, say Av = 50 produces a whopping 175V - well into clipping.

    The normal solution to this is to have a way to reduce the microphone preamp's gain - either by a pad in front of the preamp, or by having variable gain. 20dB is the usual variation provided.

    A resistor of around 1k in series with 47 ohms for RG (between pins 1 & 8) on the THAT chips would provide a gain range of 15-40dB.

    This could either be switched in/out on the THAT chip, or implemented as a dual-gang pot with the (reconfigured) gain control on the LM833s. When the pot is turned both gains would go up and down together.

    Given the extra cost and complexity of the switched version, I'm inclined to try the dual ganged pot idea - which needs no extra switches or LEDs.

    I'll rough it out tomorrow, and see if it is practical.

  24. #49
    Ah, completely misunderstood as I thought. The dual ganged pot sounds promising. Best of luck, let s know how it goes!

  25. #50
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    Yes, I got a fairly good outcome with a dual ganged A taper pot. The Bourns PTD90 series pots are the same width as the original, so no change needed to the board outline.

    Here's the curves from the simulation:

    Click image for larger version. 

Name:	preamp gain.jpg 
Views:	2 
Size:	29.6 KB 
ID:	20043

    The gain curve is a bit steeper than the A taper, but should be OK. I'll try it out with an INA128 instrumentation amp that I have in hand, which has gain controlled by a similar Rg arrangement, in the next few days to confirm that the model holds in real life.

    Technically:

    THAT 1512 gain range: 14 - 41dB so plenty of headroom even at high volumes. Add 0-20dB on the follower stage, to provide a total mic gain of 34 - 61dB.

    Follower amp - now a TL072 to improve the instrument input impedance (as per mhelin's advice to make it at least 1Mohm). Gain: 0dB - 20dB for instruments.

Posting Permissions

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