Welcome, Guest. Please login or register.

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

Author Topic: Standalone Operation  (Read 28822 times)

fireshipjohn

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Standalone Operation
« Reply #30 on: February 21, 2016, 20:04:23 »

Thanks Tom,

I'll try it out!


John
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #31 on: February 21, 2016, 20:27:42 »

IMPORTANT!

If you are using the beta standalone mode, stop now. I've just noticed that the ST4 port was mistakenly configured to be an outputs not inputs when I was modifying the code for the v7.5 beta firmware.

I'll apply a fix shortly and push it to Github as well as updating the precompiled firmware on the beta thread.

If you are going to compile your own version, you can grab the fix on Github once I've pushed it.

Logged
Tom Carpenter (AstroEQ)

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #32 on: February 21, 2016, 20:48:06 »

The above has now been corrected. I've uploaded to the beta firmware thread the new hex files. I've also pushed the source code fix to Github.

Apologies for that mistake. It shouldn't have caused any damage to the pins, but it is definitely not a good thing to be doing for extended periods of time!
Logged
Tom Carpenter (AstroEQ)

fireshipjohn

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

Hi Tom,

No problem, I've only connected the USB to it at present!

Thanks


John
Logged

PhilCrompton

  • Full Member
  • ***
  • Posts: 33
    • View Profile
Re: Standalone Operation
« Reply #34 on: March 10, 2016, 21:29:08 »

Hello Tom,

This evening I have built and uploaded the code in the v7.5-dev branch so that I could upload it and test the ST4 port  functionality. I am doing this via a breakout board.

Is gpio pin 1 the same as the digital pin 1 on the Arduino? I have tried shorting that to GND then connecting the 12v supply. When I then connect the ST4 pins for RA & Dec to GND one at a time. Nothing happens at the stepper motors. Am I misunderstanding something here? The steppers work fine from EQMOD by the way (well they move).

Kind regards,

Phil
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #35 on: March 11, 2016, 00:05:23 »

@Phil, nope. From the PinMappings.h file:

Code: [Select]

#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)

//GPIO Pins:
#define gpioPin_0_Define 21  //IO0 [ATMega PD0] - Interrupt Capable (INT0)
#define gpioPin_1_Define 22  //IO1 [ATMega PA0] - GPIO Pin
#define gpioPin_2_Define 23  //IO2 [ATMega PA1] - GPIO Pin


GPIO0 is D21
GPIO1 is D22
GPIO2 is D23
Logged
Tom Carpenter (AstroEQ)

PhilCrompton

  • Full Member
  • ***
  • Posts: 33
    • View Profile
Re: Standalone Operation
« Reply #36 on: March 11, 2016, 11:08:40 »

Ah that might explain it. I should have looked at the code myself. :D. Thanks.
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #37 on: March 13, 2016, 23:33:39 »

Well, I got a chance to sit down and think about it, and I have come up with a plan for two sorts of hand controllers, both using the ST4 connector.

The first is a basic one which has just the NESW buttons and a speed select (low speed/high speed). This is essentially just four push buttons and a toggle switch. No power supply is needed, there are simply 5 lines that are ether grounded or floating.



The second is an advanced one which can control the full functionality of AstroEQ. This one is going to take some time to develop, but I am planning to make the code for interfacing with the AstroEQ as an Arduino class which will allow people to easily develop there own hand controllers with any functionality they desire. I'm aiming to support both the Mega and the Uno (and by extension Nano, etc.) with this.

Communication will be done using the Synta protocol in much the same way that EQMOD does (this avoids having to add tons of extra code to the AstroEQ firmware), though rather than being UART based, it will be SPI based with the handcontroller being a slave. The only reason for choosing SPI is because I screwed up years back when I chose the pin assignments - I used the second UART port of the ATMega162 as mode select pins for one of the motor drivers, oh how I regret that decision! But still, some careful coding and I can bit-bang SPI at 1MHz, so should work pretty well.


The basic one is in the current beta firmware and will be unchanged. The advanced one I have integrated the code into the AstroEQ firmware and have started work on the hand controller firmware, but I have no ETA on when that will be ready.
Logged
Tom Carpenter (AstroEQ)

Washy

  • Full Member
  • ***
  • Posts: 19
    • View Profile
Re: Standalone Operation
« Reply #38 on: March 14, 2016, 18:23:52 »

Sorry if I'm being dense but couldn't one simply write an eqmod like android app that interfaces with AstroEQ via Bluetooth using the protocol?

Its no mean feat I'm sure, but the smart phone is infinitely more capable than writing a new hand controller with 18x2 LCD and more ubiquitous?
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #39 on: March 15, 2016, 02:24:13 »

If you want to write an app, then be my guest!

Alternatively, once the protocol code is in place, it may be possible for some enterprising code writer to create a parser for some other protocol (LX200?) on top of the Arduino code and then control it via, say SkySafari over Bluetooth or WiFi. That saves building an entire app. If done correctly, it may be possible to also adapt the interface to connect to Skywatcher mounts as well. I'd be more than happy to assist someone who decides to take it upon themselves to do that.

It may be possible to implement LX200 into the Arduino Mega version of the code, but I doubt there is enough RAM/CPU time left on the ATMega162 version to be able to handle a high level interface, so providing an interface to offload that to a second CPU seems like a good idea to me, even if in the end nobody makes use of it :).
Logged
Tom Carpenter (AstroEQ)

PhilCrompton

  • Full Member
  • ***
  • Posts: 33
    • View Profile
Re: Standalone Operation
« Reply #40 on: March 31, 2016, 23:04:57 »

Hello Tom and all,

I finally got to the point of testing using the latest dev sources. I have a switch to ground pin gpioPin_1_Define (D22) to select stand-a-lone or EQMOD mode. I have a hacked game pad controller hooked up to the ST4 port which will connect pins D50,D51,D52,D53 and D23 to GND to control the RA, Dec and speed selection. This is what I am seeing.

Power on in EQMOD mode without the hand controller and EQMOD N S E W options allow slewing. If I power on with the hand controller plugged in EQMOD NSEW works until you press one of the RA buttons on the controller. When you do the RA motor starts moving at a speed faster than tracking but does not stop when you release the button. After that the unit does not respond to EQMOD commands. If you don't touch the RA buttons the DEC buttons seem to work OK. Only option is to unplug everything and start again.

If you power on in stand-a-lone mode the RA motor seems to be tracking correctly but pressing the hand controller buttons doesn't seem to do anything.

Any ideas? I have checked for shorts on my hacked hand controller and cannot find any.


Logged

D33P

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Standalone Operation
« Reply #41 on: April 04, 2016, 17:02:47 »

Hi everyone,

Sorry if this is a dumb question.
I have the V4.5 board, is the square pin of the GPIO pin1, or pin5?
Love my AstroEQ but would be really handy to have manual control for quick sessions so I don't have to set up the computer.

Many thanks

James
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Standalone Operation
« Reply #42 on: April 05, 2016, 00:08:01 »

Hi James,

Pin 1 is the square one.
Logged
Tom Carpenter (AstroEQ)

D33P

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Standalone Operation
« Reply #43 on: April 05, 2016, 22:32:59 »

Hi Tom,

Thanks for your reply.
Stand alone mode now works! :-) But for some reason I can't get high speed mode to work.

Here's what I've done:
-Toggle switch between GND and GPIO header pin3 (stand alone mode)
-Link from GPIO header pin2 to pin1 on the ST4 port
-Toggle switch between ST4 pin1 and pin2 (speed mode)
-Momentary switches between ST4 pin2 and pins3,4,5,6 (direction)

Stand alone / EQMOD modes work perfectly.
RA+/- and DEC+/- work perfectly.
Speed mode switch has no effect. I've checked that the switch pulls GPIO pin2 to GND at the header, so I'm confident that the cable to my hand controller and switch are functioning.

Any ideas?

Thanks in advance for your time

James
Logged

D33P

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Standalone Operation
« Reply #44 on: July 27, 2016, 13:26:55 »

Hi everyone,

Sorry to revive an old tread. Has anybody got the high speed mode to work in stand alone mode?

Thanks in advance

James
Logged
Pages: 1 2 [3] 4