I have made the following inverter circuit, but it is not giving the desired output. The issue is with grounding but i don't know how to do it properly.
When i try to power the circuit from arduino it works
Can someone guide me how to make this circuit work using an exernal power supply?
Are you really using a PP3 battery to power the project ?
If so then it almost certainly cannot supply the correct voltage at the required current for more than a few minutes. Have you measured the supply voltage under load ?
i will use a power supply to power it
I have made the following circuit but shouldn't it give 20v peek to peek as output?
Why should it?
I can’t see any inductors or capacitors, that simply looks like a h-bridge to me. What are you seeing as an output voltage?
Where did you get the circuit?
An inverter would normally drive a transformer with a turns ratio equal to the voltage ratio you want to achieve.
yes, it is an h bridge
the input voltage is 10 v. When top left and bottom right transistors are on it should give 10v on the output. When both top are off and both bottom are on it should give 0 v and when top right and bottom left are on it should give -10V. Isn't it?
the output voltage is 8.5V peak to peak
Nope. Every BJT is has VCE (sat) Collector-Emitter Saturation Voltage > 0V.
Where does the -10V come from?
Consider this which is when one alternate pair of transistors is ON.
The load has 0V on the left and +10V on the right.
Now consider those transistors OFF and the other alternate pair ON.
The load has +10V on the left and 0V on the right.
The load sees a 10V supply being swapped across its terminals.
So not 20Vp-p but 10Vp-p
Also what is this resistor for?
That resistor is possibly the only reason that circuit works in the simulation.
Yes because the top NPN transistors can be turned OFF and ON.
When you use a motor supply voltage more than the UNO signal voltage, the biasing on the top two NPN transistors will not allow then to turn ON and OFF as you want them too.
Google:
arduino transistor h-bridge
You will find NPN and PNP transistors being used for a start.
Can you tell us if there is a project you are working towards?
Tom...

as you explained this voltage should be 10 V, right?
but its not
No it should be 10V only if there is a zero C-E saturation, but as you have been told.
Now we have established you have not got an inverter circuit at all, I have changed the title of this post