Pages: 1 ... 4 5 [6]   Go Down
Author Topic: question re' controlling stepper with potentiometer (easy driver)  (Read 2175 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Tesla Member
***
Karma: 141
Posts: 7983
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One other question - is there any way I can auto intent all of the code?  I hate not being able to do that!

If you are using the Arduino IDE to edit your code then Tools/Autoformat  will do it.

Glad to hear it's working.

...R
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, and sorry - I should have spotted that!

Now the thing is working I'm going to assemble it and fit switches etc and fit it into a box, then try it out and see if it behaves how I want.

Most likely I'll find refinements that will improve it, then I can revert back to the code and improve it.

I suppose the next thing is what sort of power source to use in the field.  I don't want to lug round a big lead acid battery as the rail itself is heavy & cumbersome.  I know steppers are thirsty things as they're always working, but hopefully I'll be able to use either some arrangement of NimH batteries or what have you.  It doesn't have to run for long so I'll try it with various things to see how it goes.

Logged

UK
Offline Offline
Tesla Member
***
Karma: 141
Posts: 7983
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think if you use the enable pin to disable the stepper driver it cuts the power to the motor. Of course then there is a risk that the load (or some "helpful" person) will move the stepper and the Arduino will lose track of its position.

In another project on another Forum I suggested using a servo to apply a brake to the mechanism when the stepper motor is powered off. If properly arranged the servo would not need power to keep the brake on.

...R
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I suppose I could have that as an option on very slow transitions to reduce power as long as it's horizontal or at a low angle.

Another thing I'm going to look at is automating the camera's shutter release via the arduino so that the movement and shutter don't overlap under certain scenarios.  For instance at night it'd be common to have an exposure that's up to 30 seconds long to soak up the light but without blurring the stars, and you definitely wouldn't want the dolly moving while the shutter is open for more than the tiniest fraction of a second at most.

I've seen that someone else did this using a raspberry pi so I'd imagine it's quite similar.  Will have a look into it.
Just now I'm adding the non arduino components onto some veroboard, and will add it all into a little project box etc to make it a bit more usable, then I'll do some field testing.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, one thing that needs improvement from doing a practical test is that the carriage needs to move a touch slower, and ideally it needs more torque.

It seems that when it's going slowly with the slowest microstepping and the code I've done that it is 'almost' slow enough, but not quite.

There's a line of code where the delay time is derived from the pot return to the analog input by getting its sqaure root then dividing that figure by 2.  This was giving a range of 0-11 ms as the step delay to control the speed basically.

I changed this to remove the /2 bit, giving a range of 0-22 ms for the speed control/step delay, but it seems a bit too weak now and it's easy to stop the stepper from turning.

Is there something I can do about this?  I'd mess with the pololu vref but it ought to be at it's ideal setting now I think anyway at 0.14v for the 0.4a stepper.
Logged

UK
Offline Offline
Tesla Member
***
Karma: 141
Posts: 7983
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, one thing that needs improvement from doing a practical test is that the carriage needs to move a touch slower, and ideally it needs more torque.

There is nothing to prevent the software producing one pulse every hour or every day.

Another way to reduce speed and increase torque is with reduction gearing. Toothed belts are commonly used with steppers as they don't have any backlash.

...R
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, I'd made it slower but it was the resulting (apparent) lack of torque it then had which is the real issue as such.

It uses a tooth belt on the pulleys already with a small pulley wheel.  I can rebuild it physically to reduce gearing by a small belt driving a bigger pulley I guess but isn't there a way to increase the torque electrically?  Guess not.

Will try it more in the field anyway and see if it will suffice.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well today I've done quite a lot of field testing of the big heavy rail that is controlled by this project.

Possibly someone might like seeing the output that I'm able to create as a result.

The carriage is running at pretty much the slowest it possibly can, and I need to make a lot of physical improvements to it, but I'm pleased so far with the results it's helping me get.  Once it's refined a little I want to look at adding panning/tilting.

Still not happy with the torque though.  Ideally I'd love to be able to set the rail at a steep angle but I just can't currently as it slips.

All in good time I'm sure but here's some of today's efforts:

https://www.youtube.com/watch?v=iELvFF9ZhAo

https://www.youtube.com/watch?v=6h1_kDSaP-Q

https://www.youtube.com/watch?v=dBBT7DDQGi0

And the machine itself:
https://www.youtube.com/watch?v=7EpgezJhPRQ
Logged

Pages: 1 ... 4 5 [6]   Go Up
Jump to: