Code Monkey home page Code Monkey logo

focuser's Introduction

Focuser

Focuser for Astronomy based on Arduino (usable by Indi)

This focuser is used with Indilib (http://indilib.org/) It use the protcol Moonlite (As documented in the indilib project). A LM335 is used as temperature sensor. The Stepper Motor is controled by a A4988 Controller. This controler is used by a lot of 3D printer like the RepRap and it should be easy to find it.

Features:

  • Several speeds
  • full, half, quater, eighth and sixteenth step
  • temperature compensation (compensate the dilatation of the instrument)
  • software temperature adjustement
  • separate display

Element used

Internal library

  • LM335. Used to interface the temperature sensor
  • Moonlite. Used to code and decode the Moolite protocol
  • StepperControl_A4988. Used to command the stepper motor

Extern library

  • The graphical library U8g2

Compilation

This project used the standard Arduino file organisation. A main file in the the folder Focuser and the librairies used are in the folder libraires. The Arduino IDE is recommanded for an easy compilation. To compile you need to copy or create some links in your Arduino directory (which is automaticaly created when you install the Arduino IDE). The Arduino IDE can be found hier: link

Compile and transfer the program to the Arduino.

When you start your Indi server use the indi_moonlite_focus module to enable the focuser. The software provided by Moonlite on Windows is also usable.

The library U8g2 support several displays. It is easy to adapt it to another one.

focuser's People

Contributors

hansastro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

focuser's Issues

Rework the schematics

The schematics is actually only in PDF. It should be available from the KiCad files.
Also a screen is now added. It should be reflected in the schematic.

Initialisation of the temperature sensor wrong

The write temperature is written only after the first integration loop is finished.

A first read of the temperature must be done to avoid wrong value before the first integration loop.

The temperature compensation work every two cycles

When called the temperature compensation function is effective only every two calls.

The whole temperature compensation process should be included in the motor controller driver.

Proposal:

  • setTemperatureCompensationDelay (set the interval of the compensation will be calculated)
  • getTemperatureCompensationDelay
  • enableTemperatureCompensation
  • disableTemperatureCompensation
  • updateTemperature (to give to the motor controler the information of the temperature sensor)
  • isTemperatureCompensationEnabled

Hang in temperature compensation mode

After a temperature elevation, when the temperature go back to the origin the whole system hang when the temperature is very close to the origin.

This bug make the temperature compensation mode unusable...

No reinit of the temperature in case of moving

When the motor go to a new position the reference temperature should be reinitialized.

Solution:
The static variable isInit in the function compensateTemperature should be a private member and it should be reinitialised to false in case of call of stopMovement.

Explicit temperature correction

I have implemented the focuser on a Nano and it works well. (small form factor)
Needed to reassign temperatureSensorPin to A0 as Nano uses A4 & A5 for I2C used by display .
Note code also currently has:
temperatureSensorPin = 3; I think that should be A3 as Digital pin 3 already assigned.
Even with a 10K pot attached on a Nano the adjustable temperature range is too small. Would useful if there could be an explicit temperature offset factor.
Great project
TNX Max

fritzing/PCB layout

@hi!
great work, would you be interested in a PCB - i can make a fritzing file/PCB for the focuser ...
yours
wolfi

The resolution of the temperature sensor is quite too low.

Without any special circuitry the temperature resolution of the LM335 is about 0.5 degree with the ADC of the Arduino.
It can be improved with some amplification of the signal.

Example:
The resolution of the actual solution is 0.5°C.
If we limit the temperature range from -20 to +15°C and use a gain of 13 and an offset of -2,5V to the sensor voltage, the resolution become 0.03°C.
For a temperature range from -25 to +35°C, a gain of 7.8 and an offset of -2.4V the resolution is 0.06°C

The maximal speed is not limited

The maximal speed should be limited according to the step mode. In full Step mode it not possible to move the motor with the same clock speed than in 1/16 mode.

The maximal speed must be limited dependently of the step mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.