I am extremely new to Vex having just ordered a bunch of parts last week. I saw the motion kit that has the linear lift and thought it would be an excellent solution for my robot project.
I am using a ServoCenter controller card that takes commands from my Visual Basic software (via USB) and allows me to control the servos in the robot with that. It also allows me to control the Dimension Engineering SyRen 10a motor controllers I have installed.
I’ve had some superb help from Vex on ordering the correct pieces for the linear lift to be pieced together. I also bought the 393 motor, motor controller and limit switches. I understand the 393 will work with voltages up to 7v although I am not sure if I need the Vex 393 motor controller?
Any hiccups or technical things I should be aware of with Vex? Thanks!
It looks like the ServoCenter outputs RC style 1.5mS pulses so you will need the motor controller 29. One thing to bear in mind is the motor power is taken from the center pin of the 3 pin servo connector. As the 393 motor will pull over 3A when stalled, you probably want to supply external power to SV_PWR on the controller card and set jumpers accordingly. The dimension engineering motor controllers had the motor power directly connected to them so this would not have been an issue. After you have done your initial testing it may be best to make some custom cables (perhaps with over current protection) to have motor power bypass the controller card completely.
I reread your question and perhaps I misunderstood. If you plan on using the existing dimension engineering controllers then you do not need the motor controller 29, they essentially do the same thing (although the dimension controller is more flexible) just keep the battery voltage to around 7.2V.
With the linear rack actuator, I want to raise the motor up to a set point the vex limit switch with stop it. Then, using the reverse polarity to move the motor down, set the limit switch to the stop point at the bottom.
I know that is electronics 101 but stumped as to what pieces/wiring / etc to make this work
The datasheet for the Dimension Engineering Syren 10 says input voltage is 6-24V, you should be OK feeding 7.2V in. Where does it say it’s a 12V controller?
As we don’t know the final plan for your system it’s hard to give advice on individual parts where that advice may affect other things you are doing. The ServoCenter can drive either the VEX or Dimension Engineering motor controller but things start to get tricky when you involve limit switches, remember the ServoCenter is really designed to drive servo’s not motors. So a few questions.
Which ServoCenter do you have? I see the latest is V4.1 but you may perhaps have an earlier version.
Do you plan on always having another control system (ie. PC) connected?
What other motors and servos do you plan to control?
Is this a stationary system or does it drive around?
Get back to us on these and we can try to help some more.
Ah good catch, since I have entirely 12v systems, I thought it was only 12v. That’s good, I already have an AnyVolt 3 I can convert the voltage down accordingly.
What’s I intend to do i mimic what my Firgelli linear actuators to. These have limit switches built into them for open and closed. Via the ServoCenter 4.1 board and into the Syren motor controller, I can send a command to open it, then it will stop when it meets the limit switch. I can then give the command to close it as well.
Being a noob, I am not sure how to connect the limit switches , or where to wire them, to halt the motor when it reaches the top and bottom.
But the problem is that the ServoCenter controller is not really suited to doing this sort of thing (if I read the datasheet correctly, I’ve never actually played with one). It’s very good for controlling servos but you would have to have an external PC monitoring the digital inputs (ie. the limit switches) and then stopping the motor. That may be OK but it does mean the PC software has to stay running.
Ok, well the ServoCenter has digital IO. Configure two pins to be digital inputs with the pullup resistor enabled. Connect the two limit switches to the two digital inputs. I don’t know if you plan to use normally open or normally closed switches, I prefer normally closed so the switch will open when triggered, its safer that way if the switch gets disconnected. Anyway, this is then the type of code (well pseudo code) you would use to drive the lift motor.
// Check if we are up already
UpLimitSwitch = ReadDigitalIO( UP_SWITCH_INPUT );
if( UpLimitSwitch == LIMIT_HIT )
return(-1); // error
// Start motor moving lift up
// Wait for limit switch to trigger
// no multi-tasking here, also should have a timeout
while( UpLimitSwitch != LIMIT_HIT )
UpLimitSwitch = ReadDigitalIO( UP_SWITCH_INPUT ); // Wait
return(0); // done
This is becoming a ServoCenter programming problem not a VEX problem per se.
Say the current is flowing in the direction of the red arrow, the motor will turn. When the limit switch is reached (switch 2 in this case) it will open and break the circuit, now the motor will stop. If the battery is reversed then current will flow in the opposite direction, the diode over switch 2 will allow this. Limit switch 2 will now close again. Same happens for the other end. This is an old and crude way of achieving what you want. A better way is having the limit switches work with the H-Bridge in the motor controller directly but neither the VEX part or (as far as I can tell) the dimension engineering controller allow this. There are other controllers on the market that have limit switch inputs but the ones I have used in the past now seem to be discontinued and were also very expensive.
I 'll drop out, since you guys are updating faster than I can contribute.
Jpearman’s method is nice, it allows variable speed control.
There is another method with isolated motor power, but no variable speed control.
Use a servo to toggle a DPDT center off switch (or combination of 4 Vex limit switches) to generate the V+ and V-.
IE Old “BEST Robotics” type servo controlled H-bridge.
Strategically placed limit switches prevent overrunning the end.
This works well if your motor voltage isn’t compatible with your cpu,
and for when you want to keep the motor electrical noise out of the CPU power supply.
First you say “no controller, just wires”
Now you suggest a USB connected smart controller from pololu,
which is wired just like post #8 again (connect the limit switches to the controller, not the motors).
The pololu solution looks like it has a bunch of nice features.
You don’t need a diode on the limit switches if you use the pololu, and program correctly.