Hi thanks for the replies. the stepper motor controller that I am using is the egg bot controller board.
http://www.schmalzhaus.com/EBB/Is it a hardware problem? Is it because you are using stepper motors?
The steppers are interface fine. I feel that I shouldnt have chosen a stepper in this case. The reason is that it requires both time and step input and it doesnt make sense to keep sending strings to my controller based on an algorithmic decision making. I think it is better to use a stepper if the path is already known. Here. My ball just keeps rolling back and forth because the PID algorithm that I implemented earlier doesnt help me balance the ball at a given point.
Do they not have a small enough effective step size?
The resolution 1.8 degrees and I can go as small as 1/16th of a step. But how do I determine the tilt in terms of time duration and number of steps? My angle of tilt keeps varying and I dont know how to feed my algorithm so that it can provide the correct output. I am contemplating whether this would be easy if I switch to a servo.
If you have a fixed reference for zero, you should be able to keep internal variables in software for the current position, and work out the direction, speed and distance from simple math calculations.
I didn't consider this factor. Let me think about it. Thanks.
Why do you think this? The angle of tilt is a simple function of the number of steps the motor has received since it was at top dead center. The speed of these pulses only determine the length of time until the table gets to this degree of tilt.
The most important factor here is that my ball just keeps rolling down when I tilt in one direction. So I am not able to estimate what must be the angle of tilt in the forward and reverse direction to make it go to a particular point.