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)
ThadeusB
member


Reged: 11/14/12

Loc: Somerset, UK
Re: How to make an automatic dew controller - Arduino new [Re: ThadeusB]
      #5543205 - 11/28/12 01:40 AM Attachment (39 downloads)

Seems that only one photo can be attached per post:

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: ThadeusB]
      #5543207 - 11/28/12 01:41 AM Attachment (39 downloads)

And finally:-

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: ThadeusB]
      #5543213 - 11/28/12 01:55 AM

Hi Paul,
I think the next thing to do is to include a switch selectable voltage divider, instead of the pot to control the duty cycle. I'm thinking to have 3 or 4 percentages for this. Very easy job but I may find it hard to find switches small enough to fit in a crammed box. Or, if space is a problem I could just bring out a small pot with knob and calibrated scale. I'll consider this in a day or two.

Best regards

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]
      #5544277 - 11/28/12 05:41 PM Attachment (30 downloads)

Phil,

I thought about having several switches or a rotary switch with voltage divider for duty cycle. Then I settled on a pot because it was the easy, quick and required little room. My long term plan is to implement an Infrared Remote control to be able to set most of the variables through it and then remove the pot's for duty cycle and LCD screen contrast.



It hasn't gone well so far. I let all of the factory smoke out of the first IR sensor. No documentation and I got the + supply voltage and signal lines reversed. I was several weeks to get some new ones. Now when I just add the IR library to my program, the Arduino screen goes crazy. I have a small little test program that the IR sensor works, it's just finding the conflicts between the library and something else...

You setup and construction looks nice, neat and clean. If you don't think you have room, you need to look at my rats nest. I accidentally pushed it against the hot soldering iron the other day, so now the top right corner is kind of melted.



I have a new version of the dht11.cpp file for the library attached that I would appreciate if you can try. What it does is looks at the data and decides if it is a DHT11 or DHT22 and returns the proper results. So then the same library can be used for both sensors. It works with my DHT11.

You might want to look at some of the Arduino tutorials on the internet. Some these are reasonably good.
http://www.youtube.com/course?list=ECA567CE235D39FA84&feature=plcp

Regards,
Paul


Post Extras: Print Post   Remind Me!   Notify Moderator  
bassplayer142
professor emeritus


Reged: 10/03/11

Loc: Michigan
Re: How to make an automatic dew controller - Arduino new [Re: Pauls72]
      #5544688 - 11/28/12 10:19 PM

Awesome work here. Wish I had some more time to play with my own designs and contributions.

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: bassplayer142]
      #5545301 - 11/29/12 10:48 AM

Hi Paul,
Soldering irons; dangerous weapons. Swapping wires= smoke (sometimes)!

The IR idea is a very good one; a useful variable to include would be temperature differential.

I'll test the new cpp later, as I'm soak teasting at the moment with all heaters connected.

Question: I'm trying to work out the logic of Dallas identification. They are firstly identified by their hex addresses:

DeviceAddress LX200 = { 0x28, 0xEB, 0xF5, 0x4A, 0x04, 0x00, 0x00, 0xDE }; // Dallas 0
DeviceAddress ED80 = { 0x28, 0x2A, 0xDC, 0x4A, 0x04, 0x00, 0x00, 0x7D }; // Dallas 1
DeviceAddress EP = { 0x28, 0x8A, 0x54, 0x4A, 0x04, 0x00, 0x00, 0xD4 }; // Dallas 2
DeviceAddress Box = { 0x28, 0xBA, 0xDF, 0x4A, 0x04, 0x00, 0x00, 0x82 }; // Dallas 3

Then we have:

boolean sv1, sv2, sv3, sv4; (sensor variable?)
byte sensorhigh, sensorhigh1, sensorhigh2, sensorhigh3; (0,1,2,3 ?)

// ********************LX200: tests** Dallas, 0, O/P D5
if(sensors.getAddress(LX200, 2)) {
if (ts0 >= 1){
sensorStorage(p1, 11, 21); where the comment refers to Dallas,0

What I'm getting at is that how does the code know which hex address relates to which one of the 0, 1, 2 &3 designations. Is it defined by the order in the code.

Why I ask is that when I first had it all running, the outputs didn't correspond to the inputs. I haven't checked yet I I think I have the hex addresses in the order as above:I will be checking that,in the serial mointor, which I presume, orders them by 0, 1, 2 & 3 ranking.

I had my mind a total knot over this yesterday.

I suspect that I do have something crossed over in the code somewhere, because if I run the box with 3 heaters, the 3 displayed don't make sense. If I run it with 1 heater it displays all 4 heaters at the same temperature. Running all 4 heaters, the displayed values correlate with what is happening at the heaters & sensors.

Once I know the true relationship between hex addresses and binary, I'll be able to work through the code to see what I've done wrong.

In fact I have seen some of those tutorials; not bad.

As a matter of interest what power are your heaters? I'm having a debate with someone over here who is going to use to high a power level, I believe. Some reseearch indicates that around 15 Watts for a 10" SCT; around 5 Watts for a 2" EP, 3 Watts for 1.25" EP. So this is what I have done. This other guy is going for 15 Watts for an 8" SCT. I think he may find that too tapid heating is going to cause rapid differential expansion of the corrector plate = rubbish viewing. Your thoughts would be appreciated.

Got to do some stuff around the house now, so more later.

Best regards

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]
      #5545432 - 11/29/12 12:09 PM

The whole Dallas OneWire temperature sensor world is kind of different. Each IC (Integrated Circuit) device is built with a unique address imbedded in it and no two are ever supposed to be the same. All the input ports are in parallel on the same serial buss. So which one is plugged into which input port makes no difference, that is because we use the device address not the port. The way the program works, is it takes the lowest address device and makes it input number 1. The next is number 2 and so on. So next time you power up or restart if you have the lowest address device unhooked, the next lowest address device would become number 1 because it is the lowest address device that we see. Any output ports that do not have an input sensor attached are turned off automatically.

If you look at my picture you can see the input sensor plugs are marked with coloured electrical tape. The sensor ends are also matching colour coded too. In my case Blue=1, Yellow=2, White=3 and Red=4. I have a label on the back of my unit with this information.

Yes it would be possible to take the address of each Dallas device and tie it to a specific output port in the program. The down side is if that sensor goes bad or the wire breaks, you are out of commission. You would then have to change the program once you get a new sensor to accommodate the new address.


I am using Dew-Not commercial dew straps:
11" SCT DN012 which is roughly 19 watts
4" (102mm) MAK DN005 which is roughly 7.5 watts
2" Eyepiece DN003 which is a little over 4 watts
1" Eyepiece DN002 which is a little over 3 watts
http://www.dew-not.com/specifications.htm

Don't forget when you reduce the duty cycle are effectively reduce the wattage. So I am running my at roughly 80% duty cycle, so my C11 19 watt dew strap is effectively running at 15 watts. It is running at 19 watts roughly 80% of the time.


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]
      #5545453 - 11/29/12 12:25 PM

Sorry, you are looking at the serial monitor and yes, that's an bug with the original code. This should take care of it:

Original source code:
//print Temperature to the USB serial port
Serial.print("OTA-1: ");
Serial.println(Scope);
Serial.print("Eyepiece: ");
Serial.println(Eye);
Serial.print("OTA-2/GuideScope: ");
Serial.println(Guide);
Serial.print("Aux Port #4: ");
Serial.println(Port4);


Changes to fix the serial monitor:
//print Temperature to the USB serial port
Serial.print("OTA-1: ");
if (ts0 >= 1) Serial.println(Scope); else Serial.println();
Serial.print("Eyepiece: ");
if (ts0 >= 2) Serial.println(Eye); else Serial.println();
Serial.print("OTA-2/GuideScope: ");
if (ts0 >= 3) Serial.println(Guide); else Serial.println();
Serial.print("Aux Port #4: ");
if (ts0 >= 4) Serial.println(Port4); else Serial.println();


In your case it would be:
//print Temperature to the USB serial port
Serial.print("LX200: ");
if (ts0 >= 1) Serial.println(Scope1); else Serial.println();
Serial.print("ED80: ");
if (ts0 >= 2) Serial.println(Scope2); else Serial.println();
Serial.print("EP: ");
if (ts0 >= 3) Serial.println(Eyepiece); else Serial.println();
Serial.print("Box: ");
if (ts0 >= 4) Serial.println(EPBox); else Serial.println();


Edited by Pauls72 (11/29/12 12:57 PM)


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]
      #5545616 - 11/29/12 02:10 PM

Paul,
Got it, I see now why I get what I get. So problem as such. I have my outputs labeled and the leads are paired and marked up so that's ok.

Now, I have been running the box all day, however, the outputs only switch on when the DHT22 temperature is greater Dallas temps. If I warm the DHT, then the outputs switch on. I had presumed that the idea of the system was to maintain the heaters at the preset level such that each bit of glass is raised that many degrees above ambient. Have I got this all wrong?

int dewAdjust2 = 4; // this I believe is + (plus)4 degrees. Above DHT?

If I have presumed correctly, could this mean that the correction factor of -2 is incorrect for mine?

Re- dew heaters. Good, it seems that the figures I have chosen are in the right ball park. I have my duty cycle set at 85% at the moment as its below freezing now.

Its now dark and clear in our part of the world - for a change - so I'll see how it goes now that scope heat radiates off. I should then see temperature differential between the skyward end of the scope compared to the DHT22.

Its a great learning curve!

I now have the two Arduino books. The basic one you have pretty much covered with your turorials, indeed you've covered a bit more. So what I'll do is go line by line through the code and try to understand it. I'll ask you If I need to - I'm sure I will need to.

Phil


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: ThadeusB]
      #5545622 - 11/29/12 02:15 PM

I have just realised I have completely missed the point of this device; its that the T differential is to raise the heaters that number of degrees above DEW POINT.

That has to be it!?


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]
      #5545657 - 11/29/12 02:45 PM

Phil,
Unfortunately work interferes with my hobby, so I can't do too much at the moment.
You are correct, the heaters only come on when the dallas sensor for that output falls below dewAdjustX + the dew point.

So if we say the dew point = 15°, and dewAdjust1 = 4, then we will strive to keep the heater on port 1 on until the dallas sensor for port one is at 19° or higher. Then we will turn the heater off until the temperature of the dallas sensor drops below 19°.


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]
      #5545995 - 11/29/12 06:40 PM

Hi Paul,
Now then, I have had something quite unexpected going on. When the heaters are in the on state, I'm not getting the expected heating; I thought I had failed Darlingtons. So I rigged a 12 Volt bulb to attach to each output in turn. What happens is that the bulb flashes at a few Hertz; can't say just what but in the 10 Hertz ball park. Then every roughly 17 seconds it will burn bright for about 1.5 seconds, then back to the flashing. Adjusting the duty cycle makes no difference. The pin 13 LED flashes in the same way.
Adding up delays, I think the loop iteration time is 16.5 secs; so there is probably a correlation here.

I have proven its not a psu problem.

It gets worse: powering up again, the LCD displayed nothing. So now back to the PC and hook up the USB. Check serial monitor to see that it read the first iteration then stopped - no activity at all. The Pin 13 LED should flash on loop re-iterations; it had previously. I did a fresh upload in case the sketch had corrupted; no difference.

I think I shall now run some other sketches to test the Arduino board.

Annoying and very frustrating, as I thought I was almost there with it all.

Phil


Post Extras: Print Post   Remind Me!   Notify Moderator  
bassplayer142
professor emeritus


Reged: 10/03/11

Loc: Michigan
Re: How to make an automatic dew controller - Arduino new [Re: ThadeusB]
      #5546104 - 11/29/12 07:31 PM

One golden rule of electronics is that a working prototype ceases to work when you show your boss . A neat and cleaner addition would be Bluetooth. A low power wireless alternative that supports spp serial port virtualization. There is a free android app I run which can act as a Bluetooth com port giving you control and data viewing on your phone, tablet, or PC.

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: bassplayer142]
      #5546404 - 11/29/12 10:51 PM

Yep, it pulse like that. Changing the duty cycle should change the width of the on/off pulses. The amount of time your light would be on, not the frequency of it. The frequency is tied directly to the display scroll rate.

int noDutyCycle = 1; // Set this to 1, to use without duty cycle input and run the heaters at 100%,

I connected my dew straps direct to the 12V supply and they get hot. I never realized that the Dew heater straps only get warm to the touch when hooked up to the controller. I'll take a look at it and see why.

With opening and closing mine, more than once I have broken a wire.


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]
      #5546484 - 11/30/12 12:05 AM

OK, I found it. On one line I have an = sign and it should be ==.
= is the assignment operator, so it was placing 100 in the value instead of testing against against 100.
== is the is equal to test.

So it was forcing the value to 100 which = 10%. So the duty cycle was always at 10%.


Problem section:

//********************Scroll the display********************
for (int positionCounter = 0; positionCounter < 40; positionCounter++){
voltsDC = getVoltage();
lcd.setCursor(33,1);
lcd.print(voltsDC);
lcd.print("V");
// Display the time since last power up or reset
if(dutyIn = 100) lcd.setCursor(32,0);
else lcd.setCursor(31,0);
displayTime(RTC_UpTime);
lcd.scrollDisplayLeft();
// scroll one position left then wait & call the duty cycle function
// you can change the frequency of the duty cycle & scroll speed by changing the number of times you go through this loop
for (int iCnt1 = 0; iCnt1 <= 3; iCnt1++) {
dutycycleloop(dutyIn, dutyIn);
}
}


Correction:

//********************Scroll the display********************
for (int positionCounter = 0; positionCounter < 40; positionCounter++){
voltsDC = getVoltage();
lcd.setCursor(33,1);
lcd.print(voltsDC);
lcd.print("V");
// Display the time since last power up or reset
if(dutyIn == 100) lcd.setCursor(32,0);
else lcd.setCursor(31,0);
displayTime(RTC_UpTime);
lcd.scrollDisplayLeft();
// scroll one position left then wait & call the duty cycle function
// you can change the frequency of the duty cycle & scroll speed by changing the number of times you go through this loop
for (int iCnt1 = 0; iCnt1 <= 3; iCnt1++) {
dutycycleloop(dutyIn, dutyIn);
}
}


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: bassplayer142]
      #5546522 - 11/30/12 12:37 AM

Quote:

One golden rule of electronics is that a working prototype ceases to work when you show your boss . A neat and cleaner addition would be Bluetooth. A low power wireless alternative that supports spp serial port virtualization. There is a free android app I run which can act as a Bluetooth com port giving you control and data viewing on your phone, tablet, or PC.




I never even thought of using Bluetooth, that's a great idea.
What Bluetooth Android app are you using?


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]
      #5546661 - 11/30/12 04:53 AM

Paul,
The Arduino is fine. It seems I have a problem with the LCD, no broken wires, no bad joints. I think Its faulty, I'll re-wire to be sure though.
I changed that line to == but that hasn't changed the flashing behaviour. Changing duty cycle still has no effect. Very odd.

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]
      #5546943 - 11/30/12 10:34 AM

There are two pins that are are used for the backlight LED on the LCD assy.

Here is a link to info. on the LCD assy. Because there are different versions from different vendors, this may not match yours.
http://www.sparkfun.com/datasheets/LCD/GDM1602K.pdf


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]
      #5547189 - 11/30/12 01:07 PM

Paul,
The backlight is working, the trouble is that no data is displayed. It did work briefly this morining which indicates an intermittent problem. The wiring all checks out end to, so no problem there. I do suspect the contrast pot, as the voltage on the LCD pin Vo is held at 5V regardless of the pot setting. So I'll be changing the pot later.
In the meantime I've not been able to check the new cpp file. However, LCD or not, I will upload with the new one and check it out on the serial monitor.
Christmas shopping has got in the way today.

Phil


Post Extras: Print Post   Remind Me!   Notify Moderator  
bassplayer142
professor emeritus


Reged: 10/03/11

Loc: Michigan
Re: How to make an automatic dew controller - Arduino [Re: ThadeusB]
      #5547216 - 11/30/12 01:19 PM

Search bluetooth spp on google app market and you should find it.

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
9 registered and 25 anonymous users are browsing this forum.

Moderator:  cbwerner, tecmage, rflinn68 

Print Thread

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


Thread views: 22373

Jump to

CN Forums Home


Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics