Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.
Get Started

Australia
Asked
Resolved Resolved by DJ Sures!

Using Stepper Motors With Ez-Builder

Hi .. I am new to ARC platform.  I have successfully created a project and exercised servos.  I know I can add DC motors via the Sabertooth controller .. my issue is that I would like to use Stepper motors (using a single Ez-b channel per stepper) .. I use the Pololu Tic T500 'smart' stepper controller which provides interface options:
- TTL serial
- I2C
- RC hobby servo
.. so my thought is that I could 'add' this T500 + servo into my Ez-b project as either a:
- vertical servo   or
- continuous servo
.. and the Ez-b will treat the T500 + stepper as if it were a servo which is exactly what my hobby RC radio does.

Please advise if I am taking the correct approach here?


Related Hardware EZ-Robot EZ-B v4
Related Control PWM Slider
AI Support Bot
Related Content
Synthiam
Australia
#10  
Actually .. pls disregard my last question .. I just found ARC and understand it to be the evolution of ARC
Synthiam
#12  
1) Details of ARC are posted here: https://synthiam.com/Products/Releases/ARC-Beta-2020-01-27-00-19052
Download is from the same page as ARC. 

2) microcontrollers generally have 1 uart, if at all. Multiple aren’t usually needed unless you’re talking to many different things. In your case, the documentation of the Tic allows multiple to be assessed. That makes it possible to use one uart to control many Tic’s. 

you will have to modify my code example to use the 32bit block commands? Something like that... again, they’re documentation is super wordy and isn’t direct like a normal data sheet would be. I don’t think I’ll have time to read their novel haha but I’ll try to help as you go along. See if they have a forum that you can ask. 

ideally, an ARC skill plugin for the tic would be easiest because you wouldn’t need any code at all. 

3) up to 128 ezb’s can be controlled by one ARC project. Right away, you can see the connection control has 5 ezb connections. To add more, use the Project -> add control. It’s in the general tab.
#13   — Edited

Quote:

But this document was written by Stephen King or someone who loves to write
I was watching "The Outsider" https://www.imdb.com/title/tt8550800/ based on SK book:)

I agree the documentation is verbose and the controller is a smart allows multiple configurations.


Quote:

I don't know if this helps but:
@EZang: Does not help your setup does not use stepper motors, and the cheap/affordable controllers can't be used with EZB to drive step motors, although you can use Arduino code, we are discussing different setups.

@All:
Maybe I missed something, if the goal is to drive the step motors like DC motors (with velocity control) it's not easier to configure the controller for PWM and use the Continuous servo control ? 

If the goal is to emulate an absolute position servo, then you have 2 setup options:
1) add a Potentiometer, the controller maps the potentiometer feedback to the configured PWM interval.
2) add a Limit switch (Home position) and then the controller handles the home position and manages the steps.
Synthiam
#14  
ptp, you don't require a potentiometer with a stepper motor - that's why it's not mandatory for this application. If the physical design doesn't account for a potentiometer to be installed, then a stepper motor can still operate as a servo. This is because it moves via steps. So you instruct how many steps to move in either direction. Keeping track of those steps and related them to a servo position works. 

For example..
Servo 1 degree = 0 steps
Servo 180 degrees = 100,000 steps

So if you move to a specific position, you'll need to keep track of where you were and how many steps to get back.
#15   — Edited
@DJ,
the main question is how you want to control the stepper motor ? 

1) velocity control
you can emulate Continuous servo 

2) positional servo

Pololu offers 2 different methods:

2.1) add a potentiometer can be a multiples turns connected with gears and you have absolute position and then you emulate a servo configuring the PWM interval

OR 

2.2) add home switch, and the controller handles everything for you:

Quote:

If you are using the RC position, Analog position, or Encoder position control modes, you might want to enable automatic homing so that you do not have to send the Go home command to the Tic. If you check the Enable automatic homing checkbox in the Advanced settings tab, the Tic will perform the homing procedure whenever it is being commanded to go to a specific position but it is uncertain about is current position (e.g. immediately after motor power is applied). The Automatic homing direction setting lets you choose whether the automatic homing will drive the motor in the reverse or forward direction.

Continuous/Velocity servo or a Positional servo (with additional hardware) you can emulate a RC servo and connect to an EZB digital port without any extra code (JavaScript or EZ-Script) so the question still stands the OP has one smart controller and can emulate a PWM servo makes sense more advanced scenarios (e.g. UART or scripting) ?
Synthiam
#16   — Edited
The application of the stepper motor may help determine the best way to drive it.

Is it being used for driving wheels on a mobile robot platform or on a rail system where limit switches can be used?

Is high torque a requirement? Steppers usually have low torque unless a high voltage (24V) is applied. High voltage is difficult to use on mobile robots.
Synthiam
#17   — Edited
Good point, ptp. Guess it comes down to what his application is. I seem to be enjoying exploring the idea of controlling the stepper as a servo by knowing/counting its steps - merely because I find it intriguing. 

That might not be his best usage case for the application. guess we’ll have to see what he comes back with:)

i should add that the servo would be easy and the best solution
Australia
#18  
Wow .. thanks guys for your enthusiastic input.  I have more than one option to explore now.  I want to use steppers as a substitute where HDD Servos simply are not holding the load.  I am building a B9 robot full scale from Lost in Space original series .. many B9 builders have used EZ-build as their core controller.  So I have an arm about the same dimensions as a human arm and while servos perform well at the extreme end of the arm (claw and wrist) where weight is minimal .. as I move toward the shoulder I have two articulation points .. call them elbow and shoulder.  The elbow joint must support the forearm weight and the shoulder must support the entire arm weight.  I treat these 2 joints (elbow and shoulder as absolute position servos .. in exactly the way your humanoid robot does).  Now .. in addition to this I have a carriage which extends/retracts the entire arm assy on a rack & pinion .. I want to drive the pinion with a stepper emulating a continuous servo.
What I have taken from your suggestions:
1. I can upgrade to ARC and write Java scripts to communicate with multiple Tic controllers from a single EZ-b UART via simple serial protocol .. ANDing the collective TXD lines from the Tics.  I guess we must assume from this that the Tic controllers do not 'solicit' a packet to the host .. they only answer when they are polled .. so no risk of packet collision.
2. I can force the stepper 'wrapped' by Tic controller to  emulate a servo either absolute position or continuous and communicate with Tic from one of EZ-b 24 x digital channels via its RC servo interface .. the stipulation here is that I introduce a home micro switch to the Tics input so that the Tic can manage homing .. removing that responsibility from the EZ-b and therefore eliminating the need for feedback from the stepper.

I don't actually know if the steppers I am using will handle the torque required in practice .. I have assumed they will but I hear you saying that steppers do not have high torque which concerns me .. my fellow B9 builders have used DC gear motors (typically a windscreen wiper motor) for these functions via a Sabertooth .. I may have to take this path.  

Regardless of the path I end up taking, the real win here is that I have learnt a great deal from you guys in a short time.  This bolsters my confidence using EZ-robot and ARC .. I will in turn pass this confidence on to my fellow builders.

Thanks DJ and associates for your time.
Synthiam
#19  
I think that #2 is what ptp is suggesting, and i am keen to agree with him now.

One of the things we used for the 6 foot JD are 3d printed shoulder brackets from the Inmoov robot. They work really really well and are very strong. Do you have a 3d printer?
Australia
#20   — Edited
I do have a 3D printer .. please advise type of motor you use on your 6 foot JD and/or Inmoov .. as this will have similar demands to my build.  I would be very interested in looking at the STL files for these shoulder brackets pls.  I was hoping the server emulation approach would suit .. so you have sured up that idea.  However .. nice to know I can Java script solutions also .. using ARC.
Synthiam
#21  
1) Either way, you'll have to use ARC eventually because it is replacing ARC:)

2) The motor is merely a large servo. But the bracket STL files matter most. They're from the InMoov shoulder. I'll have Jeremie post the STL files for you here when he sees this. He's "working from home today"

3) The servo emulation with Tic and a stepper motor will work real good i think - if the motor can get enough torque
Synthiam
#22  
Hello @mbrooks,

A rack & pinion system with linear slides may be ok for a stepper motor as it doesn't have to exert too much torque. The motor isn't carrying much of the weight in that type of system, it's mostly on the rails.  

As you can see here, even steppers that are huge and are labeled "High Torque" don't have nearly the amount of torque as a 40kg/cm servo or DC gear motor. Geared Steppers do exist but they are rare.

Here's where I got the STL files from initially. I modified them to work with a different type of servo. I will have to ask EZ-Robot if they are ok with me publishing the files.
Synthiam
#23  
Jer - do you have a picture or video of the assembly we're talking about so he can get an idea of what to expect?
Synthiam
#24   — Edited
Yes, there is a detailed build tutorial with many pictures on the inMoov website.
Australia
#25  
Hi DJ / Jeremie  
I found my way to the inMoov construction site and found this very useful.  I am going to order some Hitec HS805BB 'giant' servos ex US.  I will use these for my 'shoulder' lift in exactly the same way as the inMoov does.  I do see what you mean about these steppers and tho we know they will 'hold' while energised .. I have no fail safe for power down.  I also have the servos supplied in your EZ-robot kit which are higher torque and generally more robust construction than the 'standard' plastic geared Futabas I have been using.

Thanks for your help guys ...
Synthiam
#26  
Sweet - looks like jeremies solution is the best fit. No need to use the tic then:) 

using servos with the inmoov shoulder design is great because it’s simply using regular servo function with no additional work needed
Australia
#27  
I will be using Tic + stepper for my carriage rack & pinion but I will use the Hitec HS805BB super servo in the shoulder .. all good now .. thanks Guys.
#28   — Edited
I'm very interested in your new B9 arm design using these new motors and servos. I've been down a two year prototype path a few years ago when I was designing my B9 arms. Your arms sound a lot like what I built with the various joints needing to be moved and controlled. 

Did you 3D print your wrists and claws yourself or did you buy the set Bob R sells through the B9 Builders Club? When I designed and built my arms all I had available to me were the wrists and claws made by a vendor that is no longer active. These were very heavy and solid. It's been a while so I really don't remember the load I calculated that I was putting on the elbow joint at rest or while moving. Any servo I found simply could't lift the needed load or they would destroy their self's. Perhaps with the new lighter claws it's possible now to use these fairly inexpensive heavy duty servos and have them stand up to the punishment. 

Something I learned in my search for the right motors and support materials in my B9 arm was that when figuring the load being placed on these parts you also need to figure in Joint Rotational Acceleration (top speed your motor will be moving the arm). There are several on line robot arm torque calculators and tutorials available that will help someone get an idea how strong motors and materials need to be. Here's just one from The Society Of Robots:
https://www.societyofrobots.com/robot_arm_calculator.shtml . Please forgive if you already have this information. 

As you probably know that among the new B9 Robot STL files now available there is one that lets builders print their own wrists and claws that are very light and very accurate to the original robot. Less weight is good. I have a set of Bob's light weight 3D printed claws that I'm looking forward to finishing and painting to replace my very heavy set I currently have on my B9 Arm. 

I'm excited that there are now builders like you that are looking for a better way to build a fully articulated B9 arm that will fit in the torso and can move in and out. When I designed my retractable and fully articulated B9 arm nobody had been able to do it before. When I was discussing it with other builders I kept getting comments like: "it can never be done", "it's too experience to build", "there's not enough room inside the torso for all that", "the robot will fall over when the arms are out and moving around". All that just made me push forward and find a way. My biggest challenges were building all that so it worked, was as light as possible and have it fit through a 6' torso hole and inside of Will Hoff's rubber arm skin. Another challenge I had was getting a successful auto tune on the Kangaroo I was using with my Sabertooth for position and speed control.

I'm convinced there are better ways then my design that are simpler and cheaper to build and operate. There are many more people out there that are smarter in robotics then me and have better design ideas. There are also new and evolving equipment for this kind of stuff that I have no idea about or how to use. Good luck on your build and have fun!

Just for kicks here are just a few reasons I decided to use the DC Worm Gear Windshield motors and material I did:

Worm Gear Windshield Motors instead servos: 
PROS:
Quite (servos are so loud)
Super strong
Worm gear will hold position when powered off
Durable. They last forever on cars. Made out of steel.
Can be bought in different shapes, sizes, torque values and speeds
Easy to control with motor controllers and micro controllers like Sabertooth/Kangaroo (once tuned) and EZ Robot/Synthiam
Very easy to control if using a Sabertooth in RC mode
Using the Sabertooth/Kangaroo I was able to get smooth, ramped and natural movements with the DC motor. 

Cons: 
Large
Heavy
Power hungry (mine pull just about 25 amps each top load)
Because of size constraints of a B9 arm they are hard to mount a feedback device on like a pot or encoder
Using ARC or ARC they are harder to send control signals to then servos. 
Must have arms dead center before retracting into the body of the robot or extreme damage can occur. True with DC motors or servos.
For some reason the Kangaroo has trouble with auto tuning this type of extended load. I ended up having to set a lot of the PID Coefficients manually. 
Some slop develops in the worm gear making centering the arm up to dock and move back into the torso difficult.

I hope this helps and I'm looking forward to see where you go with all this! Have fun!!

PS: If you need to get more power out of a servo and abuse it more then it's designed considder a gear box for the servo to sit into. servo City has very nice sets that really preform. Many of their gearboxes have built in pots and can let the servo extend it's limits: 
https://www.servocity.com/servos/servo-gearboxes
Australia
#29  
David .. ok well thanks for all of this.  I am using the claw and cuff designed by Ian Hughes ..which I then animated after the style of Robert Rossi's animated claw.  My standard Futaba (4.5kgcm) servo works fine for the claw.  I then looked at your current arm and decided to have a:
- wrist left/right joint
- elbow left/right joint
- elbow/shoulder up/down joint (bicep)
- carriage extend/retract

so the Futaba works with the wrist joint also.  I needed the EZ-robot servos (19kgcm) for elbow joint and I am going to try some nice CYS-S0650 (55kgcm) servos on order at present.  I guess I was just trying to see what I could do as an alternative to your 'bicep' DC motor .. the 25A current draw a bit daunting .. but it does look 'the business' doesn't it.  I will end up milling and machining my arm components as you have .. for now 3D prints will suffice.

So the worm gear slop was the cause of your centering issue .. yes .. makes sense.  You have saved me finding out short comings of Kangaroo the hard way .. thanks for that.
Yes .. a couple of good heads up for me here .. appreciated.