Menu

problem with the home position

Philippe
2023-04-03
2024-09-19
1 2 > >> (Page 1 of 2)
  • Philippe

    Philippe - 2023-04-03

    Hello Robert
    I have just realized myROTATEUR which works very well except for the home function
    Isn't there an error in the code, in fact pin 3 (HOME) is defined as output, shouldn't it rather be input?

    ifdef HOME

    pinMode(HOME, OUTPUT);
    #endif
    Cordially

    Phil

     
    • brownrb

      brownrb - 2023-04-06

      Hi Phil

      I have looked and searched through the files in dirmware release 200-06 and cannot find this statement in any file. Am I missing something here?

      In Arduino world, yes, one can read from a digital pin that has been ccnfigured as OUTPUT.
      So it does work even though it should have been declared as an OUTPUT

      You are correct that it should be declared as INPUT.
      Regards
      Robert

       

      Last edit: brownrb 2023-04-06
  • Philippe

    Philippe - 2023-04-06

    hi robert
    it is in version 119 of the firmware currently on deposit on github at line 214 for me, that the HOME pin is declared.
    it disrupts the ky sensor
    and therefore the HOMING does not work
    What do you think?
    phil

     
  • brownrb

    brownrb - 2023-04-07

    What?

    If it is on GitHub I am pretty sure its not mine. The only github project I have is the myFP2ESP32 focuser. Unless I am loosing my marbles.

    regards
    Robert

     
  • gph.giraud

    gph.giraud - 2023-04-07

    sorry so much for me it's not on git hub but of course on sourceforge in the file tab of this forum really sorry
    phil

     
  • brownrb

    brownrb - 2023-04-07

    Ok we seem to be on the same page now, apologies for this taking time
    this code

    #ifdef HOME
      pinMode(HOME, OUTPUT);
    #endif
    

    on line 214-216 of file myRotator_119.ino is not required and can be deleted.

    phil. thanks for the post because it has pointed to an error in the homing code.

    I have made changes and just posted version 120, which can be downloaded. Can you please test this out to see if it fixes your issue. I found two errors which would have prevented the home from working correctly.

    Regards
    Robert
    https://sourceforge.net/projects/arduino-myrotator/files/Firmware/myRotator-Firmware-120.zip/download

     
  • Brendan Tynan

    Brendan Tynan - 2023-04-08

    This is a great project and thank you very much for your continued support and excellent projects to the astro community.

    This still does not seem to be working for me, in (myrotator_defines.h) the HOMESENSOR pin is defined as A0, is this correct - should it not be Digital pin 3 as per the schematics for the DRV8825 build or is my understanding incorrect.

    define HOMINGSENSORPIN A0

     
    • brownrb

      brownrb - 2023-04-14

      Hi Brendan
      I have some updated firmware etc that I would like u to try.
      Please send me an email to gmail address if interested.

       
  • Brendan Tynan

    Brendan Tynan - 2023-04-08

    Hi Robert,

    Thanks for the quick update, still not working.

    I am using the KY-003 sensor and notice when the magnet activates the sensor the output to D3 drops to 0V (i.e it is normally high going low when the magnet passes), is this the correct logic.

    Regards,
    Brendan.

     
  • Philippe

    Philippe - 2023-04-09

    hi robert
    indeed, I made the same remarks as Brindan and I also think that the sensor goes to the low state when it detects a magnetic field. The diagram must be modified by putting a pull up resistor in place of the pull down resistor so that the Ky works correctly
    In the loop that seeks the sensor digitalRead(HOMINGSENSORPIN) the high state is expected.!
    I tried with
    digitalRead(HOMINGSENSORPIN) == 1
    but that doesn't work either.
    when we click on the HOME button after a displacement (40 degrees for example) we obtain again a displacement of the same angle and in the same direction.
    Regards
    Phil

     
  • Philippe

    Philippe - 2023-04-09

    sorry mistake
    you must read
    I tried with
    digitalRead(HOMINGSENSORPIN) == 0

     
  • brownrb

    brownrb - 2023-04-09

    Ok,
    I have uploaded 122.
    By using pinMode(xxx, INPUT_PULLUP) should overcome the need for a pullup resistor, as the output of the KY003 will be High when no magnet is found. I have changed the test for HOME to be LOW which should work for KY003.

    I had been using a simple reed switch in place of the KY003, I forgot to put things back the way they were. Sorry.

    If using a reed switch then the test should be for HIGH, as noted now in the code.

    https://sourceforge.net/projects/arduino-myrotator/files/Firmware/myRotator-Firmware-122.zip/download

    Regards
    Robert

     
  • Brendan Tynan

    Brendan Tynan - 2023-04-09

    Hi Robert,

    Thanks for the new update, unfortunately it is still not recognising the input from the magnet and stopping the rotation and zeroing the position on my setup, will see how Philippe gets on.

    Regards,
    Brendan

     
  • Philippe

    Philippe - 2023-04-10

    Hi
    despite the update the HOME function does not work.
    if you select the >Home on connect option, the rotator does not move and an error occurs after a few moments.
    it's a shame because the homing function is important for me because I control my station remotely. I do not despair that the solution will be found.
    thank you again for your excellent support and your great project which allows us to equip our observation stations at a lower cost.
    best regards
    Phil

     
  • brownrb

    brownrb - 2023-04-10

    Sorry guys, I will need to delve into deeper tommorrow (my time) and see what is going on
    Regards
    Robert

    If possible, can one of you start up windows, disable home on connect (on connection) first, enable logging, then connect to the controller. Once connected, click HOME, and when finished or timed out, exit and post the error log file?

    Then I can compare things with my own

     

    Last edit: brownrb 2023-04-10
  • Philippe

    Philippe - 2023-04-10

    hi Robert
    I attach the log as well as the error that windows returns if the option >Home on connect is requested.
    regards
    Phil

     
    • brownrb

      brownrb - 2023-04-11

      Thanks Phil

      I have uploaded a new Windows app with a little more debug info. Remove the existing app first be fore installing the new one.

      Can you please try (with controller connected of course)

      Just before that - a question: Is the saved position of the Rotator at 0 when you last used it? Or was it left at the last angle it was set to?

      1. Install the new windows app
      2. Run the application
      3. Check the Home on Connect checkbox
      4. On Settings Menu, select Log File, then make sure Enable is checked
      5. Set the com port and com speed
      6. Click connect
      7. Wait for the Ready or application stops. Dont click any other buttons
      8. Exit app and send me the windows log

      https://sourceforge.net/projects/arduino-myrotator/files/Windows%20App/myRotator_1_0_1_10.zip/download

      many thanks
      Robert

      I also uploaded a new ascom driver - There was definately an error in the ASCOM driver

      https://sourceforge.net/projects/arduino-myrotator/files/ASCOM/myRotatorASCOMDriver-108.exe/download

       
  • brownrb

    brownrb - 2023-04-11

    I have uploaded new ASCOM Driver v108.
    This is a fix when using Home On Connect option in the Driver Setup Properties form.

    Delete the existing ascom driver first, using control panel,

    https://sourceforge.net/projects/arduino-myrotator/files/ASCOM/

    Regards
    Robert

     

    Last edit: brownrb 2023-04-11
  • brownrb

    brownrb - 2023-04-11

    I Have uploaded a replacement Windows Application 1_0_1_10

    Delete the existing windows app first!!!!!

    https://sourceforge.net/projects/arduino-myrotator/files/Windows%20App/

    Regards
    Robert

     

    Last edit: brownrb 2023-04-11
  • Philippe

    Philippe - 2023-04-11

    Hello
    I attach the log obtained after the updates
    I performed the operations as described in your message.
    I think the controller was in position on the last angle.
    The rotator does not move and I get an error message (screen image attached)
    B Regards
    Phil

     
  • brownrb

    brownrb - 2023-04-11

    I looked at the log for myRotator, it seems to be truncated? It is the windows app right?
    I would have expected more following the last line
    11/04/2023 16:06:57: ConnectFind home sensor: cmd: :16#

    I also dont see the initial log when the app starts - it should look a bit like this
    4/12/2023 2:35:53 AM: Load Loading form
    4/12/2023 2:35:53 AM: Load Adding comports to list
    4/12/2023 2:35:53 AM: Load Comport 3 found
    4/12/2023 2:35:53 AM: Load Setting Comport speed listbox
    4/12/2023 2:35:53 AM: Load Initialize focuser settings
    4/12/2023 2:35:53 AM: Load Disable controls
    4/12/2023 2:35:53 AM: disableall START=========================================================
    4/12/2023 2:35:53 AM: disableall END===========================================================
    4/12/2023 2:35:53 AM: Load Set focus to Connect tab
    4/12/2023 2:35:53 AM: Load Form Loaded: READY

     
  • brownrb

    brownrb - 2023-04-11

    I will continue this tommorrow my time
    Regards
    Robert

     
  • Philippe

    Philippe - 2023-04-11

    hey again
    I redid the test you asked me
    I attach the log
    I think the boot header was missing because by default the log is disabled on first boot
    the new log matches
    by the way the HOME still does not work and I have the same error
    this time I clicked continue instead of exit
    good night for you
    Phil.

     
    • brownrb

      brownrb - 2023-06-13

      Hi again
      I have made some pretty big changes on an alternative path, meaning there is a big update comming soon, and it will take me a bit longer to finish coding and testing.

      So I realised that ,oke take some time.

      hence I attach 124_1 firmware update which should address the halt+but+keep+moving issue that you reported.

      I attach Windows App myRotator_1_0_1_14 that goes with firmware 124_1

      Before you install Windows app please use control panel to remove the existing one.

      regards
      Robert

       

      Last edit: brownrb 2023-06-13
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.