Thank you for your help! I appreciate it.
I'll look into about voltage regulators and capacitors.
The resistor on base is for current limiting, thank you. I forgat about that 
My Coil doesent make a spark if i only tourn it on and then off. Its from an old car 
It would be great if i could control the length of spark time (how long the spark is active). That means it has to be switched for longer period of time (max 1second) at some frequency (8khz?). Is this posible with Arduino? Can this switching be done with PWM? And how?
I hope this isnt to much of a project for me hh, i usually don't give up on any project 
There is no additional circuit. The coil is connected directly to the fence. I already have a program that will control this, but it lacks the switching part of coil.
/*
* This is Arduino code for driving the StartupCoil
* It is using 3 Potentiometer for Voltage, On time and Off time control.
* And one button for switching betwean Run and Setup mode.
*/
/* Coil must be switched at 8kHz for making sparks */
//Devices pins
byte VoltOutPin = 1; //PWM output to the switching transistor
byte VoltRegPin = 2; //Potentiometer for output voltage control
byte TimeIntRegPin = 4; //Potentiometer for off time delay
byte TimeDelayRegPin = 5; //Potentiometer for on time delay
byte SetupPin = 6; //Pin for enabling Setup process
byte SetupModePin = 7; //LED for indicatin Setup mode
byte RunModePin = 8; //LED for indicating Run mode
//Variables
byte OutVoltage = 130; //Voltage on Coil
byte OnDelay = 100; //How long the spark is ON
byte OffDelay = 1000; //OFF time - 0V to the Coil
void Setup() {
pinMode(SetupPin, INPUT); //Mode button PinMode setup
pinMode(SetupModePin, OUTPUT); //LED PinMode setup
pinMode(RunModePin, OUTPUT); //LED PinMode setup
analogWrite(VoltOutPin, 0); //Set output voltage to 0
digitalWrite(RunModePin, LOW); //LED off
digitalWrite(SetupModePin, LOW); //LED off
delay(5000); //Delay 5s before startup
}
void Loop() {
if(SetupPin == HIGH)
SetupMode(); //Go to Setup mode
else
RunMode();
}
void SetupMode() {
digitalWrite(RunModePin, LOW);
digitalWrite(SetupModePin, HIGH); //Indicate Setup mode
while(SetupPin != HIGH) { //Read values until SetupButton is pressed
OutVoltage = map(analogRead(VoltRegPin), 0, 1023, 0, 255); //Out voltage from 0 to 255 (PWM)
OnDelay = map(analogRead(TimeDelayRegPin),0, 1023, 0, 1000); //On time for safety limited from 0 - 1000ms
OffDelay = map(analogRead(TimeIntRegPin), 0, 1023, 0, 5000); //Off time limited from 0 - 5000ms
delay(200); //Delay 200ms betwean reading values
}
digitalWrite(SetupModePin, LOW);
delay(5000); //Delay 5s befor startup of program
digitalWrite(RunModePin, HIGH); //Indicate Run mode
}
void RunMode() {
analogWrite(VoltOutPin, OutVoltage); //Power ON the Spark Coil
delay(OnDelay); //Spark Coil ON for x ms
analogWrite(VoltOutPin, 0); //Turn Spark Coil OFF
delay(OffDelay); //Switchin interval
}
/*
*analogRead = 0 - 1023
*map(value, fromLow, fromHigh, toLow, toHigh)
*/