Author Topic: Sanity check on my first project  (Read 5163 times)

0 Members and 1 Guest are viewing this topic.

Offline AmpereTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: us
Sanity check on my first project
« on: June 20, 2015, 01:51:09 am »
Hello, everyone. I'm a student and beginner electronics hobbyist. Over the last few weeks, I've been working on a design for a portable audio mixer which can be powered by 9V batteries. Attached is my schematic.

Am I on the right track? I've never worked on a large project like this, and I'm open to any suggestions, corrections, or potential improvements.

Any feedback is appreciated on either the circuit itself or my PCB layout, as well as any links to PCB production houses which are able to get me a prototype board within two weeks.

6/22/2015 Edit: New diagram uploaded.

6/23/2015 Edit: Another new diagram. Simplified the rails and made the whole thing (hopefully) much more readable.

7/6/2015 Edit: Small changes made to diagram. Finally finished the PCB layout. Sorry for the low image quality. I hit the upload size limit.
« Last Edit: July 06, 2015, 10:46:36 pm by Ampere »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9951
  • Country: nz
Re: Sanity check on my first project
« Reply #1 on: June 20, 2015, 02:12:38 am »
Getting +/- 6V rails  from 2x 9volts in series followed by a virtual ground seems a bit pointless.
Why not use the two 9Volts as is?


Also the lm317 recommends 3V between input and output.  2V (as you have it) may just work but it's likely to fall out of regulation as soon as the 9V falls much.
« Last Edit: June 20, 2015, 02:14:40 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline kizzap

  • Supporter
  • ****
  • Posts: 477
  • Country: au
Re: Sanity check on my first project
« Reply #2 on: June 20, 2015, 03:28:40 am »
Getting +/- 6V rails  from 2x 9volts in series followed by a virtual ground seems a bit pointless.
Why not use the two 9Volts as is?

The output amplifier has a maximum supply voltage of 6 Volts. It's inputs are only rated to VCC+ 0.3V. I suspect running the rails at ­±6V was some attempt to keep voltages under that threshold. Don't quote me on that though, because having the voltage go down to -6V would also apparantly blow the arse out of the IC too.

I can't honestly see /any/ reason to have a -ive rail on this design. AC couple the input, Bias it and deal with it like that.
<MatCat> The thing with aircraft is murphy loves to hang out with them
<Baljem> hey, you're the one who apparently pronounces FPGA 'fuhpugger'
 

Offline AmpereTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: us
Re: Sanity check on my first project
« Reply #3 on: June 22, 2015, 10:36:22 pm »
Getting +/- 6V rails  from 2x 9volts in series followed by a virtual ground seems a bit pointless.
Why not use the two 9Volts as is?

The output amplifier has a maximum supply voltage of 6 Volts. It's inputs are only rated to VCC+ 0.3V. I suspect running the rails at ­±6V was some attempt to keep voltages under that threshold. Don't quote me on that though, because having the voltage go down to -6V would also apparantly blow the arse out of the IC too.

I can't honestly see /any/ reason to have a -ive rail on this design. AC couple the input, Bias it and deal with it like that.

I guess my project failed the sanity check.

You're both right. I never thought to bias the signal and use as a single supply. But it's fixed now. While I was at it, I simplified the design by making it work off one 9V source (which, in practice will probably either be two 9V batteries in parallel or a set of AAs). 18V was probably a bit excessive for what I'm doing.

Here's my updated diagram. You meant something like this, right?
 

Offline kizzap

  • Supporter
  • ****
  • Posts: 477
  • Country: au
Re: Sanity check on my first project
« Reply #4 on: June 23, 2015, 12:28:34 pm »
Well, where do I start?

Point one: Why +5.5V? Generally people just use +5V, and there are /thousands/ of different regulators out there that can deal with what you will need. Which also answers:
Point two: Don't use a buffer like you have to generate that +5V. There are so many issues in doing it that way, it just pays to use a proper regulator.
Point Three: Your supply rails are all over the shop. +9V, +5V, +2.5V should be all you need. If you can't get a fixed value +2.5V regulator, use an LM317 or something. Don't use a resistor divider to do this.
Point Four: I'd suggest adding a power switch in there somewhere that will kill the circuit.
Point Five: I am struggling to read your schematic. From what I can see, it looks like all of those blocks are permanently wired in parallel with each other (Lin, Rin and Lout, Rout)
Point Six: I don't know the logic behind the design, but do you absolutely need separate High and Low pass filters? could you not simply use a bandpass filter?
Point Seven: I admit I have little knowledge on this sort of stuff.
Point Eight: I am not sure that you have correctly set up the AC coupling Biasing for the inputs...

TL;DR: read the points I made ;-)

<MatCat> The thing with aircraft is murphy loves to hang out with them
<Baljem> hey, you're the one who apparently pronounces FPGA 'fuhpugger'
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: au
    • Halestrom
Re: Sanity check on my first project
« Reply #5 on: June 23, 2015, 01:26:53 pm »
Power supply
A 9V battery probably isn't the best option.  The standby current of all of your op-amps alone is probably enough to drain one in an annoyingly short period of time, but I could be incorrect.  Also be very wary that the voltage from the battery will sag quite a bit over the lifetime of the battery and especially under load.

DC offset rails
I'd say the 2M resistors for the dividers are much too large.  Although you are only using these as a reference voltage into op-amps, op-amp inputs do not have infinite resistance and will likely affect this divider.  If you can't find any details on the input impedance of your op-amps then just try it out in real life, but be wary that your multi-meter may only have an input impedance of a meg itself.

5.5V rail
Be ware that this (and the 2.75 daughter rail) will drop as your battery flattens.  This may not be what you're after -- consider an actual voltage regulator (or a voltage reference, but the reg will be easier) instead if so.

Rather than paralleling lots of a resistors to get your 12.75K you could instead use a 10K, a 20K and a 5K trimpot between them.  Again keep in mind that your 9V battery goes above and below that 9V, rendering the exact value you'll get over runtime different anyway. 

Misc part variety reduction
You can make DC buffers with op-amps.  Test it with your op-amps/read the datasheets just in-case they're special and don't like low frequency (ie DC).

Do the filters really need that many op-amps?  It might be worth making the filters on some separate boards so that you can swap in/out different designs once its all working.

Balanced amplifiers can be made using ordinary op-amps (more complicated).  If you are not going to use this for long mic/line cable runs then treating the bal signals as unbal is also an option.  Don't tell anyone I said that :)

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: au
    • Halestrom
Re: Sanity check on my first project
« Reply #6 on: June 23, 2015, 01:36:13 pm »
This is quite a first project.  Don't be disheartened by failure -- plan and expect it to happen everywhere ;)  Keep your parts modular so that it's easier to track down where problems are.


Quote
Does a switch used for DC applications need to be rated for DC? The switches in my cart, for example, are rated at 125Vac/10A, but can I use them for 6Vdc/~20mA?
If you were using DC currents within a magnitude of the 10A then it might be worth considering, but at this project's levels it will be a non-issue.

Quote
Is there a better place to buy things like switches, pots, jacks, and project boxes? It seems like these things make up most of the cost of my project.
What places are you currently looking at?  For generic parts eBay is often a cheaper source than major online retailers , but beware its possible cons too (esp shipping time).   

Can you steal most of these large parts out of other electronics?  Especially for the switches and the box this is the way to go.

Quote
The LM317/337 recommend tantalum capacitors. Would electrolytic capacitors work or are there factors that make them non-ideal in this case? Most sources seem to advise against tantalum for general use.
Don't even bother with tantalums.  Electrolytics will be more than fine -- the worst you would have to do is add some ceramic capacitors in parallel (and at audio frequencies you probably won't even have reason to do this).
« Last Edit: June 23, 2015, 01:38:05 pm by Whales »
 

Offline AmpereTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: us
Re: Sanity check on my first project
« Reply #7 on: June 23, 2015, 07:50:48 pm »
Well, where do I start?

Point one: Why +5.5V? Generally people just use +5V, and there are /thousands/ of different regulators out there that can deal with what you will need. Which also answers:
Point two: Don't use a buffer like you have to generate that +5V. There are so many issues in doing it that way, it just pays to use a proper regulator.
Point Three: Your supply rails are all over the shop. +9V, +5V, +2.5V should be all you need. If you can't get a fixed value +2.5V regulator, use an LM317 or something. Don't use a resistor divider to do this.
Point Four: I'd suggest adding a power switch in there somewhere that will kill the circuit.
Point Five: I am struggling to read your schematic. From what I can see, it looks like all of those blocks are permanently wired in parallel with each other (Lin, Rin and Lout, Rout)
Point Six: I don't know the logic behind the design, but do you absolutely need separate High and Low pass filters? could you not simply use a bandpass filter?
Point Seven: I admit I have little knowledge on this sort of stuff.
Point Eight: I am not sure that you have correctly set up the AC coupling Biasing for the inputs...

TL;DR: read the points I made ;-)

I was trying to keep the levels as high as possible without exceeding the limit of the headphone driver, even going to far as including an op-amp to step down the gain for the headphone output, but I've changed my supply rails to only +9V, +5V, and +2.5V. +5V and +2.5V are regulated. You're right. It's much simpler now.

There is a switch, although I didn't label it well enough. Sorry for the messy schematic. L and R are the left and right audio channels which I wanted to keep separate for the possibility of stereo recording.

The idea behind the separate high pass and low pass filters was that I wanted the ability to turn them off if necessary.

Power supply
A 9V battery probably isn't the best option.  The standby current of all of your op-amps alone is probably enough to drain one in an annoyingly short period of time, but I could be incorrect.  Also be very wary that the voltage from the battery will sag quite a bit over the lifetime of the battery and especially under load.

The LM833s are rated at 10mA max each, and I have 10 of them. INA217s are also rated at 10mA, and I have 4 of those. The NCP2809 apparently requires a maximum of 250mA, but that that seems to be worst case scenario and based on very low impedance headphones. The boost converter also needs to output an absolute max of 40mA at +48V.

But that's assuming everything is turned on, and I'm only running the op-amps at a small fraction of their total voltage swing. All of the channels also have switches that can be used to turn off their op-amp when not in use, and the filters both have the same.

Even so, I wouldn't want the 9V to go dead in under an hour in worst case conditions. Should I go with 6 AA batteries in series instead? It looks like AAs have nearly 5x the capacity of 9V. Should I include an optional external power adapter jack? Is it safe to parallel the AC-DC adapter's output with the battery or should I have some sort of selector switch to choose between them?

Quote
DC offset rails
I'd say the 2M resistors for the dividers are much too large.  Although you are only using these as a reference voltage into op-amps, op-amp inputs do not have infinite resistance and will likely affect this divider.  If you can't find any details on the input impedance of your op-amps then just try it out in real life, but be wary that your multi-meter may only have an input impedance of a meg itself.

5.5V rail
Be ware that this (and the 2.75 daughter rail) will drop as your battery flattens.  This may not be what you're after -- consider an actual voltage regulator (or a voltage reference, but the reg will be easier) instead if so.

Rather than paralleling lots of a resistors to get your 12.75K you could instead use a 10K, a 20K and a 5K trimpot between them.  Again keep in mind that your 9V battery goes above and below that 9V, rendering the exact value you'll get over runtime different anyway.

I've removed these problems by using real voltage regulators as kizzap suggested. But the idea was that the 2.75V rail would always be at half the voltage of the 5.5V, even as the latter sagged. But I see now that it's better to just regulate the whole thing with dedicated ICs.

Quote
Misc part variety reduction
Do the filters really need that many op-amps?  It might be worth making the filters on some separate boards so that you can swap in/out different designs once its all working.

Putting the filters on a second board is a good idea, but it would probably increase the physical size of the project. This is meant to be a super portable mixer that's small enough to stuff into a large camera bag.

Quote
Balanced amplifiers can be made using ordinary op-amps (more complicated).  If you are not going to use this for long mic/line cable runs then treating the bal signals as unbal is also an option.  Don't tell anyone I said that :)

It may very well be used for longer runs at some point. I wouldn't want to lose the noise rejection aspect of the balanced signal. I'll look into making a balanced amplifier out of normal op-amps, but it looks like such a design will only work with three of them. My current balanced op-amps draw max 10mA and my others draw 10mA (but two per chip) so I'd be looking at a 50% increase in max current draw unless it's not that simple.

This is quite a first project.  Don't be disheartened by failure -- plan and expect it to happen everywhere ;)  Keep your parts modular so that it's easier to track down where problems are.

I don't really expect it to work (perfectly) the first time. I will probably go through a few prototypes before settling on a design that really works.

But I'll buy a big roll of solder wick. So it'll be OK.

Quote
Quote
Is there a better place to buy things like switches, pots, jacks, and project boxes? It seems like these things make up most of the cost of my project.
What places are you currently looking at?  For generic parts eBay is often a cheaper source than major online retailers , but beware its possible cons too (esp shipping time).   

Can you steal most of these large parts out of other electronics?  Especially for the switches and the box this is the way to go.

I've been looking for my parts on Digikey because it looks like it has almost everything that I need. I wish I had enough spare stuff to steal from other electronics, but there are so many pots in this project that I can't find enough identical ones elsewhere.

Thank you both for all the advice.

Attached is the latest (much more readable, hopefully) version of my diagram. I never thought that it would be getting simpler over time, but I guess I underestimated my ability to add in superfluous components.  :-DD
« Last Edit: June 23, 2015, 07:54:12 pm by Ampere »
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: au
    • Halestrom
Re: Sanity check on my first project
« Reply #8 on: June 24, 2015, 01:30:04 am »
Quote
I've changed my supply rails to only +9V, +5V, and +2.5V. +5V and +2.5V are regulated
Making the 2.5V reference with a divider is still perfectly OK, but you would need to use something like a pair of 10K resistors.  That way they should be a couple of magnitudes smaller than the op-amp inputs so that the op-amps don't affect this reference.

Quote
Even so, I wouldn't want the 9V to go dead in under an hour in worst case conditions. Should I go with 6 AA batteries in series instead? It looks like AAs have nearly 5x the capacity of 9V.
Definitely, if space is not an issue!  AA's are also many times cheaper per joule than 9V's.

Quote
Should I include an optional external power adapter jack? Is it safe to parallel the AC-DC adapter's output with the battery or should I have some sort of selector switch to choose between them?
I'd recommend adding one even if it's just a PCB footprint that you don't populate until later.  A couple of pads to solder a couple of small nails onto is also useful if you are going to use alligator leads for power during testing. 

You would definitely have to isolate them otherwise the DC adapter could try and charge your battery.  Considering the low current draw a couple of diodes would be fine.  The voltage drop across them would mostly be OK as most of the circuit power is drawn through the 5V reg anyway, which wastes the other ~4 volts.

Quote
The LM833s are rated at 10mA max each, and I have 10 of them. INA217s are also rated at 10mA, and I have 4 of those. The NCP2809 apparently requires a maximum of 250mA, but that that seems to be worst case scenario and based on very low impedance headphones. The boost converter also needs to output an absolute max of 40mA at +48V.

Be wary that 40mA at 48V is 213 mA at 9V, assuming perfect booster efficiency.  The best thing you can do is test and find out, but a conservative estimate of 100mA average draw "should" give you a while on a 500mAh (averagish) 9V.  Also be wary how low your circuit can use the battery to.

Quote
But I'll buy a big roll of solder wick. So it'll be OK.
:-+  Haha.  It won't all be that easy, however.  You'll inevitably be head-banging because of problems.

Quote
I've been looking for my parts on Digikey because it looks like it has almost everything that I need. I wish I had enough spare stuff to steal from other electronics, but there are so many pots in this project that I can't find enough identical ones elsewhere.
Also check competitors element14 , mouser and other online retailers that other people here can point you to.  I'm not what it's like in the US but in Australia you need a $150 order from digikey before shipping is free.

Also: ebay has cheap log pots.  You don't need them to be 1M to do what you want and 10K/100K ones are much more popular AFAIK.


I don't see any bypass caps other than < 1 nF on the 9V rail.  You will want something from a few uF to a few hundred uF on each side of the regulators.  Generally it's advised to put some at the regulator and a few uF next to every op-amp, but you can can probably get away without this and put it all next to the regulators if it's a problem in the layout.
« Last Edit: June 24, 2015, 01:35:47 am by Whales »
 

Offline AmpereTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: us
Re: Sanity check on my first project
« Reply #9 on: July 06, 2015, 11:13:17 pm »
I don't see any bypass caps other than < 1 nF on the 9V rail.  You will want something from a few uF to a few hundred uF on each side of the regulators.  Generally it's advised to put some at the regulator and a few uF next to every op-amp, but you can can probably get away without this and put it all next to the regulators if it's a problem in the layout.

Thank you again for all of the advice. I've added two 47uF bypass caps to the input of both regulators and two to the outputs. The +2.5V and +5.0V rails also have small 10uF caps at every op-amp. I've also added a space for a power connector (connected via diodes, although I could just short that space if I don't actually put the power supply connector in) and pads connected to every rail for testing.

The 1M pots are still in the design for now, but those are easy to switch out, so I may change them to 100k as you suggested when I start getting my part list together. It also occurred to me that the 10uF caps I was using to couple the different stages might be a bit too low so they're all 68uF now.

I've added my latest diagram and my PCB layout to the first post of this thread. Could you tell me what you think? Doing PCB layouts is uncharted territory for me.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf