Shop Learn
dual stepper motors - Page 2 — Parallax Forums

dual stepper motors

2»

Comments

  • I have know idea what the gear ratios are. I will start with a set pulse and adjust the freq as needed to dial in the needed pulse. all I have to do is get it in the ballpark. The guide camera can do the compensating. It is a costar.

  • @bbrien , we haven't heard from you for a few weeks. I'm curious whether the code I posted drives your stepper motors. Have you tried the code, and if so, do the motors move?

  • bbrien,
    Good luck with your new telescope project.
    I am not engaging - the last one was enough for me!
    However, I did come across an interesting article about hacking another kind of telescope with a different microprocessor which posters may find interesting;

    https://diyodemag.com/projects/hacking-motorised-goto-telescope-arduino-uno-nano

  • Had to design and order new boards stuff and solder the boards. Double checked the new programs and tested today but no luck, no function, either on the monitor or the output pins. Tested the board outputs with theTMDH12 program and the output pins have pulses on the speed pins and high or low on dir. pins, so I know the flip module works fine.

  • This is where I am currently. I have an error in the " cognew(debug, @debug stack). write me about what I be doing wrong.:::

                                                                                                                                                                            thanks!![](https://forums.parallax.com/uploads/editor/ea/ddxi3x9c8t0e.jpg "")
    




  • For starters, you have cognew(tracer, @stack2). There is not a method called tracer in your code, nor is there a stack2. You have ser.start(RX, TX, 0, 9600), but you have not declared a "ser" object. You have two calls to cognew(debug, @debug_stack). That would cause the debug method to run in two different cogs using the same memory space for the stack.

    It appears that your code merges some of the mount and handbox code into one file. I suggest that you first try to get "Telescope mount dh17" and "Telescope handbox dh11" working, and then it can be simplified by merging them later on. Just to refresh your memory, "Telescope mount dh17" is the top object that includes "Telescope handbox dh11" as a secondary object. Both objects run on the same Prop chip.

  • bbrienbbrien Posts: 413
    edited 2021-11-06 06:49

    I typed out both handbox dh11 and Telescope Mount dh17 as you presented them to me and double checked them but nothing happened physically or on the monitor. Also I hadn't finished the debug section that you wrote out. To check my board and the flip module I loaded the dh9 program and testred the leds and they work fine and get data on the monitor and then loaded the dh15 program and tested the outputs individually changing the pin numbers to correspond with the RA pins and dec pins

  • Dave HeinDave Hein Posts: 6,347
    edited 2021-11-06 11:59

    What do you mean by "typed out"? Did you save the files and then try running them, or did you re-enter the programs using a keyboard and then run them?

  • When
    I downloaded the files from the forum they came up in a word program and not as prop tools files so I typed them in. Also I have been studying the handbox dh11 files and I see only print but no tx bytes commands. I'm confused help to understand.

  • Dave HeinDave Hein Posts: 6,347
    edited 2021-11-07 00:16

    You should not have to type them in. Try downloading them again, and then instead of opening them, save them in the directory that contains your other Spin files. It appears that you are using the propeller tool _Demos directory. You can then open the files with the propeller tool.

    EDIT: The handbox dh11 sends bytes to the the mount object by calling ser.tx(). It uses the virtual serial object to send the bytes. The virtual serial objects performs a send by writing a byte into a circular buffer. The mount object reads the byte by calling the ser.rxcheck() method, which reads the byte out of the circular buffer.

  • GenetixGenetix Posts: 1,553

    bbrien,

    Since you are using Propeller Tool just change to the directory where the downloaded files are; right now you are in the Propeller Demos directly.

    Then any Spin files will show up in the lower left box and if you double-click on them, they will open up in a new tab.

    The file association in wrong so that's why it doesn't automatically open in Propeller tool.

    If Propeller Tool won't open the file or you see a ? next to the filename, then try changing the file extension to SPIN.

  • I was able to send the files from the downloads folder to the demo folder. can I delete the unwanted files from the demo folder. Am going to try to run the dh17 file again, will let you know the results later.

  • dgatelydgately Posts: 1,474

    @bbrien said:
    I was able to send the files from the downloads folder to the demo folder. can I delete the unwanted files from the demo folder. Am going to try to run the dh17 file again, will let you know the results later.

    The files within the demo folder are just text and take up very little space. They are also great examples of code that you may want to peruse, right? Reading through the demo code, compiling the examples and running them may answer a lot of questions before you would need to post them here... Also I'm a little unsure of why you would retype code instead of a simple Copy & Paste. Is your system compromised in some way that Copy & Paste are not working?

    dgately

  • I wanted to remove the typed in files after I moved the downloaded files from the downloads folder just in case they are damaged.
    2) to Dave H, I reloaded the dh17 program into the Flip module , but the led lights on the speed do not light up nor is their any data on the monitor.

  • Dave HeinDave Hein Posts: 6,347
    edited 2021-11-08 01:54

    I looked at the code, and I see where there is a problem with the LEDs in the handbox dh11 object. It assumes that the LEDs are on four consecutive pins, but that is not the case. I modified it so it now handles LED pins that are in any order. I also changed the object so that it can either run as a sub-object to the mount program, or the handbox object can run in a stand-alone mode as the top object for testing purposes.

    The new mount and handbox files are attached below. Try running handbox dh12 first in the stand-alone mode by using it as the top object. This should light the LEDs, and you should see debug output on the monitor. It does not run the motors in this mode. If the LEDs and the debug output look OK you should then try running mount dh18 as the top object. You should see the motors operate, the LEDs light, and there should be debug output on the monitor.

  • Thanks Dave , will give these a try and let you know if they help as soon as I test.

  • I tested dh12 stand alone and no display at the monitor . Two out of four leds , checking for shorts , have new led strip boards but 3waiting for new leds.

  • I tested dh18 now none of the speed leds and none of the motor outputs work. may have to go back to using a flip and a mini in separate boxes, and fds.

  • I found a problem with handbox 12 in the stand alone mode. Try the attached handbox dh13 program. If that works, then try the attached mount dh19.

    You should verify that you have the correct polarity on the LEDs. The common connector going to the resistor should be at ground, and the LED that is to be lit should be at 3.3V. Also, verify that the pin assignments are correct for handbox 13 and mount dh19.

  • Just to set the records straight the new board pin numbers have been changed

  • So are the pin numbers in the new "Telescope mount dh19.spin" that you posted the correct numbers now? I'm confused by the TELESCOPEDH13.spin file that you posted. Did you intend to post a new version of "Telescope handbox dh13.spin" instead?

  • Only the pin numbers are changed.

  • Can you post the new version of "Telescope handbox dh13.spin" with the new pin numbers?

  • bbrienbbrien Posts: 413
    edited 2021-11-12 02:43

    Sorry I sent the wrong files before, New version posting

  • Also another question; if program is installed , shouldn't the monitor be reading if still plugged in to chip even if no power applied to board.

  • Are you are asking if the monitor will display the text from the Prop if you have the USB plugged in, but no other power connected to the board? It should work as long as you aren't drawing too much power from the USB. You're using the Propellor Flip module, correct? Are you getting anything on the PST screen? If not, you should try running a simple serial test program to make sure things are working.

  • I using the "Flip" module , and when I run the dh9 program I do have a serial display: press north button , prints NORTH.

  • bbrienbbrien Posts: 413
    edited 2021-11-14 06:16

    dh13 apparently does work. When I press mode switch , the leds cycle normally and if I press a direction switch the monitor will display a direction. With dh19 the mode lights are working and only the RA clock pin outputs a clock pulse but that is all, nothing on the monitor.

Sign In or Register to comment.