Go Down

Topic: total newb, theoretically simple question about synchronizing motor to input (Read 1 time) previous topic - next topic

I'm looking to build a remote steering system in a car, not terribly unlike the standard full size remote control cars you see running all over town nowadays....

sadly, i'm more of a physical control guy than i am a logic control guy.

instead of a remote control car, tho, i'm just trying to electrically replicate the steering shaft the car would have come with originally.

in my mind, i can put a 4 turn potentiometer on the steering wheel, and another on the steering box (it's just over 3 turns lock to lock). with an appropriately sized electric motor and some gearing, i assume Arduino can compare the wheel pot to the rack pot and power the motor in the proper direction to have the rack mimic the wheel.

(i understand the steering will lose all feel, and there will be little more than the pot to create a positive stop at the wheel, but for my purposes, this is fine)

i'm sure this is foolishly simple, and possibly even answered a half dozen times already, but searching turned up little in practical application (likely because this is nearly obvious to those who regularly dabble in this world). I find a lot of "we did this!" in the RC car world, but much less "...and this is how".


any help, or even a decent nudge in the proper direction would be greatly appreciated.

thanks
justin
"Racing is an investment in life. You trade money for awesome."

MarkT

Well the correct keywords are "continuous rotation servo".  You'd really want to use an encoder rather than a 10-turn pot probably (4-turn pot
doesn't exist to my knowledge). 

In theory building your own servo isn't too daunting, but you will need to get position sensing working, motor
driver circuit, then use a feedback loop in software (PID control loop is good) to close the loop.

Depending on how big this needs to be you may find a ready-built servo that suits your needs and budget...
[ I won't respond to messages, use the forum please ]

thanks! i'll keep digging.

it's a normal car with normal (unassisted) steering loads, and "normal" is about 4 lbs at the edge of the wheel..making it about 50lbs at the edge of the input shaft.

i'm still having trouble translating servo torques to multirotation functions, so i was looking at the simpler (to me) version of a window regulator motor running a chain.
"Racing is an investment in life. You trade money for awesome."

0AlphaOmega

Gearing is a good idea. Yep will find an encoder to be easier than a pot in some ways. You could gear down from the wheel to the pot and have a normal linear pot. A single turn pot will make this easier than using an encoder to find "centre".
Then again, if you are using remote control, all you want to do is turn the wheel left or right varying amounts. You could have a simple "run motor left or right" (digital) and you will be part of the feedback loop, knowing when to stop or reverse the wheel. So Two buttons: turn left or right (to a stop so you don't over-run the motor) (auto return to centre would be a nice third button) and drop the pot/encoder
For whom does the clock pulse? It pulses for you!

my fear of a single (or less) turn pot is resolution. since this is steering, it's naturally analog. too grainy of digital resolution becomes steps at the tires, and that becomes problematic (especially with the loss of feel/feedback)

in effect, turning 1080 degrees into 270 makes the jumps too large to safely jump, unless the pot resolution is way better than i think it is.

the same problem exists with pushbuttons (or momentary on-off-on toggles) for left/right/center. i'll be driving the car like a normal car, so rotating the wheel a handful of degrees and waiting for full lock to occur is unnatural and counter steering to dial back the steering angle works better for ken block than it does for me.

going the other way (1080 degrees into 3600, or just using the 540 or 1080 on either side of center) more finely resolves the steps into near-enough to analog for this function.

again, i know squat about how the logic actually works, only what my mind says makes the most sense.

if the wheel encoder is instantly at +30*, the logic should see the rack encoder is at 0* and power the drive so that the rack approaches and achieves +30*. the speed of the logic should allow the response to be near instantaneous, and since there is no way to jump over steps, i shouldn't have to worry about the motor hunting/chasing the target if the resolution is fine enough.

i've found a few encoders that will likely work for my needs, some that even look to fit nicely over the input and output shafts. 

thanks for the insight, tho...i'm know i'm still floating adrift in this ocean, and if i can get the pieces sorted...i still have to write the logic.
"Racing is an investment in life. You trade money for awesome."

Looking at pots more closely, is there a compare function in Arduino?

i run 5 volts to both pots so that resistance is decreased as the pot is turned clockwise. when the wheel is turned clockwise, pot A (at the wheel) is a higher voltage than pot B (at the rack) the logic powers the motor at the rack clockwise, to seek balance between the pots. when pot A is turned back to center (counter clockwise), pot A is lower voltage than pot B and the logic turns the motor CCW to seek balance.

basically:
if Va>Vb, then 1=gnd 2=12volt
if Va<Vb, then 1=12volt 2=gnd

am i anywhere near the right track?
"Racing is an investment in life. You trade money for awesome."

0AlphaOmega

What you describe is effectively a servo.

When you drive, you don't know the position of the rack (some cars have mechanical or electronic systems for adjusting the applied movement depending upon speed and are not 1:1), you turn the wheel to achieve the required radius, as I said, you are part of the feedback system, all you are doing is turning the wheel remotely.

If an RC car travelling at ridiculously high scale speeds is able to cope using an RC servo (using a single turn pot), why can't you just scale it up?

Turning the wheel 15deg on a RC car or a real one, only really differers in the scale of power required.


For whom does the clock pulse? It pulses for you!


What you describe is effectively a servo.


ok...i'm following so far. the servo has a built in pot and it's mimicking the steering wheel pot on the on the controller.

Quote
When you drive, you don't know the position of the rack (some cars have mechanical or electronic systems for adjusting the applied movement depending upon speed and are not 1:1), you turn the wheel to achieve the required radius, as I said, you are part of the feedback system, all you are doing is turning the wheel remotely.


I do need to be able to reference "center" visually. in this gear box, there is no assist, no mechanical trickery beyond gear ratios. when not in motion, i need to know that straight per the wheel is straight per the box.

Quote
If an RC car travelling at ridiculously high scale speeds is able to cope using an RC servo (using a single turn pot), why can't you just scale it up?


i didn't think the resolution on a pot would be fine enough to handle the reduction of 1080 degrees of steering wheel to 270 degrees of pot....

Quote
Turning the wheel 15deg on a RC car or a real one, only really differers in the scale of power required.


that's where i think my problem lies. I'm not turning either end 15 degrees.

1080 compressed to 270 is 4 degrees in real life = 1 degree virtually. at the other end, that 1 degree scales up to a 4-degrees-are-still-accurate window. i guess, if i find a precision enough 3/4 turn pot, i can get the compressed steps into a quarter of a degree (or less) narrowing the output window to 1 single degree.

just got off the phone with a guy from TR Electronics who was saying their "low resolution" magnetic based encoders are something like 4000 steps per revolution. since a normal pot is theoretically more analog than that, then a 3/4 pot might be more than enough for my purposes, despite what my brain wants to believe.
"Racing is an investment in life. You trade money for awesome."

kf2qd

The whole thing could be done with potentiometers. Multiturn pots at each end. What you would be making is just a bigger version of something similar to a standard hobby servo. Basically - at the steering wheel end you would be "creating" a refernce voltage that you would then compare to the voltage present at the gearbox end. and then itf the voltage is higher or lowere you use that to decide the direction and speed to turn the motor on the gearbox. The difference between the 2 is referred to as the "error voltage" This can be done with linear circuits or Analog to Digital circuits.

Using a couple of potentiometers is probably going to be much simpler than using encoders, as absolute encoders would be needed and they get expensive. A good multiturn pot would give good, repeatable feed back.

michinyon

They have done this a bunch of times on mythbusters,  so it can't be too hard.   The video is probably
on youtube.


0AlphaOmega

15deg was an example, you would gear your motor/servo pot so that full left on your stick/wheel represents full left lock etc.

Write to the May & the Hamster
http://www.topgear.com/uk/videos/radio-controlled
For whom does the clock pulse? It pulses for you!


They have done this a bunch of times on mythbusters,  so it can't be too hard.   The video is probably
on youtube.


there are a lot of people who have built full size rc cars, but they don't tend to get real deep on how they did it on the mechanical interface side.

it's one thing to run a servo with a small sweep, it's another to build a servo that can push a steering box thru three revolutions. not saying it can't be done, since it clearly has been...only that people rarely document it beyond saying "here it is".


Quote from: kf2qd

The whole thing could be done with potentiometers. Multiturn pots at each end. What you would be making is just a bigger version of something similar to a standard hobby servo. Basically - at the steering wheel end you would be "creating" a refernce voltage that you would then compare to the voltage present at the gearbox end. and then itf the voltage is higher or lowere you use that to decide the direction and speed to turn the motor on the gearbox. The difference between the 2 is referred to as the "error voltage" This can be done with linear circuits or Analog to Digital circuits.

Using a couple of potentiometers is probably going to be much simpler than using encoders, as absolute encoders would be needed and they get expensive. A good multiturn pot would give good, repeatable feed back.


that's the direction i'm leaning at the moment, unless TR comes back with a reasonably priced solution in a box.

i'm now trying to decide if i can do it without a processor. since i'm just comparing voltages and using the difference to flip a relay in a pure linear relationship, i might be able to take the logic out of it (at least until i decide to get really tricky with it..progressive steering rates or something similar).
"Racing is an investment in life. You trade money for awesome."

zoomkat

Servocity below has servo based gear boxes. With some creativity a rotating shaft can drive via belt or gear reduction to a 300 deg pot (or multi turn pot). Bottom are some DIY servo type setups using windshield wiper motors.

http://www.servocity.com/

http://www.youtube.com/results?search_query=wiper+servo&oq=wiper+servo&gs_l=youtube.3...8537.13781.0.15143.11.11.0.0.0.0.385.1816.0j10j0j1.11.0...0.0...1ac.1.tTKZgcfKa_I
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

Go Up