Jump to content

SkySurveyBanner.jpg.21855908fce40597655603b6c9af720d.jpg

Arduino Focus control and Cloud sensor


ncjunk

Recommended Posts

  • Replies 490
  • Created
  • Last Reply

So-

Motor works

Power off works

In general 100 rpm works.

The issue you have now is that when moving out it doesnt quite do 200 steps.

Can you tell what "a little bit" equates to in terms of steps?

is it the same error if you do 400, 600 and 800 steps? i.e. if it is 1 step out does it remain only 1 step out or is it a 1 step error per rev and thus 2 steps, 3 steps and 4 steps out respectively for these.

Also, you will get a jolt on power up as the stepper settles into position and it may not be the exact same position as when we powered down. It may be one or two steps out (but this is the price you pay for turni.g the power off)

Link to comment
Share on other sites

Hi Neil,

Apologies for the delay, I did have another play with it while trying to quantify the movement. I realised that it was sometimes repeatable and sometimes random. ie sometimes it would do 360 degrees both in and out and sometimes it would be short by a random (small) amount.

I got an easydriver on Friday, hooked it up today and it all seems to work, microstepping at 1600 steps per rev, it's nice and fast, and much smoother too.

The only thing I can't figure out is how to get it to go to sleep. I've got it hooked up exactly as the diagram here Do I need to connect another pin from the Uno to the easydriver to get the power off to work? I'm using the sketch from the Yahoo group; SGL_Focuser_Driver_nolcd_2_0_0I.pde and the beta version of the standalone app.

I know you're put a lot of work into trying to get this working Neil but I really want a chance to try this before the season's over. I'd like to thank you again and if you want the Arduino motor shield to play with then it's yours, PM me your address and I'll send it over to you :)

Cheers,

Ian

Link to comment
Share on other sites

For power off/on connect pin 4 on the arduino to the easydriver enable pin (up by the power supply pins for the motor).

So the easydrive has worked better than the shield?

I'll probably take you up on that offer. I could always send it back when i"ve finished.

Link to comment
Share on other sites

Hi Neil,

Yep, the easy driver just worked :)

Right... I've connected pin 4 to Enable and the motor no longer runs at all, the motor is energized and the led is it on the easydriver. When I press in or out on the app nothing happens but the motor isn't energised any more, in so far as I can turn it easily by hand, then it locks up again as it re-energises. Any pointers? :)

I was meaning that you can keep the motor shield, hopefully you can crack it and it'll help others out, just let me know where to send it.

Cheers,

Ian

Link to comment
Share on other sites

I'll have to check it again here...the one in the obs doesnt use power off but the test one does. I'll set it all up later in the week and check it. No time now.

you can try inverting the powerpin commands so where we set it low change it to high and where we set it high change it to low.

change this one to high-

//FocuserControl Power off command

if (millis() > (powerMillis + 20000)) // check if power has been on for more than 20 seconds

{

digitalWrite(powerPin, LOW); // if yes, then disable power

}

//If There is information in the Serial buffer read it in and start the Build command subroutine

if (usingSerial && Serial.available() >= 1) {

change this one to low-

void EasyDriverStep(boolean dir,long steps){

digitalWrite(powerPin, HIGH); // enable power to the EasyDriver

powerMillis = millis(); // remember when power was switched on

delayMicroseconds(10); // wait a bi

Link to comment
Share on other sites

  • 11 months later...

I am just getting started with the cloud sensor. I made a how-to on cloudynights for a dew controller and am fairly comfortable with arduino. I don't have the time to read through this entire thread but want to know if a current schematic and code exists. I am using the MLX60614 3.3v.

Link to comment
Share on other sites

There are two versions one is my simple one that has a few graphs an you can use as a base:

Schematic

http://f1.grp.yahoofs.com/v1/CGd7UT9tHsOtuqbzORhaiyN6MUVkxpmdRqu8YUe-_YfI06sZSbuH2tvvhBc1Cl5RDRiHDkXhCPSvNhHemWmN5Q/SGL%20Documentation/Cloud%20sensor%20schematic.pdf

Files:

http://tech.groups.yahoo.com/group/sgl_observatory_automation/files/SGL%20Software/Cloud%20Sensor/

Then mick did some improvements and posted his version here:

http://tech.groups.yahoo.com/group/sgl_observatory_automation/files/Cloud%20Sensor%20Evolution/

You will need a heater of some kind to stop dew forming on the sensor and causing it to read the dew temp. You can use a few resistors or a heater element pad but you have experience in that already.

Goodbluck :D

Sent from my GT-I9003 using Tapatalk 2

Link to comment
Share on other sites

Oohh and i am writing some code to post an html file to a website for automatic posting of data.

Did this ever happen? This is exactly what I want to do. Report the cloud/sky condition to a website for me to view.
Link to comment
Share on other sites

I use a web server on the arduino with the ethernet shield. This is only for controlling the relays but its easy to add any additional info to it.

I think this link is correct:

http://tech.groups.yahoo.com/group/sgl_observatory_automation/files/SGL%20Software/Arduino%20web%20power%20control/

Sent from my GT-I9003 using Tapatalk 2

Link to comment
Share on other sites

  • 1 year later...

Hi, i have struggled a bit with FocusMax v3.8 and maxim v5.08 and are getting some weird error messages, I was told that FM v 3.8 can´t handle the "get temperature" serial, but i can´t get ahold of some earlier versions of FM, this doesn't seem to inflict on the FM functions anyway.

These other fault messages i got is when i doesn´t use FocusMax at all, just Maxim dl and is somehow related to the SGL Ascom driver?

post-28724-0-44943200-1420627163_thumb.p

There is also an issue of where the FRMcontrols say that my focuser is in absolute mode and maxim dl recognize it as a relative, is there someway to fix this?

post-28724-0-39388600-1420627171_thumb.p

// Daniel

Link to comment
Share on other sites

Daniel,

Write your own ASCOM driver. It is really simple and you get code you are in control of. Lots of good examples on how to do it, but you always have to have underlying hardware that is responsive (i.e. no long wait loops in code).

/per

Link to comment
Share on other sites

The temperature is a FM problem as the driver is saying temp not implemented. i have a copy of focusmax 3.6.0.77 pm me if you want a copy.

I'm adding a temp routine that you can set to a fixed value and that will get reported back to FM.

No idea on the form.

The code is there so that if anyone finds it useful they can use it or just build their own, as per says.It is easy but I've found issues with things that work with some software but not others, one example was the link function not implemented correctly and the driver blamed.

The absolute/Relative depends on when maxim checks it, it may be that if it's changed after maxim is connected then maxim won't recheck, just a guess as i've not looked into it.

I'm rechecking it now with maxim dl 6.08 and focusmax 3.8 to ensure it works.

The hope was that a few people with more programming experience would lend a hand and improve it but most do their own specific version taylored to their hardware.

I'll get it working agaim with maxim 6.08 and fm 3.8 and leave it at that.

Saludos,

Neil C

Sent from my GT-N5110 using Tapatalk

Link to comment
Share on other sites

The absolute/relative mismatch is because the Driver loads, then gets the value from settings and sends it to the hardware.

By the time it gets confirmation from the Hardware Maxim DL has taken the initial Absolute/Relative state, which is relative, and doesn't request it again.

I'll fix it

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.