Return to the Cloudy Nights Telescope Reviews home pageAstronomics discounts for Cloudy Nights members
Get a Cloudy Nights T-Shirt Submit a Review / Article

Click here if you are having trouble logging into the forums

Privacy Policy | Please read our Terms of Service | Signup and Troubleshooting FAQ | Problems? PM a Red or a Green Gu uh, User

Equipment Discussions >> Equipment

Pages: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | (show all)
dan_h
Carpal Tunnel


Reged: 12/10/07

Re: How to make an automatic dew controller - Arduino new [Re: Pauls72]
      #5568928 - 12/13/12 10:16 AM

I have been following this thread closely. The subject is intriguing and the project is a very nice implementation of technology. I do have some questions though and I hope you do not take these the wrong way. They are probably born out of lack of understanding and are not meant to be a criticism.

Just how automatic is this package? Specifically, can a setup be transferred from one scope to another without a lot of fudging to get the thing running efficiently on a new installation or does the user have to adjust a number of parameters to get it going? Can the needed adjustments be made easily in the field?

dan


Post Extras: Print Post   Remind Me!   Notify Moderator  
ThadeusB
member


Reged: 11/14/12

Loc: Somerset, UK
Re: How to make an automatic dew controller - Arduino new [Re: dan_h]
      #5569080 - 12/13/12 11:34 AM

Hi Dan,
I have just commissioned mine; its working very well indeed, and yes, it is fully automatic I've found. It does take a bit of experimenting to achieve the right temperature differentials for a particular scope.

So in view of individual scope requirements, I would suggest that it may not be an instant transfer from say a large SCT, to a smaller scope such as a refractor. However, as I am going to do, one can have a library of sketches that are set up for different scopes. It is then a simple matter of compiling and uploading a specific sketch to the Arduino to match the scope to be used. This is very simple to do, once the differentials have been determined for particular dew straps. Clearly it would require a PC at the location.

Paul S is helping me a great deal with all this, and is working on individual duty cycles for each output. I'm evaluating the simple version at the moment, that can only be tweaked within the sketch. However, Paul may be coming up with a version that can be controlled externally, with switches or pots, or BlueTooth.

Its a growing animal.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pauls72
professor emeritus
*****

Reged: 10/28/07

Loc: LaPorte, IN
Re: How to make an automatic dew controller - Arduino new [Re: dan_h]
      #5569348 - 12/13/12 02:09 PM

Dan,

Up through release 3.8 there where 2 potentiometers (variable resistors or miniature volume controls) as the only user inputs. These control the screen contrast and the duty cycle of the output straps. The duty cycle is the percentage of time that when required to be turned on they actually are turned on.

There are a number of parameters that are pretty much a one time deal. Do you
want to display the temperatures in Celsius of Fahrenheit? Do you want to use the Duty Cycle Function? Do you want to use the Low Voltage Detect, stop running the dew straps if the voltage falls below 11.6V?

boolean temperatureC = 0; // Set to one to display tempertaures on Celsius. Note: All math and debugging is still done in Fahrenheit.
int correctionDHT = 0;//-2; // DHT-11 Temperature sensor correction value.
int noDutyCycle = 0; // Set this to 1, to use without duty cycle input and run at 100% when required
int noVoltage = 0; // Set this to 1, to use without voltage detect input.



There are these 4 variables that you set how much you want the dew strap temperature sensor to be above the dew point. We turn on the heater to try and obtain this temperature and turn it off when reached. Initially I had these set to 10 and found that was over kill for my 102mm MAK, 80mm refactor and eyepieces. So I reduced them to 5 and it has worked well for me. Now when cold weather set in Phil found that 5 temperature was not enough for his 10" SCT, so he bumped the 1st value back up. I hadn't had my C11 out in a couple of months when I needed the dew heater, so I didn't know this.

int dewAdjust1 = 8; // Temperature difference between the Dallas one wire heater sensors and the controller DHT-11 sensor, in Fahrenheit. One for each output port so you can adhust the outputs individually.
int dewAdjust2 = 5; //
int dewAdjust3 = 5; //
int dewAdjust4 = 5; //


These would be the only parameters you might want to change when going between different size scopes. But I'm sure you can find a value that would work for both. My future plans are to make all the parameters adjustable on the fly using either an Infared remote control or BlueTooth connect from a cell phone/PDA.

The system has up to 5 sensors. The DHT 11 or 22 which provides the reference temperature, the humidity and is used to calculate the dew point temp.

Then you can have between 1 and 4 Dallas temp sensors. You place these under your dew straps.

When you power the system up, it will look at how many Dallas temp sensors you have and then use that many outputs. Only 1 sensor, only the first port is used, etc...

The system will strive to keep the temperature of each of the Dallas temp sensors x number of degrees above the calculated dew point and keep it there or above. It does this my turning the outputs to the dew straps on and off. The system doesn't know or care if you have a 65mm reflector, 14" SCT or 20" DOB. It checks all the sensors and decides what to do with the dew heaters about ever 12 seconds, so about 5 times a minute.

It also displays a bunch of information, keeps track of the date and time, stores all the sensor and voltage readings in a couple memory chip every 15 minutes or so (kind of the way your cell phone stores contact information). It also checks for low battery input voltage and shuts down the dew heater outputs if it fall's below 11.6V to keep from killing your battery.


I could have put the display contrast and duty cycle pot's on the outside, but chose not too. Especially since I plan to do away with them.

Phil uses his in his observatory and had to put his DHT sensor up on the OTA to get a good reference, near the dome opening to the outside temperature and humidity. I use my scope outside in the yard and hang the dew controller from the tripod spreader. Since all of my equipment is out in the open, I don't have the problem of being in a protected environment of an observatory.

I am always open to suggestions and for changes to make it better. What else do you think needs to be automated?

For the Arduino I do have a second Arduino Uno 3, a tilt sensor, 3 axis gyroscope sensor and magnetometer (compass), stepper motor controller with motor and 4 channel relay module and Ethernet shield. I don't see how any one of these can help with a dew controller??? I'm thinking about another project of an automatic focuser using some of this stuff.


Post Extras: Print Post   Remind Me!   Notify Moderator  
dan_h
Carpal Tunnel


Reged: 12/10/07

Re: How to make an automatic dew controller - Arduino new [Re: Pauls72]
      #5569374 - 12/13/12 02:24 PM

Wow Pauls, thanks for taking the time for such a thorough reply.

<< I am always open to suggestions and for changes to make it better. What else do you think needs to be automated?>>

You guys are so many miles ahead of me I am only trying to understand. I am not in a position to offer suggestions for improvements.

Clear skies (and warm dry air!)

dan


Post Extras: Print Post   Remind Me!   Notify Moderator  
ThadeusB
member


Reged: 11/14/12

Loc: Somerset, UK
Re: How to make an automatic dew controller - Arduino new [Re: dan_h]
      #5569449 - 12/13/12 03:15 PM

Paul,

Rewinding a little, I don't actually have version 3.9. I'm using 3.6. I have just trawled through all the posts, and the latest I see is 3.8 where you added the RTC. Would it be better if I compiled 3.9?

Phil


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pauls72
professor emeritus
*****

Reged: 10/28/07

Loc: LaPorte, IN
Re: How to make an automatic dew controller - Arduino new [Re: ThadeusB]
      #5569620 - 12/13/12 05:29 PM

Phil,
Unless you have the DS1307 RTC (Real Time Clock) and 24C32 EEPROM modules, you can't go to 3.8 or 3.9.
If you send me your current sketch, I can integrate the 3.7 and 3.9-beta changes into it leaving out the 3.8 stuff for the RTC and larger EEPROM.

Do you have a red LCD screen? If not what colour?
Paul

Edited by Pauls72 (12/13/12 05:45 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pauls72
professor emeritus
*****

Reged: 10/28/07

Loc: LaPorte, IN
Re: How to make an automatic dew controller - Arduino new [Re: dan_h]
      #5569633 - 12/13/12 05:41 PM

Dan,
I don't mind sharing or helping. Hopefully other people will learn from it and not have to go through some of the stumbling blocks and learning curve that I had to.
Paul


Post Extras: Print Post   Remind Me!   Notify Moderator  
mitaccio
professor emeritus
*****

Reged: 03/17/09

Loc: Oahu, Hawaii
Re: How to make an automatic dew controller - Arduino new [Re: Pauls72]
      #5569655 - 12/13/12 05:49 PM

To Pauls72: how did you run the reset button through? I didnt find a good way of making the button pass through from the case to the arduino.

Post Extras: Print Post   Remind Me!   Notify Moderator  
ThadeusB
member


Reged: 11/14/12

Loc: Somerset, UK
Re: How to make an automatic dew controller - Arduino new [Re: mitaccio]
      #5569681 - 12/13/12 06:05 PM

OK Paul, I'll send my sketch tomorrow, its on another PC.

I'm using the plain vanilla blue/grey LCD. Does the red one have a clearer display when scrolling?

Phil


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pauls72
professor emeritus
*****

Reged: 10/28/07

Loc: LaPorte, IN
Re: How to make an automatic dew controller - Arduino new [Re: mitaccio]
      #5569702 - 12/13/12 06:17 PM

I have the reset button on the shield board located under the hole. I took 3 (of the 4) of those little square white buttons that came with the case and glued them together in a stack. I then used a very small drop of hot glue and glued it to the actual reset button. Hot glue is nice, because you can peal or scrape it off and it remains a little flexible. You have to use a small screwdriver or something to kind of guide it through the hole when you put the case back together. You can see them stacked up in this picture.



Post Extras: Print Post   Remind Me!   Notify Moderator  
Pauls72
professor emeritus
*****

Reged: 10/28/07

Loc: LaPorte, IN
Re: How to make an automatic dew controller - Arduino new [Re: ThadeusB]
      #5569792 - 12/13/12 07:25 PM

I just took this video with my cell phone. Sorry I can't hold it that still. The video is slightly out of focus, the display is perfectly clear.

https://www.youtube.com/watch?v=VMPlu6-BRuY


Post Extras: Print Post   Remind Me!   Notify Moderator  
ThadeusB
member


Reged: 11/14/12

Loc: Somerset, UK
Re: How to make an automatic dew controller - Arduino new [Re: Pauls72]
      #5570458 - 12/14/12 08:34 AM Attachment (32 downloads)

Paul,
Your LCD is very much clearer than mine, it doesn't appear to suffer from the lag that mine does. Can you please tell me which one you have?

My latest sketch is attached.

Phil


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pauls72
professor emeritus
*****

Reged: 10/28/07

Loc: LaPorte, IN
Re: How to make an automatic dew controller - Arduino new [Re: ThadeusB]
      #5570538 - 12/14/12 09:42 AM

I got the same red LCD that mitaccio used from Sparkfun.
https://www.sparkfun.com/products/791?


Post Extras: Print Post   Remind Me!   Notify Moderator  
ThadeusB
member


Reged: 11/14/12

Loc: Somerset, UK
Re: How to make an automatic dew controller - Arduino new [Re: Pauls72]
      #5570787 - 12/14/12 12:35 PM

Paul,
That LCD doesn't seem to be available in the UK. However, I have found a red backlit with orange characters. I've queried the latency with them. If this one is OK then I don't need to worry about having a 4 line display. Cheap too, 4 (6$)


Post Extras: Print Post   Remind Me!   Notify Moderator  
mitaccio
professor emeritus
*****

Reged: 03/17/09

Loc: Oahu, Hawaii
Re: How to make an automatic dew controller - Arduino new [Re: ThadeusB]
      #5571522 - 12/14/12 08:41 PM

I have some questions about the setup you guys are doing. Keep in mind, that even though I got this thing started that I am a beginner at electronics and programming. This was my first project ever!

1)What is the concensus on the DHT11 vs DHT22? Is the range worth the delay?

2)Ports: How often do you need 4 heaters?

3)Powering the arduino. I run my arduino off the 12v supply. I haven't had any issues, but are there advantages to running it separately at a lower voltage?

4)Duty Cycle/PWM I know my coding in this area was very simple, but it seems to work well in my climate. What advantage over my original coding is there to the Duty Cycle/PWM? It seems that you are using a pot to adjust the duty cycle. Doesn't this remove the automation?

I have to say, I am super pleased at how much this has taken off. Thanks for keeping this going and improving as much as you have.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pauls72
professor emeritus
*****

Reged: 10/28/07

Loc: LaPorte, IN
Re: How to make an automatic dew controller - Arduino new [Re: mitaccio]
      #5571866 - 12/15/12 12:47 AM

1) For those of us in other parts of the world, the change from the DHT11 to the DHT22 is probably the most important and even mandatory.

DHT11
0 to 50C (32 to 122F) 2C
20 to 80% Humidity 5%

DHT22
-40 to 80C (-40 to 176F) 0.5C
0 to 100% Humidity 2%

Here in the Midwest in winter the temperature routinely fall's well below 32F and the humidity can go below 20%. In heat of summer the humidity can exceed 80%. As a secondary plus, the DHT22 is more accurate.

The way the program currently is structured, we only go through the main program loop every 12 seconds. So we look at the DHT sensor a few times pretty quickly and then it sits for the next 10-11 seconds. So the delay of the DHT22 only being able to be read every 1/2 second isn't an issue. But even at this rate we can adjust the dew straps on/off up to 5 times per minute.

2) Scope, Eyepiece, Finder scope, Telrad, Mount Hand controller.
When imaging I will take out 2 scopes, one for imaging and one for visual. Scope and Guide scope, then Scope and Eyepiece on the second one.

3) There is nothing wrong with powering everything off of one 12V supply. The main issue is the dew heater straps use a lot of power. I didn't want that much current flowing through the Arduino board or shield, especially if you have a dew strap or cable short out. A dew strap for my C11 uses 1.57A, plus for the 2" eyepiece .32A, plus for the guide scope or finder .5A. So it is possible to end up with 4-5 Amps going to the dew straps, this would smoke the runs off the Arduino or shield. So I have separate isolated inputs for the two. From my battery I have a cable with 2 connectors at the end. One with a 2.1mm connector for the Arduino and the other with a 2.5mm for the dew straps.

I suppose if you run the Arduino off of a 9V transistor battery or 4AA 1.5V batteries it will run cooler, but I didn't find this as an issue.

4) Well the system currently uses both your original concept for turning the dew heaters on/off, plus it has variable duty cycle. By reducing the duty cycle you reduce the wattage/heat output of dew straps. This gives you give a lower more even heat, slower change in temp. But it lets me use my C11 dew strap on my 102mm MAK, because I can adjust the wattage way down. This is important with home made dew heater straps, you can control their heat output. Now with the latest changes we are testing you can run each of the different outputs at different duty cycles.

Although we could drive the dew straps in an analog manner, to control the percentage without introducing some feedback circuitry this would be harder to regulate or know exactly what percentage we are driving the straps at. Now using Pulse Width Modulation when a dew strap needs to be turned on, we are turning the straps on/off at about 10HZ. We are then controlling the width of the positive and negative portions of the pulses with fairly accurate control. Wen we run at 100% then stay in all the time they are required. When using PWM and under driving your dew straps, your dew straps will last longer electrically.



You had a great idea, I wish that I would of though of it. I learned my electronics in the early to mid 1970's. So I learned about both vacuum tubes and solid state electronics. Solid State was in it's infancy and I kind of grew along with it for 20 years or so. Then I transitioned over to the application software side of the world. The Arduino is programed in a OOP (Object Oriented Programing) language similar to C++. And the libraries are in C++. Now, I deal in some totally different languages, but I have learned other OOP languages on different systems (Algol, Pascal, Java, Visual Basic) over the years. If you know the concepts behind OOP languages, it makes it easier to learn and understand other OOP style languages. There are a lot of things similar between all OOP languages. Things like Class, Function, passing variables and pointers and objects, use of pointers, defining variables, types of variables, use of casting, overloading operators are all common to all OOP's. The commands, their syntax and uses is different between the different languages, but not totally foreign.

I had never heard of an Arduino before I read your post on this project. I was looking at building a Dew Controller, but nothing as sophisticated as this. When I first built mine, the program wouldn't even compile. I soon found there are a bunch of different versions of the libraries for the different devices floating around the web. Getting the correct combination was quite a challenge.

I also wanted to increase the ports from 2 to 4 and had some other ideas for improvement that kept growing over time. So this project motivated me to learn the Arduino, it's programing language and some C++.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pauls72
professor emeritus
*****

Reged: 10/28/07

Loc: LaPorte, IN
Re: How to make an automatic dew controller - Arduino new [Re: Pauls72]
      #5575699 - 12/17/12 01:10 PM Attachment (38 downloads)

Phil,
Attached is a semi-consolidated 4.2a beta version with the multiple duty cycles for the different ports. I took your sketch and added in my changes from 3.7, some of 3.8 and the 3.9c-beta versions. I also made a change so that the Dallas onewire sensor values are saved in either Fahrenheit or Celsius accordingly.

What is different for sure is that I have the additional code for the RTC (Real Time Clock) and EEPROM 32K memory modules. I now have a idea/plan for making a version that we could both use. That way it will make it easier for us to stay in sync.

I wish my Bluetooth stuff and my DHT22 would get here soon.
Paul


Post Extras: Print Post   Remind Me!   Notify Moderator  
ThadeusB
member


Reged: 11/14/12

Loc: Somerset, UK
Re: How to make an automatic dew controller - Arduino new [Re: Pauls72]
      #5577393 - 12/18/12 02:20 PM

Paul,
I think in the New Year, once recovered from the cost of Christmas, I'll buy another Arduino Uno plus proto shield, and start getting to grips with the coding. Then perhaps to join in with some development.

When you do finally get your BlueToothe device, let me know what it is exactly, so I can take a look at it for future reference. I may then go ahead a buy one myself to experiment with.

As a matter of interest regarding the RTC, have you implemented that as a device for sidereal time checks?

Phil


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pauls72
professor emeritus
*****

Reged: 10/28/07

Loc: LaPorte, IN
Re: How to make an automatic dew controller - Arduino [Re: ThadeusB]
      #5577679 - 12/18/12 06:04 PM Attachment (34 downloads)

Phil,

The date/time is read from the RTC module and displayed during the power up sequence.

During operation I alternate between the Arduino powered up time and the actual time. So the first time scrolling through I display the powered up time with a little up arrow to the left of it. The next time through I display the actual time from the RTC module (HH:MM) in military or 24 hour clock format. I thought it would be nice to have the time on the display since it was already lit up.

Last I use the date time when storing off the all the reading to the external EEPROM. I save the date and time along with the temperature, humidity dew point and all temp of all 4 Dallas sensors.

I am using an DS1307 RTC module. Cost was about $4 (I'd guess about 2).

So I think I have finished consolidating and have one version that should work for both of us.

Some new parameters:
boolean noRTC = 0; // Ver 4.3 - set to 1 when there is no Real Time Clock module present.
boolean noExtEEPROM = 0; // Ver 4.3 - set to 1 when there is no External 32K EEPROM module present.

// Ver 4.3 - Make displayed port names variables.
// Put your output port names here, the maximum size including the equal sign is 6 characters.
char port1Display[7] = "OTA1=";
char port2Display[7] = " Eye=";
char port3Display[7] = " OTA2=";
char port4Display[7] = " Aux=";

All the parameters that you will need to change should be grouped together in the source. The source has mine, so you will have to change them.

There are a few small changes/enhancements that I made while making the other changes. I started making more comments when I made changes, this is to make it easier for you to follow along. I was not about to unsolder or cut the wires to my RTC or external EEPROM modules, so I will rely on you to test that part.

Awhile back I picked up a second Arduino, a prototyping board and a bunch of the jumper wires. It makes life so much easier when messing with this stuff. The Arduino Uno is a clone from Hong Kong for like $13 (7). The only real difference I noticed is it uses USB serial port 7 instead of 5.

Regards,
Paul


Post Extras: Print Post   Remind Me!   Notify Moderator  
ThadeusB
member


Reged: 11/14/12

Loc: Somerset, UK
Re: How to make an automatic dew controller - Arduino [Re: Pauls72]
      #5580612 - 12/20/12 12:45 PM

Thank you Paul, I might just RTC myself. However, in order to do this, I'll have to get a bigger box, mine is crammed to the brim as it is; it would sense anyway, making it easier to mess with things as this seems to be an ongoing project.

I've looked at the BlueTooth links, very neat gadgets, and very cheap, I'll see if I can locate them here. Is there an existing program for send commands from a PC? Or is this something else that has to be developed?

Good idea putting in more comments. I am currently on the programming learning curve by reading the two books I bought. I just need to buy that second Arduino - I may get a clone too. One of the books refers to downloadable sketches to experiment with, I'm just about to get them and work through them. Your previous notes are coming in very handy for clarity. Its all beginning to make sense now.

Phil


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | (show all)


Extra information
7 registered and 44 anonymous users are browsing this forum.

Moderator:  zjc26138, tecmage, rflinn68 

Print Thread

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled


Thread views: 20636

Jump to

CN Forums Home


Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics