Activating a relay: will switching the (+) line with a transistor cause damage?

I am making a temperature controller to control heating and cooling for two fridges using a singe arduino. I am using 4 digital pins to activate transistors, which in turn activate relays. I started this project about a year ago and only added the circuitry for a single relay, and at that time I had followed a guide to basically switch the ground wire going to the relay to activate it, so basically the relay has a constant positive voltage going to it and when the transistor is activated by the digital pin then that completes the circuit and activates the relay. This weekend I finally got around to adding the additional 3 relay circuits, and I decided that I wanted to switch the positive current going to the relay instead of the negative, with the reasoning that if by chance the relay accidentally got grounded, it could activate due to the positive voltage going to it at all times. So, I wired everything up accordingly, and everything works great, sort of. The only problem is, I am trying to send 12V to the relay to activate it, but on the relay circuits where I am using the transistor to switch the positive line, I am only getting ~4.5V. After some researching, it seems that the reason the original schematic was switching the negative line is because doing it the other way will result in a voltage no greater than what is being applied to the base. I just so happen to have 5V relays so the 12V/5V difference isn't a problem for me and I'd like to keep it the way it is so I don't have to redo any soldering, however my concern is, can this set up cause any damage to the arduino? I know the reason a transistor is used in the first place instead of having the digital pin trigger the relay directly is to avoid damage to the pin by pulling too much current, so before I use it as-is, I'm just hoping someone can confirm either way if this could damage the arduino in any way.

Thanks,
Chris

I think we need to see a schematic. If you have a proper current limiting resistor in series with the transistor base, you won't damage the Arduino.

Transistors are basically current-amplifying devices. The base-emitter voltage is around 0.5 to 0.7V when the transistor is switched on. It sounds like you've built a "emitter follower" circuit, where the emitter voltage "follows" the base voltage (ignoring the base-emitter voltage drop).

I am trying to send 12V to the relay to activate it...

... I just so happen to have 5V relays so the 12V/5V difference isn't a problem for me.

With regular (electromechanical) relays, you should NEVER run 12V into a 5V relay coil! Power increases with the square of the voltage, so with 12V you are dissipating more than 5 times the specified power in the relay coil. It's going to overheat and it might burn up!

can this set up cause any damage to the arduino?

No.

If you have a proper current limiting resistor in series with the transistor base,

With this setup you do not need a base resistor. The relay limits the base current to exactly what it needs to be.

However 4.3V is the maximum you will get across the relay.

Thanks DVDdoug,
First, to alleviate your concern, I have both 12V and 5V relays, and I have not connected a 5V relay to a 12V source (and I don't plan on doing so). Here's an example schematic that is basically what I did for the first relay: http://i.stack.imgur.com/VcJCl.gif. For the others, I simply moved (and flipped) the transistor to the other side of the relay so that it is switching the voltage going into the relay instead of switching the voltage coming out. This is the only change I made, and this has resulted in a voltage of ~4.5V going into the relay coil instead of 12V like the first relay circuit is doing. This seems really strange to me that it is behaving this way, but after a bit of research it is apparently normal. I just want to make sure that this won't damage my digital pins. It sounds like I won't since I have the 1K current limiting resistor on the pins... But then am I basically activating the relay using the current directly from the pin, or is it using the current from the 12V source but limiting the voltage?

Thanks,
Chris

Thanks Grumpy_Mike.

It sounds like I won't since I have the 1K current limiting resistor on the pins

Adding a series resistor will reduce the output voltage on the relay.

is it using the current from the 12V source but limiting the voltage?

Yes.
The excess power is being dissipated as heat in the transistor, so watch how hot it gets.

The excess power is being dissipated as heat in the transistor, so watch how hot it gets.

Interesting... Well in that case I'll probably just go ahead and re-wire it correctly so I get the full 12V through the transistor like I was hoping for in the first place. That way there's no risk of the transistor burning up on me.

Thanks for the help everyone!

OK remember to use 12V relays and not 5V ones then.

OK remember to use 12V relays and not 5V ones then.

Yep, will do. Thanks for the reminder.

There is a nice little tutorial about using transistors for high side and low side switching here:

PNP transistors may be best for high side switching.