What if you use your second (or indeed first, or indeed any of all the other devices) with a device made by someone thinking the same as you with a shared supply in some larger encompassing device? Call the person and ask if the one ground is the same as the other ground? i.e. Is signal ground the same level as power ground?
I can tell you, in "cheap" designs many do it the same way as you, but often use the full power input to divide. So you are going to compete. Violently, if their reference is 12V/2.
If you want to make a good design that's universally compatible, you make sure that the external grounds are all actually the same hardwired level. So if you output a +5V and a 0V only, that 0V should be the same as the 0V on all the audio plugs. That's a good design.
So in this set-up, what would have been better is to output your original 5VDC as a +/- 2.5VDC balanced around your 'weak' virtual ground in a three pin plug. Then suddenly you have a balanced power supply to your second box and you could even devise a system where if the middle pin is not lifted to half VCC, then you make it yourself if needed. Or for separate use make a second DC plug with a switch built in that activates the divider and disconnects the 5VDC lines (for safety).
The high-end or 'common rail' design thing if you have a DC input jack, is to use a voltage inverter to obtain your negative rail, +9VDC --> -8VDC ; +9VDC --> +5VDC ; -8VDC --> -5VDC (or 2.5V for each, but then, use 5VDC in, for efficiency). Or even better a fully isolated balanced DC. Unfortunately nobody else who makes $10 gadgets does this, so you can't even assume it.
Want to use a divided VCC as a virtual ground with an external DC adapter and stay safe and compatible to "shared power situations"? One of two options:
- You'll have to decouple and route the hard external ground through input and output or just force your own ground on the output again. It's not awesome, but it's what it is.
- Add the DCDC isolation on the DC input I discussed before. If your consumption is as low as 1W DC/DC with +5V and 0V out or +3.3V, 0V and -3.3V out is about $5. Using the balanced with two low-drop 2.5V regulators, one negative one positive, will even get you much better thermal stability on the ground and its relation to your supplies. Plus, it sources and sinks the maximum available current with no problems or aberrations. In fact, doing that same trick with your original DC input would have been possible by first dividing the 9V to virtual ground and then dropping the original power lines to +2.5V and -2.5V.
If you go down the rabbit hole of "Oh, I'll just assume it's only a 0.1V difference", in six months you'll be kicking yourself, because you have a 9VDC system with a 4.5V virtual ground, etc.
The LM324 has a maximum offset voltage of 9mV (worst case, over temperature), according to the datasheet.
With your circuit, with 0V in, you could have a current of 9mV/500m\$\Omega\$/9mV = 18mA below which your pot would not be able to set the current. So it's not a very good design if you need to set it to less than 18mA. It's luck of the draw- the next op-amp (even in the same package) could be 9mV in the opposite polarity, so you'd just move the pot.
Maximum temperature drift of the LM324 is not specified (it's not intended for precision applications, after all), but it might easily be +/-10uV/°C, so if the board changes by (say) 70°C as the MOSFET gets hot, the current will change by 0.7mV or 1.4mA, so you'd have to readjust the pot. Of course the highest power dissipation occurs at high output currents, so the change is relatively small (1.4mA out of 2A is < 0.1%). A 20°C change in ambient temperature means a change of perhaps (no guarantees) of 0.4mA, which is several percent of a 15mA current. If you only care about 5%, and currents above 20mA, probably just okay.
Another difference between a cheap amplifier and a good one is the gain. The LM324 can be as bad as 25,000 gain (and it changes with temperature). A precision op-amp will have a gain in the millions. The difference will show up in how well it compensates for load or line changes (not a big deal in this case).
The bias current of the LM324 can be as bad as 0.5uA (typical 20nA) and it changes with temperature so if you had a high resistance pot, you could see it change with temperature.
The noise of the LM324 is a fairly miserable 35nV/sqrt(Hz), and it has nasty crossover distortion, neither of which affects you much in this case.
A couple of things (other than being extremely cheap) that the LM324 has that a typical precision op-amp may not have- wide supply range (especially on the high end), though it may not do so well at very low supply voltages, and it's single supply (input common mode range includes the minus supply) which you absolutely require for your circuit.
So there are plenty of reasons to use a decent op-amp if it's required by the specifications. Or you can get clever with the circuit- increase the sense resistor to get good accuracy for low currents, but to get wide dynamic range, a good amplifier (and other techniques such as good resistors and good layout) may be worth it. For just hacking around and if your current range not huge (minimum to maximum), an LM324 is certainly acceptable. There's no point in using a $5 op-amp if a 1-cent one will do. On the other hand, there are some requirement for which the best ones are not good enough and one has to resort to discretes and other techniques.
By the way, your circuit may not be stable against oscillation. It can be fixed with some passive components, but loading op-amps with the equivalent of a large capacitance in series with a small resistance is inviting trouble.
Best Answer
The ADA4077-1 has a gain-bandwidth product of about 4MHz so, with a gain of 50, the bandwidth of the circuit will only be about 80 kHz - this is the first problem to solve - you need an amplifier (before the output driver) with a GBP of at least 50 MHz in order to keep your frequency response level up to 1 MHz.
I'd seriously consider looking at something with a GBP of 100 MHz minimum for this. What about the AD815: -
It looks like it can supply the current, can be paralleled, can produce 40Vp-p and has a GBP of 120 MHz. I'd also look at what LT have to offer.