I have my arduino feeding a digitalWrite(50, HIGH) to my transistors "Base" leg, and now i want that transistor to control a power supply for a relay, how would you guys wire that up ? . right now i collect the volt from the PSU and emit it to the relay, and on the other side of the relay i have a wire connected to ground on the arduino. it's making the relay do some clicky noises but it doesent have enough power to make it switch. my PSU goes from 0-30 volts, tried turning it all up, no change. if i wire it directly to the psu i can control the relay manually, but then my arduino cant control it. please haalp
This should help with how to wire it. Make sure to use a diode as show. Running a relay straight from your arduino is bad for it. The coil builds up high voltage spike that is put into our arduino. The sketch you need is a simple switch one.
i cant see what it says on the 2 components on teh far right. exept "R" rest of teh text goes outside the picture
and yea i already have a diode on it fried tons of transistors already because i missed the diode :b
You need a resistor on the base of the transistor to the arduino.
i have that, 400 some thing ohm, should be enough ?
i just noticed that this schematic is for small 5v relays, mines a 10v , and the arduino cant produce enough power to trigger the switch, so back to my original question, how do i wire the PSU correctly to the transistor or relay. ?
PSU to relay/diode. Then relay/diode to collector side of a NPN transistor. Emitter to ground. A resistor to the base from the arduino. Connect your grounds of the PSU and arduino. This assumes you have a NPN transistor.
i have a bc547 so yea, npn, and i just wired exactly like u said. still nothing happens.
ok i made it work, i forgot to wire the minus side of the psu to the arduino ground.