Motor Drivers and Servo Drivers

jack_flat

New Member
I am working on a project that has a motor mounted onto a set of 2 servo motors, the servo motors pick a direction for the motor and then the motor needs to go forward for (X) and then reverse for (X) anound of time.

Because the servo driver motor board only has 3 sets of outputs (and 2 are taken up by the 2 servo's) I wanted to take the 3rd output out to the (normal) motor driver board and hook up the motor to this.

Im not sure if it will work and i'm not sure of the coding that it will need but the idea is that the motor driver board 08 will sense the signal (high or low) given by the 08m on the servo driver board and if it's high it will go one way and if it's low it will go the other.

I am a PICAXE beginner so don't know much about this sort of thing but it is for a big exhibition in Vienna so need a reliable and relativley easy way to produce it.
 

BeanieBots

Moderator
You don't give much away about your motors so I'll have a guess that the motor mounted on your servos is of similar size to the servo motors.

To make a motor go in either direction, you need what is called an "H-Bridge" driver circuit. It can be as simple as a relay or a very complex array of transistors that includes current limits and other goodies. There are also special drive chips such as the L293D that has two such bridges built in.
What you can't do, is simply connect the output to the motor.

If you have a spare servo, you can 'hack' that servo to make a variable speed bi-directional motor controller, but that is only an option if your 'other' motor is comparable in size to the motor used by the servo.

Give us more details such as motor voltage and stall current and I (or somebody else) will be able to give a more specific answer.
 

jack_flat

New Member
Sorry I am a complete beginner at PICAXE and electronics in general, i'm an artist trying to use the picaxe system to control some work for an exhibition, i didn't even think about including this information.

The motor mounted ontop og the servo's is a 6V DC motor.

I have bought a 08 motor driver board and i guess what i want to do is take an output from the servo motor driver board into the normal motor driver board and write some code (I have no coding expereince) for the servo driver board that sends an output to the motor driver board and some code for the motor driver board that says when you get this signal driver the 6V DC motor forward for 10 seconds and then reverse for 10 seconds. I don't know if this is possible.

Any help would be amazing, sorry for my remeadialness with this...

Also I hooked up a 6V supply to my motor driver board and the motor to inputs 2 and 4 and put this code in to test it:

main:
high 2
low 4
wait 4
high 4
low 2
goto main

I changed over the jumper to run instead of program but nothing happened...

The data sheet says "The chip is designed to run warm in use. This is normal" but the L293D isn't "warm" its really HOT, too hot to touch... is this normal? When they say wram do they mean really hot?
 

Rickharris

Senior Member
No the L293 should be touchable because it has an inbuilt current limiter and shuts down if you exceed it's rated current - you would't see your motor turn in that case and the 293 would remain cold because it has shut off.

Apart from that I still can not see what you want this thing to do. Do the servos control the DC motor? in what way or do they position it in a particular direction and you need to turn the motor on and off.


Edited by - rickharris on 11/08/2007 14:44:54
 

jack_flat

New Member
Sorry again, the servo motors are just to possition the motor in the direction it needs to drive in, it is the lynx B servo motors tilt and pan kit


Edited by - Jack_flat on 11/08/2007 15:02:29
 

Wrenow

Senior Member
Jack,

The simple solution is to use an electronic speed control (ESC) properly sized to the needs of your motor. The ESC takes the same servo pulse command signal as the servos and uses it to determine speed and direction of the motor.

The simplest and cheapest solution, if it is a small motor without too much current draw, is to rip one out of a Radio Shack Vex Robotics Motor (or, if about 100 RPM is sufficient - just use the R/S Vex Robotics Motor). It lists for under $20.

A caution, some ESC's are forwards only, some are Fw/Rev with a delay between switching directions, and some are instant Fw/Rev (usually Marine versions). The Vex motors have no Fw/Rev delay and are Fw/Rev.

Radio shack has quit carrying them, but they are available sometimes on Ebay, and are available from VexLabs and IFIRobotics.

Note: The Vex Motors have a plug with pins sticking out (actually called a female type in r/c servo terminology) as opposed to the male pluc (which is actually a socket) that regular servos use. If you don't want to replace the plug or build an adapter, Parallax has a M/M lead available for a buck or two. I find them pretty handy for plugging stuff together on headers anyway, and keep a bunch in my parts box.

Cheers,

Wreno
 

jack_flat

New Member
I phoned my local model shop to ask them about ESC's and they weren't very helpful...

The motor that I am trying to control is a 6V DC motor and is fixed as it is a device that i've hacked so i can't change that motor.

Are ESC's something that can take the pulse transmitted from the 08M servo driver board and convert it into a direct current for the hacked devices motor

so if I put a 1.25 pulse into the ESC and then out to the DC motor it will go one way and a 1.75 pulse and it will go the other? or am i being stupid... i don't really know what i'm talking about and i might have got the wrong end of the stick

or

could i hack a sevro motor so that it rotates all the way round and just take the 2 inputs into the motor section of the servo and run them straight into my DC motor?

Edited by - jack_flat on 11/08/2007 16:23:39
 

Wrenow

Senior Member
"Are ESC's something that can take the pulse transmitted from the 08M servo driver board and convert it into a direct current for the hacked devices motor

so if I put a 1.25 pulse into the ESC and then out to the DC motor it will go one way and a 1.75 pulse and it will go the other? or am i being stupid... i don't really know what i'm talking about and i might have got the wrong end of the stick"

EXACTAMUNDO! You have it!
Check out the http://www.mtroniks.net/ site, it might be useful in getting you up to speed - or a better hobby shop (or ask for their electronics guru)
For an example, using an Mtroniks Marine (forwards/instant reverse, no brake)
1.00ms = very fast in one (say cw) direction
1.25ms = slower (say, about 1/2 speed) also cw
1.50ms = motor stopped
1.75ms = motor slow in other direction (say ccw)
2.00ms = motor very fast ccw

Speed is relatively finely variable.

"or
could i hack a sevro motor so that it rotates all the way round and just take the 2 inputs into the motor section of the servo and run them straight into my DC motor?"

Actually, no need to do all that. Just rip out the board and pot. Use the pot to set center off. Then it depends on whether the motor exceeds the power requirements the servo board is set up for. If the motor draws less under stall and under load than the servo's native motor, you can usually just interchange the motor. But the speed is not nearly so variable without further hacking, if at all. The Radio Shack Vex Motor is set up to be pretty much the same thing (it is a fully variable fw/rev ESC and motor), and is easy to replace the motor and board. But, again, you need to make sure the motor does not overdraw the board (though I understand it does have some overload protection built in), and if you do not overload it a lot, you might get by with heat sinking the chips. For a while, at least, until it shuts down due to overload and cools back down.

You might also want to check out <A href='http://www.ntxbg.org/pgOnTheWays/pgMTronicsESCLessons.htm' Target=_Blank>External Web Link</a> for some additional tips (capping the motor, what to do with the BEC power lead, etc.).

I hope that helps.

Cheers,

Wreno

Edited by - Wrenow on 12/08/2007 04:51:42
 

Wrenow

Senior Member
Mycroft,

You are more than welcome. We have been using them for the last 5 years or so in R/C Model Warship Combat with great effectiveness. They often show up other weaknesses in your system, but as one of my engineering friends mentioned only last night, &quot;I thought about building my own super H-Bridge system early on - then found these were available, and someone had already solved my problems elegantly. Why reinvent the wheel?&quot; The answer, is, of course, when there is no wheel that fits, or you can do it yourself cheaper. Funny thing, we both discovered and introduced (to our club) the MTroniks range the same month, unbeknownst to each other.

However, some clubs remain unconvinced about these &quot;unreliable things that give up the ghost when you need them most.&quot; Virtually every case of unreliability has been traced to installation/spec error.

The most common problem was using one 15A or 20A rated ESC to run 3 550 series equivalent motors. After all, they only draw a couple of amps apiece. So they seemed to work just fine on the bench, or in light duty operation. However, at stall, these motors crae 89A apiece or more. Yes that is about 90Ax3 or 270A worst case (slogging through the moss, for instance). On an ESC rated for 15A. No wonder the magic smoke was set free.

Then there was not putting capacitors on the motors. Or using a receiver battery with the BEC supply from the ESC still attached. Etc.

Personally, I have never had one fail (yet), but, then, I read the freakin' directions. Plus, I go for lower draw motors (more battery life, is a great side effect). My 15A ESC is driving a motor that draws 0.75A at full stall. Life is good.

Best part about the MTroniks, they are all waterproof, so you can just set them in the bilges for additional cooling by the water coming in from your leaks as you get shot up.

Many ESCs feel a drop of water on the FET's and the magic smoke puffs out instantly. LRP has some with a conformal coating, some not, and Castle is supposed to be introducing waterproof ones, too.

A bit long here, sorry. But the little buggers are such a handy solution to a tough problem.

Cheers,

Wreno

Edited by - Wrenow on 12/08/2007 14:39:35
 

BrendanP

Senior Member
Wrenno, do you think the Mtronics units are the best quality on the market?

I see they have overload protection. So what happens if the thing is overloaded, does it just shutdown? And then reset after it cools down?

I have been using a current sensor which can be found here

http://www.tamura-ss.co.jp/en/electronics/current_sensor/pdf/s22p.pdf

I watch its output with readadc and if current consumption goes too high I'd shut down the the motor with the ESC.

With your experience on the battle ships Wrenno can you offer any advice re. detecting the postion of a rotating shaft or mechanism so the picaxe will know what posi the hatch is in. I was going to use hall effect sensors such as can be found here http://www.mouser.com/catalog/631/1616.PDF

But on more mature reflection perhaps this is the way to go http://www.vishay.com/docs/57000/6011045.pdf


Any observations welcome Wrenno.

P.S. Any links to pics of your battle ships? Do they have cool names like Rodney, Hood and The Golden Hind?

&#160;

Edited by - BrendanP on 12/08/2007 16:35:35
 

Mycroft2152

Senior Member
Wrenow, I I heartily agree agree with your &quot;reinvnt thee wheel&quot; comment, but would lke to add one more reason. To learn how it works. Hands on building is ageat teacher.

On the other hand, I would be cautious with the &quot;build it becaus it's cheaper&quot; reason. Hobbyists tend to not include the cost of their time. You have to ask, &quot;Is this the best way to complete the project?&quot;

My favorite example is driving LCDs. Yes. you CAN use a PICAXE to drive a LCD, but at the same time you are tying up valuable rsources (pins and progam space) that may be better used. But for $5US, you can buy a 'plug and play' driver chip.

It's all a matter of personal choice.

Again, thanks for the info on ESCs.

Myc
 

Wrenow

Senior Member
Brendan,

It would probably be easier to find out the stall current and size for that. Not too hard to do, if it is not readily available from the manufacturer - hook up a stout ammeter and stall the motor for a bit.

The problem with monitoring the draw is that, by the time you sense it, it may be too late. Another possibility is a fuse for protection.

My understanding on the MTroniks is that on ordinary overload, it just shuts down, cools off, and resets. How much overload they can take until they fry, I have no idea. As to the &quot;best&quot;? No idea whatsoever. I feel they are good bang for the buck, and have found them to be rugged and worked as promised with no drama (if you read, understand, and follow the directions). Interestingly, another fine product from our brethren in Great Britain.

My first thought for your position sensor was a simple pot (after all that is what is in servos), or, if you do not need proportionality, simple limit switches. However, the sensor you found looks a treat. If you need its features. A pot might be easiest to start, and are readily avialable.

As for pictures, there are tons on the internet. There is an introductory article article at: ftp://anonymous@rcwarships.org/servo20051rcmw.pdf
and some pics at the <A href='http://www.ntxbg.org' Target=_Blank>External Web Link</a> web site. I have links to pictures of the last couple of North American Big Gun Opens at <A href='http://www.nabgo.org' Target=_Blank>External Web Link</a>.

As for the names - we generally use the names the original ships (1900-1946) had. Our club has a Hood, Nelson, Pittsburgh, Bismarck, Tirpitz, Iowa, Missouri, Imperio, Roma, Altmarck, Spica, Poete, Scharnhorst, Graf Spee, Adm. Scheer, Lutzow, Akagi, Yamato, Richelieu, Dunkerque, Le Terrible, Reluctant, Lake Shore, Cimarron, Espana, Dallas, Titanic, Indiana, etc. (including a fleet of Liberties), and we have had Komet, Verdun, Indianapolis, and others come visit.

No-one has build HMS Dreadnought in our club yet.


Cheers,

Wreno

Edited by - Wrenow on 13/08/2007 04:30:13

Edited by - Wrenow on 13/08/2007 15:23:18
 

Wrenow

Senior Member
Mycroft,

I agree with you point about &quot;learning how&quot; being another valuable reason. Also add to &quot;reasons to reinvent the wheel&quot; - to try and build a better (more efficient/reliable/smaller/higher capacity/smoother/attribute of choice for improvement) one.

In my case, with the ESC's, peaple WAY above my paygrade have been working on refining them for some years now. In fact, some I just ordered from Hong Kong have 2 separate microcontrollers doing whatever they are doing to contol the mosfets, do error correction, eliminate glitches, handle signal out routines, etc.

For me, that is huge - the H-bridge I would build would frankly never reach that level of sophistication, as I would only be building the H-bridge as a part of the overall project. For these guys, it IS the project.

Of course, different horses for different courses.

Cheers,

Wreno


Edited by - Wrenow on 13/08/2007 15:15:37
 

Mycroft2152

Senior Member
Wwrenow,

I agree completely. Not only were the H-bridgs the total project, but volume manufatring brings the price down to levels that a hobbyist could not duplicate (with the same functionality).

As we say north of the equator: To each, his own.

Myc
 

BrendanP

Senior Member
Great looking ships Wrenno, How are the guns driven, CO2?, do you mod C02 pistol actions? Is there much on board automation or is it controlled from shore via RC.

I notice one vessel had what seemed to be bilge pumps, do they auto activate if she starts taking water or do you activate them from shore if she starts taking hits?

What sort of picaxes do you use to run the vessel?

&#160;

Edited by - BrendanP on 13/08/2007 18:50:10
 

Wrenow

Senior Member
Brendan,

Thanks. Some are &quot;prettier&quot; than others, but
they are pretty cool, methinks.

The guns are, indeed CO2 or air powered. We do not use pistol or airsoft mechanisms (either too powerful on not effective). For Big Gun (4 calibers), the guns are pretty much custom made. One source is <A href='http://bderc.com' Target=_Blank>External Web Link</a>. The operating principle, and a diagram of turrets are at <A href='http://www.rcwarships.org/rcwarships' Target=_Blank>External Web Link</a>. Small gun (.177 BBs only) use a different principle, and are based on plumbing parts. See <A href='http://battlersconnection.com' Target=_Blank>External Web Link</a>.

Pumps- Some use &quot;always on&quot; others use one of the various APCs (Automatic Pump Circuit), some use control radio (though that takes up a channel unless you find a way do duplex it off of some other function.

As for Picaxe, they are kind of new to us. In fact I was the first to introduce them to our hobby, AFAIK. None is currently in a ship, but some projects are in development. One local ship DOES have a PIC onboard.

One of my ongoing Picaxe projects is a Fire Control Assistant (FCA). It uses the AXE024 with 08M to read the master turret's position command, the slave turret's position command, and the depression (an indicator of range), to automatically coordinate the slave turret when the master is pointing at a target in the slave's range of travel, but releasing the slave to the slave's control when not.

The holy grail to many is the ability to set relative bearing and range to target, and the onboard computer brings all available guns to bear and allows them to shoot. This, of course, is pretty ship-specific.

One of our members has worked out an improved APC (Mk 4?) that should improve /reduce vapour-lock with various behaviours. Basically, as I understand it:

- Water detected
- Pause to make sure it is not just a small splash, but the left is indeed sufficient to cover the inlet and retest.
- When water is confirmed sufficient to cover the inlet, ramp the speed of the pump up.
- Once the sensor is cleared, continue pumping for at least 30 seconds to clear out any remaining bits.
- Any more sloshes in the 30 second final clear restarts the timer on the final clear.

Oh, and it also starts the pump for 30 seconds on power-up to confirm power and operation.

We also have a PIC based speed trap, that I am planning on &quot;reinventing&quot; with the Picaxe to make it smaller, cheaper, and more easy for other clubs to implement.

Cheers,

Wreno

Edited by - Wrenow on 14/08/2007 14:07:56

Edited by - Wrenow on 14/08/2007 14:09:11

Edited by - Wrenow on 14/08/2007 14:10:32
 

BrendanP

Senior Member
Thats some sophisticated gear. Do you have night battles? A controllable on board LED spotlight would be nice, you could light up the other ship before opening fire. It could be on the same plane as the weapons. Put the spotlight on the opposing vessel and open fire. Maybe a low power laser could be used for this. Might be against the rules.

 
 

Wrenow

Senior Member
We had a night battle a couple of years back. No lasers wer allowed, and only general lighting. My little freighter had full running/nav lights, most did not. Some triggered lights on/off by radio. We also had shore-searchlights (flashlights).

It was kind of fun, but the Japanese night-fighters ruled, taking cout captains and crew with their strafing runs (mosquitos were BAD at the pond at night).

During the last migration season, we had flights of G33-se high altitude bombers dropping their loads on the battle area. Not terribly accurate, but one did manage to make a mess of the decks of the Imnperio. ;-)

Cheers,

Wreno
 
Top