View Single Post
  #24  
Old 19-10-2013, 12:26 AM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
Quote:
Originally Posted by redbeard View Post
snip
Ahhh right so the control scheme is keep the tube at dewpoint + 5deg. Seems simple enough. Looks easy enough.

One thing is certain I'm not going to implement the function you suggested:
Code:
logEx=0.66077+7.5*t/(237.3+t)+(log10(h)-2);
dew_point = (logEx - 0.66077)*237.3/(0.66077+7.5-logEx);
Computers are really bad at math. That function has 11 floating point operations, and a logarithm. It doesn't look like much but it compiles to 1658kB of code (~20% of the 8kB available in my targeted microcontroller ) and it takes a whopping 4678 instructions to calculate.

There's a rule of thumb which gets you to within 1deg of the actual dewpoint providing humidity is above 50%, and gets more accurate the closer you get to 100%:
Code:
dew_point = t-(100-h)/5;
1 floating point operation (the divide by 5) 268 bytes, and 407 clock cycles.

And since I was bored:
Code:
dew_point = t-((100-h)*410>>11);
no floating point operations 68 bytes and 74 clock cycles. The answer still comes in to the nearest degree. So I'm going down that path.
(Don't you love it how a computer finds it hard to divide by 5 but can efficiently divide by 4.995121912 ).

Or maybe a hybrid solution, if running from the computer do the full calc, and if running independently from the micro only do the approximation complete with screwy division.


Quote:
Originally Posted by AndrewJ View Post
Gday Chris

I did something like this many years ago, and you will find it gets too complicated too quick, and too many cables go to one spot.
Have attached piccies of a unit i made up for fun that could
a) Have one DewHeater channel controlled via several means
including using dewpoint, defined PWM duty cycle or auto temp delta mode. It doesnt come on till you get within a set delta from the dewpoint.
b) Have 4 secondary PWM channels that could be manually controlled
c) Have regulated 8V and 12V outputs for my cameras
d) Have a focusser controller
e) Have a user settable menu system

It worked OK, but in the end, i split up the process and used dedicated units for each of the functions
Looks quite neat. Ultimately I'm going to have a split between complicated units too, and I'm looking at maybe reduced functionality away from the computer so I can offload complicated stuff to software. Focus will be on it's own microcontroller too. I'm not sure what the problem is with cables going into one spot, that is exactly what I'm going for. 1 spot on the OTA so there's no risk on tangles when slewing. The only cables coming off my scope/mount will be primary and backup power.

Quote:
Originally Posted by AndrewJ View Post
As per redbeard, i also put my primary dew heater wires behind the corrector, but my ( insulated) dewshield also goes right back over the OTA as far as possible to retain as much dewheater heat as possible in the OTA. I also use dallas 1 wire temp probes and the system works quite well with much lower current draw than exposed units.
I know the feeling. I DIY'd my dewstrap with some nichrome wire. Did the job well but at astrofest I couldn't get enough heat into my scope because it was literally wire held on the OTA by tape, like yours except a single wire. The wire was hot but my scope was cold. H0ughy lent me his dew strap but I didn't actually even have to turn it on. It just had to be there to prevent losing heat to the environment for my piece of wire to do it's job. Now it's insulated with a neoprene strip.
Reply With Quote