View Full Version here: : Really easy to make arduino dew heater controller
ChrisV
10-04-2016, 05:04 PM
EASY TO MAKE ARDUINO DEW HEATER CONTROLLER
I needed a dew heater, so thought it was a good time to revisit the excellent Dew Heater controller built in IceInSpace 2010 by Bob Stephens. I had two reasons for doing this:
1. There are some great modular arduino products which make it extremely easy to make. The Nano has a great extension I/O board so all the components CAN BE attached with pre-made connectors. There is NO circuit board making. There is NO soldering onto circuit boards. The ONLY soldering is for the plugs and sockets to connect it to the outside world.
2. Arduino based modules are now very cheap. Apart from the heater straps it costs ~$40 for a 1x channel build (Jan-Feb 2016).
3. Except for the heater it uses very little power. In fact, you can leave it on all the time to monitor temp/humidity – only plug in the heater if needed.
The 1st attached pic show it connected and its inside connections
How the controller works & software
The controller is similar to the build by Bob Stephens (with additional liberation of software from other sources) so I won’t go into details. It is Arduino based and feedback controlled, briefly:
1. DHT22 senses ambient temperature & humidity. The dew point is calculated.
2. DS18B20 temperature sensor placed inside the heater strap senses the temperature of the element to be heated. You’ll need 1x for each bit of glass to be heated. I haven’t done the code for multiple channels yet, but will do so if any interest.
3. Calculate the difference = ( heated element - ambient dew point ).
4. Send a PWM output from the Arduino based on this difference. I have used a threshold for activation of the heater of 5oC above ambient dew point (this is what most seem to use - can be changed in the software). So the PWM output = 0% at +5 oC (and above this) to 100% at 0 oC.
5. This PWM output drives the heater strap via a MOSFET driver module. The heater output increases as the temperature difference between heated element and ambient decreases.
6. The display swaps between showing (1) the ambient temperature, humidity and dew point and (2) the heater temperature, difference to dew point, and heater drive level.
The parts
The parts as follows. The 2nd attached pic shows the main Arduino bits.
• Arduino bits ($10-11 – ebay O/S vendors): Arduino Nano; Nano V3.0 prototype shield I/O extension board expansion module.
• The sensors ($10.50 – ebay O/S vendors): DHT22 Digital temperature/humidity sensor; DS18B20 digital temperature 1-wire sensor (need an extra DS18B20 for each additional heater). The beauty of these is that they are digital – they are plug and play as they do not need calibrating.
• Display ($7 - $12 – ebay local & O/S vendors). I used a 0.96” I2C SPI serial 128x64 OLED display - it is small, so if you only want 1x heater channel it all fits in a small light (box) that I Velcro onto the scope. You can use other display eg 20x4 red LCD display. Any display is fine just as long it is an I2C serial display as it only require 2x connection leads (it wont use up all of the Arduino analog/digital ports if you need multiple heater channels) plus 2x power leads.
• MOSFET driver for heater (ebay O/S vendors). $3.50 1x channel module and ($10 for a 4x channel module).
• Hardware (Jaycar). ~$10-15 for Jiffy box, plugs/sockets, wires and 1x resistor.
• Heater strap (Jaycar & Bunnings). Whatever you want. I won’t describe the heater straps here – I use nichrome as its much easier than resistors (and not difficult to connect to wire as some would have you believe).
The nice thing about the extension I/O board is that each Arduino analog/digital/I2C input/output has pins for that input/output & +5VDCC/GND. So you can just plug the pre-made connectors into the IO board. For the MOSFET driver and display just plug the other end into that module. For the sensors (DHT22, DS18B20), just cut one end off and solder onto the appropriate lead or socket (and cover with heatshrink = wonderful stuff).
The circuit
The circuit and how you put it together as follows (shown in the 3rd attached pic). A few things to note:
• The DHT22 attaches to the outside of the box. So get 3x connectors, cut off one end, solder to the DHT22 leads and cover soldering with heatshrink (1.5 – 2.55mm). See the 4th attached pic.
• Have used parasitic mode for the BS18B20 (so only need 2x wires instead of 3x). So you can’t go wrong wiring it up. Just connect the 2 outside ones together – these go to GND; the central one goes to the signal of digital 12. If you cover up all the solder joints and its connections to the 2 core wire with heatshrink it is nice and watertight (see 4th attached pic). There might also have to be a one line change to code in the library of you find it doesn’t work (I can provide details).
• The serial display – just needs 4x wires. Don’t forget to swap over the SCL & SDA connections between display and extension I/O board.
• MOSFET driver connections = easy.
• Power – run the 12V input to both the Arduino extension IO board and the MOSFET driver.
Getting it going
Before you do the whole build its best to put it together in stages and test each bit.
1. First put Arduino on your PC or Mac, load up the attached sketch (it will need a few libraries uploaded – should happen automatically). Don’t worry if you haven’t used Arduino before – its not too hard.
2. At this stage its best to put it together in stages to check it works. (1) plug in the DHT22 and check that it reads the ambient temp/humidity. (2) plug in the Ds18B20 and check that it reads heater sensor temp and calculates the heater output. (3) Plug in MOSFET driver and heater strap – does it heat it.
3. Put it all together in a jiffy box.
Cheers, Chris
janoskiss
10-04-2016, 05:45 PM
Your definition of "easy" may not be agreed upon by everyone... The instructions that you posted look complicated enough. Nevertheless, it's going in my TODO bookmarks folder. Thanks! ;)
Astroman
10-04-2016, 07:16 PM
I will bookmark this page, it looks a great little project, after I manage to do a stepper controller for a moonlite focuser. May take a while, so hopefully the page doesn't disappear.
Thanks for putting this up, will save the zip file for future references..
DavidTrap
10-04-2016, 08:02 PM
Hi Chris,
Can dew not or kendrick dew straps be used with this device??
Ta
DT
aarong
11-04-2016, 10:18 AM
Thank you for the detailed write up. Very interesting. I've just started my Arduino adventure, so really interesting post.
Cheers,
Aaron
ChrisV
11-04-2016, 11:15 AM
David
Just depends upon the current they draw. I've used IRF520 MOSFET module. This can do 1amp as is, and up to 5amps with a heatsink. I've used it on a 4" refractor and an 8" SCT and its fine without a heatsink - but conditions don't require a massive heat drive in Sydney. The rule of thumb is that if the mosfet feels too hot then it isn't coping - so add a heatsink or go for a higher power module.
I couldn't find the specs on the Kendrik straps. But the Astrozap 4" heater is 0.6A, 6" is 0.8A and 8" is 1.2A - so it will be fine with those. Just look up whatever heater strap you have and see what current it draws then compare to the above IRF520 specs. And don't forget - most of the time the heater will be running on a low duty cycle if conditions aren't terrible. So if the heater is running 50% duty cycle this equates 0.6A for the above 8" strap.
The thing about the setup I have described is that it uses simple interchangeable modules, so if you need higher power then just get a higher power mosfet module. I'll have a look for some higher power modules when I get a chance. But really, if your need to draw more than 5amps - thats 60W ! Might as well pull out a hair dryer !!!!
Thanks for your interest. Chris
DavidTrap
11-04-2016, 02:39 PM
Thanks Chris,
I'd be looking at this for a warming the mirror of a 10inch RC. The strap wraps around the inside edge of the tube and heats the mirror by radiant heat.
I only want to keep the mirror a degree or so above ambient dew point.
The current draw would be 1.6 amps at maximum. Any suggestion of what model Mofset I would require? (Much to learn about all this stuff!)
Ta
DT
redbeard
11-04-2016, 05:51 PM
Hi Chris,
Well done with this device.
The funny thing is, I have made one almost exactly the same as yours. As I was reading your article I was thinking, that sounds familiar.
Same temp sensors and humidity sensor.
The difference with mine is I am using the Freetronics N-MOSFET Driver which can handle up to 40 Amps so pulling up to 3 amps, does not even get hot. Also have 2 channels.
I have also taken advantage of the USB connection and do stats that can be imported into Excel to show all parameter info. That way the unit can be monitored all night to check the performance. As I'm always using the laptop, I have written some software to show all the parameters live.
Apart from fully auto mode, I aslo have a manual mode built in where 4 different settings for each channel can be set. Also these settings can be custonised to whatever suits the users scope/location. To top it off, it starts to the sound of Black Dog by Led Zeppelin!
I use 2 LED's to display the modes and that also helps to keep things light as it's mounted on the tube.
Great minds think alike. I'll post details of mine when I get a chance.
Cool!
Cheers,
Damien.
DavidTrap
11-04-2016, 07:39 PM
Sounds very interesting Damien!
DT
ChrisV
11-04-2016, 10:14 PM
I like the Zeppelin touch ! What about Sabbath, Pigs of War, with them coming out for a tour ?
Manual mode - good idea.
I was after an easy build that wouldn't scare people too much.
Love to see your build. Yes, it takes as long to write it up as design it.
DavidTrap
17-04-2016, 11:06 PM
Hi Chris,
Just wondering if you've had a chance to find any higher power modules. I'm a complete novice at this sort of electronics, so really appreciate any assistance you can offer.
Can you suggest a heatsink for the MOSFET module pictured in your build? I'd like to be able to cope with a 2 amp load through the dew strip.
I had a look at the N-MOSFET that Damien suggested. I'm not sure if that is compatible with your project - I think it triggers differently?
Regards,
DT
ChrisV
18-04-2016, 03:10 PM
The IRF520 module will be fine at 2A if heatsinked.
Get a TO-220 Heatsink (6021 Type) from jaycar. Its $1.45, plus paste and washer.
I'll measure what mine is doing over the next few nights - with heaters for 4" and 8" scopes.
Or use the freetronics NDRIVE Damien suggested - that's great and only $4 ! The freetronics site has the wiring for it also.
Just remember to run the 12V and GND from the power input directly to whatever mosfet module you use and also to the arduino (as in the diagrams and pics in my post). The mosfet power doesn't come from the arduino.
DavidTrap
18-04-2016, 05:59 PM
Thanks Chris,
Will start accumulating some bits and pieces.
DT
ChrisV
18-04-2016, 06:09 PM
David
A guinea pig !! Good luck.
PM if need any help.
Chris
DavidTrap
19-04-2016, 10:30 PM
Thanks Chris,
You may regret your offer of assistance. I have zero experience with electronics!
Most of the parts are on a slow boat from SE Asia, so I don't expect to have all the bits for a month or so.
DT
hikerbob
01-05-2016, 09:36 AM
Chris thanks for the kind words about my older design. Glad to see that it continues to be of use. Thanks also for sharing what you have done and the benefits that brings to others. Love the power of the web to enable us to share and build on others work (as much of mine was done by pulling other stuff together). Bob
ChrisV
03-05-2016, 09:17 AM
Bob
More than useful. It had to change for me as I'm a messy solderer. I wonder what the next version will look like, Damien's sounds pretty intense.
Chris
redbeard
03-05-2016, 10:17 PM
HI again to all,
Sorry about the late reply.
I've added some pics to show what I've done.
How it works is fairly simple:
With the switch in the manual position, the unit will use presets that have been pre designated. In one of the photos, you can see the heater settings can be set for each channel and each channel has 4 heater settings that can be selected by using the small push button. These settings get downloaded and saved in the eeprom.
By pressing this button in, it will cycle through the different heat settings and beep and flash to let you know which setting has been selected. 1 flash and beep for level 1, keep holding the button in,,,2 flash and beeps for Level 2 .......etc. When using the software, it will display the selected settings. The unit does not need the software to run, it's stand alone, but the software is a bonus.
When the switch is in automatic mode, the unit just works and uses the sensors to detect the ambient temp, RH, and heater temperatures to set the heater output PWM. My favorite setting.
The software is fairly straight forward in respect to features, and multiple files can be saved with different settings, (perhaps for different locations).
The unit is very light itself which is great for mounting on the telescope tube.
You can use any software to read in the values as the data is simple and easily imported.
The Humidity/temp sensor on the top, I just wrapped white electrical tape around it for a little protection.
There are a few prototype holes drilled where they should not be, lol.
The centre connection on the front has 2 RCA connectors for the dew heaters and the central connector is for power. I love these power connectors and try to fit to all my gear as I have several 5 amp power supplies with the same mating connectors. The 2 LED's below this are the indicators.
The rear connections are for the 2 temp sensors with the USB in the middle. Below the USB is the small button for selection and the switch below that to select modes. Always use a fuse somewhere logical in the power feed. I have an inline one I use, not shown.
I use DEW NOT heaters as they are reasonably priced and work well.
The photos show the software, (excuse my galaxy pic, couldn't help myself), in operation as well as the settings form.
I've really appreciated reading about your project and I'm guessing you got a buzz when it was working as I did. This is fun stuff.
There is also another guy here on IIS, (Garbz), who has also built an amazing all things device. Look it up. He really knows what he is doing and helped me with some advice on saving memory!
Cheers,
Damien.
redbeard
03-05-2016, 10:18 PM
Other pics attached.
Data in Excel with graph.
Cheers,
Damien.
ChrisV
04-05-2016, 08:42 AM
Nice build Damien !
redbeard
07-05-2016, 10:50 PM
Many thanks Chris.
Your Oled display rocks by the way, no PC needed!
Black Sabbath, yeah, got me thinking now... Going to see Iron Maiden on Thurs, Hmmmm
Oops, just noticed, the Mosfets are 20Amp not 40.
Happy to share any other info if need be.
Cheers,
Damien.
DavidTrap
12-05-2016, 05:58 PM
Hi Chris,
Finally got the bits together.
Have managed to finally get an appropriate USB driver for the clone Arduino Nano so I can connect it to my Mac. Sketch has been uploaded and it appears to work! I will have to buy the resistor and sockets and wire them up tomorrow. I'll let you know if the heater gets warm...
Very cool to get this working - feel like a real electronics geek!
DT
DavidTrap
12-05-2016, 06:10 PM
Chris,
Can you please clarify what wattage resistor is needed?
4.7k ohm 0.25W, 0.5W or 1W??
Ta
DT
DavidTrap
05-07-2016, 08:58 PM
Hi Chris,
Finally reporting back in with the field test of the controller.
The temps at Leyburn were -2 degrees and there was a thick frost on the ground in the morning. The controller was covered in frost where I had it mounted on top of the optical tube. The temperature sensor was a snug fit into one of the collimation bolt holes on the lens cell. The front objective was clear of dew all night. On the occasions I checked the screen, it was running the heater at ~40% to maintain the lens cell 2-3 degrees above the dew point calculated by the unit. I had the dew strap wrapped around the outside of the dew shield - there’s a 1cm gap between the dew shield and lens cell, but it still worked fine.
I highly recommend this unit to others. I'm going to build another unit for a mate with a 14inch OTA - hopefully the mofset plus heatsink will cope with the higher amperage. Better do some calculations.
Thanks again for publishing this design.
DT
Garbz
10-07-2016, 07:38 AM
Hey guys, had a chance to lurk today and thought I'd comment on this.
First of nice work looking very good. There seems to be a bit of talk about power draw and MOSFETs so I thought I'd add some advice to the selection:
Firstly you're measuring humidity to calculate dewpoint right at the case of the electronics. If you get hot enough to need a heatsink then this is a really bad MOSFET choice. One-Two degrees of heat passing through the case to your DHT22 will throw out your calculations, and self heating prevents the DHT22 from reading 100% humidity so your dewpoint will follow the temperature and things just don't work (found this out the hard way).
So MOSFET selection. This SHOULD be a non-issue, but the IRF520 is not too good of a choice here. For a dew heater the duty cycles are very slow so a MOSFET will not spend any time in the active region, it will either be on or off. The active region becomes a problem when you're switching in the 100kHz kind of region, but for this application one of the most important numbers is R_ds(on) for the MOSFET.
The IRF520 has a Resistance Drain - Source in On state [R_ds(on)] of 0.27ohm. What this means is that when the power is being applied to the heater the mosfet looks like a 0.27ohm resistor. Drawing 2A through your heater? That's over half a watt for the MOSFET. Thermal resistance Junction to Ambient [R_thJA] for the IRF520 is 62 C/W so the junction of the MOSFET will be 30degrees higher than the ambient temperature. This isn't an issue for the MOSFET, but if you enclose it into a small black box, maybe add a second one for another dew strap you'll quickly turn your box into a heatsource right next to the temperature measurement.
So for ideal component selection rather than looking at the Amps D-S rating, instead look for a low R_ds(on) rating.
If you feel inclined to experiment more you could look at the part I used in my little dew heater controller which was an IR3315 High-Side Switch. This has a couple of awesome advantages over using an N-channel MOSFET:
It has an R_ds(on) of 0.02ohm so an order of magnitude better than the IRF520
It is high-side switch so it switches off the VCC line rather than switching off the Ground. Using an N-channel FET as a low-side switch is not an issue for a dewstrap ... unless you have a short circuit. On a low side switch there's always 12V on the output, so a short circuit to the telescope itself (most likely place, and usually grounded) is a short circuit even when your circuit is off.
Speaking of short circuits using a single resistor the IR3315 can be configured for current limiting, so a short circuit won't damage anything even when you crank the dewheater to 11 :)
Just some free tips :). It's a very nice and simple build all the same so thanks for sharing it with everyone.
(edit: Poo! I just forgot one very important detail. The IR3315 being a high side device needs 12V to turn it on. I installed a MOSFET driver before it, a TC4426. That complicates things.)
Also David for resistor wattage it's a simple calculation:
Volts (V) = Amps (I) * Resistance (R).
Power (P) = Volts (V) * Amps (I)
Put them together:
P = V^2 / R.
P = (5*5) / 4700
P = 0.005W so a resistor rated to 0.25W is more than adequate, and as a general rule of thumb typically every time you see a resistor in any kind of digital signal (e.g. 5V output of an Arduino) vs power (+12V side) service it's almost universally okay to select the lowest power rating.
ChrisV
16-07-2016, 06:30 PM
Been running mine now for a few months. Some cold dewy nights running at 50-70% power. The mosfet doesnt get very hot.
Under these conditions I've measured surrounding ambient temp - is the same as the reading i get with the sensor.
No probs.
Cheers Chris
redtail
22-07-2016, 04:03 PM
Hi Chris
I noticed your sketch for the nano dew heater has a button and a potentiometer but the wiring diagram does not show it.
Can you help me out with a revised diagram.
Regards
Kenny
redtail
22-07-2016, 04:26 PM
Sorry loaded wrong sketch:lol:
julianh72
26-07-2016, 04:35 PM
Congratulations to ChrisV on a nice project!
I hope nobody is offended if I "hijack" this thread - but I was just perusing the JayCar site (that's what I do when it's cloudy, so there's no point in taking the telescope out!), and I came across this project:
http://www.jaycar.com.au/diy-telescope-dew-heater
The parts list runs to a total of about $90 at JayCar (or less if you already have some of the basic components, or shop on eBay):
XC4520 Temperature and Humidity Module: $9.95
XC4454 LCD and Button Shield: $19.95
XC4410 Duinotech Uno Board: $29.95
RN3440 10K Thermistor: $1.75
RR0596 10K resistors: $0.55
RR0572 1K resistors: $0.55
ZT2468 MOSFET: $5.95
XC4482 Proto Shield: $15.95
WC6028 Plug-socket leads: $5.95
RR3264 5W 39Ohm Resistor: $0.48
I haven't done a detailed comparison against Chris's project, and I don't know whether this is a "fork" of his project (or Bob Stephens' 2010 project which he references), but there might be some handy hints for selecting / designing components and wiring, and / or optimising code, for anybody who is thinking of making something similar.
wasyoungonce
26-07-2016, 10:34 PM
This is a good project guys...Following with interest...keep up the good work.:thumbsup:
ChrisV
28-07-2016, 11:28 PM
Julian
Interesting. Different to my build - which I ripped a lot from Bob's. My idea was to try and make an easy build with the nice pre-made modules now available (cheaper on ebay).
Bob's (and mine) use a better temp sensor than the thermistor which isn't as sensitive and can be a bit unstable. But the Jaycar version has some nice ideas.
I'll incorporate some of their ideas when I finally getting around to making mine multichannel.
ChrisV
05-08-2016, 08:48 PM
Attached is an update to the dew heater - includes instructions and updated code. The updates are:
1. changes to the code as one of the arduino libraries was altered which affected its running (well, crashed it actually).
2. You can now run 0- 3 heaters from it, each with their own sensor. It will automatically detect if the number of sensors connected.
- if so = it will control its heater and display its data.
- if not = it will turn off the drive to its heater and not display its data.
NB- there is a change to the pins connecting sensors and heaters.
3. some changes to components - there were some good suggestions about the MOSFET (eg from Damien/Redbeard & Chris/Garbz)
4. Have included more detailed instructions, including how & what arduino libraries to install
Cheers, Chris
ChrisV
06-08-2016, 06:10 PM
Another update. This version has some testing sketches, so that you can check that each sensor works before putting it all together. Also instructions on that testing.
The final test sketch lets you run it using the computer as the display. So lets you test everything except the display.
Some might like to modify for different types of display. Redtail found a nice red 16x2 LCD display and he's helping me get it going.
redtail
06-08-2016, 11:36 PM
I would like to thank Chris for all his hard work and lightning fast response.
Another excellent project.:thanx:
StuTodd
18-08-2016, 08:50 PM
Superb project Chris and sorry for this probably stupid noob question!
I have got all the pieces and went for the Freetronics MOSFET a la Damien.
The wiring diagram on the freetronics website has thrown me (I'm not well up in such matters).
The S connection is from the -(ve) from the 12V battery supply, the G connector to the arduino board but the D connection should come from the negative side of the load? What would that be and then where does the +(ve) wire from the battery go??
Sorry for my confused state..:help:
ChrisV
18-08-2016, 11:57 PM
Freetronics has a diagram
http://www.freetronics.com.au/pages/ndrive-quickstart-guide#.V7W-JMuubqA
Take the +12v and gnd directly from where the power comes in to your unit.
redbeard
19-08-2016, 12:39 AM
You're pretty much on the money. S connection OK, G connection OK, and the D connection is also OK as you connect it to the negative end of the load. Then all you do is connect the positive side of the load to the positive (+) battery. So it's like the load is in series between positive and the mosfet.
Cheers,
Damien.
StuTodd
19-08-2016, 09:24 AM
Thanks Damien.
So the load in our example would be the dew band? The D connection goes to the negative of the dew band, positive battery wire to the dew band too, well, the RCA connectors anyway..
Stu
redbeard
21-08-2016, 05:15 AM
Yep, That's it. :thumbsup:
All correct!
Cheers.
hikerbob
26-08-2016, 10:25 AM
Just had a look at a new Linux device (a Kickstarter project) https://www.indiegogo.com/projects/omega2-5-linux-computer-with-wi-fi-made-for-iot#/ which opens some interesting opportunities in this space. Towards the end of the article it lists a bunch of third part modules which can be used including Current sensing, temp humidity sensors, display etc. I2C, wifi and other bits already on board.
Not available yet from what I can see but an interesting option for the next iteration of dew controllers (and other smart telescope accessories) .
Garbz
28-08-2016, 03:05 AM
Just be careful with how smart you want to make it. "Linux device" is a bit misleading in what people think it means. Most Linux devices like a Raspberry Pi run the full OS like Debian and can do almost anything. The predecessor to this one ran OpenWRT which is in comparison quite limiting.
Still way overpowered and should be able to easily control a dew heater (as well as many other things) but just go in with the right expectations.
Shand359
08-09-2016, 09:33 AM
Considering making myself one of these. Looks like a great project. What size of project box is needed for a 4 channel controller?
ChrisV
09-09-2016, 11:28 PM
Good questions. Not quite sure how much heat that would generate inside the box. What sort of elements would it be driving ? For an OTA and other things ?
Shand359
13-09-2016, 07:00 AM
I am about to start assembling the components for this controller. I am a bit lost with the power aspect.
The extension board has a 5.5mm socket. The wiring diagram shows 12v supply. I assume the 12v supply from the battery pack plugs in here.
Do I need to do anything to my Arduino before I apply power? I don't want it going BANG on me.
It is my understanding that an Arduino is 5v when powered through USB but can take 12v supply through VIN. I take it then plugging the battery into the 5.5mm socket it is connected through VIN then???
Sorry for the noob questions. I'm picking this up bit by bit as I progress with the build......
Shand359
18-09-2016, 02:44 AM
Well, build complete...... almost. MOSFET is in the post, arriving Wednesday...
Power applied to partial build just to check. Did find one issue. Connections for screen asked for SCL and SCA leads to be crossed. When I did this the screen did not work. When I put them the "wrong" way, it all works perfectly.... GO figure
Hagar333
18-09-2016, 12:56 PM
Hi Shand,
I have just tested my new build of this unit all is working except the heater temp sensors do you get a reading of temperature Under the Status on your DS18B20 ?Currently my is returning Status = Error
thank Peter
ChrisV
18-09-2016, 02:01 PM
Peter
The two most obvious things are wrong input port or ds18b20 not wired correctly. Just check that - check the i/o you are connected to compared to the code , and . If still not working PM me.
And make sure you have the updated code i posted recently .
Chris
Hagar333
22-09-2016, 05:58 PM
Up and Running!! :D Thanks Chris for your support
and everyone else who contributed to this great project :thumbsup::thumbsup:
Shand359
28-09-2016, 09:52 PM
http://s182.photobucket.com/user/Shand359/media/CEFE58CA-4FC1-4C34-8EC6-976CF52A4D62_zps6eeaptaw.mp4.html
Got mine finished. Once heaters arrive I can test it completely....
ChrisV
29-09-2016, 12:42 AM
Nice !
And an update. Now does 4 channels.
redtail
10-10-2016, 10:50 PM
Thanks Chris you are a star....great project
Shand359
11-10-2016, 01:27 AM
Nice one Chris....... need to drill another hole now..... :)
DavidTrap
11-10-2016, 10:39 AM
Excellent - will try this out in due course!
DT
Great project. Built in a few hours including a couple of homemade heater straps, and used to great effect last night. Thanks Chris for sharing such a good project.
ChrisV
11-10-2016, 04:08 PM
Thanks all, any problems post or PM me.
Chris
Shand359
20-10-2016, 11:36 PM
Ok, thanks to ChrisV for his help with this.... (would never have been done otherwise...)
I ordered the wrong screen from ebay (2004A) when I first went to build this controller. Re-ordered with the correct OLED one.
The LCD eventually arrived from China and its a HUGE screen compared to the OLED one.
Due to the size of the box I used (to get use of the 4 channels on the MOSFET eventually) I think the larger LCD screen just looks better....
http://vid182.photobucket.com/albums/x144/Shand359/35B10640-CEF4-42E4-A9CA-95D729ECD78B_zps9sa9x8ob.mp4
This is the CODE used for the LCD in case anyone else fancies doing the same.....
redtail
21-10-2016, 05:10 AM
Well done Shand:thumbsup:
Hi Chris,
Thought it worth mentioning a few issues I ran into over the weekend with the latest update. I had not been running a screen with my unit which has been running great on two channels using the 2nd August update, but when a 128x64 oled arrived Friday, I decided to install it, and also update to the most recent code release.
Much frustration ensued until i realized the display initialize is 0x3D. This seems contrary to your notes in the code. The SSD1306 screen I used is in the link below, I'm not sure why it would be different to what you used originally, but maybe something I missed?
http://core-electronics.com.au/monochrome-0-96-128x64-oled-graphic-display.html
Anyway, with that issue out of the way, the next glitch had the display not advance past the intro screen (threshold/cutoff etc..). And this one I can't seem to work out. The code seem's identical with regards to screen function across the two updates, I haven't line for lined the code but from a quick scroll I couldn't find any reasons why it should not work (screen only that is, heater function was fine). If I swap back to the August-2nd update code, make the 0x3c - 0x3D change, everything runs fine.
I will keep hunting for the issue, but thought I would let you know what I experienced.
corduroy
12-12-2016, 08:41 AM
Chris, Awesome design. I love that this can be put together with no bread boarding or soldering. Thank you for sharing!
Is there any chance you could make a code revision to display in Fahrenheit?
Thank you,
Matt
MartinG7MRV
16-12-2016, 01:55 AM
Hi Chris,
Thanks for a great project. Im currently 'trying' to make it work. After a lot of head scratching over v.3 and the dht error, I finally decided to read the entire thread and found v.4! This has compiled nicely.
Im now battling a multi-format OLED which is configured in some odd way, I think for 3SPI. Hopefully get the display working (another, I2C only one on order anyway) soon, and can crack on with the sensors!
Martin
MartinG7MRV
16-12-2016, 04:12 AM
Well, its progressing! After a battle with the display, I now have it running on breadboard with the DHT22, showing the Ambient conditions,
I wonder though if you could clarify something for me please Chris? I also have the DS18 connected, but not yet the MOSFET driver and heater. Should I be seeing readings from the DS18? At what point in the build should I be seeing data other than the Ambient readings?
I recall seeing someone mention a pushbutton somewhere in the thread, but dont see one in your diagrams?
EDIT - Just found the v.4 update 2 folder, thanks! The test sketches were what I needed - my DS18 looks like its duff! Only reading 0.75V parasitic power at the signal pin! Typical, one of the few items I dont have spares of!
Cheers
Martin
corduroy
16-12-2016, 04:47 AM
I have a holiday project!! Almost all orders are placed. One question, is the 4.3k resistor 1/8W?
I think I will use a Powerpole panel mount for the 12v.
My long term plan is to put a RigRunner, this dew controller, Small USB hub, and an Intel compute stick on board which is piggy backed to my OTA. The intel stick will run BYEOS, PHD2, Astrotortilla, etc. Everything will be powered off powerpoles and I will only have one single cable coming from scope to the battery.
corduroy
25-12-2016, 03:49 AM
Yay, mine works. Thank you Chris. This is so cool! I just need a Fahrenheit code update for my Yank brain!
I ran into a few issues so let me list them here for others. This was my 1st arduino build so these are probably all noobie mistakes!
1) I used a 4.7KW 1/4W resistor (no issue but was unsure if I should use a 1/8w or 1/4w)
2) I could not get the sketches to compile until I added the Adafruit unified sensor library.
3) I could not get the DHT22 to read any temperatures. Maybe this is due to how I wired the mono jack. I ordered mono but it appears I got stereo. Originally I had digital 10 signal going to one end of the resistor and digital 10 VCC going to the jack along with the other end of the resistor. I switched signal and VCC on the extension board and then I could read temps.
4) I could not get the display to work by following the diagram (crossing SDA to SCL). When I hooked up SDA from the display to SDA extension board (and SCL to SCL) the display worked.
5) The MOSFET was coming on when it should but I had a constantly warm heater strap. Originally, I had the heater connected to Vin and GND and the 12v supply to V+ and V-. As soon as I switched those the heater only came on when the controller told it to.
By the way, I am using 12v power source with power pole connector. It has 7x USB2.0 ports and is made by Modern Robotics in the US. IT's about $90. I plan to have an ulta light, low power imaging solution using an Intel compute stick as the PC. The stick, powered USB / 12v hub, dew controller will all mount on my scope with only 1 wire coming up to the scope. I put an inline meter off the battery output. At idle this dew controller pulls 0.5W, with 1x 3" heater strap at 100%, I am pulling 5.8W.
Happy Holidays!
https://s29.postimg.org/5ij58ul5j/IMG_1755.jpg
https://s30.postimg.org/m8bgs24yp/IMG_1756.jpg
https://s24.postimg.org/xloj8ej11/IMG_1759.jpg
https://s27.postimg.org/i01xhyn9f/IMG_1760.jpg
https://s24.postimg.org/t6hx4dg5h/IMG_1761.jpg
https://s23.postimg.org/7626bqhob/IMG_1762.jpg
https://s28.postimg.org/6ttuhgicd/IMG_1764.jpg
corduroy
14-01-2017, 06:18 AM
Hello, I am curious how folks have mounted their LCD? There is very little room around the LCD. I am thinking about using a nibbler to cut out the rectangular hole slightly smaller than the LCD then finish with a file. Install the LCD from the underside of the case and use silicone adhesive to secure it in place.
ChrisV
14-01-2017, 09:05 AM
I did similar but held in place with double sided tape. Silicon adhesive might be better !
Hello Everyone,
My wife bought a Dew strap for Xmas, not realising it needed a Dew controller. After searching the internet, I settled on the Jaycar Arduino Dew Heater project. [www.jaycar.com.au]. This is my first Arduino project and the first time since the early 90's I have tried programming, therefore I thought I'd take the easy way out and build an established kit with existing code.
However, the code from the website kept on giving me Checksum errors when reading the DHT11 module. After further research, I was able to modify the code to get around the Checksum error. See below
Offending code was
if(DHT11.getStatus()==IDDHTLIB_OK){
ambtemp=DHT11.getCelsius()*10;
ambhum=DHT11.getHumidity()*10;
dptemp=DHT11.getDewPointSlow()*10;
}else{
thermerror=thermerror|2;
}
Changed to
ambtemp=DHT11.getCelsius()*10;
Serial.print("C Ambtemp: "); Serial.write((ambtemp/10)%10+'0');Serial.print("C AmbHum: ");
ambhum=DHT11.getHumidity()*10;
Serial.write((ambhum/10)%10+'0');Serial.print("% dptemp: ");
dptemp=DHT11.getDewPointSlow()*10;
Serial.write((dptemp/10)%10+'0');
// Check if any reads failed and exit early (to try again).
if (isnan(ambhum) || isnan(ambtemp) || isnan(dptemp)) {
Serial.println("Failed to read from DHT sensor!");
thermerror=thermerror|2;
return;
}
This got me around the CRC error but Ambient Temperature, Humidity and Dew point still weren't displaying itself onto the LCD screen.
Further research I discovered that it wasn't uncommon to have issues reading the DHT11 module. In fact many libraries have been written to try to overcome this. Therefore I decided to try some of the different libraries. Without going into too much detail, I settled on the DHT.H library. I was able to get the LCD screen to display everything once the code was modified to suit the new library.
I don't know if the code is perfect as I am dubious on the Dew Point reading its given and welcome feedback. Anyway, attached is the full modified code for the Jaycar Dew Heater kit using he DHT.H library. Hope this helps anyone who also decided to try it and found similar issues.
Kind Regards
Graham Galea.
ChrisV
27-01-2018, 12:45 AM
I thought this thread died and went to the thread-afterlife.
I haven't tried the jaycar one. I finally put the latest version of the dew heater described in this thread on github
https://github.com/ChrisV77/TelescopeDewHeaterController
It has two possible ways to calculate dew point. They are the standard formalae (at least as far as I know).
This project used a tiny 128x64 display. I noticed a lot of people use the 16*2 or 16*4 displays. I'll do another version for these in a while - but I still reckon that little display is way better !!!
I've now stuck mine in a larger box which also has 12v outputs, usb power out, a usb hub. So its all in one thing.
Chris
Garbz
27-01-2018, 01:26 AM
Hi Graham,
The calculation for Dewpoint follows some well established formulas. They are of varying complexity and efficiency. The detailed formulas produce no error, the simplified formulas are accurate >50%RH which if you're looking to calculate the dewpoint to turn on heaters is good enough since you're going to be interested in the point where the RH is close to 100% anyway.
As for the DHT11, there are some serious variances in quality. The RH it spits out is highly dependent on temperature and I found some variance in the accuracy of the temperature part.
Both Temp and RH are easy enough to test yourself. Stick your DHT11 next to a temperature gauge you know is accurate (surely everyone has those lying around right? ;) ) and compare it as temperatures change.
To test the RH accuracy create a saturated salt solution. Get some table salt and mix it with water. Well over mix it. Add way more salt than will dissolve in the water. Then seal your solution air tight with the sensor. (I did this by mixing it in a small dish and putting that dish and the sensor in a zip lock bag and then sealing the last part of the zip lock where the sensor cable came in with some blutack. Leave it over night and the next morning you should have a calibrated environment with 75.3%RH at 25C or 75.1%RH at 30C, and frankly if you're reading between 70 and 80 on a DHT11 you're already better than expected.
http://www.kandrsmith.org/RJS/Misc/Hygrometers/calib_dht22_dht11_sht71.html
Fundamentally there's a different problem though. The DHT11 tops out at 90%RH and is lucky to read above 80%. If you turn on dew heaters at 80% that's fine, but if you turn on your dew heaters based on a calculation of dew point and difference of your actual temperature you won't actually ever get to your dew point. The calculation will use RH which may top out at 80% after which as the actual temperature drops your calculated dew point will drop with it and the two will never converge as you will for ever think your relative humidity is not 100% and by definition then the current temperature is above the dewpoint.
My suggestion is jump on ebay and buy a 10 pack of DHT22 sensors and then put them through the salt test till you find one that performs acceptably. Or spend big and get better sensor, but you may struggle to find an Arduino library for proper sensors as the cheap ones are favoured for obvious reasons.
ChrisV
27-01-2018, 12:08 PM
I don't know what the jaycar one uses to calculate dew point. Mine uses:
dewPointAmbient = (logEx - 0.66077)*237.3/(0.66077+7.5-logEx);
logEx=0.66077 + 7.5*temperatureAmbient/(237.3+temperatureAmbient) + (log10(humidityAmbient) - 2);
This is reasonably accurate (unlike simpler formulae that have huge errors at humidity below 50%).
As Gabrz says the DHT11 can have trouble above 80% humidity. I figure this could lead to an error of about 2C in the dew point calculation. I'm not going to lose sleep over that. There's probably more errors due to placement of the scope lens temperature probes which provide the feedback control to the heater (difference between ambient dew point and temperature of scope glass which has to be heated).
Also the Jaycar uses as resistor to sense scope temp? I don't think think will work as well as the DS18B20s (which theoretically doesn't require any calibration)
Edit: actually error might be a bit more, maybe 3-4C error between humidity at 80% v 100%. But for the purposes of a controller I don't think it matters too much, the other errors probably have a bigger impact.
Can I suggest that you look into the Bosch BME280 sensors. Superior than the DHT sensors and also measures pressure.
You can get them from AliExpress or ebay for about $5.
Follow the links here (https://www.adafruit.com/product/2652) to find the Arduino drivers.
Garbz
28-01-2018, 04:53 AM
Chris you're right with the errors 3-4 degC is a good estimate. Assuming it caps at 80% RH at 5degC the dewpoint will be calculated at 1.8C
I would factor in a small error band in this and turn on my dew heaters when I'm within 5-6 degC of the dew point just to be on the safe side.
Sidenote:
I needed the simplified formula because my dew heater had to handle powersuplies, USB interfaces, autofocus and a lot of other things so I had no spare microcontroller cycles to waste on doing a logarithm :)
Actually I was so tight that I optimised the simplified instruction to avoid dividing by 5 as well by pre-multiplying by 410 and then logically shifting right by 11.
The proper formula took 4678 instructions and 1658b of code (20% of the microcontroller's program space). The simplified formula was 407 instructions, and 268b of code. My final one was 74 instructions and 68 bytes. :camera:
ChrisV
28-01-2018, 10:00 AM
That's pretty tight for processing !! I didn't have to worry about economy - which is a good thing given my hack coding skills.
On mine I had a sliding scale of heater power. Kicks in when within 5C (or maybe it was 6) of dew point. And increases by 20% with each degree.
I dare not check the calibration on my dht11 using your salt bath. It would probably be way out ...
Hello All,
I took the Dew heater kit out last night and it seemed to work. IE: Heater strap connected correctly to the MOSFET, heating up. The thermistor and Ambient temperature reading correctly. However, the Ambience Humidity was reading 99% and Dew Point 42C. I suspect this is not right.
ChrisV, I used your code for the Dew Point. Thankyou.
However, I suspect the Dew Point reading of 42C is not right because of the high Ambient Humidity in the calculation.
Next steps. Calibrate the DHT11 as proposed by Garbz. I may also upgrade to a DHT22 and DS18B20s.
Thanks ChrisV, Garbz and Luka for the feedback.
Kind Regards
Graham Galea.
Garbz,
I'd love to get a copy of your simplified formula for Dew Point. Below are the 3 versions I have been using. I don't know which one is more economical when it comes to microcontroller cycles.
Side Note: I just realised ChrisV had a simpler version of his code commented out. Didn't see it earlier. I'll try that next.
// Read Dew Point Slow in Celcius;
// delta max = 0.6544 wrt dewPoint()
// 5x faster than dewPoint()
// reference: http://en.wikipedia.org/wiki/Dew_point
double a = 17.271;
double b = 237.7;
double temp_ = (a * (double) ambtemp) / (b + (double) ambtemp) + log( (double) ambhum/100);
int Td = (b * temp_) / (a - temp_);
Serial.write((Td/10)%10+'0');Serial.print("C dptemp: ");
// dewPoint function NOAA
// reference: http://wahiduddin.net/calc/density_algorithms.htm
double A0= 373.15/(273.15 + (double) ambtemp);
double SUM = -7.90298 * (A0-1);
SUM += 5.02808 * log10(A0);
SUM += -1.3816e-7 * (pow(10, (11.344*(1-1/A0)))-1) ;
SUM += 8.1328e-3 * (pow(10,(-3.49149*(A0-1)))-1) ;
SUM += log10(1013.246);
double VP = pow(10, SUM-3) * (double) ambhum;
double T = log(VP/0.61078); // temp var
dptemp = ( (241.88 * T) / (17.558-T));
Serial.write((dptemp/10)%10+'0');Serial.print("C dewPointAmbient: ");
// Calc dew point if no error reading DHT11. ChrisV code.
// simple calc = dewPointAmbient = temperatureAmbient - ((100 - humidityAmbient)/5.0);
// more complex calc
double logEx=0.66077 + 7.5*ambtemp/(237.3+ambtemp) + (log10(ambhum) - 2);
dewPointAmbient = (logEx - 0.66077)*237.3/(0.66077+7.5-logEx);
Serial.write((dewPointAmbient/10)%10+'0');
ChrisV
28-01-2018, 11:43 AM
Graham
That's weird. The dew point should approach the ambient temp as humidity approaches 100%. I'll check with mine.
What was the ambient temperature?
Chris
Edit: I just realised you are using the Jaycar one. I don't think its very good - I wouldn't trust the way they measure temperature with resistors, plus it uses the DHT11 versus the DHT22 in mine and others
ChrisV
28-01-2018, 11:49 AM
Thanks Luka, will have a look at them.
I might also try and make another version with a dedicated circuit board. I've been following the onstep project and they now make them with the easyEDA website which is very quick and cheap.
Garbz
28-01-2018, 10:52 PM
Microcontrollers hate logarithms, floating point and division. However if you're just calculating a dew point and you don't have concerns about sleeping to save battery life then there's really no benefit. I'm using a slight variant of the "simple calc" formula you already listed:
That one is an order of magnitude more efficient than the full formula.
I changed that to:
and I used deci-degrees for everything i.e. 15 = 1.5C The result is a pure simple integer maths and critically, no division. A floating point division takes 100s of instructions. A logical shift right takes a single instruction (or 11 in this case).
1>>11 = 1/(2^11) = 0.00048828125. If you pre-multiply by 411 you get 0.20068359375. Very close to what you get if you divide something by 5.
Okay that is probably all of no interest to you :lol:
But this here may be more interesting to you:
Below I've graphed the relative error for dew point calculations at 5C. Note at 0C the max error increases to +1.2C and at -5 it's +1.5C. However the dewpoint calculation error decreases the closer to the dewpoint you get. At 90%RH you're at 0.5C error.
ChrisV
28-01-2018, 11:55 PM
So go the simple calculation. The big error is all down at low humidity which is when you are unlikely to need much dew heating
Hello All,
I quoted the wrong humidity in previous response. It wasn't 99%. I got confused with the Heater output.
Anyway, I went back to the original code because I wasn't happy with the Dew point reading. Made some modifications to how data was read, copying code from the library example. The new code got around the original DHT faulty problem.
Code and Dew Point reading working as it should.
Yes, I am still using the Jaycar version but will be upgrading to ChrisV version once I buy the new parts.
Kind Regards
Graham Galea
ChrisV
25-03-2018, 05:32 PM
Updates etc are now on Github
https://github.com/ChrisV77/TelescopeDewHeaterController
adavis
22-07-2018, 11:27 AM
Hi Chris, I am having a few issues with the dew heater, I was hoping that you might be able to help me out.
1. the DHT22 is reading WAY his, like 235 degrees high, and a corresponding 1000% humidity.
2. the temp sensor is not reading at all. When I run the test code it errors out citing pin 3,5,6 but the instructions say to use pin 12, though Ising 3,5,6 produce the same results.
I am wondering if you have a version of the code that works with a single sensor and heater, Im wanting to use it for camera use, so only need one.
cheers
Andrew
ChrisV
22-07-2018, 05:50 PM
Its been a while since I've looked at the build.
Are you using a nano?
To start, have you tried the v4a-test-DHT22, its on the github link from post #80. That will just test the DHT22 - on pin 2. Don't worry about connecting the DS18B20 sensors or the heater mosfets. This will print the data via the serial monitor on your computer (rather than the OLED display).
When you get that sorted I can help you out with a single channel version - its a minor change.
adavis
23-07-2018, 08:55 AM
Hey, THANKS for picking up the response so fast.
Yes, Nano, and the latest test file from GitHub.
Heres the output.
Dew Heater Controller
DHT22 test - serial output to computer
Digital pin Status Temp (C) Humidity (%) Dew Point
2 OK 230.4 998.4 397.0
2 OK 230.4 1024.0 399.5
2 OK 230.4 998.4 397.0
adavis
24-07-2018, 03:32 PM
To round out the solution in case anyone else has the same issue that I did......
It turns out that I have a DHT11 temp/humidity sensor, not the DHT22.
The fix was to simply replace every occurrence of DHT22 with DHT11 in the code and it works a treat now.
cheers
Andrew
ChrisV
25-07-2018, 03:08 PM
Glad to see you got it resolved. Be interesting to see how it goes.
Looks like the DHT11 has lower temperature accuracy than the DHT22, ±2C versus ±0.5C. Also it says its best for 20-80% humidity versus 0-100% humidity for the DHT22.
I'm sure it will all be fine as its all pretty gross control - fuzzy logic-like.
Paullus
10-03-2019, 10:33 PM
Hi everyone,
My mate Josh and I built a couple of these dew controller over the past few weeks. Josh ordered the parts via ebay and Jaycar (whichever was cheapest/most convenient) and generally speaking it was fairly straight forward thanks to Chris' (and others) instructions and coding. The only major issue I had was getting the display to work, as the ones we ordered were SPI by default and needed slightly different pinning to get them to work as I2C. My particular display didn't need the SCL/SDA pins swapped, and also need an extra pin from the Digital 4 Signal pin to the RES(ET) on the display. I also had to do some minor soldering to on the display board to convert it to I2C, as per the instructions printed on the board.
I used the V4 program as I think the V5 shares the same D4S pin that my display used and I didn't have enough room to squeeze in the momentary switch. I was almost finished construction when I discovered the V5 and decided it wasn't worth the effort to fix those couple of issues. All 4 channels have been tested and are all working fine with the V4 program.
I did a very tight build in a smaller jiffy box where I spent more time measuring and piecing it together in my mind than I did actually constructing it. It'd be quicker and easier to use the next size up (which I had) but opted for the compactness of the smaller box.
Anyway here's some photos of the finished product. Now I just need some clear nights to put it to use.
ChrisV
10-03-2019, 11:00 PM
Someone is still making them, great! Thanks for reporting your build Paul and Josh. I've got mine in a larger box, but I also have another Arduino in there with a focus stepper controller and a usb3 hub.
I should go back and fix the instructions - scl and sda shouldn't be swapped.
I'm on about v7 now, just never uploaded. Gone back to a 16*2 lcd display - easier to see with my glasses etc. Also changed to a different ambient temperature/humidity sensor on I2C.
Also, there can be issues with long lines to heater if you have a close parallel line to a sensor - the heater signal can screw up sensor reading. I've now fixed that. I'll get my act together and upload it all.
Astroman
28-04-2019, 10:10 AM
I'm starting to look into this again, combining this heater with a Stepper controlled Dustcap. Still deciding whether to add a Light to the Dust cover for flats, so I don't have to be out with the telescope.
zGunBLADEz
17-05-2019, 06:47 AM
Hi, can you post the code for the LCD 2 lines?? Thanks. Also i sent you a pm i hope you can give me a hand here..
This is exactly what i need for my project.
Corpze
25-05-2019, 03:42 AM
Hi, just found this thread and love the simple sulotion regarding components, i have also reviewed the code a bit and was thinking if there is possible to change channel 4 (both ds18b20 and the 12v output) to a fan controller loop to cool a primary mirror.
For me, two dew heater channels is enough but a fan output would be awesome.
ChrisV
25-05-2019, 09:15 AM
Hi Daniel. Should be simple enough. How is the fan cooler supposed to be controlled?
- does it just turn on for a certain amount of time or
- oes it sense the mirror temp and turn the fan on until the mirror drops to within a few degrees of ambient?
Let me know.
One other thing. Don't get the components for a week or two as I'm making some changes - different ambient temp/humidity sensor, and big changes to the code. I'll have it all up on GitHub soon.
Chris
Astroman
25-05-2019, 08:51 PM
Sounds interesting Chris. Look forward to what you have in mind. This is one project I do plan on doing now, since my guide-scope developed dew the other night, cutting short my imaging session. Would have been nice to have it automatically take care of it for me. I just have to fit it in somewhere between setting up the automation of my roll off roof observatory and taking images.
ChrisV
25-05-2019, 11:52 PM
New update on github
http://github.com/ChrisV77/TelescopeDewHeaterController
It has a few more options
- ambient temperature/humidity - can use either DHT22 or AM2320 (change in wiring)
- display: 16x2 LCD or 128x64 OLED (no change to wiring)
Also
- improved some odd behaviour due to interference between DS18B20 sensor and heater output if wires run close to each other
- has a switch to change mode
- optional output to computer and simple control via arduino serial monitor (I'll be making a windows app for this soon)
Corpze
26-05-2019, 01:44 AM
Actually, I have choosen a different kind of DHT sensor, the AM2301, mainly because the enclosure, and some tests show it is on pair with dht22 in accuracy.
Regarding the fan, it should be set probably something like this;
Temp diff > 3 degrees C - 100% fan (Both under or over primary mirror temp)
Temp diff between 2-3 degrees C - 75% fan
Temp diff between 1-2 degrees C - 50% fan
Temp diff between 0-1 degrees C - 0% fan
I am thinking taking the differential temperature measurements from the ambient DHT- sensor and the DS18B20 attached to the primary mirror.
It should be doable uding the 4th channel of the IR540 board i presume?
Regards, Daniel.
ChrisV
26-05-2019, 12:31 PM
Yes, but you might want to put a diode across the fan for back EMF protection.
Corpze
20-06-2019, 04:53 AM
I will do that, thanks for the heads up!
I have now gotten all of my pieces and fired it up, the LCD works fine but i have problems with my ambient sensor, beeing the AM2301 (DHT21)
When i try with a stand alone "dhttype dht21" -code it works fine, but i get error (intermittent readings and at wrong values) when trying your code, do you know if the support for the DHT21 is not in the DHT.h you are using?
Both works on floats so i don't think it that kind of error.
Ukastronomer
20-06-2019, 05:41 AM
I think my definition of easy is paypal and an astro supplier, also I paid about the same for a new one rather than home made but good luck
ChrisV
20-06-2019, 09:12 AM
You need to read the advertising Jeremy. It doesn't just say 'easy', it says 'easy to make' :)
But that Ukrainian store pointed out by Matthew in another thread is excellent value. Certainly worth looking at if you don't want to spend loads and don't want to bother making one
Corpze
29-06-2019, 12:27 AM
Does anyone have a photograph or schematics of the connections of the mosfet 4ch board?
I just can't get my head around how to get mine working.
All four channels are set to 100%, even if i have all signal cables disconnected.
The connections I have made is GND and Signal between the Arduino and the input to the mosfet board.
On the 12v side of the mosfet board I have connected 12v and GND to the 12v input terminal, the ch1 - ch4 i have connected 12v and gnd to the phono terminals.
Some questions i have are;
Do you guys also connect the 5v+ to the input side of the mosfet board?
I have attached a photo but it isn't the best one.
ChrisV
04-07-2019, 03:30 PM
Like this Daniel. You can warm the DS18B20 to make it turn off the heater, or ditto for the DHT22 to turn heater on.
Check the wiring input to the mosfet from the arduino
S = signal from arudino pin 9 for CH1, etc
+/- = +5V, ground from arduino. If you have the Nano then its a simple connect for each channel
Corpze
09-07-2019, 02:53 AM
Hi again.
I recieved two new boards (4ch irf540) but both of them puts out 12v regardless if the respective channel is activated by the arduino or not (the led on the 4ch mosfet board is only shining when the arduino output is activated by the code ( as it should be)
But even if the output from the arduino is 0% and the LED on the mosfet board is dark, it is 12v to the heater band and it gets really hot.
My connections is correct on the low-level side, as the LED is on or off when the arduino activates the output.
The 12v side is connected as 12v+ in and ground (shared ground with the arduino)
The outputs are connected 12v+ and ground from each channel to a RCA connector with same ground as the casing (and arduino)
I just can't seem to understand why the mosfet is always on?
ChrisV
16-04-2023, 12:05 PM
After a long break I've made many modifications to the dew heater. Its now a simple stand alone unit but can also be controlled via USB on a PC to monitor it and change mode/settings. The basic Arduino coding and .exe are here
https://drive.google.com/drive/folders/1gwNykrJM1NZTUBiBX8Roz2UySlsGebgR?u sp=sharing
Might take a few days to re-write all the instructions
inertia8
13-06-2024, 09:00 PM
Just wanted to say, excellent work!
Shall be building one of these after deciding upon which screen to use.
ChrisV
14-06-2024, 05:02 PM
Inertia8
I don't use a screen anymore. Makes construction simpler and frankly it was just one extra thing that could go bung. I made a PC app that sets it all up. You can then just let the box run and do its own thing; one less thing to think about while imaging. Or you can have it connected to a PC to see what's going on, or change settings. I also redid the feedback controller; uses PID and is much better. This is also good cause it greatly reduces power consumption!
Instructions should all be on the Google drive link with my last post. But I will go through and check, and add some photos of new build. But any questions reply in the thread or PM me.
inertia8
14-06-2024, 09:05 PM
Cheers Chris.
Mines actually for a 10in dob and visual observing.
I had severe dew last weekend and had my observing cut short. Telrad and finder dew up, then secondary. Primary looked horrible but it does under red torch...
At a minimum I'm doing it for telrad, ep and eyepiece. Figured I would do the secondary but that looks tricky with the thin foil on one spider for wiring.
I would prefer a screen just to confirm what's going on etc. can the little oled be dimmed right down?
ChrisV
15-06-2024, 08:33 PM
The OLED. I just put some red translucent plastic sheet over it. Dimmed it and kept the dew out!!
inertia8
18-06-2024, 10:05 PM
Excellent, I've done a bunch of ordering from Ali.. along with the kit to try and repair a fried Goto board or two..
pinakoza
10-01-2025, 12:53 AM
Thanks, Chris, for sharing all these precious information :)
I have checked other similar dew heaters as well, but yours is the simplest with no need for any custom PCB, few ready to buy components, easy to build, and still with great functionalities. I already ordered some components that I was missing in my stash - like expansion boards, Mosfets, AM2320 etc.
For dew heater, I mainly use the element from inside the Pipe Heating Cables available here in Canada. I cut the desired length and connect it with either an old USB cable (for 5v), or some 18-20 AWG wires for 12v application. I have been successfully using them since 3-4 years now with ZERO issues. They are all covered by a Velcro tape (on one side) and a thin cotton tape over the Velcro, while the element is lightly covered by the same thin cotton tape.
This time, I want to go for Planet photography using my 8" and 12" Newtonians, and I want to have a smart control on dew heaters so as not to overheat the primary mirror. That's where I came across your smart dew heater page.
I will keep you posted with the progress. I am attaching some pics of my dew heaters.
https://photos.app.goo.gl/mgBL2ZYQBx3RDiWc7
pinakoza
25-01-2025, 01:07 AM
Hi Chris, thanks for your support.
I finally made one using the Dew Heater v.6.2.3. Most hardware is connected and working as intended. I tested it on PC and Button mode; both of these modes working great.
The sensors that I have used are AM2320 and DS18B20 with 16x2 LCD and 4ch Mosfet board. I haven't connected any heater output jacks yet, but just tested the whole thing completely using ice packs (to cool down DS18b20) at room temperature.
PC app is truly great. I love it. It displays lot of useful information. Thank you very much for making this app :)
How I made it finally work after 3 days of disappointment?
By adding 2 sec. delay. I figured it out by random testing only:
------------------------------------------
sensorAmbient.ino file
------------------------------------------
// get ambient temp & humidity data from AM2320 or BME280 sensor
#ifdef AM2320_ON
void resetAmbientSensor() {
am2320.begin();
}
void getAmbientData() {
// read ambient temp and humidity - takes 100s of msec?.
humidityAmbient = am2320.readHumidity();
delay(2000);//EXTREMELY IMPORTANT DELAY
temperatureAmbient = am2320.readTemperature();
calcDewPoint();
----------------------------------------
This one line changed everything - from disappointment to joy :D
I hope this will help someone having similar issues of getting readings from AM2320 sensor.
pinakoza
26-01-2025, 03:37 PM
Sharing some pictures of my dew heater.
https://photos.app.goo.gl/mgBL2ZYQBx3RDiWc7
Leo.G
28-01-2025, 01:57 PM
This seems like an interesting thread I will go through later. I still have my old camera thingie here, a row of resistors I plugged into 12 volts which got just warm enough to keep my camera lens clear but not warm enough to interfere with the mechanical (greased) components of the Nikon lens.
Sorry Chris I haven't been through the thread yet but did you make your own dew straps too or are you buying the cheaper camera type ones?
I know the camera ones come in a variety of sizes which will fit around certain sized scopes and good prices.
I keep various shades of nail polish here mainly for locking screws and components on electronic circuits but also occasionally for dimming nuisance LEDs on boards.
Nothing expensive, clearance price stuff from the reject shop. Also great for marking locks and keys when you're too stupid to figure out big locks generally take big keys (me)....
ChrisV
29-01-2025, 10:04 AM
Leo
Thanks for your comments. In the past I have made my dew straps. I haven't tried the resistor method but I'm sure its great. I have used nichrome wire covered in heatshrink (I have some instructions somewhere to sort out length needed ...). I lay this on aluminium tape which will be on the scope side, put gaffa tape on the back then insulation tape to keep the heat in & hold it all together, and add some velcro straps.
I haven't used ready made heater straps but just got some cheap ones on aliexpress to try out. As is, they can only support the auto-ambient mode of heating (uses dewpoint v ambient temp to drive it). But I would have to replace the cabling (or just add another cable) as I use 4-core cable for the auto-heater mode which requires a temp sensor on the scope.
Nail polish - good idea. Also be good to keep moisture out of the unit.
I'm currently revising the instructions and some of the coding as its all a bit of a mess; but WORKS (well except for some current issues with AM2320)
Leo.G
31-01-2025, 01:00 PM
Thanks Chris!
I have Nichrome wire here I bought to make some straps but until I just read this I forgot I even had it. The only reason I didn't progress with them was I didn't want to use duct tape, it peels away and leaves so much stickiness. I'll find something else which is simple or get the old sewing machine out and make something decent
A little trick with Nichrome wire, since it can not be soldered, there are little crimp fittings used for fishing, they are great for crimping a connection wire to Nichrome wire and very cheap.
ChrisV
12-02-2025, 02:31 PM
Hi all
For any users out there, I've just updated the arduino code (v6.3) & optional windows app. I have also included some vaguely sensible instructions for build & use. The new version is compatible with any older builds.
Its all on github, here (http://github.com/ChrisV77/DewHeaterControllerArduino). This is where I'll put everything in future.
pinakoza
12-02-2025, 03:05 PM
Thanks Chris for sharing this new version. I uploaded it to my Arduino, and its working great. As you know, I am using it in Button Mode with LCD1602. I tried using it in PC mode, and that works great too.
I want to share pictures of my build, but icenspace is not letting me do it. My pics are all around 100kb, but still the website logs me off as soon as I press the final upload button! My old and new pics & videos of dew heater are sill available to watch at this link:
https://photos.app.goo.gl/mgBL2ZYQBx3RDiWc7
Stonius
13-02-2025, 11:19 AM
How do you tune the PID - wouldn't every system have a different thermal inertia?
ChrisV
13-02-2025, 04:28 PM
Markus
Good question. There’s a hell a lot of thermal inertia. To tune it, I did steps from ambient to 26C (step up for 20-30min) - it took ages to do. Followed these three standard(ish) steps
1. Set P-value (proportional gain): start with PID = 0,0,0. Increased P until it could at least closely approach the step set point without much oscillation when it got there. NB: there will be some error over time when it reaches the new stable value.
P=100 was about right.
2. Set I-value (integral gain): with P=100, D=0, increase I to reduce the long-term error. This will be at the expense of some oscillation at the new set point.
I=150 was about right.
3. Set D-value (differential gain): with P=100, I=150, increased D to reduce oscillations (without too much initial overshoot).
D=10 was about right
After getting it set up on a one heater strap with my 80mm refractor, I then tried the same settings with 2 other things – 50mm guidescope & a 30mm guidescope. They were all pretty similar. And you can pick than from my graphs – have to change PID values a lot to get any change in responsiveness.
You don’t even really need PID but I used it just cause there’s a nice library for it. I originally just used difference between set-point and actual heater temperature but I found it to be very sluggish and always below the set point - that’s the nature of P-only control.
This has a great graph stating the above process
https://forum.arduino.cc/t/pid-library/333329
Hope this helps
Stonius
18-02-2025, 04:04 PM
Thanks for the detailed reply Chris, and thanks for creating the project. Strangely enough, I've been working on my own project with very similar specs devices, but I don't really know what I'm doing - I'd never even heard of PID control systems till about a month ago. I've been struggling to tune mine - there's a delay of about 2 minutes before any heating of the mirror registers with the sensor. I've been using ChatGPT to help me refine code and it's been suggesting *much* lower values - maybe that's why I've been having offsets and oscillations. It's been great, and I've learned a ton, but I can tell from your code that you certainly know what you're doing - much more than I do. I'm thinking I might just abandon my code I have been struggling with for weeks and just adopt yours because it's much better!
One thing I've done which I was pretty happy with was using the OLED to display graphs of the sensor data over time, as read from an SD card.
Anyway, I just wanted to say thank you for doing this project it's certainly going to help me a lot!
One question - are there any issues with the ambient sensor placement? I worry when it gets really dewy that the sensor will get wet and saturate. I assume that as long as it's not facing the sky it won't get physical dew on it, but I want to avoid droplets forming and running, Maybe I'll attach it just inside the lip of the top ring of my Hubble UL16.
Anyway, nice work - what you've done is impressive and very helpful and thank you for sharing it with the community.
Markus
pinakoza
26-03-2025, 08:16 AM
It's almost 3 months now since I built this dew heater. Few days ago, the temperature here in Toronto-Canada went down to -11 (feels like -20), but the sky was all clear, and I decided to shoot M104. To my surprise, the primary and secondary mirror, both remained free from dew/fog all night. When I checked the mirrors in morning, and also the pics, they were all crystal clear. That's truly surprising for me as before the installation of this dew heater, they used to get foggy in just 2-3 hours! In last 2 months, I have used my scope almost 2-3 days/week with no dew related issues at all. 100% success.
Thanks Chris, you have truly gifted us a great dew heater which is still very simple to build and use.
I am also sharing my pics heater pics here. You can see that my primary dew heater strip is not even touching the mirror surface. It's about 5-10 mm away from mirror, but still works great. While the secondary mirror heater strip (6 volt, 0.5 amps) and cable are just about 1mm thin (just as thin as spider vane) so not blocking any light. I hope this info and pics will help someone.
Leo.G
27-03-2025, 07:43 PM
That's a nice job on the build, I love the plastic food storage containers for outdoor projects and have used them myself on several things. The ones with the silicon seal are great and instantly waterproof.
Where I live it only drops down to -12C on the coldest of winter nights but I have friends who live in Canada, you get some nasty cold.
I saw an interesting device recently when a member was selling a curved spider, he had a small set of resistors in parallel under his secondary with one vane live and insulated from the tube assembly while the other vane directly attached to the scope provided the earth. My interest is in owning an RC8 carbon and with my dew shield it never gets any moisture on the primary (or not so far) in winter but the secondary fogs up quite easily. Except I'm still terribly confused by the collimation process if I ever have the secondary out I'll be doing something similar with resistors providing the warming of the secondary. Though I won't rely on the tube providing an earth and a live leg on the vane. I have self adhesive copper tape here I'd run down a vane out of view for my power needs.
pinakoza
30-03-2025, 04:19 AM
Hi Leo, thanks for your feedback. Yes, I frequently use sealed food containers from Dollar store as a project box. They are cheap and easy to cut out using heated knife/soldering iron. And if the project fails, nothing much to loose :D
Once, I too had a similar idea of using two different spider vanes as conductors, but then it requires to add insulators as well, so left it!
I actually striped down an old non-functional HDMI cable and used its thin single strand wires as sensor and heater cables. The width of two such twisted wires is just as that of a spider vane, and can easily carry the current for the sensor and 0.5 amps to secondary mirror heater. Problem solved :)
As you have mentioned, self-adhesive copper tape is a good idea to use as a conductor. I have used it in some of my past projects and this one too. If you check the 4th picture (Power supply, Primary heater band & Multimeter) in my post #119, you will see the Copper tape covering the top half of resistor row. Here, I have used it to spread the heat to the space between two resistors.
I will share more detailed pics of my build in a day or two.
BTW, Carbon RC8 is really a good choice. In last few weeks, I too was looking for a used RC6/8 or Nexstar 6/8SE (portable enough for travel visual astronomy), but then ordered SW-Virtuoso 150p. Its arriving soon.
Leo.G
30-03-2025, 10:56 AM
Yes, the carbon RC is very light, bulky but light.
pinakoza
30-03-2025, 12:49 PM
Hello Chris, as discussed, I am uploading the pics from the inside of the dew-heater, and some other pics related to it's installation and working. As I mentioned to you earlier, the internal looks very chaotic, but for me they are very clear and well labelled (though only one label is visible in the pics attached), and insulated.
The dew heater's plastic box itself is glued to thick cardboard using hot glue, and then a candy stick is hot-glued horizontally to the top of the cardboard, and wedged between the telescope body and two mounting rings.
The entire dew-heater/power box is itself powered by 16 AWG umbilical cord (13 amps capacity) attached to 12v 30Amps power supply (using XT60 power plug). Dew heater has three 12v (5.5 x 2.1mm dc female jack) and one 5v 3amps USB output (through buck converter). One of the 12v output is further reduced to 6volt (for secondary mirror heater) using buck converter.
DS18B20 Sensor jacks are regular 3 pin stereo jacks, and cables for the sensors and secondary mirror heater are made up of the thin cables salvaged from an old 10 feet HDMI cable. Primary mirror heater cable is 22awg cable, and protected by 2amps mini fuse.
EQ6-R Pro mount has its own power supply.
Pictures attached.
ChrisV
10-04-2025, 06:38 PM
Have recently made a few updates to the dew heater controller & its PC interface. Its now on github, HERE (https://github.com/ChrisV77/DewHeaterControllerArduino/tree/master). I'll even do occassional updates and fixes. So if anyone is interested, they'll all be on github.
vBulletin® v3.8.7, Copyright ©2000-2025, vBulletin Solutions, Inc.