Simple way to convert PWM to DC?? Coffee Roaster

Hi All,

I am modifying a popcorn popper so it becomes a programmable coffee roaster.

A popcorn popper basically has a heating element that is powered by mains voltage and a fan that blows air past the heating element. The hot air pops the popcorn. In the original version the fan is also powered by the mains voltage through a rectifier and a resistor is a secondary heating element.

What i would like to do is control the temperature of the air flowing through the popcorn popper by controlling the the fan speed. I have already separated the circuits for the the fan and the heating element. The heating element is switched on and off with a digital output from the arduino and a solid state relay. The fan speed is controlled by a PWM output through a transistor which increases the 0 to 5V from the Arduino to 0 to 30V.

I also have a PT1000 temp sensor which i am using measure the air temperature which feeds into on the analog inputs.

This works great..except now i would like to program my coffee roaster using a PID controller..

I am a little paranoid that i am going to make a mistake on my program and switch the heating element on when the fan is not running. If i do this it will melt.

So, is i would like to add a second relay that prevents the heating element being switched on unless the fan is running. If i connect the PWM output from the transistor to a second relay it will switch it on and off very fast. Is there a simple way to convert say 10V to 30V PWM output from the transistor to between 3.4V to 15V DC (not PWM) which will switch on a solid state relay???

Andrew

I'm no expert in electronics, but I'd use a diode and then a condenser.

For details see:-
http://www.thebox.myzen.co.uk/Tutorial/PWM.html

P.S. I haven't heard it called a condenser for 40 years.

I haven't heard it called a condenser for 40 years.

And yet we still call electret mics "condenser" mics.

And yet we still call electret mics "condenser" mics.

We do indeed. Way back in 1962 I had a electronics construction set that called them condensers and you used variable condensers for tuning radios, but by 1967 everyone was calling them capacitors when I started working in the electronics industry.

I am a little paranoid that i am going to make a mistake on my program and switch the heating element on when the fan is not running. If i do this it will melt.

Not paranoid... sensible. This is an example of working towards a fail safe solution. It may fail to roast the coffee, but that's the worst that can go wrong... things are safe when something (e.g. the logic of the controlling program) fails.

Now... to a solution...

Like ULRichard, I'm not very experienced with such things, but I think you are making things harder than they need to be.

Instead of tapping the high voltage side of the fan control circuit, couldn't you take a wire from the PWM input to the base of the transistor that controls the fan's power, feed it through a resistor (to "isolate", not in the electronic sense) what comes next from the fan power control transistor's base, thence to the base of a second transistor, we'll call it T-failsafe. This transistor will be used to turn on the relay that allows the heater's PWM pulse train to reach the heater, or disable the heater if T-failsafe's base isn't high.

If you are with me so far, you'll see a system that "sort of" works, the only problem being that the heat will be going on/off/on/off... in sync with the on/off/on/off of the electricity going to the fan motor. And... so far... my resistor is unnecessary.

However: Now add a capacitor between the base of T-failsafe and ground. Do it the transistor side of the resistor.

Now when the fan motor PWM pulse train starts going to the fan's transistor, in the early moments of that, the capacitor will start charging. While it is charging, T-failsafe's base will stay low, but as charge builds in the capacitor, the current flowing into it will taper off, the voltage drop across the resistor will become less, and the voltage on T-failsafe's base will rise. Eventually, it will get high enough to turn on the relay that permits the heat to be on, if the OTHER part of "heat on" is saying "do it". And, once you get the right values for the resistor and capacitor, the "heat allowed" relay will stay in the "yes" state through the "off" periods of the fan's PWM pulse control because electrons flowing out of the capacitor will keep the base high until the fan PWM signal returns to high.

A bonus: The heat won't come on until the fan has been blowing for a bit. A problem: The heat will stay enabled for a time after the "fan on" PWM pulse train ends. But if you get the values of resistor and capacitor right, it shouldn't be too long? Maybe you need another resistor, from the "other" side (away from T-failsafe) of the first resistor, to ground, to discharge the capacitor more quickly when the fan on pulse train ends?

Or!...

Just get a low torque microswitch, put a little "paddle" on it, mount it in the airflow of the fan. No blow, no heat.

I'm not that old, but in German they're still called "Kondensator" :slight_smile: