Menu

Source code

Jacques
2015-05-21
2016-02-21
1 2 > >> (Page 1 of 2)
  • Jacques

    Jacques - 2015-05-21

    Hello Robert,

    I build your project and like it very much. Specialy that settings are being saved in eeprom and speed is selectable.

    You shared the sourcecode for the Arduino. Are you willing to share the sourcecode of the ASCOM driver and windows apps (Visual Studio?) to?

    Thanks,
    Jacques

     
  • brownrb

    brownrb - 2015-05-21

    Hi Jacques
    Thanks for the comment.
    Please dont take the following comments in a negative way, they are not meant to be.

    I have spent hundreds upon hundreds upon hundreds of hours writing and developing code (and hundreds upon hundreds of hours testing different versions) for this project. A lot of IP has been invested into both the ASCOM and Windows APPs. I am reluctant to share this at this point in time (that might change later). I am an imager and have a permanent observatory setup so dont plan to give this up tomorrow.

    As you can see this project is well supported, it works and is reliable. And I have asked nothing from anyone who wants to build the focuser, providing the schematic, layout, testing, build instruction etc for free.

    I understand some reticence in using something that you dont have the source to, but then if you purchased a moonlite or some professional unit that would also be the case too. I also understand the curiousity of how things are built or work under the hood.

    If it gets to the stage where I feel I cannot support it anymore or I lose interest, I will post all files ascom and windows app and everything else here for anyone to continue onward. That is my contribution.

    If there are some features you might want or are lacking let me know and we can talk about those and discuss them and maybe look at incorporating them as well.

    cheers
    Robert

     
  • Jacques

    Jacques - 2015-05-22

    Hi Robert

    I fully understand and respect your choice and don't see it in a negative way. I develop some of my own tools and know how much time and effort it can take. I was just curious about how you've addressed the issues relating to the communication between the various components.

    Jacques

     
  • Miloš Stojadinović

    Hello,

    My stepper PG27 gets really hot when the coil power option is on. I know this is usual, but it gets so hot that I can barely touch it. I set the current on the driver so that I get 170 reference voltate reading (mV).

    Does you get this hot as well?

    Miloš

     
  • brownrb

    brownrb - 2015-10-26

    No it should not be hot. I run mine always with coil power on and they dont even get luke-warm.

    Are you running off 12V?
    I use a NEMA17PG5 and NEMA17PG27 both off 12V, with the pot on the DRV8825 set so that it steps at 1/8 ok. The pot is very fiddlly and even small amounts can make huge changes,
    At 0.175V there is only 350mA flowing through the coils, which at 12V is (120.35) 4Watts which means it should not be getting hot. It must mean that either more than 12V is being used or the current setting is still too high.If you can measure the current (wire the meter in series with one of the coils, and set it to full step - it should read about 250mA of just a bit less).

    Personally I adjust mine by sound, I set to about 1/8 step and set speed to slow and about 2000 steps to move with coil power on (no focuser connected, just on the work bench), Then slowly turn the pot either way until it stops, then very very slowly increase till it just starts to step. Its that fine point one gets just after it is hestitating a bit and then one very little extra turn and its ok and stepping fine. Then I leave the pot, test that it is stepping fine at full, half, 1/4 and if so thats it done. If not,. just repeat the whole process.

    For me, I always use 1/2 stepping when attached to the focuser.

    It might be that your DRV8825 driver uses a different current resistor thus setting by voltage would be incorrect (not all 8825 drivers are the same, some of the newer ones do use a different current sense resistor value and thus the readings would be very different. In this case it is best to adjust by current method.

    Let me know how you get on

     
    • Miloš Stojadinović

      It is working cold now :) Still on the breadboard though. I started from scratch and rewired everthying.

       
  • Miloš Stojadinović

    I will let you know as soon as I test it again today.

    It is interesting that the ref voltage is 0.175 V if I use the ground pin on the DRV8825 board, but it is a lot higher if I use the power supply ground.

     

    Last edit: Miloš Stojadinović 2015-10-26
  • brownrb

    brownrb - 2015-10-26

    Thats not right. The ground of the 12V should be connected to the ground of the Arduino. So voltage read should be the same. I suspect the 12V GND is not connected to the Arduino Ground?

     
  • Miloš Stojadinović

    No, both Arduino GND pins are connected to the 12V GND. I measured the current, I get the reading of 2.5 when I put the multimeter to the 200m position, that means 250mA. I will lower the value to see what is going on and I'll let you know.

     
  • Miloš Stojadinović

    Hello Robert,

    Do you perhaps have the Eagle files for the schematics for DRV8825_HW203_F?

    Miloš

     
  • brownrb

    brownrb - 2016-01-29

    Hi Milos
    There is a major problem with the Eagle files as I could not find a correct part for a DRV8825 and ended up fudging things by changing wires and doing all sorts of dumb things to get it to resemble what it should have. So it does not resemble anything that can be used to generatre a gerber file for pcb production. I used it only to get a starting pcb layout and then used ms paint to make the necessary corrections to the layout (a lot of wires to the drv8825 ended up in the wrong place). Needless to to say the final pcb artwork that came out of the board design in eagle bares little resemblence to what you can download. I spend literally many tens of hours by hand in mspaint and the pencil tool.......

    Cheers
    Robert

     
  • Miloš Stojadinović

    No problems Robert. I'll let you know if I manage to find the eagle part for drv8825.

     
  • Miloš Stojadinović

    That one is great, thank you so much Franck!

     
  • Miloš Stojadinović

    I was running some tests on the breadboard and I noticed that the diode 1n5346B heats up significantly. I only have arduino, the 15 ohm resistor and the diode connected. Is this normal? Everything is connected well.

     
  • brownrb

    brownrb - 2016-02-14

    Doing the math, we have a 15Ohm resistor and Zener Diode in series, with 12V as the input voltage. 9.1V is dropped across the zener, with 2.9V dropped across the 15Ohm resistor, This means there is 193mA flowing in the circuit. For the 15Ohms resistor, this in Watts equates to VxR or 2.9x0.193 = 0.55watts. The resistor is rated as 3W so this is more than ample.

    There is 192mA flowing in the circuit (through the Zener) and 9.1V across the zener, so the Watts equates to 9.1x0.192 or 1.76 Watts (the Zener is rated at 5W). In terms of powering the Nano, 192mA should be sufficient as we are only powering 2 in/out leds . switches, lcd, nano and drv8825 input pins (and occassionally the buzzer)

    On this basis the zener should be relatively cool.

    Are you sure the Zener is the right way round (bar towards resistor) and that the 15Ohm is not a different value? I remember ording a pack of 15ohm resistors and the supplier sent me a different value from memory. This definately made the Zener run very hot

     

    Last edit: brownrb 2016-02-14
    • Miloš Stojadinović

      I will test this again for sure. Everything is working on the breadboard. But I have another question: does the temperature refreshes on the screen and how frequently? The temperature gets detected only during the powering up and remains on the display. I am refering to using the focuser without the Windows app.

       
  • brownrb

    brownrb - 2016-02-16

    Hi Milos
    In the Windows application, one needs to press the Get button near Temperature to get the latest temperature reading from the controller.

    For the LCD display, the same answer. At present it does not update on a regular basis. I will add the code into the next release with a menu option to turn this feature off/on.

    Be aware that the temp sensor can take around 2s to actually update the temperature, this is a high overhead when the controller is meant to be looking for commands or processing commands as well.

     
  • brownrb

    brownrb - 2016-02-16

    Hi Milos
    I have looked at this and have some code ready for testing later today. It involves changes to the Arduino firmware, WIndows App and ASCOM drivers. I'll test the firmware and windows app later today, and look at doing the ascom drivers by the end of week. So check back in a few days and the new code should be uploaded here. I'll update the pdf as well with the newer screen shots and explanations of what to do etc

    Cheers
    Robert

     
  • Miloš Stojadinović

    Thank you very much Robert, I am looking forward to it.

    Miloš

     
  • Miloš Stojadinović

    Would there be any disadvantage if I used 6A100G diode instead of 10A10? I think there shouldn't be any.

     

    Last edit: Miloš Stojadinović 2016-02-17
  • brownrb

    brownrb - 2016-02-18

    Should be good to go with the 6A100G.
    The new code etc for the updating of temperature on the LCD is already up
    Cheers
    Robert

     
  • Miloš Stojadinović

    Hi Robert,

    I am not sure if I can find the new code. All I see is the updated PDF file.

    Another question: could you please in brief explain why can't the rotary encoder be used with the BT option?

    Miloš

     

    Last edit: Miloš Stojadinović 2016-02-18
  • brownrb

    brownrb - 2016-02-18

    Hi Miloš
    Firmware 218 for the controller, Windows App v2146, ASCOM v220 all support the requested changes for having the controller lcd updated at regular intervals with a new temperature value.

    As for RE and BT - there is a conflict with the two different libraries, they break other basically, so that one or the other stops working. I did not have the time to rewrite the libraries involved.

    Cheers
    Robert

     
  • brownrb

    brownrb - 2016-02-19

    Hi Milos, did you manage to find the new firmware and apps?

     
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.