loading

How do I program an Arduino to be used as an interrupter in a Solid State Tesla Coil?

I want to use an Arduino as the interrupter in my Dual Resonant Solid State Tesla Coil but I do not know how to program in Arduino (or any other programming language for that matter).  The rest of my gate driver (i am using an IGBT full bridge) is a 555 timer with equal on/off time generating pulses at the resonant frequency of the coil.  The output is split into 2 parts, 1 being the direct output from the 555 and the other being the output of the 555 connected to an inverter gate.  From there both inputs are fed into MOSFETs (or some other type of transistor, I just had some switching MOSFETs laying around) that have their gates controlled by the interrupter.  I want the Arduino to take the pulse from the 555, read its frequency with pulseIn, and then read a variable resistor on the analog pins whose value will be used as the duty cycle of the pulse generated by the interrupter expressed as a percentage.  The drains of the MOSFETs will then be connected to the gates of the IGBTs that will switch 900 volts from an inverter based around a transformer from a disposible camera flash board through the primary coil.  This is the last part of my driver and then I can build the coil and post the instructable for everyone to enjoy (hopefully, i am always open to constructive criticism).

sort by: active | newest | oldest
If you are just trying to convert an Analog reading from a potentiometer to a PWM value, you could use something like this code, but I don't think you can change the frequency while the code is running (you can set it in the setup() function), but you will change the duty-cycle with the potentiometer.  Or you can use PulseIn.

int potPin = 14;
int potVal = 0;
int outPin = 11;

int pulse_length = 0;
int 555_pin = 4;

void setup() {

/*
//You can change the PWM frequency of pin 11 here by changing the 0x01 setting
// check http://www.arduino.cc/playground/Main/TimerPWMCheatsheet for more
// uncomment the below line to change the frequency from 488Hz, to 32kHz
 //TCCR2B = TCCR2B & 0b11111000 | 0x01  
Serial.begin(9600);

pinMode(potPin, INPUT);
pinMode(outPin, OUTPUT);
pinMode(555_pin, INPUT);
}

void loop() {

potVal = analogRead(potPin) / 4;
 
/*this will return the length in Microseconds that the pulse is HIGH on digital pin 4 (with a timeout of 1000 microseconds) and store the pulse in variable "pulse_length", you do with it what you want from there:
*/
pulse_length = pulseIn(555_pin, HIGH, 1000)

analogWrite(outPin, potVal);

Serial.print(" potVal:  ");
Serial.print(potVal);
Serial.println("        ");

}
Hi, could you explain how an arduino can be programmed/ setup to audio modulate a solid state tesla coil and how PWM is involved? I essentially want my arduino to do this: http://www.youtube.com/watch?v=eSa0nGmHT8E. I'm currently building Steve Ward's Mini Solid State Tesla Coil: https://www.instructables.com/id/Building-a-solid-state-tesla-coil/?comments=all#CJPK7MSGKS0RPEX
I don't see the point of the 555. The microcontroller can do it all, as far as I can see. Can you do a block diagram ?

Steve
UbuntuNinja (author)  steveastrouk7 years ago
Yeah you are right.  I talked to someone else and they said that I should do away with the 555 and take advantage of the arduino's internal timing capabilities.  I dont know how to do that either.  I also learned that i need the Arduino to drive MOSFETs that will supply current to the IGBTs gates because the IGBTs need lots of current to turn on fast enough.  The IGBTs i am using are HGTG10N120.  Thanks.  Let me know if you need any more information and I can tell you more specifics.
Well for a start look at IGBT/MOSFET driver chips - they're the interface from the micro to the power.

Atmegas ("arduinos") are not a processor family I have worked with, so I can't give you any specific code to help, but start by looking at the PWM modes the thing's internal timers offer. You can program the basic frequency of the PWM, and modulate the duty cycle - in fact the atmegas have 6 channels of PWM which can all be locked together in phase.

Steve