Master Programmer, but complete noob at electronics, has one question.

I may not be asking the right question here. Maybe I need a stepper motor. Maybe I need a relay.

I want to control an ATV's steering wheel with a computer output.

The problem has many phases to get to the point where I'm using a Cell Phone to control pedals/steering wheel, and streaming video to my computer where I'd be controlling it.

First Phase is getting computer 5 volt output to control a big motor.
From what I can tell I have either A or B:
A: I hook up a 12 volt battery directly to a motor driving the steering wheel left and reverse the wiring for right.
The trick is I think I need relays to turn on/off the 12 volt connections. Also someone said something about buffering the output of the joystick. I'm not sure what that means or even how do I Google it.
B: I can enter into the wide world of stepper motors.

Do you know where I can buy a relay that'd do what I want?

If you want to steer me in the way of stepper motors for steering, do you know a cheap DC one which could turn an ATV steering wheel being supplied with 12volt car battery?

Very interesting, why are you doing this? Planning to enter the DARPA Grand Challenge or something similar? Quite frankly this is an overly ambitious, not to mention potentially dangerous, project for a person that is completely new at electronics, regardless of their programming skills. I'd start with a scaled-down version, maybe something that runs on flashlight batteries, something that weighs at most a few tens of pounds, not several hundred. Most of the problems to be solved are identical. If I were able to solve them to my satisfaction, only then would I consider scaling up.

Your biggest challenge will most likely be trying to figure out how you are going to mechanically couple the motor to the steering gear, how much torque your motor must provide, maximum and minimum steering speed, etc. Only when you have that figured out and spec'd and selected the motor, can you then figure out how to electrically interface the arduino to the motor. I also don't think you can succeed without also having some feedback value from the steering mechanism so you can know how far from neutral the steering is at any given instance. I suspect you would end up requiring a full blown PID algorithm to be able to control steering on full scale size vehicle. So I think you need some expert mechanical engineering help to get started. That or see if you can find an existing design that works on a similar vehicle and use that as a starting point.

Good luck.

Lefty

goodnewsjimdotcom:
I may not be asking the right question here. Maybe I need a stepper motor. Maybe I need a relay.

Maybe you need to realize that a project of this size and nature may be completely over your head, especially if you don't give consideration to certain details...

goodnewsjimdotcom:
I want to control an ATV's steering wheel with a computer output.

That's the least and most minor of your concerns...

goodnewsjimdotcom:
The problem has many phases to get to the point where I'm using a Cell Phone to control pedals/steering wheel, and streaming video to my computer where I'd be controlling it.

This is called building an "Unmanned Ground Vehicle" - something which I am pursuing myself, but doing so in stages; I'm not jumping to the ATV stage immediately, because:

a) I don't have the money to purchase an ATV
b) I realize the complexity and scope of such a project is huge
c) I want to implement and perfect my software on a smaller platform that won't (likely) cause personal injury or property damage should something go wrong

You might want to re-read item "c" above - and think about what you are trying to do. More on that in a moment...

goodnewsjimdotcom:
First Phase is getting computer 5 volt output to control a big motor.
From what I can tell I have either A or B:
A: I hook up a 12 volt battery directly to a motor driving the steering wheel left and reverse the wiring for right.
The trick is I think I need relays to turn on/off the 12 volt connections. Also someone said something about buffering the output of the joystick. I'm not sure what that means or even how do I Google it.
B: I can enter into the wide world of stepper motors.

If you are asking these kinds of questions, you are already in waaaay over your head, and a full-scale UGV using an ATV as the base is -not- something you want to mess up - because if something goes wrong, serious consequences can and will follow.

goodnewsjimdotcom:
Do you know where I can buy a relay that'd do what I want?

If you want to steer me in the way of stepper motors for steering, do you know a cheap DC one which could turn an ATV steering wheel being supplied with 12volt car battery?

Let me tell you this - what you want to do will be neither inexpensive nor easy to accomplish; when you are dealing with moving large loads, the actuators needed are going to cost a bit of money, unless you get really lucky with surplus (which is easily possible; I'll touch on this further in a bit). First, though, let me try to persuade you to follow a slightly different path:

You want to build and control, via some wireless method, an unmanned ground vehicle, with video feedback. Cool. However, given your lack of experience, I would suggest you start smaller, rather than with an ATV. I would suggest going to a thrift store (or purchasing new) a toy remote controlled vehicle (something larger scale, it doesn't have to be tiny) with Ackermann steering (Ackermann steering geometry - Wikipedia) - which is what most automobiles, ATVs, etc. use. Most inexpensive R/C toy vehicles (like a 2 or 4 wheel drive truck chassis) use a similar steering system, and are easily hackable to interface to the drive electronics that control steering and acceleration (especially if it uses the RX2/TX2 chipset). Even if you can't interface in that manner, most can be easily controlled with off-the-shelf h-bridge controllers, or small relays, or similar means.

A simpler option (though perhaps more expensive) in the same vein would be a hobby-grade R/C truck platform; these tend to be a lot more expensive, but have the advantage of being more rugged, easy to service (should something break, parts tend to be readily available - which is usually not the case with a toy R/C vehicle), and easy to control (because they use controller and such that interface via standard servo signals - which are easily generated by the Arduino, or via servo interface boards which can be commanded by the Arduino).

Both of these options will teach you a lot about stuff you don't know yet, while still providing a capable platform to develop your software which (if designed properly) can eventually be transitioned over to a larger platform (up to and including a full-sized automobile). Their one downside would be their power capacity; most of these platforms have limited torque and motor power, and not much weight handling capability to add on extra batteries; this will limit the amount of processing power you can put on-board. However, that can open up unique challenges and possibilities by itself. For instance, you might not be able to have the video processing on-board (at least with just an Arduino), so you would need to use a wireless IP camera, or something similar, communicating back to the home-base station.

One way around this might be to use a hacked router (WRT54G or similar running Linux) to communicate with the Arduino (which would control the motors and such), while the router would run a small web-server and route a wired IP camera's data over wireless back to the control system (your iphone or whatnot). Lots of possibilities here of course...

--- cutting this short here - see part 2 ---

--- PART 2 ---

Now - if that kind of a platform seems too small, there is another option that isn't as dangerous as a full-sized ATV - which is what I am pursuing:

PowerWheels

You can find 6 volt and 12 volt PowerWheels ride-on toy vehicles which don't move too fast, are fairly easy to control, and if they get out of hand they won't likely cause too much damage. Their drive motors are fairly easy to control; the steering system is where it gets more difficult (you'll run into the same problems with an ATV - so starting on a ride-on toy may allow you to solve the problems in a fashion that you can then transfer to the ATV when you get there). Some solve it with geared servos, some solve it with other means. I'm personally going to be using (well - it will be an attempt) a 24 volt linear actuator I got surplus. Incidentally, such a similar actuator could easily rotate the steering of an ATV (it's has 4000 N push-pull rating - that's 800 lbs of force); should I get to that point, I can easily move the component over. There are many forums and information out there on doing "PowerWheels Modding" - many people have made remote-controlled PowerWheels toys, and have documented them on the internet; you might want to look at this possibility. New PowerWheels are fairly inexpensive, and used ones can be found cheaply as well (kids outgrow them all the time). They are very tough, but made out of an easy-to-modify using handtools plastic that makes them very adaptable to homebrew robotics.

The problems with an ATV platform are several fold - you need special tools and skills to "interface" to such a machine. Do you know how to weld? Have you ever used a right-angle grinder? Do you have experience and access to a cutting torch? Do you know anything about vehicle repair and maintenance? Small engines? Metal work? Do you have a place where you could work on such a machine (large garage or outdoor area)?

Not to mention the cost of an ATV (though maybe you already own one, or maybe you know where to get one cheap)...

Much of this can be avoided by going with something smaller, and something inherently safer. I've heard more than a few stories about people using, for instance, a differentially steered 200+ lb mobility chair or electric wheelchair as a robot platform in a similar manner, who hooked it up and something went wrong, and it went careening down a hallway, crashing into a wall (if they are very lucky). Can you imagine what would happen if your code was incorrect, or the mechanical linkages were not sound, and you several hundred pound ATV took off at full throttle? Well - can you? Nothing good, I can easily say that much.

...and this is why - before anything else - before you start modding your R/C car, your PowerWheels, your ATV - or whatever other platform you use - large or small - this is why you give some long and drawn out thought to the general layout of your control system, with particular emphasis on safety and control recovery. DO IT NOW. Don't wait until you have a runaway on your hands and you are filing an insurance claim (or having one filed against you).

You want a system that will allow you control, but knows when things are out of control, and can shut down automatically. You want a system where you can remotely shut it down completely. You want blinking safety strobes and possibly warning sirens. You want an on-board, large flashing red "emergency stop" button that is clearly marked and easily accessed from the outside of the machine. You want a "dead-man" safety-pull switch that can possibly be easily grabbed, and once pulled out, stops the machine quickly (like those used by jet-ski riders and similar). You might even want an automatic fire-extinguishing system installed.

You may think these things don't belong on an R/C car or a PowerWheels - but I can assure you that a few of them do (maybe not all - but more than a few). All of them (and probably more) should be implemented once you move to some form of a larger-scale (and possibly engine-powered) machine, like an ATV. The important thing is to design these systems ahead of time, and implement what you can (and what makes sense) for the scale of platform you do use, and to put these in place FIRST - so that when you transfer your design to a larger system, your safety systems are in place without having to band-aid them in afterward. This is the same kind of thinking and design practice as should be done in computer security setups; you should never set your security systems up last (especially if you don't want to be hacked - sadly, in many situations, the norm is to think about security last - I call this idiot engineering).

Know that despite all of these precautions and all of your design choices, testing and such, you might still end up with a "runaway"; in the case of an R/C vehicle or that of a PowerWheels (depending on what you have on-board), it probably isn't that big of a deal. You can easily stop it with your foot, or run after it or something and bring it to a safe halt. In the case of an ATV (or a larger platform with a lot of weight in SLA batteries!) - running after it might be impossible, or even if you did catch up to it, you might not be able to halt its momentum. If all of your safety systems and such fail - if all of your precautions do nothing; well - first, I hope you are testing your large robot where there isn't much to harm (particularly humans), but even so...

Buy some insurance coverage. This really only applies in the case of a UGV based on something like an ATV or a full-sized automobile; it won't be cheap, it won't be easy - but it will be cheaper and easier than the alternative.

Good luck with your project, and please re-read everything I have written here. It is very important, and shouldn't be taken lightly. This isn't an easy project (even at the level of an R/C vehicle); and once you go past R/C vehicle size, it isn't cheap, either. For my project, using a PowerWheels, I've probably spent $1000.00+ USD in mostly used components - not all at once mind you, but over the course of time. I know that if I get to building an ATV version (which is a goal of mine), I'll probably end up spending 10 times that, and probably more.

:slight_smile:

cr0sh,

Exactly, I am going to use a Power Wheels,but I didn't know the name for it :slight_smile: I just called it an ATV because I think it'd be okay to over estimate the torque needed to spin the steering wheel. I'm sorry, the whole ATV thing was a red herring for you guys.

I've had this problem for 9 years:
I want to use a 9 volt battery to enable a connection between a car battery and a motor. So far no one has ever been able to answer me.

"Car battery" -------- "ON/OFF SWITCH" ------- "MOTOR"

The On switch is on if a 9 volt battery is applied
The Off switch is off if 9 volts is not applied.

Someone answered me on this question here:
http://www.reddit.com/r/engineering/comments/kcl94/cross_post_from_rrobotics_how_can_i_use_a_9_volt/

Apparently I wanted a relay...

I'm gonna play with the relay some, then if it doesn't do what I want, I will move on to learn Stepper Motors.

Thank you everyone for posting :slight_smile:

I've had this problem for 9 years:

Whoa, can't rush these things :slight_smile:

Yes you need a relay to control the connection. Any particular reason for 9V though when you obviously have 12v available?


Rob

goodnewsjimdotcom:
Exactly, I am going to use a Power Wheels,but I didn't know the name for it :slight_smile: I just called it an ATV because I think it'd be okay to over estimate the torque needed to spin the steering wheel. I'm sorry, the whole ATV thing was a red herring for you guys.

Ok - cool. While it is possible to build an ATV-based UGV (like I said - I'm contemplating it myself, should I get there) - it is something that needs to be given a lot of thought.

FYI - there are mainly two major brands of ride-on toys out there: Power Wheels and Perego; the motors/gearboxes aren't generally interchangeable. Do some research on what you want to use (I think Perego vehicles are more in the European market). Here are some links to a few sites for information, etc:

http://powerwheelscd.com/

The CD is well worth the price - but a lot of the information can be found on the Modified Power Wheels forum, too.

goodnewsjimdotcom:
I've had this problem for 9 years:
I want to use a 9 volt battery to enable a connection between a car battery and a motor. So far no one has ever been able to answer me.

"Car battery" -------- "ON/OFF SWITCH" ------- "MOTOR"

The On switch is on if a 9 volt battery is applied
The Off switch is off if 9 volts is not applied.

Someone answered me on this question here:
Reddit - Dive into anything

Apparently I wanted a relay...

A relay will work - so will a bipolar transistor or mosfet. If you want to control direction, then an h-bridge is what you'll need. H-bridges can be made from relays, but if you want to control speed of the motor via PWM, then you will want a transistor/mosfet based h-bridge (it is also possible to build a "hybrid" h-bridge which uses relays for direction control, and a transistor/mosfet for PWM). Note that on the 12 volt dual-motor Power Wheels ride-on toys, the motors are pretty beefy (540 brushed cans); from what I remember, the built-in fuse for the system on my Power Wheels H2 is a 25 amp fuse; you won't be messing around with small amounts of power here, certainly - so be careful.

You might find that if you want to use an h-bridge, that purchasing one (especially for PWM) might be the cheaper option in the long run. There are a few out there that should be more than capable for brushed DC motors that aren't too expensive.

Another thing - the 12 volt ride-ons typically use two motors/gearboxes (one for each rear wheel), and a specially switch setup to switch the motors between serial and parallel running configurations for speed control. Something I've thought about, but haven't played around with, has been the concept of implementing an electronic differential via current monitoring, as well as possibly using the rear
wheels in a differential drive configuration to sharpen the turn-radius as needed. I'm also thinking about a hybrid-configuration (perhaps using a small cheapo Harbor Freight gas generator)...

goodnewsjimdotcom:
I'm gonna play with the relay some, then if it doesn't do what I want, I will move on to learn Stepper Motors.

Thank you everyone for posting :slight_smile:

For steering or control of the drive motors on a Power Wheels - you are going to want to use an h-bridge to control the motors, at least for the rear drive motors. You might also try to replace the brushed motors with brushless motors (though I have read on the Modified Power Wheels forums that such a mod, while possible, tends to damage the gearboxes, since the motors have greater torque).

As far as the steering is concerned, whether you use a brushed DC or brushless DC motor, or a stepper motor - you are going to need to couple it to a geared reduction unit to lower the speed and raise the torque. I would suggest using a metal-geared windshield wiper motor, or something similar and beefy (perhaps a power-seat adjusting motor would work ok too). I've decided on mine to go with a large linear actuator; it has way more than enough power - I will probably break my mounting scheme before the motor/gearbox breaks.

Regardless of which method you use to steer the machine - you will need to set up some kind of feedback mechanism so you know how far left/right the wheels are turned. You will also -definitely- want some end-stop switches to shut power off to the steering system when end-of-travel has been reached (I didn't do that on my first steering setup, and ended up breaking teeth off of the metal gears in the gearmotor I was using).

Good luck!

:slight_smile:

I am going to use a Power Wheels,but I didn't know the name for it

You may want to provide a link to the specific unit you have so everyone can ge t a better idea of what you are working with.

I want to use a 9 volt battery to enable a connection between a car battery and a motor.

Depending on the motor size, a logic level MOSFET and a couple of resistors might make this happen.

The below link might give you some simple ideas of web enabling your bot.

http://www.lynxmotion.net/viewtopic.php?f=20&t=6343

zoomkat:

I am going to use a Power Wheels,but I didn't know the name for it

You may want to provide a link to the specific unit you have so everyone can ge t a better idea of what you are working with.

The best way to check this is to find the fuse or resetable circuit-breaker for the vehicle (generally near the battery), and read its value; if it is original (and hasn't been replaced), that's going to be what the manufacturer rated things at, and it would probably be best to use that as the value.

Otherwise the OP will have to remove the gearboxes/motors from the vehicle - not an easy task since you have to remove the cap-nuts (then get replacements, or set up a cotter-pin arrangement or something else) from the axle. Then maybe you can read the make/model of the motor. Many of the 12 VDC Power Wheels vehicles use a pair of large 540-type brushed DC motors from Mabuchi IIRC...

If all you have is the model of the Power Wheels - then it takes a lot of research on the Modified Power Wheels forum and elsewhere to find such information - if it can be found at all (the information isn't published otherwise; heck, it's a gray-market affair just to get replacement motor/gearboxes).

@OP - Not to put too fine a point on this...... have you made an LED blink [without using delay] yet?

Otherwise the OP will have to remove the gearboxes/motors from the vehicle - not an easy task since you have... (snip!)

Way too much hanger flying! :slight_smile: If the riding toy already has a foward/reverse switch, it probably can be rigged to be operated via a cheap servo. The stearing linkage might be actuted via a large heavy duty servo when the normal stearing wheel linkage is disconnected. I've got a $49 walmart riding toy to tinker with and to get started just actuate the same controls a 3 year old would use when riding the toy.

zoomkat:

Otherwise the OP will have to remove the gearboxes/motors from the vehicle - not an easy task since you have... (snip!)

Way too much hanger flying! :slight_smile:

Hanger flying? Have you even looked at what I've been working on (slowly, I admit - summer in Phoenix takes it out of me)?

zoomkat:
If the riding toy already has a foward/reverse switch, it probably can be rigged to be operated via a cheap servo.

Well - I suppose you could, if you only wanted a single speed (slow or fast) on the 12 volt models; the speed is set by a combo switch that looks like a "shifter"; I suppose you could actuate that with a servo too, though. Not nearly as fun, though, as taking direct control of the motors.

zoomkat:
The stearing linkage might be actuted via a large heavy duty servo when the normal stearing wheel linkage is disconnected.

Yeah - I've seen that done; I've also seen people gut a regular servo, use the h-bridge outputs of it to drive a larger h-bridge that actuates a larger gear motor, then use a linkage from the steering bar to a control horn on the gutter servo that turns the remaining potentiometer. Large geared servos aren't cheap, though; gutting a servo and hacking it in such a manner is cheaper.

Many options available. I'm taking the route of "brute force" with the linear actuator - I figure if I get to the point of using a real ATV chassis, I can just transfer the actuator over, and it would still have plenty of power to handle the larger wheels and weight. There's also the fact that I intend to replace the wheels on my PowerWheels H2 with 10 inch pneumatic knobby garden tires (better traction, which will also take more power to turn), plus I am planning on a maximum weight capacity of 150-200 lbs (there's going to be an on-board PC plus extra batteries).

A geared servo would likely bust on something like that, especially in the dirt, on grass, going up and down hills and such...not worth the expense.

zoomkat:
I've got a $49 walmart riding toy to tinker with and to get started just actuate the same controls a 3 year old would use when riding the toy.

To each their own; I'm looking for something more robust - I'm not looking at this project as a robot built from a toy, but rather a prototype to learn from to eventually apply the knowledge gained to a larger and more capable off-road vehicle (hey, maybe I'll outfit my 79 full-size Bronco - cheaper than buying a smaller ORV).

:smiley: