Welcome, Guest
Username: Password: Remember me
27 Feb 2017
INDI development team is happy to announce the release of INDI Library v1.4.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers. Several improvements and enhancements are included in this release including native support for Cygwin and MacOS platforms in addition to Linux, BSD, and Windows (Client only).
Read More...

TOPIC: Stepper focusser directly from Raspberry

Stepper focusser directly from Raspberry 1 year 9 months ago #4643

Thank you, I ordered the motor and driver board today. I think I can do first tests at the weekend :)

Please Log in or Create an account to join the conversation.

--= human, without Windows™ =--
pls excuse my bad english! :)

Stepper focusser directly from Raspberry 1 year 9 months ago #4644

mrpraline wrote: Are the black ribbed grip sections rubber rings? If they are, why don you just remove one and use a rubber band straight on the motor axes? Then you will have a free 'manual override' function too...

Yes they are. But the problem is I have trouble to find a good & cheap combination of Timing belt drives with 5mm shaft for my motor and an fitting belt.
I also want to prevent ordering every peace at an different shop which would make it all unecessary expensive. I will now order the aluminium,tools at amazon, cogwheels at Conrad and motor and driver another shop...

I changed my plans to use pure cogwheel solution now. One big with 60 teeth that fits perfect on the 4mm shaft of the focuser and one pinion with ~20 teeth for the motor. Because the two wheels would be very close, may too close I think I will change the mounting also. A Ventilation pipe clamp should be used to mount the motor. Painting will follow..

Please Log in or Create an account to join the conversation.

--= human, without Windows™ =--
pls excuse my bad english! :)

Stepper focusser directly from Raspberry 1 year 9 months ago #4647

I think I have it all together now. I will use:

Stepper: SY28STH32-0674A 1.8° 3.8V, 670mA 600 g-cm
Driver: DRV8834
Mount Angle: Aluminium angle 10x10x1000mm (1mm thickness)
Allen screw 8x M2.5 8mm
Pinion M0.5 13 teeth 0.5mm shaft
Gear M0.5 60 teeth 0.4mm shaft
Shaft 4mm 500mm (to replace the original one that came with the telescope (to short/ D-profile))


Here are some images. I only fear that the aluminium profile would not be stiff enough but I think 1mm thickness should be ok. And I dont know how
to fill the space between the allen screws but I will try some shims.



Please Log in or Create an account to join the conversation.

--= human, without Windows™ =--
pls excuse my bad english! :)

Stepper focusser directly from Raspberry 1 year 9 months ago #4653

pauledd it looks fantastic! I'm really looking forward to see the actual pics over weekend.
There's a hint - I would highly recommend that you drill bigger holes (or horizontaly elongated holes) in motor-side mount plate. This way you can adjust motor shaft axis when needed for smooth operation of the focuser. Good luck and let us know of the results!

Please Log in or Create an account to join the conversation.

Stepper focusser directly from Raspberry 1 year 9 months ago #4658

Ok, I think I need a bit help with the wiring. Iam not very much into electronics and I dont know if this will work or burn my raspi :whistle: . I tried to follow the instructions from the astroberry readme but maybe (Kaczorek?) someone can cast an eye on my plan.
Because the motor only needs 3.8V and 0.68A (per phase!) shouldnt it be possible to power it from the raspberry pi (I have Model 2) 3.3V PIN itself? And if 3.3V is to low I could go to the 5V PIN and lower it with an resistor of (5V-3.8V)/0.68A=1.8 Ohms 1W.
Here is the plan for raspi 3.3V powered stepper:


I think I was wrong! The motor uses 0.6A per coil, that is 1.2A and that's way to much for the 3.3V Pin and even for the 5V Pin of the RP2. I consider using external power supply for the stepper (VMOT)

Please Log in or Create an account to join the conversation.

--= human, without Windows™ =--
pls excuse my bad english! :)
Last Edit: by pauledd.

Stepper focusser directly from Raspberry 1 year 9 months ago #4659

Pauledd it looks ok. In my project I'm using 5V directly from RPi. However I use 5V stepper motor. Powering your 3.8V motor with 5V will make it go faster. If you don't want to take risk (for the motor, rpi is safe and in critical case it would cut the current if it's overloaded) just decrease voltage from 5V to 3.8V with a resistor as you said or try using 3.3V from RPi. In the latter case the motor will go below nominal speed. I'm not sure about maximum current on 3.3V taken from GPIO but I believe it's way over 0.6A.

Please Log in or Create an account to join the conversation.

Stepper focusser directly from Raspberry 1 year 9 months ago #4660

Kaczorek thank you. Just one more point. Am I right that I have to adjust in the rpi_focus.cpp the values "#define MAX_STEPS 10000, #define STEP_DELAY 4" to my needs?
The motor came today and soldering of the driver is done. I will do motor test tomorrow. :)

Please Log in or Create an account to join the conversation.

--= human, without Windows™ =--
pls excuse my bad english! :)

Stepper focusser directly from Raspberry 1 year 9 months ago #4661

This is correct. You can probably live with this values but tuning is a good idea. Especially STEP_DELAY which is time in milliseconds for each step. Depending on this value a motor goes smoothly or not. You can check times for your motor in its datasheet or find it out by experiment. It is safe to change this value to anything.
MAX_STEPS is specific for your scope and represents number of steps needed to travel from minimum focus position to maximum focus position (from left to right) i.e. if it takes 5 revolutions for your focus to travel from min to max and you use gear 60:13 and your motor takes 200 steps per revolution MAX_STEPS = 5*60:13*200 = 4615. If you don't change this value just remember not to push your focuser further than absolute position 4615. Otherwise it gets noisy :-)
Keep us posted and good luck!

Please Log in or Create an account to join the conversation.

Stepper focusser directly from Raspberry 1 year 9 months ago #4662

Ok. the good new is the motor works :). The motor runs smooth until approx. one ore more full rotation. Then its sounds stuttering and just after that it stops movement as if it has not enough power. My guess is that 3.3V is not enough and I will try the 5V PIN with an resistor (~1.8Ω,0.8W).

@Kaczorek I have some more questions:
  • The "Ticks" in the Indi Main Control is the same as one Full Steps of the stepper? So 200 Ticks should do one 360° turn on the motor?
  • Do you know what the little rotary potentiometer on the DRV8834 does?
  • Do you have/know something like simple sample code to drive the DRV8834 stepper just some steps foreward/backward?

Please Log in or Create an account to join the conversation.

--= human, without Windows™ =--
pls excuse my bad english! :)

Stepper focusser directly from Raspberry 1 year 9 months ago #4663

Well done!
  • Yes, the "Ticks" in the Indi Main Control is the same as one Full Steps and 200 ticks equals 360° turn on the motor. This parameter is Absolute Position of the motor.
  • Potentiometer is very useful and you should set the current for your motor with it. Check pololu site , which says "Adjustable current control lets you set the maximum current output with a potentiometer, which lets you use voltages above your stepper motor’s rated voltage to achieve higher step rates".
  • When developing my first prototype I wrote a simple bash script for testing. I attach it to the post. Feel free to use it.

File Attachment:

File Name: motor.sh.zip
File Size: 1 KB
Attachments:
The following user(s) said Thank You: pauledd

Please Log in or Create an account to join the conversation.

Last Edit: by Kaczorek. Reason: Attachement missing

Stepper focusser directly from Raspberry 1 year 9 months ago #4664

This was exactly what I was looking for. Thank you very much :)

Please Log in or Create an account to join the conversation.

--= human, without Windows™ =--
pls excuse my bad english! :)

Stepper focusser directly from Raspberry 1 year 9 months ago #4665

I tried to set the current regulator as described in the video but I dont know how to power the driver in the way they did without connecting the motor but measuring the vref voltage. When I measure from the "black circle" to ground I get no voltage. Maybe I have to manually set the STEP PIN to 1 while measuring. Nevertheless I measured the current from one coil while doing 1/2 step movement and it did not touch the rating of 0.67(/2) A.

I did some tests with the motor.sh script and I came to the conclusion the stuttering is not an voltage issue but an "delay" issue. With the default value "sleep 0.000005" the motor stutters again but with higher values it runs smooth.
I also tested the latest astroberry image and I have to say it worked out of the box with the focuser (without stuttering and very smooth), but I did not test eqmod and gphoto. I will do that tomorrow or in the next days while still waiting for the mechanics parts to arrive.

Besides all of this I had again issues with eqmod "indi_eqmod_telescope dispatch error:" and gphoto connection with my custom rasparian. But that belongs to its appropriate thread and thats why I will try the pure astroberry way first and then solve my own.

Please Log in or Create an account to join the conversation.

--= human, without Windows™ =--
pls excuse my bad english! :)
Time to create page: 0.183 seconds

Login

3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!

Gallery

Replica

Why INDI

Replica