Welcome, Guest. Please login or register.

Username: Password:
Pages: 1 [2] 3 4

Author Topic: Standalone Operation  (Read 30230 times)

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #15 on: February 02, 2016, 20:41:21 »

Both control pins should be toggle switches (not momentary). You can change either at any point.
Logged
Tom Carpenter (AstroEQ)

cmosfreak

  • Full Member
  • ***
  • Posts: 11
    • View Profile
Re: Standalone Operation
« Reply #16 on: February 02, 2016, 21:59:32 »

Hi Tom,

thank you for the code. If I switch to standalone mode after startup without EQMOD, the motors don't start working. If I start sidereal mode in EQMOD, it works perfect again!
Any ideas?

Andreas
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #17 on: February 02, 2016, 22:57:57 »

As I say, it's completely untested code at the moment. I'll have a look see. Think I might know why...
Logged
Tom Carpenter (AstroEQ)

cmosfreak

  • Full Member
  • ***
  • Posts: 11
    • View Profile
Re: Standalone Operation
« Reply #18 on: February 02, 2016, 23:03:58 »

Ok, I'll wait for your bugfix.
Thank you & good luck!

Andreas
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #19 on: February 02, 2016, 23:33:16 »

@cmosfreak Just uploaded a patch. Could you try it again.

I've realised that actually the high-speed may or may not be the go-to speed. If the mount uses a microstepping mode <1/8 stepping (e.g. 1/4 stepping), then it will be the go-to speed. However, if the mount uses a larger stepping mode, the speed will actually be 1/8th of the go-to speed as the ST4 code doesn't support changing microstepping mode (it is far too bulky to do that in an ISR). But actually that may not be a bad thing as trying to manually control a mount going at such high speeds would be pretty difficult.
Logged
Tom Carpenter (AstroEQ)

cmosfreak

  • Full Member
  • ***
  • Posts: 11
    • View Profile
Re: Standalone Operation
« Reply #20 on: February 03, 2016, 20:44:34 »

Hi Tom,

after a first glance with my oscilloscope the automatic tracking starts now if standalone mode selected! The only thing I still have to check is the speed option. My tracking rate is 2x at the moment, regardless which mode was selected. Maybe a wiring fault in my board...?!

BTW, do you use the real sidereal rate for the calculation of the rotation speed? On my board it seems to be one RA rotation in exactly 24 hours. Isn't it better to compensate by the factor 364/365?

Thanks
Andreas
Logged

cmosfreak

  • Full Member
  • ***
  • Posts: 11
    • View Profile
Re: Standalone Operation
« Reply #21 on: February 03, 2016, 21:21:12 »

I've found out that I have to execute the command
Code: [Select]
Commands_configureST4Speed(CMD_ST4_STANDALONE); //Change the ST4 speeds when starting in standalone mode, also if I'm not explicitely coming from highspeed mode.
It seems to be necessary to initialize some things for normal speed mode?

Andreas
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #22 on: February 03, 2016, 21:36:46 »

The sidereal rate is calculated by the configuration utility using the standard 86164.0905 seconds in a sidereal day, so 1x speed, should be an exact match with the sidereal rate.

You are right about needing to call that line. I've added it in and made a couple of other minor tweaks and updated the repository.

Logged
Tom Carpenter (AstroEQ)

cmosfreak

  • Full Member
  • ***
  • Posts: 11
    • View Profile
Re: Standalone Operation
« Reply #23 on: February 03, 2016, 22:17:18 »

Thank you, Tom! It's working fine now!

Regarding the sidereal rate, I'v stumbled upon it when I measured the frequency of the RA motor on. I'm working with two Arduino Mega boards and they show slightly different frequencies. Maybe the oscillators vary too much.

Andreas
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #24 on: February 03, 2016, 23:01:17 »

The mega's use a ceramic oscillator which can be out by as much as 1000ppm (or ~0.1%) if not more. Given that the sidereal rate is about 0.2% from the seconds in a day, your oscillator is probably on the way out side of things.

To put that in comparison, the crystal on an AstroEQ is rated to be no more than 10ppm. (0.001%).
Logged
Tom Carpenter (AstroEQ)

D33P

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Standalone Operation
« Reply #25 on: February 17, 2016, 16:42:33 »

Hi everyone,

I currently use my AstroEQ for imaging by plugging it into a cheap windows tablet (along with camera). Then retreat to the comfort and warmth of the lounge and connect remotely on my laptop.
But I would love to have standalone control of my AstroEQ for visual use away from home.

I don't suppose someone could give me a few tips? Not quite an idiots guide... but close  ;)

Many Thanks, and clear skies!

James
Logged

paul_astrix

  • Full Member
  • ***
  • Posts: 27
    • View Profile
Re: Standalone Operation
« Reply #26 on: February 20, 2016, 21:08:55 »

AstroTux on the Stargazerslounge forum used an ATmega8A, 2 line LCD and 3 buttons to make a low cost, accurate RA stepper and digital focuser for an EQ mount. See the PDF in the first post of this topic below, it steps in one of 3 modes: Sidereal, Lunar or Solar

https://stargazerslounge.com/topic/162657-a-low-cost-ra-stepper-for-small-telescopes/

There is enough program space on the AstroEQ cpu to support a standalone (guided) RA stepper and plenty of spare pins on the Arduino Mega version for the LCD and buttons, which became a hand controller. (6 pins for LCD)

For standalone I would think an LCD was essential. If power was interrupted the user would have no idea what was happening after a reboot nor could the user control what happens next. There could be many requests for extra standalone features....a few buttons and 2-line LCD can support many options.

I attached pictures of the prototype. The second shows Sidereal stepping in the North hemisphere, and the Rate tweaked slightly faster. Drift alignment at a Goto Dark Site, without laptop?

cheers
Paul
« Last Edit: February 20, 2016, 21:25:25 by paul_astrix »
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #27 on: February 21, 2016, 01:35:06 »

Paul,

Adding all that would not be simple, partly because the ATMega162 is limited not only by flash (not such an issue), but also by RAM. I'm using roughly 85% of the RAM for variables and stuff. The other issue is that when operating there are many interrupts firing to drive the motors which means there is very little time for anything else to run on the CPU - in fact the Synta interface takes up pretty much all of what is left. There is practically no time when the CPU is idle.

However, you got me thinking, which is always a dangerous thing ;). I have another idea which could be workable, and would actually open up AstroEQ quite nicely. Rather than trying to run everything on the one ATMega, what if there were a way to talk Synta. In essence have a CPU such as the one on the Arduino Uno (ATMega328P) which talks via serial to the AstroEQ using the Synta protocol - meaning it talks in exactly the same way as EQMOD does.

The idea would involve having a select switch to determine between EQMOD mode in which the ST4 port would be used as it currently is (for ST4) and a hand controller mode in which the ST4 port would be converted to a serial interface on to which a hand controller could be attached. This would not only allow various DIY hand controllers to be designed (I'd make the APIs for the synta protocol, and others can then customise to their needs), but would also allow future expansion to more intensive control such as go-to movements. The downsides to this are it would require slightly more than just a couple of push buttons, and is less likely to "just work" - the hand controller would have to communicate with a much more complex method (synta) rather than directly changing IO lines. But it would allow better customisability. An ST4 port could be added to the hand controller which would essentially perform pulse guiding via serial as EQMOD does with PHD.


I think there are two options really, (1) stick with the very simplistic stand alone mode I proposed earlier, or (2) go whole hog and make a full Synta interface hand controller.

While you are free to customise the AstroEQ source code (in fact I encourage you to try things out!), I think trying to hack on an LCD to the existing firmware which most people wouldn't use isn't viable. It's basically go all in, or stick with what is in the beta firmware.


As always, I await your feedback.





Grr, just realised I used the second UART port on the ATMega162 as GPIO for the mode select pins. I so regret doing that! Well, if I was going to do option 2, it would have to be some form of SPI based communication instead of serial. Not completely a game changer, but somewhat annoying!

Edit: I've had a think about that and SPI would be possible, though the AstroEQ board would have to be the master and the handcontroller the slave. Not such an issue really.

I've also been thinking if it is possible to get the best of both worlds, and I think it might be possible to have both the advanced SPI based hand controller and also the basic push button controller all using the same ST4 connector and without much in the way of additional code!

Edit 2: Nope, SPI is also not possible, for the same reason I can't use the second UART. The SS pin is one of the mode select pins. In itself this isn't am issue as the AstroEQ could be the master, *but* just to make me regret pin assignments again, it happens to be MS1 which for the DRV8834 boards can either be an output or an input (floating) - if it is an input, it disables the SPI controller!! Now I could say that the 8834 is only supported with modification to the driver board (basically reassign MS1 on the driver board to be MS3) which would allow it to work, but not sure at this moment.
« Last Edit: February 21, 2016, 06:24:52 by TCWORLD »
Logged
Tom Carpenter (AstroEQ)

fireshipjohn

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Standalone Operation
« Reply #28 on: February 21, 2016, 18:45:17 »

Hi Tom/Everyone,

Just completed my homemade AstroEq, its the Mega based version, and I've added the standalone parts, also put together a small switch box to test the ST4 controls, its working nicely with a test Arduino program to my EQ5, even have it free running at ~ sidereal rate. I can also do some basic control it from lin_guider, so the hardware all looks good.

I do have 3 questions though :)
1. If I get the v7.5 source from github is there any instructions on how to compile/upload the code (I'm running under Linux BTW)?
2. If I upload this code (or the normal master branch code) to my Arduino Mega, can I roll back to my test Arduino code if necessary? (i.e. Does AstroEQ affect the Arduino bootloader?).
3. In the new code there may be a small issue I think. Where the test is made for standalone mode, it tests both new pins, but surely it should test only the standalonePin[0] (mode) in line 440 of AstroEQ.cpp? Otherwise if the standalone mode is off and the standalonePin[1] (speed) switch is set low, the code will not find a valid clause in the if...else structure?

Sorry for all the questions, and thanks for the excellent project!

John
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #29 on: February 21, 2016, 19:10:44 »

Hi John,

I use UECIDE to compile the AstroEQ firmware, but you should also be able to use the Arduino IDE (version 1.0.x) to do it too. Both of these work on Linux. You shouldn't need to do anything special, just click compile.

The AstroEQ code does nothing to the bootloader. It just uses it to upload itself like any Arduino sketch. You can easily swap between what the config utility has uploaded and uploading things directly from UECIDE/Arduino IDE.

I think you may be right about the if statement condition - I haven't been able to test the standalone stuff yet as things have once again gotten busy at work. I'll be taking some holiday at the end of March, so will spend some time working on it then.
Logged
Tom Carpenter (AstroEQ)
Pages: 1 [2] 3 4