Using Transistors to Swap 2 leads

I need help on a circuit, it has to output +3 and -3 volts. I have a current regulates power supply that i adjusted to +3v. I realise I can get -3V by reversing the positive and negative leads.

This is what I am trying to accomplish:

I was hoping to use transistors instead of relays for this. So when pin 9 on the arduino is high, it outputs +3 and when pin 8 on the arduino is HIGH it outputs -3V. And when neither pin is high the power supply is not connected to the device.

I am not sure how to do this.

Just use relays.

or an H-bridge...

or, depending on the load, use a 3.3V Arduino and just use the output pins to source the "device".

Relay solution - transistors depend on coil resistance.

I was thinking of using 4 NPN transistors in an H Bridge. Using the Arduino to trigger the bases of diagonal pairs using HIGH signals. Does that make sense?

Yes, but transistors will have voltage drop across them, you will need to raise voltage. How much current is needed?

about 10ma, its a variable supply

I wired it up like the left image (NPN)

I tied the Base of Q1 and Q3, Q2 and Q4 and connected them through a 220ohm resistor to pins 8 and 9 respectively.

However the voltage output is a constant +0.5V and -0.5ishV even when i turn the variable supply to max (5v)

tied the Base of Q1 and Q3, Q2 and Q4 and connected them through a 220ohm resistor to pins 8 and 9 respectively.

That is where you are going wrong. Use a seprate resistor for each base, with it's own resistor. The circuit on the right is so much better.

What are the benefits of 2 pnps and 2npns vs 4 npn?

The voltage you get at the emitter of the top NPN is always going to be 0.7V less than the base drive voltage. This creates a bigger voltage drop. Also it is easier to arrange the base resistor values to prevent both transistors turning on at the same time.

Ah i got it, it was an error on my part, I had the current limiting too low on my power supply. Lowered the limiting resistor a bit and now its working perfect, thanks for the help.

@Crossroads When using multiple relays or switches to accomplish a polarity reversal, place mains power on the contacts and loads on the commons. This prevents hung relays or multiple relay activations from shorting the mains. Your circuit is a dead short if the Arduino does not have one relay picked up all the time.

Sorry, I am not following that. If no relays are closed, then 3V and GND are not connected to anything, and the device leads are both floating.

The names above the relays are just names, the NC pins are not connected to anything.

if both pairs are on at the same time the 3v buss shorts to ground.

Same happens with an H-bridge too - can't keep people from poor programming.

Just thing of the motor as your load in these diagrams. A better way with one relay is:-

Or if you want on off control as well then add another relay:-

No danger of anything shorting out.