Giter Site home page Giter Site logo

jbrazio / ardufocus Goto Github PK

View Code? Open in Web Editor NEW
51.0 9.0 19.0 5.54 MB

:telescope: The most accurate Open Source focus controller

Home Page: https://ardufocus.com

License: GNU General Public License v3.0

C++ 70.36% C 29.14% Python 0.04% Shell 0.46%
astronomy arduino focus focuser ascom ascom-driver moonlite-focuser moonlite

ardufocus's People

Contributors

jbrazio avatar mr-groch avatar per1234 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  avatar  avatar  avatar  avatar  avatar  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

ardufocus's Issues

SGP won't connect

Hi! Thanks for putting this up for us all to use! I've got ardufocus on a Arduino Nano. From the standalone Moonlight focusing software everything works. I can also control it as expected from putty to my COM port. However, SGP won't connect to the device. When I sniff on the serial port, I see that the Ardufocus is sent :GH# and then it times out with no response. I can send :GH# through putty and I get a response.

Use of Ardufocus with __AVR_ATmega2560__ possible?

I am trying to build my Ardufocus and found out, this platform is not configured.
is it not possible the use of this with MEGA2560, to avoid supplying the motor with external VCC?
Thank you very much in advanced for any possible answer or help!
M°Jesús Sogorb Amorós

Arduino firmware location

Hello, I would like to use this Ardufocus but I found only .cpp files that are not compatiple with Arduino IDLE, how and where I can download the Arduino firmware?
Thanks in advance for your feedback
Roberto

Firmware Issue

I've made some ardufocus in the past (like one year ago), and they all work fine. In the last month I tried to make another one, but this time I have a problem. I can't connect properly the arduino, both the moonlight driver and the Ardufocus driver show a connection problem. The wired thing is that I've upload the same skecth of the ardufocus that I've made in the past and they work fine!
It is pheraps an Arduino IDE problem, maybe due to the libraries update?

Pro Micro 32U4 support possible?

Would it be possible to support the Arduino Pro micro?

I tried adding it to the list of boards but the registers seem to be different. Is there an easy fix for this or is it a limitation of the chip?

Board: "SparkFun Pro Micro, ATmega32U4 (3.3V, 8 MHz)"
serial.h:50: error: 'UCSR0A' was not declared in this scope
         UCSR0A &= ~bit(U2X0); // baud doubler off

Configuring motor 2 using the printed board

Im trying to use the second motor using printed board and Im getting this error when I try to compile

The build instructions says to use this pinout https://ardufocus.com/manual/build-instructions/

#define MOTOR2_PINOUT A2, 6, 5, 4, 3, 2

Error:
sketch\a4988.h:70:12: note: no known conversion for argument 1 from '' to 'const a4988::pinout_t&'
exit status 1
'A2' was not declared in this scope

this is the PCB Im using https://github.com/jbrazio/ardufocus-schematics/raw/master/ardufocus/ardufocus-top.png

Motor wont turn

I have the Nema 17 motor with a A4988 motor controller running off an arduino nano. I cant seem to get the motor to turn. I wired it exactly as in this diagram.

#define MOTOR1_USE_DRV8825_DRIVER ( DRV8825) not working

First of all, thank you for this amazing project. Is the only DIY focuser I can use on NINA without any issues.

However, I can't figure out how to make it work with the DRV8825.

On the config.h file, there are 3 options, which the user must select only one. This is the default:

#define MOTOR1_USE_A4988_DRIVER
//#define MOTOR1_USE_DRV8825_DRIVER
//#define MOTOR1_USE_ULN2003_DRIVER

That is, the user can choose between the A4988, the ULN2003, and the DRV8825. This is also mentioned on the "Firmware" page with instructions here: https://ardufocus.com/manual/firmware/

Unfortunately, the DRV8825 doesn't seem to have been implemented yet. Forgive me if I'm wrong. :P

Right below these options, in the config.h file, I found two "IF"s. One for the A4988, and another for the ULN2003. But none for the DRV8825:

// Driver pin-out definition
// Define bellow the pin-out for your specific driver.
#ifdef MOTOR1_USE_ULN2003_DRIVER
  //                    IN1, IN2, IN3, IN4
  #define MOTOR1_PINOUT   2,   3,   4,   5
#endif

#ifdef MOTOR1_USE_A4988_DRIVER
  //                    MS1, MS2, MS3, SLEEP,  STEP, DIR
  #define MOTOR1_PINOUT  12,  11,  10,     8,     7,   6
#endif

After that, the next lines refer to other settings, such as sleep when idle, etc.

That said, as expected, we can't compile or upload the code to the Arduino when the option "MOTOR1_USE_DRV8825_DRIVER" is defined.

As I'm learning how to code yet, I'm not sure if this is in fact something that needs to be implemented, or if I'm missing something.

Thank you!


EDIT: Looking on other files, I found this on the assert.h:

// DRV8825 driver hack --------------------------------------------------------
#if defined(MOTOR2_USE_DRV8825_DRIVER)
  #define MOTOR2_USE_A4988_DRIVER
#endif

Even so, the code won't compile.

Can I interpret that defining "MOTOR1_USE_A4988_DRIVER" on config.h would work just fine with the DRV8825? Of course, correcting the connections for the variations of the DRV8825.

compile error - error: no matching function for call to 'uln2003::pinout_t::pinout_t(<brace-enclosed initializer list>)'

Hi, i've downloaded the files and simply opened ardufocus.ino and configured for ULN2003 per the readme. When trying to compile it comes up with the following error (using Arduino IDE 1.6.9).

What am I doing wrong?

ERROR:

In file included from sketch\motordrv.h:31:0,

             from sketch\ardufocus.h:30,

             from sketch\ardufocus.cpp:20:

sketch\uln2003.h: In constructor 'uln2003::uln2003(const uln2003::pinout_t&)':

uln2003.h:56: error: no matching function for call to 'uln2003::pinout_t::pinout_t()'

 inline uln2003(pinout_t const& pinout) : m_pinout({ pinout }) { ; }

                                                             ^

sketch\uln2003.h:56:65: note: candidates are:

sketch\uln2003.h:32:12: note: uln2003::pinout_t::pinout_t()

 struct pinout_t

        ^

sketch\uln2003.h:32:12: note: candidate expects 0 arguments, 1 provided

sketch\uln2003.h:32:12: note: constexpr uln2003::pinout_t::pinout_t(const uln2003::pinout_t&)

sketch\uln2003.h:32:12: note: no known conversion for argument 1 from '' to 'const uln2003::pinout_t&'

sketch\uln2003.h:32:12: note: constexpr uln2003::pinout_t::pinout_t(uln2003::pinout_t&&)

sketch\uln2003.h:32:12: note: no known conversion for argument 1 from '' to 'uln2003::pinout_t&&'

exit status 1
no matching function for call to 'uln2003::pinout_t::pinout_t()'

Moonlite Compatibility

How Is the Adufocus controller connected to the Stand alone Moonlite Hi-Rez Stepper motor DB9 connector ? I don’t see circuits for the DB9 connections. Thank you .....

Motore freezer when stopped

Hi, i built the project and everything works fine, except for One issue.
In N.i.n.a. when the motor Is moving (and only in this case) of i clic the X for stop It the motor stops but It remains flagged "Is moving" and all that i have tò do Is disconnect and reset the borad. All control buttons became disabled.

But if i leave motor to complete its command and It stops itself, everything goes well.

Switch for in/out focusing

Hi !

Can you add support for 2 switchs doing in and out focusing , usefull for regular stargazing without loosing home and preset .
Actually using a basic sketch with switchs on D2 and D3 and fixed speed @ 300 steps/s . Adjustable speed will be great too , like long press --> increase speed and impulse for fine tuning .

Thx for your great job !

Sometimes focuser goes to 0 absolute, instead of step out or step in command.

Quite often, like 5% of the time, focuser goes to 0 absolute position instead of making small step. Using Ekos/Indilib on virtual machine. Arduino mini. Can't be sure that it's not a driver's issue.
Kind of 'solved' by checking target distance, if it's >1000, don't move in function stepper::set_target_position.

A way to specify step size in UI_KAP

Hi,
congratulations for this amazing work!! even I got some issues using Moonlite protocol.

The questions is, I'm currently using UI_KAP function, which is working, but It move step by step at a speed determined by Arduino polling which is very very slow.
Is there a way to interact with this or modify defaults in your code?
Regards.

PCB components missing from BOM

Hello,

You did a great job with the Ardufocus, thanks.

I have a question about your PCB.
What means the 100nF and 10K unter the Arduino Nano board.
100nF is not a part of the components.
Are this components on the top side or bottom side of the PCB?

And what is the purpose of the NTC component?

Please could you explain it to my?

With Regards

Peter Boot

Speed with the user interface (switches).

I would like to change the speed in manual mode. Righ now, the acceleration is very slow and the top speed achieved is also quite low. It is fine though when I'm controlling the device with the ascom driver ( the firmware is set to 400 steps/sec maximum in the config file). Wich part of the code do I have to change to resolve this ?
Also, is this manual mode using half steps ou full steps by default ?

Modified step motor 28BYJ-48 with PCB not working

Hey,
I finally succeeded in assembling the PCB. I soldered the components on the PCB, and put the code in the Arduino Nano.
Put 12V power supply on PCB and the PWR LED lights up green. The usb connected to the laptop. Arduino Nano is found by the laptop on COM 6. When I connect to the software, the DX and RX Led start blinking at the same time. When I try to control the motor, the flashing speed of the DX and RX LED changes briefly and then returns to the original speed. The step motor does not move at all. The step motor is a modified 28BYJ-48 and is connected according to issues 2 of this site. The step motor also gets hot. Can you give a clue as to what I can do?

Ardufocus components

Hello João,

I want to build the arduino focuser using your code and schematics as a reference.
Can I succeed without using the resistance and thermistor and if not could you please elaborate on their function on the project ?
I do not have a thermistor at hand so, can I substitute thermistor with a resistance ?

Best Regards

Apo

Will not compile when DRV8825 selected.

I can not compile the ino file if I select DRV8825 as the driver. Get an error about motor 1 not having a driver selected.

Also wiring image does not seem to match pin assignments

INDI compatibility

Hi. Is this project INDI compatibile? I would like to use it with EKOS software under Astroberry platform.

Arduino IDE

I'm a little confused about how to build a sketch from your files. All I see are library files. I don't see a main program loop.
Thanks for your effort. It looks like your project has all the features I need. I just need to figure out how to upload a sketch to an Arduino Nano. I'll be using a unipolar motor and I see how to implement that in the config file so I understand some of what's happening.
Again thanks.

Support for TMC2130 Silent StepStick

I've downloaded your code and I'm trying to figure out how I might go about adding support for the TCM2130 Silent Stepstick drivers. I've got a few from other projects and they have some very nice features that I think would be nice for use in a focuser. They are complicated drivers but there are some nice Arduino libraries available, this one I've used in the past:

https://github.com/teemuatlut/TMC2130Stepper

Got any pointers as to how I would I go about adding this library, and support for its functions, to your ardufocus program

Ardufocus is not recognized by the Moolite ASCOM driver

Compiled and uploaded the firmware to Arduino Mini. I am able to communicate with it from the Moonlite Single Focuser
v1.4 app, but the Moonlite DRO Focuser Driver (downloaded from focuser.com) does not show any devices in the Moonlite Focus Setup menu. I am running the latest version 6.5 of the ASCOM Platform.

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.