Hello everyone!
I am currently working on a projected that uses PWM to power a small heat element coil (similar to what is commonly used in e-cigs and vapes). I am trying to set up a method of reading the temperature of the coil based upon resistance changes in the metal. the current setup has the PWM passing through the coil, then through a low pass filter which converts it into an analog voltage, then into an op-amp configuration that amplifies the small changes in voltage resulting from the change in resistance across the coil as it heats up. The analog voltage then runs back into the arduino on an analog pin. I am able to read the changes in voltage with a good degree of accuracy, and was actually surprised with how well it worked.
My question is this:
Is there a way I can do an analog read of the signal coming in from the coil and have the arduino increment/decrement the PWM value until the analog read value reaches a certain point, then hold it there?
I want to use this as a temperature control setup. Essentially, as the coil starts to heat up the value will change on the analog pin, then when it hits the desired temp(seen by the arduino as a predetermined 0-1023 value) it will move the PWM value up or down as needed to hold it at lets just say 850. if it increases in temp and it goes up to 860, it will decrement the PWM until it levels off back at 850 and vice versa.
I hope I'm explaining myself well enough. Any ideas or help is greatly appreciated.
thanks!