Pot for linear control of heating element and ac motor?

Hi,

So I have coffee roaster and I want to be able to set up pid for it, where I simply have two rotary knobs for input. Both heating element and ac fan motor would be connected to arduino by solid state relays. Turn first knob and heating element increases or decreases in 1c increment, within some specified range. Turn second knob and ac motor increases or decreases by 1% or equivalent.

First, I am searching for sample code to translate turning a pot or some other device as up or down for the pid code.

Second, I am looking for sample code that interprets the position of the knob and then pulses a signal in some increment or equivalent ac speed control. Solid state relays have zero cross detectors built in, so I'm thinking just changing the length of the on and off pulses would accomplish effective speed control. Not 100% on that though :slight_smile:

I may be searching for the wrong thing, but I can't find where anyone has done either of these two things. All my searches for pots have to do with voltage control of dc devices. Also, I don't have arduino yet, because I can't spend money on this if it isn't feasible.

Thanks for any help.

To control the speed of an ac motor, you need to control both the voltage and frequency applied in the correct proportion to one another. What is the voltage, speed and power rating of the motor you want to control?

Heating control is dependent upon the thermal lag of the system. Long lag times of ten seconds or more may be controlled with time proportional schemes. If the lag is small, you may need to resort to phase angle firing control of an scr or triac controlling the heater.

PID is a unit-less system that is usually done as 0-100% input and output values. You then map your analog subsystem onto those values where, for example, an Uno's 10 bit analog input would map 0-1023 counts of analog input range to 0-100% of the PID input value.

avr_fred:
To control the speed of an ac motor, you need to control both the voltage and frequency applied in the correct proportion to one another. What is the voltage, speed and power rating of the motor you want to control?

As indicated, it will be connected to an ssr, so no, I don't need to do those things. I am pretty sure I just need to send on and off signals that are divisible by 16.67 ms to correlate to a 60 hz ac cycle.

avr_fred:
Heating control is dependent upon the thermal lag of the system. Long lag times of ten seconds or more may be controlled with time proportional schemes. If the lag is small, you may need to resort to phase angle firing control of an scr or triac controlling the heater.

PID is a unit-less system that is usually done as 0-100% input and output values. You then map your analog subsystem onto those values where, for example, an Uno's 10 bit analog input would map 0-1023 counts of analog input range to 0-100% of the PID input value.

I don't need to do this either, there is plenty of code out there for controlling a heating element via ssr and I have no intention of reinventing the wheel.

I just need code so I can use a pot or some other rotary device as an input to make these changes. There are button inputs, so there must be something for a rotary type input, I just can't find it to save my life.

There are two ways of controlling the speed of a ac motor. One is controlling both voltage and frequency using a VFD. The other is only usable for motors drivning a fan or an other mechanical load having a torque requirement that is the square of the speed. In this case you can lower the speed by lowering the voltage by using either a autotransformer or a phase angle control. You cannot use a ssr with zero crossing for this.

If you want a knob for controlling values have a look a simple encoders.

OMG you guys,

I am not asking for the feasibility of controlling a motor using an ssr, I already know it is possible to do this. Look here Digital SSR Power Regulator for Wort Boiling Control [DSPR1] - $35.95 : Auber Instruments, Inc., Temperature control solutions for home and industry I am already using this with a shaded pole motor in another application. Think about it a minute, you turn a fan on and then off, does it immediately stop moving? No, it doesn't, it keeps moving but immediately starts to slow down. You can control the speed by simply turning on and off quickly and varying the length of the pulses. So an arduino can not do the same thing?

I am simply looking for code to use pot or other rotary device as input. I really don't know how I can make this more clear. If you can't use pot or other device as input or there is no code for it, that is all I am asking for here.

That said, nevermind, quickly learning this is not a good place to come for arduino support, moving on here.

HoldTheDrama
It's pretty easy to use analogRead and then effect some result (analogWrite) based on that.
You can't have looked very hard.

That "auberins" device has some kind of feedback in it.
Looks like it's counting cycles or alternations; where with it 1% is one cycle out of 100, 25% is 25 out of 100 and so on - duty over a period of 1 2/3 sec. (60Hz)

The auberins device is intended for heating, not motor control. The method you describe can be used for a shaded pole motor because of its ridiculously low efficiency. The motor will get equally warm no matter of the load. Operating any kind of asynchronous motor that way will overheat it because you will be operating the motor with full voltage in a high slip area of operation where efficiency is low.