Basic question about steering

I have been working on a small bot that is going to be radio controlled (for now) using a 2 channel futaba. It has a forward, back
lever (center is neutral) and a left, right lever (center is neutral). I built up the circuit in Gordon's book on p. 353 for the H bridge controller. I breadboarded it tonite and it works fine. I will be building up 2 of them over the next few days to use to drive my motors. It is a 3 wheeled bot, the front 2 wheels will have the motors attached directly to them, the rear wheel is just a caster wheel. The motors turn at about 50 rpm. I am using 7 inch wheels, so it is a fair amount of speed. Anyway, I can see how the forward and backward control will work. I am going to use that servo to apply the 5-6V to the H bridges by means of a toggle switch, DPDT, momentary. The H bridge will be connected to the +V all the time, which is a separate battery. Now I am having trouble picturing how to turn the bot. I know I have to cut power to one of the wheels to turn, but I cannot seem to picture how to do that with the left right lever. When the lever is neutral, the bot should go either forward or back. When I want it to turn, I push the left right lever either to the left or the right, but I am not sure what type of switch to put in to stop one motor, but keep the other one running to execute my turn. It seems that if I use another DPDT, I won't have a neutral position if it is placed between the forward, back lever because then it will interrupt all the power going to the wheels. If I place it before the forward back lever switch, then, same problem, the control voltage will never make it to the forward back lever switch. I know this has been done before, I just seem to be having trouble wrapping my brain around the specifics of how to execute a turn without messing up the rest of the system. Any suggestions welcomed. TIA, Joe
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Perhaps I misunderstood, but typically you won't need H-Bridges if you are using mechanical switches. Typically, to turn on the spot you make one motor go forward and the other go backwards. This can be done by using servos to activate switches. Others have used this approach but the mechanics become more involved. Basically, to turn, you'd need to operate two switches with one servo, via mechanical linkage of some sort. Or, you could hook up two servos to the same channel and reverse the wiring to one of the switches.
If you have an RC setup that can be programmed to do differential steering as in a tank, use a separate servo for each switch and let the RC do the figuring.
DPDT switches can reverse the motor if wired as shown on page 349 of RBB 3rd Edition
HTH -Will

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
@@ wrote:

Hello Will,
Thank you for the reply. . I have toggle switches in the properly wired configuration to use in this application (maybe I should have stated that in my op). The problem is that, 1. eventually I want to interface this to a microcontroller, so I would like to make that transition as simple as possible, ie, I can use the data output pins from the uc, through the already installed 1K resistors to the H bridge to power the motors. 2. I tried using the 2 switches on one servo and it was becoming a nightmare because every time one switch would work, the other wouldn't. I had to keep readjusting the position of one of the toggle switches in order to make it work but then the other would not work. I also rebuilt the linkages I don't even know how many times. It was just not reliable enough. This is an old futaba system and I suspect the servos are not as " torquey" as they used to be as I have used it for different things over the years. So I decided to use the H bridges. So I need to find a way to either cut off power to one of the wheels to make my turn, or just apply power to one of the wheels and not the other without causing any other problems with the system.
Maybe better put, I tried using the 2 switch idea for over a week with no results except frustration. In one night, just an hour or so, I was able to breadboard the H bridge and test it (It also gave me a chance to play a little, checking the speeds of the motors one at a time for now to be sure they both turned at the same rpm. They do, within 1 rpm or so). My RC system is not that sophisticated. Two channel, 1 for forward and back, and one for left right. It cannot be programmed.
Joe
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hello Will,
Today, I wired the both motors to the one switch, one servo, the forward, back, one with reverse polarity as you suggested, and it works, like the H bridge did, but I still have the same dilemma. How do I stop one using the other servo, and keep the other moving. OR how do I start one and keep the other one stopped so that I can turn? I still have one servo and one toggle switch DPDT left, but not sure how to accomplish this. Can you maybe expound on your suggestion a little bit more? The forward and back motion is not the problem, the turning is.
Joe
Joe wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

The other answer which I don't think anyone suggested is to just wire the servos and switches tank-style so that one servo/channel controls the right wheel and the other controls the left wheel.
Then the trick becomes clever use of your transmitter. Is it one joystick with both controls? Or two sticks with one going up and down the other left and right?
If it's a single stick, you can just rotate your transmitter 45 degrees when you hold it and everything will work correctly (assuming you got the switches wired correctly). If you have two sticks, you have to logically do the same thing in your mind and it will be a confusing, but with a little practice you should be able to make it work. And if this is just temporary before switching to computer control, it will allow you to get it working without buying more parts.
--
Curt Welch http://CurtWelch.Com /
snipped-for-privacy@kcwc.com http://NewsReader.Com /
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Curt Welch wrote:

HI Curt,
No, it's a 2 channel futaba, so there's 2 sticks. I figured I wanted to use both of them as I have gotten used to using them in the past. The forward/back is up/down, and the left/right is, well, left/right. It's a first project and I wanted to see what I could do with a couple of decent motors and a light frame. Thanks for the suggestions
Joe
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Joe wrote:

Looks like you are approaching the problem in a purely digital (on/off manner). When you put the radio controls forward, you engage power to both drive motors. When you put the radio controls backwards you engage power backwards to both drive motors. So far so good right?
Have you heard of a momentary switch which is normally closed? Well, imagine splitting the two wires from your forward backwards switch connection, have two of these switches which will be controlled by the left-right servo. When the servo is left, it opens the momentary switch going to the left motor, it stops, and the robot turns left. When the servo is right, it opens the momentary switch going to the right motor, it stops, and the robot turns right. When in the middle, the two momentary switches are in the normal state (closed) and the robot goes straight.
Joe, what you are pondering as a general principle is called servo mixing. It's a pretty long way from the digital bang/bang method you are approaching it on, and has to do with PWMing the H-bridges. You might google on the subject. Also you might want to do some reading on differential steering.
http://rossum.sourceforge.net/papers/DiffSteer /
-- Randy M. Dumse www.newmicros.com Caution: Objects in mirror are more confused than they appear.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
RMDumse wrote:

Hi Randy,
No I never knew there were normally closed dpdt toggle switches. I can check with some of my suppliers. I am not using the H bridge now, just the switches. I looked at the waveforms tonite on the scope from the receiver that drives the servos, but it was very difficult to observe. I was able to measure the frequency and duty cycle as I moved the levers on the transmitter though. The duty cycle changed, which is expected for pwm and the frequency, of course stayed the same. I was exploring how it may be possible to get rid of the switches and possibly use the pwm signal from the RC receiver to drive the motors thru the H bridge. I guess that's what you meant about PWMing the H Bridges. I will google and see what I can find. Oh, and thanks for the link. It was interesting reading. Thank you again for the info.
Joe
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Joe wrote:

Normally closed switches come in many varieties. You only need SPST. You just need one of these in series with each motor. When the servo is left it should open the one in line to the left motor, and to the right open the one in line to the right motor. It will stop the motor on the side of the turn. Works both for going forward and going back.
Also consider you could do the same thing for forward and back, if you had a double pole version.
Have a look at this: http://www.bu.edu/eng/design/rules/switch.shtml
And you can even get them at Radio Shack: http://www.radioshack.com/sm-pushbutton-normally-closed-momentary-switch4-pk--pi-2062540.html
or digikey or mouser for example.
Really what you need is to have a 3 pos switch. That way you can choose fwd - off - back with the vertical stick. This needs to be DP3T. In the middle position both circuits need to be open, so you can stop.
For the left right stick you need turn-left, straight, turn-right for the side to side. In the middle position both circuits need to be closed. That's rather a complicated switch that would be a DP3P. That's why I suggested the two simpler switches.
The signals from the radios to the servos are a kind of PWM, but it is used for signalling, and its purpose is to have a very short on period (from 1 - 2 ms) and a long off period (from 19-18ms) so you can overlap several as you serialize them and send them through the radio. In any case, they don't go through in a format suitable for application to motors.
So you will have to convert these RC Servo pulses to a different frequency and periodicity suitable for driving DC motors.
With RC Cars, this is often done with a ESC (Electronic Speed Controller) which is somewhat like an PWM-converter and an H-bridge put together.
So you could use prebuild ESC's and Servo Mixers, which are somewhat expensive and a dead end if you want to do non-radio control, or you can get a micro and convert the incoming signal from RC Servo to PWM signals and apply those to the motors, again, somewhat expensive and rather a complicated process requiring you to know lots about micros.
-- Randy M. Dumse www.newmicros.com Caution: Objects in mirror are more confused than they appear.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
RMDumse wrote:

http://www.radioshack.com/sm-pushbutton-normally-closed-momentary-switch4-pk--pi-2062540.html
Hi Randy,
Yes, I picked up a couple of NC (or NO) slide switches today at the rat shack. I don't know if that's the right name for them, but Gordon has them in his book for making "whiskers" for robots. It has a long lever on it, but is spdt, so you can wire it as either NO or NC. Thank you for that idea. I am now in the process of wiring this thing up. All I wanted to do for my first project was to build an ROV, for starters, just to learn how all these things actually work in the real world. Sometimes, I make things more complicated then they really are. I have a good education, but as many people have told me, and I laugh about it, I just lack common sense. I would never have thought of using a nc type momentary switch. The link you provided me with last night was interesting. That's basic physics and some elementary calculus. I have no problem reading articles like that. It is all in how I was trained. When I was undergrad, I would stop the professor and ask him how something like this could be applied in the real world, and he would look at me like I had 3 heads and say something to the effect of "that's what engineers are for" , or some such nonsense. Now I am studying applied physics with my first formal electronics course this coming semester. So maybe I will develop some common sense in the next few years. But back to that article, what struck me the most about it was that he explained it so clearly and concisely that someone who didn't understand the math, or even the basic physics behind it could still understand it, and just use the result. Anyway, I will be on this forum for awhile. I hope folks don't mind a really basic question once in awhile. I hope I may be able to contribute something useful once in awhile. So thanks again, and I will hopefully have this up and running by New Year's Day.
Joe
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Joe wrote:

The PWM from an RC receiver is different from th PWM used to drive a motor.
For the PWM from an RC receiver, the duty cycle isn't so important, but the width of the pulse is. It's between 1 msec and 2 msec which repeats about every 15 msec to 30 msec.
For driving an H-Bridge, the PWM duty cycle is used to determine the speed of the motor. So a 75% duty cycle runs the motor at 3/4 speed.
So they're both PWM, but the PWM is totally different. You can use something like an ESC (Electronic Speed Control) to convert RC stylw PWM pulses and directly drive a motor.
Dave Hylands
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Joe wrote:

Joe Ideally you would want your steering and speed to be proportional to your stick input. This will give a better control of your "robot". i.e true differential steering. Obviously there are a number ways to do this using non-microcontroller circuits, a 555 timer comes to mind. There are plenty of circuits for PWM if you do a Google search.
If you want to get something up and running quickly and with minimum problems, then you might want to take a look at the Oopic Micro-Controller. It has predefined objects which are designed to do what you require. The objects are oNavCon for steering left/right and and oDcMotor which provide forward/reverse and the PWM to your H-Bridge.
With both the above suggestions you would link your servo to a potentiometer to give a smooth control as opposed to the bang-bang control you will achieve using switches.
Ian
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ian Drennan wrote:

Hello Ian,
I have heard of the oopic. As a first project, I wanted to see what I could do with a couple of decent motors and a light frame. It's more of a ROV. I need to look into different microcontrollers because I plan on eventually putting one in either this vehicle or my next one. Not sure yet. I have also been looking at the basic stamp because I know the basic language, I have an extra serial port on my PC, and it seems to have some advantages over some of the other uc's, like built in voltage regulator, a whole lot of info out on the web. The only drawback is the price. They're about $50 a pop, so I am still contemplating.
I actually have a schematic of a 555 being used as a PWM. I am just learning, so, for this one, at least for now, bang bang will do.
Thank you for the info
Joe
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Wed, 27 Dec 2006 20:35:14 -0800, Joe wrote:

I've seen this done with an "8-way" joystick, which is just a 4-way (X, Y) with a hole where you can go inside the quadrants, i.e., you don't only get (+X,0) (-X,0) (0,+Y) (0,-Y) you get (+X,+Y) (+X,0) (+X,-Y) (0,+Y) (0,0) (0,-Y) (-X,+Y) (-X,0) (-X,-Y)
turned 45 degrees, i.e., X is upper right to lower left, and Y is upper left to lower right. Then you just control one motor with X, the other with Y, and when you push the stick straight forware, X and Y increase the same; when you push the stick sideways, the motors are driven differentially.
Good Luck! Rich
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.