
Mulberry
USA
Asked
— Edited
Afternoon All
So I'm using an H-Bridge and panel to turn the head section of my robot. It works great but I want to limit the range of the revolution. For example I'd like to have the section only be able to move from 2:00 position to the 10:00 position and no more. I've experimented with various controls haven't had any luck.
Anyone care to chime in?
Thanks,
Daniel
Dave has used Pots connected to the ADC ports for his B9 along with limit switches and relevant scripting. I'm sure he will chime in with the details soon
For safety though I would always advise putting in some limit switches just after the point of where it should stop, but before the point of any damage. A simple switch which will cut the power to the motor if it is triggered (a normally closed microswitch should do it, put in line on the Vcc to the motor, when the motor oversteps it's mark, switch is hit causing it to open circuit and the motor stops.
Another alternative is, if you can find one, strip a servo guts out and replace the servos motor with the motor you are using, relocate the pot to the motor spindle or whatever is moving somehow, this will allow you to use the Servo() command and have much better accuracy. You will require a servo which has the guts to drive a motor of the same current demand though which may be the biggest challenge.
I have limit switches on all my actions (waist and radar). Dave has taught me well :-)
Aameralis I'll start taking a look at your suggestions.
Daniel
However I'm on the side of the fence with Rich. Using a feedback pot connected to an ADC port of EZB has let me stop at any point on a radius. I just send a variable value from one script to the movement script and that movement script will start the motor, move it in the direction of the value it receives and stop when it gets there.
Here's an example of the two scripts I use:
This one sends the specified variable where I want the radar to stop at (I can also set the speed (PWM) of the motor from here):
Code:
Here's the Movement Script that will receive the specified variable. It uses math to figure it all out. ARC and EZB gets this from the pot connected to a ADC port:
Code:
Here's how it all ended up working:
You are welcome to use any or all my already written scripts if they help. You will just have to adjust the port values.
Hope this helps, Dave
I haven't played with the scripting much at all, but it would seem that a voltage dropping off would be just as effective as a trigger as one turning on. If worse came to worse, I could use a spdt relay to reverse the pulse and have it power on for the brief moment that the switch actually opens.
I guess at this point, I am just kicking around ideas. Any feedback would be appreciated.
That being said. the wiper motor turns continuously in one direction. The "park" switch is a simple on/off. In the car, power is supplied through that switch so that if it is shut off mid-cycle, it continues to get current until it reaches the bottom. My thinking is that this steady on-off cycle could be used by EZ-B to keep track of how many turns the motor makes.
I do appreciate the input Josh. I may end up going with the encoder idea. However, if this switch is already clicking away in the motor anyway, I'd like to try to use that.
One final note. I am not just asking for my situation. These motors are heavy and not very efficient, but they are dirt cheap ($19.99) and very rugged. Others building large robots might find them useful.
I didn't see this post was updated I have not received EZ robot automated notifications for a while. I went through my spam box and I don't get them there either. So I never know when there is a reply to a thread I commented on now.