Move telescope with joystick and stepper motors.

Hello.

Newb here, name is Jim.

I would like to move my telescope using two stepper motors and a joystick. Everything in between is a nightmare. I have read many posts of people wanting to do similar but not exact things. Some want to move a camera on a rail, some want to control speed, but nothing exact, so, I look to you for help.

Here is what I have:

CNC Shield Expansion Board V3.0
Arduino UNO R3 Board
A4988 Stepper Motor Driver with Heatsink
12v 30a Dc Universal Regulated Switching Power Supply 360w
Nema 17 Stepper Motor 42BYGH 1.8 Degree 38MM 1.5A 42 Motor (17HS4401S) x2
Jumpers
Joystick module

Here is what I would like to accomplish:

In short, if I move the joystick to the right, the telescope moves to the right using one stepper. When I let go of joystick, the telescope stops moving. Similarly, If I move the joystick forward (up), the telescope raises and stops using the other stepper when joystick released. I want to be able to plug the power supply in and go. No computer on hand, no pre-written coordinates etc.

All of the videos etc I have seen show a bread board and drivers.

  1. Does my CNC shield eliminate need of bread board?
  2. Do I need additional hardware?

All of the threads I read talk about the programming. I am working based on a Thingiverse posting for a DIY CNC. Figured could be adapted to my needs. In there, the guy uses GRBL and is always tethered to laptop.

  1. Can I be untethered?
  2. What is the simplest code? (I have read stepper library, Greek.)

My skill level:

I own 2 3D printers, Ender 3 and MP Select Mini V2. I have added a ABL (Auto bed-leveler) to the Ender and that required obtaining an Arduino UNO, jumper cables, and following very good instructions. I changed a few setting in the code based on suggestions from the supplier of the ABL. Otherwise, zero experience.

Images attached.

Thanks in advance!!

Lskuared:

  1. Does my CNC shield eliminate need of bread board?
  2. Do I need additional hardware?

All of the threads I read talk about the programming. I am working based on a Thingiverse posting for a DIY CNC. Figured could be adapted to my needs. In there, the guy uses GRBL and is always tethered to laptop.

  1. Can I be untethered?
  2. What is the simplest code? (I have read stepper library, Greek.)

You won't need a breadboard.
As long as you have two stepper motor drivers, you should be ok for hardware. Some limit switches might be useful, although since you're controlling manually, not essential.

You can ignore GRBL and the laptop, but you'll need to write code for the Uno that reads the joystick and commands the steppers as you've specified. Start with the stepper motor examples that come with the IDE.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .

Have you googled..

arduino joystick stepper motor control A4988

Tom.. :slight_smile:

Lskuared:
In short, if I move the joystick to the right, the telescope moves to the right using one stepper. When I let go of joystick, the telescope stops moving.

The code in this link illustrates how to use a joystick like that.

...R

Thanks, wildbill. Will I need to jump any posts?

Thanks, TomGeorge. I Googled many things but maybe not that exact string.

Thanks, Robin2. I have uploaded it as is (changed degree per move to 1). I will play with it and see how it goes. Much appreciated!!

Follow up question.

Do I put the power to the CNC Shield or the Arduino board? Assume Arduino.

Lskuared:
Do put the power to the CNC Shield or the Arduino board?

I don't have a CNC shield so I can't answer.

I have a RAMPS shield that works with a Mega and IIRC the Mega is powered to give it a 5v supply and the power for the stepper motors is connected to the RAMPS board. However I have never wanted to operate the combination without having the Mega connected to my PC so there may be options I have not explored.

...R

Thanks, Robin2. A quick Google search agrees with you. Both boards need power. 7-12v 1a to Arduino and in my case 24v from power supply to shield.