I am trying to drive a 12vdc relay via one of the Arduino outputs.
I have the following circuit which works, but don't want to burn out the transistor..
the transistor is a standard 2n3904 npn. the circuit I took it from had 2 100k resistors in parallel for about 50k ohm total value connecting the trigger output to the base pin of the transistor... but that was just driving an LED from a 5v output. When hooked to the relay it barely drove it..
I reduced the resistor to 20k by putting two 10k resistors in series. It drives the relay fully. What is the best way to calculate what size resistor to use for the base pin?