Cloud sensor heater control using PWM

This is my first post here so first of all I would like to introduce myself, My name is Ryan, i am reasonable with basic electronics, & a complete noob when it comes to programming.

I am in the process of building an arduino based cloud sensor / weather station. So far i have managed to get most of the sensors set up, I am using the MLX90614 IR thermometer, a BMP085 barometric pressure sensor, a SHT15 humidity/temp sensor & an LDR. A wetness sensor to detect rain drops & wind speed sensor are also going to be needed, but i don't have those yet. Also i plan to add a wind direction sensor & a rain fall amount sensor, but that depends on how much code space i have left on the arduino.

this allows me to compare the sky temperature with the ambient temperature and work out if the sky is clear or cloudy, but if any moisture were to collect on the IR sensor i would get a false reading of the sky temperature, so i need to add some form of heater to prevent dew collecting or evaporate any surface moisture after rain.

in order to detect rain i will use either a wet leaf sensor or an optical sensor like those used in cars to control windscreen wipers, it will simply indicate either a wet or dry condition.

the ambient temperature & dew point measured using the SHT15 should be monitored and regulate the heater to keep the body of the MLX90614 & rain sensor above freezing / dew point (whichever is detected first) the MLX90614 has an internal temp sensor that will be used to measure the temp of the rain/IR sensors. Also in the event that the rain sensor detects a wet condition the heater should heat the rain & IR sensors to 60-70c to evaporate the moisture away when the rain has stopped.

whilst i appreciate that the arduino cannot technically do two processes simultaneously will it be possible to manage the heater control & take sensor readings (& Serial.print them) once every 1-2 seconds?

If this is possible to do can anyone offer me any advice on creating the code for such a task? if it helps i can also provide details of the relevant variables used for the outputs from the different sensors

Also i could do with some assistance on the design of the actual heater element & any electronics needed to provide the heater with sufficient current as i am pretty sure that the PWM on board the arduino will not be up to the job on its own. it would also be good to keep the potentially "noisy" heater circuit isolated from the rest of the more delicate electronics.

For the heater element its self i am thinking of using either a bunch of resistors or nichrome wire, but i have no idea of any of the details, so any pointers here would also be useful, the whole project will probably live in a box with a lid approx 100mm x 100mm and the whole surface of the lid will need to be heated.

Thanks in advance. Ryan.

I can’t help with the heater but I built a nickel / penny sensor shown at the bottom of this page http://www.techlib.com/electronics/raindetectors.htm. Using a voltage divider read the analog reading to see if it’s wet or not. See graph attached.

wetness.png

RyanParle:
For the heater element its self i am thinking of using either a bunch of resistors or nichrome wire, but i have no idea of any of the details, so any pointers here would also be useful, the whole project will probably live in a box with a lid approx 100mm x 100mm and the whole surface of the lid will need to be heated.

If you go the resistor route I’d hit up a store for a cheap, hot glue gun. You’ll find a low ohm (~10) ceramic resistor inside that will obviously take quite a bit of heat. If you go the (more expensive) nichrome wire route you’ll need to insulate it in which case you’ll need some kapton tape which will safely peak out at 400 degrees C without melting. A last option would be to just use a DC lightbulb.

…as to how to feed it with voltage, there are plenty of how-to-use-a-transistor/mosfet/relay tutorials out there.

pantonvich: I can't help with the heater but I built a nickel / penny sensor shown at the bottom of this page http://www.techlib.com/electronics/raindetectors.htm. Using a voltage divider read the analog reading to see if it's wet or not. See graph attached.

I like the idea of the nickel/penny sensor, it creainly looks quite robust, but i am concerned that it will not be sensitive enough for my application, really i need to detect moisture after a single spot of rain has hit the sensor, with the penny/nickel sensor you'd have to be quite lucky for the first drop of water to bridge the gap between the two coins.

Chagrin: If you go the resistor route I'd hit up a store for a cheap, hot glue gun. You'll find a low ohm (~10) ceramic resistor inside that will obviously take quite a bit of heat. If you go the (more expensive) nichrome wire route you'll need to insulate it in which case you'll need some kapton tape which will safely peak out at 400 degrees C without melting. A last option would be to just use a DC lightbulb.

...as to how to feed it with voltage, there are plenty of how-to-use-a-transistor/mosfet/relay tutorials out there.

I was thinking of using a few alloy clad wire wound resistors, it has just occurred to me that i have a stack of 11 alloy clad 22r 50W resistors attached to a board which i was used as a discharger for RC batteries. I'm sure a couple of those would be up to the job, although probably a little overkill!!

I'll have a look for tutorials on using transistors/mosfets/relays soon, i'm now thinking back to an RGBLED driver i built a while ago, i was in the process of building an additional circuit to manage a bank of 20 large (2w iirc) leds, the output from the standard controller was just a PWM chip somewhat like that on the arduino... Its amazing how when you start to think in the right lines how much you remember about old projects that may be relevant.

KE7GKP: What you are describing should be quite easy to do with Arduino. Including controlling the header. If you are going to energize the heater on a fixed time schedule (x seconds whenever moisture is detected) that is trivial, even while talking to other transducers. Or even if you are going to run the heater until dry, it is still quite easy for Arduino even while talking to other sensors.

You didn't mention what power source you have available for this project? If you are going for fastest drying action, you probably don't need to modulate the heater current with PWM. If you use steady DC or zero-switched AC for the heater current, there is no reason to expect any noise.

Start by learning how to talk to each transducer separately, and once you have all those down, integrating them together will be pretty easy, I expect. I don't see any reason why you should have any concern about code space, assuming you are simply passing the readings on and not doing heavy calculating or local storage.

Ideally the heater will run continuously at a low setting (approx 5C above freezing or Dew point) when the air temperature gets close to freezing/dew point, if a wet condition is reported by the leaf sensor, i want to turn up the heat enough so that any moisture remaining after the rain has stopped will be evaporated away in less than 10 mins, so a temperature of around 60-70c should be adequate. I would want to regulate this using the ambient temperature reading from the MLX90614.

My power source is fairly open, ideally it will be DC and of fairly low voltage, 12v would be my preferred choice although i will consider other sources if required.

Thanks for the reassurance about code space, i had no idea about how much would be required to manage the heater, you are correct that i am only passing the readings on to a PC, the only considerable calculations carried out on board the arduino are calculating barometric pressure using the BMP085 sensor, but its not particularly heavy work. the dew point is also calculated (behind the scenes by the Sensiron.h lib), but i believe this is a simple job.

KE7GKP:

Ideally the heater will run continuously at a low setting (approx 5C above freezing or Dew point)

But unless this is in some kind of arctic climate, that would mean that it is off much (most?) of the time. Doesn’t it? Because the ambient is above dewpoint + 5C. We don’t see the whole picture, so it seems confusing at this end.

yes that is certainly correct in daytime conditions when the ambient temperature is normally above the dewpoint temp / freezing. But during night time conditions especially here in the UK the ambient temp is often below dew point so the heater will often be running in this case.

I just re-read my previous post and realised that i could have worded it better, the heater will need to meet these reqirements.

  1. switch on if the ambient temp drops below dew point +5c & regulate to dew point +5
  2. switch on if the ambient drops below 5c. the heater should regulate to 5c
  3. switch on if rain is detected on the leaf sensor & regulate 70c until leaf sensor reports dry.

I am not really sure what it is that i am doing that is difficult to understand, i simply need a heat source & control system that will prevent dew or frost forming on the sensors & dry them out after rain.

at the moment i don’t have a leaf wetness sensor so i cannot be totally sure yet on the actual physical designs, but i’ve attached two possible layouts quickly sketched up in paint. The IR sesnor & LDR will be poking through holes drilled in the box lid and sealed with silicone sealant, the leaf sensor/s will be stuck to the lid with silicone sealant (or maybe a thermally conductive epoxy, but this might be a little overkill).
On the inside of the lid i will affix the heat source.

KE7GKP:
Even if you did want to run a DC supply (like 12V), using a linear circuit (vs. PWM) is no great disadvantage in this particular application. We typically prefer PWM because a major advantage is that it doesn’t heat up the control element, and that outweighs the disadvantage of the switching artifacts.

HOWEVER, in your case the heat is specifically what you are going for. So attaching a heater/resistor AND its controlling transistor to the heated surface gets you 100% efficient use of energy converted to heat! You could use a resistor or two like this:

And a TO-220 case transistor that can easily be thermal-coupled to the surface. And drive the transistor with an analog voltage created by filtering the PWM.

Sounds simple enough. what kind of filtering did you have in mind?

layout.JPG

would i need to use an optoisolator to keep the 12v part of the circuit iosloated from the arduino's 5v circuit?