Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

PnP Focus: The simplest-ever Arduino focus controller

  • Please log in to reply
252 replies to this topic

#26 RDBeck

RDBeck

    Ranger 4

  • -----
  • Posts: 324
  • Joined: 13 Feb 2017
  • Loc: Montgomery, TX USA

Posted 13 November 2017 - 04:48 PM

Do I just need a motor and gears to make a complete focuser?

 

Mikefulb, I assume this works with the Moonlight driver in INDI.  Can you confirm?



#27 mikefulb

mikefulb

    Surveyor 1

  • *****
  • Posts: 1,833
  • Joined: 17 Apr 2006

Posted 14 November 2017 - 03:04 AM

Yes I have using it with the moonlite Indi driver.

#28 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,102
  • Joined: 03 Jun 2004

Posted 15 November 2017 - 04:58 AM

Michael,

 

Does the PnP focus work with INDI without any modification ?  I have never tested it in Linux. Thanks.

 

Anat


Edited by anat, 15 November 2017 - 04:59 AM.


#29 telfish

telfish

    3D Astro Solutions, custom 3D printing for Astrophotography

  • *****
  • Vendors
  • Posts: 2,309
  • Joined: 17 Nov 2010
  • Loc: Adirondack Mountains NY

Posted 18 November 2017 - 01:23 PM

Tried to download the zip file from github. It failed and said there was a virus present.



#30 RDBeck

RDBeck

    Ranger 4

  • -----
  • Posts: 324
  • Joined: 13 Feb 2017
  • Loc: Montgomery, TX USA

Posted 20 November 2017 - 10:37 AM

Since I'm looking at making a complete focuser with a NEMA17 motor, would there be any issues with using RJ45 connections and Ethernet cable?  The voltage drop would be less than 0.1V.  I assume I would use the same pin assignments at both jacks and a straight-through patch cable.


  • mtc likes this

#31 telfish

telfish

    3D Astro Solutions, custom 3D printing for Astrophotography

  • *****
  • Vendors
  • Posts: 2,309
  • Joined: 17 Nov 2010
  • Loc: Adirondack Mountains NY

Posted 20 November 2017 - 11:15 AM

Since I'm looking at making a complete focuser with a NEMA17 motor, would there be any issues with using RJ45 connections and Ethernet cable?  The voltage drop would be less than 0.1V.  I assume I would use the same pin assignments at both jacks and a straight-through patch cable.

Yep, they work fine, have even used them for cooling applications with a TEC. Better quality for higher current draw is good though. On a focuser with low current should not be an issue. With my Moonlite focusers I use a DB9 to RJ adapter to avoid the stiff DB9 cables.



#32 telfish

telfish

    3D Astro Solutions, custom 3D printing for Astrophotography

  • *****
  • Vendors
  • Posts: 2,309
  • Joined: 17 Nov 2010
  • Loc: Adirondack Mountains NY

Posted 23 November 2017 - 12:14 PM

Built this with a genuine Arduino Leonardo and a genuine shield and finally got around the virus and managed to load the sketch. It works but with a fatal flaw. When you connect via ascom it continuously moves the focuser in the out direction with zero input in the control panel. It's impossible to stop this.

 

Any ideas from anyone who has got this working. I did reach out to a couple of people on PM but was just ignored, which is a bit sad.



#33 Jmel

Jmel

    Vostok 1

  • -----
  • Posts: 101
  • Joined: 24 Jan 2012
  • Loc: Eastern North Carolina

Posted 28 January 2018 - 07:51 PM

I've just purchased parts (I went with the full size Leonardo version, not the micro)... It'll be a few weeks before everything arrives. I'm trying this project from this thread and also this one: http://www.scopefocu...duino-focuser-2

Edited by Jmel, 28 January 2018 - 08:01 PM.


#34 Jmel

Jmel

    Vostok 1

  • -----
  • Posts: 101
  • Joined: 24 Jan 2012
  • Loc: Eastern North Carolina

Posted 15 February 2018 - 12:15 PM

Well... about to admit defeat here... the other project works fine, but this one... well, I can't even get the ascom driver to work properly.

 

When I install it:  

 

MoonLite 32/64 bit universal ASCOM driver requires ASCOM Platform 6.0 and can be downloaded here:
MoonLite DRO Setup.zip

 

The driver does not seem to "see" a focuser. The ASCOM selection screen is blank. No way to configure a port or anything. I've tried on 2 different computers. 

 

I also tried the standalone non-ascom software, and I hit connect... I see the rx light on the leonardo flash a couple of times, and then the software simply says "connect" again (as if it disconnected).

 

 

I'd love if there were some way to test to make sure the leonardo even got the firmware updated properly. I've tried both ways; with the upload.exe file AND with the standalone software...

 

pulling my hair out here frown.gif

 

Uploading sketch  https://www.youtube....h?v=KCHrVjjG4E4

 

Won't connect  https://www.youtube....h?v=6GKz7iLW7O4

 

Do ALL of the components have to be connected to get a reaction out of the ascom or standalone software? Right now, I only have the motor shield and the leonardo (and motor). I figured I should still be able to send commands to the arduino in this state...


Edited by Jmel, 15 February 2018 - 05:52 PM.


#35 RDBeck

RDBeck

    Ranger 4

  • -----
  • Posts: 324
  • Joined: 13 Feb 2017
  • Loc: Montgomery, TX USA

Posted 17 February 2018 - 08:56 AM

In your video, I didn't see the motor shield and motor connected.  I wouldn't have tried to connect to the computer control without all those in place.

 

I have yet to build mine so I have no actual experience to speak from.



#36 Jmel

Jmel

    Vostok 1

  • -----
  • Posts: 101
  • Joined: 24 Jan 2012
  • Loc: Eastern North Carolina

Posted 18 February 2018 - 11:43 AM

Yeah I wasn't sure if they were needed before the driver would see the board.

I'm waiting on the LCD and temperature probe still.

But can't get a reply from the guy that started this thread, which is a huge bummer.

#37 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,102
  • Joined: 03 Jun 2004

Posted 19 February 2018 - 02:37 AM

Have you tried uploading the sketch (source code) using the Arduino IDE? Please see the steps in

https://www.arduino.cc/en/Main/Howto

 

My source codes are in:

https://github.com/aruangra/PnP-Focus

 

Best regards,

Anat



#38 Jmel

Jmel

    Vostok 1

  • -----
  • Posts: 101
  • Joined: 24 Jan 2012
  • Loc: Eastern North Carolina

Posted 19 February 2018 - 07:43 PM

Thanks for your help anat.

Hopefully you saw the last videos I sent. I almost wonder if there is some sort of communication issue... A buffer problem it something in the code that makes the Arduino react slowly when the LCD and temperature sensor is not attached... Possible?

This could maybe explain everything from slow detection of the device by ascom, to the repeated one direction movement after a command...or not...

Edited by Jmel, 19 February 2018 - 10:39 PM.


#39 Jmel

Jmel

    Vostok 1

  • -----
  • Posts: 101
  • Joined: 24 Jan 2012
  • Loc: Eastern North Carolina

Posted 20 February 2018 - 01:25 AM

I had a bit of a breakthrough here...

I realized I needed to change the total steps per revolution in the ino file before flashing.

Changed to 200 for my nema 17, and now it doesn't just rotate in one direction continuously.

Still a little lag after I send each command though. Also connecting errors out often unless I reset board, and immediately connect.

Also need to figure out whether I should use a different motor or not...

The nema17 really needs 12v to carry weight.

The ardumotor board gets hot and the motor makes high pitched whining noises after a while if I run 12v to it. I tried removing Vin pin from the sheild, but even though this takes stress off the voltage regulator in the Arduino, the other symptoms persist. Ideas?

Edited by Jmel, 20 February 2018 - 01:26 AM.


#40 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,102
  • Joined: 03 Jun 2004

Posted 20 February 2018 - 01:57 AM

The behavior is weird. You don't need the motor board to test. You should see the step number changes accordingly in SGP  otherwise it is the communication-related issue.  Try...

1. using the USB2 port in your PC or use a different port. Make sure that the port is shown as "Arduino Leonardo" in Device Mananger. 
2. reinstalling the Moonlite DRO Ascom driver.

3. using another board if you have it around.

 

The motor board is hot while running.but there is no problem. I want you to test without the motor board first to see what happens. 

 

The LCD display will help seeing what is going on.

 

Best regards,
Anat



#41 Jmel

Jmel

    Vostok 1

  • -----
  • Posts: 101
  • Joined: 24 Jan 2012
  • Loc: Eastern North Carolina

Posted 20 February 2018 - 11:35 AM

Hello Anat, yeah, I agree, very weird.

 

With the motor board off, and just the leonardo board, the step numbers do change, but there is a bit of a delay. I had previously tried the board on another PC and was having the same experience. I don't suppose you could make a video of how yours operates and put it on youtube? This will help me a lot.

 

I have reinstalled the moonlite driver a few times already... I only have an arduino mega, (chinese clone actually) and the leonardo board.

 

I think the Nema 17 motor is pulling too many amps through the motor board, which makes it hot.

 

The LCD and temperature sensor should arrive by Saturday. I placed a second order because the chinese order is taking way too long at this point to test with.

 

I took another video last night. I'll edit this post shortly with the video.

 

EDIT: Here it is:  https://youtu.be/eOvTprE8Z6I

 

You can hear the high pitched whine... and see the delay


Edited by Jmel, 20 February 2018 - 11:44 AM.


#42 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,102
  • Joined: 03 Jun 2004

Posted 22 February 2018 - 07:41 AM

You can use Arduino mega to test. It will work with the Standalone program only. You will understand how it works and the command log is available in the program.

 

Anat


Edited by anat, 22 February 2018 - 07:41 AM.


#43 Jmel

Jmel

    Vostok 1

  • -----
  • Posts: 101
  • Joined: 24 Jan 2012
  • Loc: Eastern North Carolina

Posted 24 February 2018 - 05:32 PM

Hello anat,

The LCD and temperature sensor arrived.

What are the pins that the temp sensor uses? My LCD does not have the same ponout on the top, but it works perfectly and displays just like your photos.

I've purchased a different stepper motor that has gears so I can use less amps over the thin wires.

The buttons were perfect on the LCD to move the focus steps in and out, as well as change speed and backlight.

Seems fine now that everything is connected... It might be needed due to wait commands in the code...

Gonna try with a USB 2 hub just to see.

Edit: USB hub didn't give enough power to make the motor turn...

 

Here is the video of it working now. I think this will work pretty well, and I appreciate your help anat. My next challenge is mounting the unit and the new motor to the telescope.

 

 https://www.youtube....h?v=1mzV30Iheto


Edited by Jmel, 24 February 2018 - 10:56 PM.


#44 jp071848

jp071848

    Mariner 2

  • -----
  • Posts: 213
  • Joined: 18 Jul 2010

Posted 26 February 2018 - 04:26 PM

This looks like a very interesting project, and I already have all the necessary hardware in  my parts bins, but I am not able to find the wiring/assembly diagram for this anywhere. Just a few photos of the completed system. Could someone please share a link to a wiring diagram, ideally compatible with Fritzing. Thanks to the OP for a great job.



#45 Jmel

Jmel

    Vostok 1

  • -----
  • Posts: 101
  • Joined: 24 Jan 2012
  • Loc: Eastern North Carolina

Posted 28 February 2018 - 11:02 PM

This looks like a very interesting project, and I already have all the necessary hardware in  my parts bins, but I am not able to find the wiring/assembly diagram for this anywhere. Just a few photos of the completed system. Could someone please share a link to a wiring diagram, ideally compatible with Fritzing. Thanks to the OP for a great job.

 

The components just stack together. The motor will use the 4 pins on the motor board, and the temp sensor uses pin 1 and +5v and ground.

 

If you purchase the components listed, I can give you more info if you need it when the parts arrive.



#46 KevinS

KevinS

    Messenger

  • -----
  • Posts: 476
  • Joined: 27 Dec 2011

Posted 04 March 2018 - 04:10 PM

I love this project but cannot get the code.

All of your references so far point to an executable that is identified as a virus.

Can you please just provide the source Arduino files somewere? Or maybe copy the text to this forum?

 

Thanks


Edited by KevinS, 04 March 2018 - 04:11 PM.


#47 RDBeck

RDBeck

    Ranger 4

  • -----
  • Posts: 324
  • Joined: 13 Feb 2017
  • Loc: Montgomery, TX USA

Posted 05 March 2018 - 08:23 AM

The source is in the src folder on the Github page (https://github.com/aruangra/PnP-Focus).



#48 KevinS

KevinS

    Messenger

  • -----
  • Posts: 476
  • Joined: 27 Dec 2011

Posted 05 March 2018 - 11:37 AM

The source is in the src folder on the Github page (https://github.com/aruangra/PnP-Focus).

 

Thankswaytogo.gif

Downloading those only gets me html script from the GitHub page. 

I guess I'll open them up in GitHub and copy the text. Then transfer it to a new file on my system.



#49 RDBeck

RDBeck

    Ranger 4

  • -----
  • Posts: 324
  • Joined: 13 Feb 2017
  • Loc: Montgomery, TX USA

Posted 05 March 2018 - 12:19 PM

You can download all the files using the "Clone or Download" button.  Select "Download ZIP" to get a zip file of all contents.

 

There are other ways to obtain the files, but this is the easiest for a first time user of git. 



#50 KevinS

KevinS

    Messenger

  • -----
  • Posts: 476
  • Joined: 27 Dec 2011

Posted 05 March 2018 - 12:37 PM

There is no "clone or download" button.

"Download zip" results in a zip containing an executable file.

Which is a big security problem.

I was able to copy the raw text into local files.




CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics