Author Topic: Little Foot Display Firmware  (Read 46118 times)

Offline Armando

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 225
Re: Little Foot Display Firmware
« Reply #20 on: Wednesday, 18.09.13 - 23:37:13 - CEST »
...
I think at this point we can finish our small excourse into what's about electric motors. Now we have an equal understand and won't suffer from different definitions.
...
I think to know how a stepper motor works.
Without taking into account mechanical aspects (step angle and overall reduction) tracking resolution is still related to the number of microsteps/step. Voltage PWM output with coils current feedback is what is required to make microstepping working. Appropriate IC stepper driver exist to properly move stepper motors with adequate PWM frequencies and appropriate (variable thanks to the feedback) PWM duty cycles.
Nothing else is required except the need to make the MCU asking for a ustep CW or CCW to the motor driver.

While referring to PID solution I meant to "guide" at variable speed (no more fixed usteps/s) according to the current detected tracking error.

CS
Armando

Offline Astroquattro

  • Member
  • **
  • Posts: 21
Re: Little Foot Display Firmware
« Reply #21 on: Thursday, 19.09.13 - 00:10:18 - CEST »
Yes, you're right about the deeper understanding.

About the PID we have to talk about a bit more. But let's do that when it come to implementing this module.
Since auto guiding is based on looking at the offset of a guiding star between to images, and correcting that offset right away, the speed differs because of how far the shift was. To do that as accurate as possible taking the image, downloading it from the ccd or cmos, pinpointing the center of the guiding star, measuring its x and y position and calculating the offset transferring it to µsteps and passing it to the motors, a CPU has it's advantages as I pointed out.

Normally one uses a subset of  lets say 40 by 60 pixels depending on how large a pixel is and how faint the guiding star was chosen. An MCU can do that in a couple of hundred milliseconds where a CPU does that in some some milliseconds to hundred nanoseconds. All we have to ensure is to stay below 997 milliseconds because that's what is the critical time you see a result with common telescope apertures. The large a telescope is, the more accurate it has to be and what's good for the large is good for the smaller ones, too.

cheers,
Christian

Offline Armando

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 225
Re: Little Foot Display Firmware
« Reply #22 on: Thursday, 19.09.13 - 00:28:55 - CEST »
Since auto guiding is based on looking at the offset of a guiding star between to images, and correcting that offset right away, the speed differs because of how far the shift was. To do that as accurate as possible taking the image, downloading it from the ccd or cmos, pinpointing the center of the guiding star, measuring its x and y position and calculating the offset transferring it to µsteps and passing it to the motors, a CPU has it's advantages as I pointed out.
In fact I think the controller should be compatible with current guiding software...
The PC guiding software computes the error and corresponding pulse durations on RA and Dec. But the MCU should properly manage it. Nothing new...

Quote
Normally one uses a subset of  lets say 40 by 60 pixels depending on how large a pixel is and how faint the guiding star was chosen. An MCU can do that in a couple of hundred milliseconds where a CPU does that in some some milliseconds to hundred nanoseconds. All we have to ensure is to stay below 997 milliseconds because that's what is the critical time you see a result with common telescope apertures. The large a telescope is, the more accurate it has to be and what's good for the large is good for the smaller ones, too.
It's obvious a PC guiding software is required. Do you mean to implement also a new guiding software? I think it's not worth it.

CS
Armando

Offline Astroquattro

  • Member
  • **
  • Posts: 21
Re: Little Foot Display Firmware
« Reply #23 on: Thursday, 19.09.13 - 14:01:32 - CEST »
Since auto guiding is based on looking at the offset of a guiding star between to images, and correcting that offset right away, the speed differs because of how far the shift was. To do that as accurate as possible taking the image, downloading it from the ccd or cmos, pinpointing the center of the guiding star, measuring its x and y position and calculating the offset transferring it to µsteps and passing it to the motors, a CPU has it's advantages as I pointed out.
In fact I think the controller should be compatible with current guiding software...
The PC guiding software computes the error and corresponding pulse durations on RA and Dec. But the MCU should properly manage it. Nothing new...

Quote
Normally one uses a subset of  lets say 40 by 60 pixels depending on how large a pixel is and how faint the guiding star was chosen. An MCU can do that in a couple of hundred milliseconds where a CPU does that in some some milliseconds to hundred nanoseconds. All we have to ensure is to stay below 997 milliseconds because that's what is the critical time you see a result with common telescope apertures. The large a telescope is, the more accurate it has to be and what's good for the large is good for the smaller ones, too.
It's obvious a PC guiding software is required. Do you mean to implement also a new guiding software? I think it's not worth it.

CS
Armando

Did you take a look at the software lately? Guide9's gui is pretty oldschool. It is infact the same look and feel as it was when it started as a DOS program. Bill Grey said, that he know C and C++ to get the algorithms right and the concepts fast, but he does not know opengl nor direct_lightning nor other graphics libraries and he does not have the time to get them to know good enough to build a modern gui. The Sky is nearly the same but it relies completely on Windows therefore forget about it's calculations they have nothing to do with realtime. If you run Guide with Windows it's the same, but you can use wine under Linux and than you have realtime and the benefits. Those two programs are nice for pointing to targets and moving the telescope but they do not support autoguiding the way it is useful. MaximDL does that for good, but it lacks the other way round, no good star map program and it's pointing is rather bad. Stellarium is a virtual planetarium with the capability to move telescopes. It claims to be as accurate as Guide9 but it isn't. What ever, it moves the telescope but has not autoguiding section. CCDobs, Nebulosity3 and all the other do control the camera but their guiding has issues and lack important parts one needs by getting all necessary images like bias frames in the first place, the do it amateur style and think that "a calibration" is what has to be done. It's like Msoft think that you need a "logical device (c:)" and the user is not capable of understanding the concept of partitions and file systems. I had a little test on all those ccd recording programs which give the user reduction capabilities and compared them to pro stuff like IRAF and MIDAS. Producing a masterbias should, if you use the same images and the same algorithm without any weighting function in it, the same result over and over again. You get that with for example IRAF and can proof it by doing so and substracting the resulting images from each other with complete black images. However I did that with MaximDL's "calibration", with images I got out from Fitswork, AstroImageJ, Nebulosity, CCDStack etc, the results were different and even if you do it ten time with one program allone, the results were different.
So much for that.

For example the Badlands Observatory in South Dokota uses old Dos software for slewing the telescope and that is common.
At my home town observatory we do the same. Our control software was written in pascal and is still a Dos program because you can't compile it for Windows. It won't run! It is specificly written for Dos. I won't compile with necessary changes on Linux either. Badlands uses MaximDL for guiding because their is no better.

Yes of course I have to write new Software because we are using new hardware. Using Arduino with shields doesn't free you from writing new Software. I don't want to develop the wheel again, but since what's on the market isn't a complete suite which gives us the opportunity to get a piece of software that is a summarization of all the good things without the lacks.

We won't start writing another ASCOM driver, because that would turn all the advantages we just pointed out in. Besides, the software should be plattform independant. So no ASCOM allowed. Building a gui with python3 and QT which runs on every OS even on smartphones and tablets is easy because of QT's designer. Implementing all the nice features within modules is easy, too and gives us the possibility to just use or provide what the telescope and the other equipment let's us do. For example, you do not need auto guiding if you just want to go visual or haven't cameras. The bare minimum can also be used as stand-alone version, but that is only optional not the main goal!

Loose yourselves from the idea that a handheld stand-alone version mirrors state of the art telescope usage. What's good for scientists is good for amateurs, too. Not only the hard- and software but methods and ways of doing things. Scientist like it easy, reliable and comfortable but not screwed up.

The telescope controls at the big observatories are very easy to use so most times, it's profound to the observer and one can do that after half an hour. What's very much more complicated is, setting up an amateur telescope for the night because hard- and software, when it's even there, is not meant to be use for such equipment.

One or two sentences to writing new software for the Arduino or in general... whether you build new closed or open hardware you need to write a new piece of software anyway. You have to implement ASCOM support, you have to write cpp code to be loaded to Arduino, that is new software!

cheers,
Christian

Offline Armando

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 225
Re: Little Foot Display Firmware
« Reply #24 on: Thursday, 19.09.13 - 18:57:27 - CEST »
Hi Christian,

what do you think about Metaguide?

Anyway I think Qt framework is a cross-platform framework if you don't mean to communicate to specific hardware.
Try just to make use of serial COMs on Linux and XP/W7 by an unique code... Try to make use of an USB HID; then let me know...
What camera should be supported by your guiding software?

I think you meant to make a new mount controller; now I really don't know...
Quote
whether you build new closed or open hardware you need to write a new piece of software anyway. You have to implement ASCOM support, you have to write cpp code to be loaded to Arduino, that is new software!
Ok, you excluded ASCOM. So develop a new controller, a new cross-platform guiding software able to communicate to the controller on each OS. Then remember your guiding software should be able to communicate to a guiding camera. Only one? You'll have to offer support for each camera on each OS... Good work!  :)

CS
Armando

Offline Astroquattro

  • Member
  • **
  • Posts: 21
Re: Little Foot Display Firmware
« Reply #25 on: Friday, 20.09.13 - 15:31:56 - CEST »
Of course I was talking about having a new controller based on open hardware, like Arduino. For a new controller you need new software because the old one can't be used on a complete new model.  How else can you get rid of all the annoyances if you keep something from the, despite it won't be usable with complete different electronics?

Do you have an idea why there isn't any such system open hardware with python/QT coding on the market?
I give you a hint: it's not because it's undoable...

cheers,
Christian

Offline the_lizardking

  • Hero Member
  • *****
  • Posts: 136
Re: Little Foot Display Firmware
« Reply #26 on: Thursday, 03.10.13 - 07:26:41 - CEST »
Maybe some interesting link related to our discussion sent by Orlando:
https://github.com/TCWORLD/AstroEQ

Offline Astroquattro

  • Member
  • **
  • Posts: 21
Re: Little Foot Display Firmware
« Reply #27 on: Friday, 18.10.13 - 16:57:32 - CEST »
This is indeed interesting and I found it on the web earlier this year. It started going in the right direction but ended up where one was before because the mind behind it do not know much about computer science and how to put up controls the right way.

I've been on some busyness trips the last weeks, meeting people who work in the field of serial programming controls and some working on FPGAs. All in all they know about the issues with closed hardware. We had many talks about the pro's and con's and in the end we agreed: The answer to the question why there are no universal tracking controls on the astronomy market is: There is no professional electronic engineer involved who is an amateur astronomer and know as much about astronomy than electronics. At second, there are too few serious amateur astronomers pay for such a device the amount professional companies want to have. At third, there are no companies who would built such devices based on open hardware because anybody could kick them out of busyness.

So if we want to have a cool and freaking tracking control, future ready and expandable based on open hardware we have to do it on our own. And we have to treat the result like that and distribute just the information how to built such a thing and not distribute the device itself. Such tracking devices which can evolve with it's user needs the user, or more to the point only if the user evolves from an unexperienced buyer to a serious observer he deserves such a tracking control because if he builds it he will know how it works and therefore know what it does and how to use it right. As like a car, if you have build or re-build it because you know what it consits you, you will drive it better. Then you know how every part works together with every other part. This understanding brings you to the point of using this self-learned knowledge in your driving skills, like reducing your usage of the break less by controlling the speed more accurately, or by trusting the side guiding forces of the tires when driving through narrow curves with higher speeds.
Just for example.

The mistakes in the astroeq lie in the wrong choosen ascom environment again. If one would have relied on the arduinos internally used c++ language or turned to the pyduino library and not screwing things up with ascom, we would not have to build our own. And if they didn't start using the microcontroller, which is just copying all other controls from the past, we won't start our own, too.

To sum it up:

no-goes are: ascom, microcontroller based tracking, sub-d-plugs, closed-hardware and closed os-support (msoft os are just an option not a requirement, pec

requirements:
 - open-hardware, to make rooms for evolution
 - Linux as standard os because of it's realtimeness (MacOs is linux!)
 - USB and Ethernet interfaces because no one hase sub-d, ieee1394, pcmcia, cardbus interfaces anymore
 - microstepping: hardware and software (h: >= 128x, s: expandable by formula)
 - gui has to work on all os-types preferable Linux, see Linux as standard for why
 - modularity, not everyone needs autoguiding, not everyone needs star map-based object selection and slewing, etc
 - indi-library inclusion for controlling filters, cameras etc
 - opengl inclusion for realtime star maps and modern look and feel -> there is a kick-ass opengl-lib for python3 which does not exlcude ATI-cards like other languages.
 - UCAC4 and USNO B2.0 as main catalogs for positioning and object databases
 - objects and informations are organized in database -> mysql, there are nice python-mysql-libraries which give good gui support
 - parallization! if available make us of as much cpu-cores or cpus as possible

to be continued...

Offline SurfaceCleanerZ

  • Member
  • **
  • Posts: 11
Re: Little Foot Display Firmware
« Reply #28 on: Sunday, 20.10.13 - 18:38:25 - CEST »
Hi,
do you know the µstic stepper control? It is open source and is probably a basis for an development.

http://www.s-line.de/homepages/schweikert/SMCtrl/smctrldocu.htm
sorry just german.

regards,
Stefan

Offline Astroquattro

  • Member
  • **
  • Posts: 21
Re: Little Foot Display Firmware
« Reply #29 on: Thursday, 24.10.13 - 20:01:05 - CEST »
Hi,
do you know the µstic stepper control? It is open source and is probably a basis for an development.

http://www.s-line.de/homepages/schweikert/SMCtrl/smctrldocu.htm
sorry just german.

regards,
Stefan
Hi Stefan,

yes it is open source but it is still what we don't want. It uses very old Atmel microcontrollers AT90S2313 and as old and not available any more rs232 interfaces. The board is closed hardware. The concept presented on this site is what is used since the late 70th and the improvements a little down the site suggest using a h-bridge like L293 which is replaced in more modern controlls by several ic like the A4988 or TMC 262 or TLC5940 etc.
Our main problem today is, that there are no electronic engineers in astronomy anymore who know all possible chips. That's why open_hardware is the key to get an universal controll which will stay and evolve with the future.

Offline SurfaceCleanerZ

  • Member
  • **
  • Posts: 11
Re: Little Foot Display Firmware
« Reply #30 on: Tuesday, 19.11.13 - 18:29:44 - CET »
Hi,
the board is also open source!

Using newer Atmels is possible if you reroute it... But I know, what you mean! But the code is interesting for every hardware!

I just wanted to give the link to get some code bits for the development!

Why invent always a new wheel?

regards,
Stefan

Offline the_lizardking

  • Hero Member
  • *****
  • Posts: 136
Re: Little Foot Display Firmware
« Reply #31 on: Thursday, 21.11.13 - 22:32:35 - CET »
I think we will never get code,... and the current code is anyway so buggy that we will need to re-write most of the things except the standard function that are almost running ok.

So we code create a new code simply, that would be a possible solution,...

cs

Offline Astroquattro

  • Member
  • **
  • Posts: 21
Re: Little Foot Display Firmware
« Reply #32 on: Friday, 20.12.13 - 15:11:59 - CET »

Why invent always a new wheel?

That isn't the problem, because the algorithms, what is behind every implementation doesn't change. The problem is, that with every new piece of hardware, with every new board the implementation has to be change to get straight with it.
One solution which is used in modern computers since 2004 is something which is called acpi-handler which can talk to hardware and tell it what it has to do leaving code once written as it is, so changes in production series won't bring up the issue of changing the code.
You know that problem from the time prism-chips in network cards on windows needed up to 37 different drivers. Based on that problem the building of the acpi-handler was triggered.

All in all that's why I was looking for open hardware like arduino and stuff where you can leave the original coding as it is because the libraries of the different hardware are standards and do the trick.
Python will come in handy, too, because you can just write one implementation and be platform independent. Pyduino is really a way to go.

Quote
I think we will never get code,... and the current code is anyway so buggy that we will need to re-write most of the things except the standard function that are almost running ok.

So we code create a new code simply, that would be a possible solution,...

cs
You are right about we will never get the complete code, which isn't really neccessary anymore because the hardware itself got old and there are better ways to go. If we just port what was achieved to more modern and open hardware we just have to choose the right programming language and implement the code once because with the right selection one use parsers to transfer the code later to more modern languages in the future without having to re-implement again. That is code recycling at it's most, and I think the best way to go.
Writing special code for special closed hardware is the past.

Anotherway to go is, transfering our guiding tasks to FPGA's which won't be a solution to not having to invent the wheel again but is a solution to react on hardware and task changes very quickly and very inexpensive.

I prefer the first solution because we don't have to invent the hardware ourselves and the availability correlates with the market.

cheers

Offline the_lizardking

  • Hero Member
  • *****
  • Posts: 136
Re: Little Foot Display Firmware
« Reply #33 on: Monday, 23.12.13 - 13:18:09 - CET »
You are for sure right,... the hardware is old,... too old meantime,...

Offline Astroquattro

  • Member
  • **
  • Posts: 21
Re: Little Foot Display Firmware
« Reply #34 on: Monday, 23.12.13 - 17:32:37 - CET »
I would say, let's leave it like it is and concentrate on having a new tracking control based an open hardware and on languages which evolve with the same pace. The concepts behind each realisation didn't change since the 70ths but what was expensive by hardware those days is low-cost today and what was available and ugly in the 90ths is fine and sophisticated today.

I think the main problem will be time to implement things.
We already started a thread on what should a new version contain. Next step is to bring all the guys who want to participate up to speed with python3, pyduino, firmata, qt and maybe qpython (if one wants to have android support).

The basic stuff like running the motors in tracking speed will be short to have. The more convenient stuff like knowing where the scope is pointing at, parking position and how to slew to coordinates will take a bit ans finally having a nice gui with Guide 9's precision and stellarium's transparent look may come in to existence at the end in phase 3. We should manage such a project with a pms where every piece of work can be split up into task and everyone participating can choose his/her task without being forced to anything. Those project management systems do have links to sourceforge or are able to use version control systems like gitorious, subversion or darcs. Today we are in the comfortable position to have all these features compared with the time 15 years ago where such tools were restricted to professionals and nerds.

But we got off-topic for a bit.
The display firmware is obsolete with the new tracking control.