06-06-2013 08:42 PM
Hi everyone,
I need to control an AC lamp temperature using arduino + lifa and LM35 , but i dont know exactly how to do it.
I know how to make this control using an arduino code as i have attached below.
As you can see, if there´s a LM35 on A0 it works, using arduino´s interrupts.
But i want ( or there is another way? ) to get LM35 value, to send it by serial to arduino to use interrupt to dinners works.
I have attached my Arduino .ino program, that dinner works ok. And my labview program which read the value of LM35 and shows in a termometer.
In fact, my objevtive with that is to use labview and a PDI block to use a Setpoint Temperature on LM35 and control the AC voltage of lamp.
Hope somebody can give me some ideia !
Thank you.
06-06-2013 11:17 PM
The first thing to note is that you cannot use interrupts when using LIFA.
I'm a bit confused on what you are doing in your Arduino code. What does your physical setup consist of and how are they wired? What do you have wired to pin 2 (the interrupt)?
Give as many details as you can to enable us to help as much as we can.
06-07-2013 07:02 AM
Well, i use an triac with diac circuit to cut the senoid wave actived by pin3. A optacouple to in pin2 to sync the wave to the time cut. (Sorry for bad english.... o dont know exactly how to explain in english).
06-14-2013 05:57 PM
Hi again,
I got a " simple " solution to do this.
I used another arduino uno. One arduino with labview - another one to dimmer circuit.
I Used one PWM port with LIFA to send the signal to analog port on my arduino-dimmer circuit. And that´s work fine ( With a little eletrolytic capacitor in paralel with analog port, if there´s not a capacitor, pwm didn´t work).
The only problem with this is to use 2 arduinos in the project. If there´s someone with another idea to control only with one, I appreciate !
06-14-2013 06:41 PM
Here is an articel on an AC light dimmer using one Arduino.
<http://www.instructables.com/id/Arduino-controlled-light-dimmer-The-circuit/>
However, it is not compatible with the present version of LIFA
06-14-2013 08:40 PM
I used a similar circuit in my project. As you said... the problem is to use this with lifa. =(