Hi all.
My last project was to control the amount of DC power delivered to a load using PWM. I am now trying to use a pic to control AC power.
I am in the process of writing a program (in C language) to control the gate pin on a triac that in turn controlls the amount of AC power delivered to a load. I suppose its prity much digital Phase control. The load is resistive, a heater to be precise, and the AC voltage is 240 Mains 50Hz. I already have the circuit built and it is tested using a pwm (i know this will not control the AC however it does aid in showing that the circuit works). Basically the output from the pic will go to a mosfet which will go into an opto-isolator and to the triac. in order to gain phase control i will need to send information back to the pic at the zero crossing points. The Pic also has a variable DC input of 0-10V that controls the AC power.
Basically i will explain my idea for accomplishing this and i would really appreciate it if i got some feedback or any of your own ideas.
I will read from the Pics ADC (i currently working with the PIC12f683) and this value will either;
1) determin from a lookup table (not sure how to create a look up table, but it seems like a good idea, any help on that would be great) what delay needs to be used in order to fire the triac in the right place. The timeing will be over 10ms (half a Full wave cycle) and will be triggered at each zero crossing point. so for instance for 10% power to the load the delay will be 9ms and a pulse will then be sent from the pic to the Triac. relativly simple i know however i am having quite a few problems trying to use this method.
2) my second idea was to take the ADC value and multiply it but the smallest delay gap (10ms/256) to find the correct delay for that ADC value.
for instance;
ADC_value = j;
Delay = J*(39.215);
Delay_us(Delay);
Pic output high;
Delays_us(100);
Pic output low;
Im just wondereing if i am overcomplicating this problem and whether anyone has any feedback as to whether my solution will work or whether there is a simpler solution?
Any ideas would be very welcome.
Cheers,
Rob
My last project was to control the amount of DC power delivered to a load using PWM. I am now trying to use a pic to control AC power.
I am in the process of writing a program (in C language) to control the gate pin on a triac that in turn controlls the amount of AC power delivered to a load. I suppose its prity much digital Phase control. The load is resistive, a heater to be precise, and the AC voltage is 240 Mains 50Hz. I already have the circuit built and it is tested using a pwm (i know this will not control the AC however it does aid in showing that the circuit works). Basically the output from the pic will go to a mosfet which will go into an opto-isolator and to the triac. in order to gain phase control i will need to send information back to the pic at the zero crossing points. The Pic also has a variable DC input of 0-10V that controls the AC power.
Basically i will explain my idea for accomplishing this and i would really appreciate it if i got some feedback or any of your own ideas.
I will read from the Pics ADC (i currently working with the PIC12f683) and this value will either;
1) determin from a lookup table (not sure how to create a look up table, but it seems like a good idea, any help on that would be great) what delay needs to be used in order to fire the triac in the right place. The timeing will be over 10ms (half a Full wave cycle) and will be triggered at each zero crossing point. so for instance for 10% power to the load the delay will be 9ms and a pulse will then be sent from the pic to the Triac. relativly simple i know however i am having quite a few problems trying to use this method.
2) my second idea was to take the ADC value and multiply it but the smallest delay gap (10ms/256) to find the correct delay for that ADC value.
for instance;
ADC_value = j;
Delay = J*(39.215);
Delay_us(Delay);
Pic output high;
Delays_us(100);
Pic output low;
Im just wondereing if i am overcomplicating this problem and whether anyone has any feedback as to whether my solution will work or whether there is a simpler solution?
Any ideas would be very welcome.
Cheers,
Rob