PDA

View Full Version : [Question(s)] Servo control using FSRs



heat
12-26-2008, 04:54 PM
First post to this forum. Hope all of you are having a great holiday.


If you've seen the videos on Phidget's site [ http://www.trossenrobotics.com/store/p/3221-1-5-Inch-Force-Sensing-Resistor-FSR-.aspx ], picture pressing down on a FSR and using that output to control the RPM of a brushless electric motor (squeeze - rpm increases... release - rpm decreases). That's my current objective... to control a BLDC motor's RPM by squeezing "some source" (a handle, foam ball, foam shape, gel blob, etc.). I want to solve the schematic and build the required circuit, or determine what I need and buy the existing technology to build the prototype.

So I'm looking for some help using FSRs as the variable input to the elcetronic speed control (ESC) required for brushless DC motors (same input as required to control a servo). I'm developing an application that would use the output of a single FSR (either the .5" or the 1.5" FlexiForce) to provide the variable input to the ESC to control motor rpm. More specifically, I'm looking for a simple solution to convert the output of an FSR to a pulse-modulated wave signal required (1.0-2.0mS at ~50hz).

The FlexiForce sensor users manual has a depiction of a force-to-voltage circuit, but the output is an analog signal. How could I build a force-to-voltage circuit whose output is a PMW (as stated above) where the variable resistance of the FSR controls the pulsewidth of the output signal? If that's not feasible, how could I turn the variable analog output of FlexiForce's Op Amp (MC34071) into the required PMW output to control the servo?

Anyone... Bueller? Looking forward to hearing your ideas

Adrenalynn
12-26-2008, 05:31 PM
Microcontroller.

Trivial with any decent microcontroller - just about any AVR will do the job, as will just about any real PIC.

I'm doing something not too dissimilar on a project I've posted here - scaling the output from potentiometers and a flex resistor, sending it over wireless to a servo controller, and controlling servos. You could do the same thing without the wireless -> servo-controller stage. An Arduino would make it trivially simple. Read the analog in, output to a servo.

robologist
12-27-2008, 01:50 AM
Another possibility would be a 555 based circuit. There are various ones shown on the net, a Google search for "555 servo" can show many. One possible I saw was here :
http://www.slewin.clara.net/elec/ecl.htm that appeared to have a 47k potentiometer as a variable resistance to change the circuit output. The FSR data shows something in that range, maybe acting as a 50k or less variable resistor.

This type of solution would probably take a lot of tweaking to get the exact component values, and might not operate as hoped as the FSR response appears logarithmic rather than linear. It would probably be easiest, to go with a microcontroller based solution as Adrenalynn has suggested, as all the parameters can then be tweaked more easily in software.

Adrenalynn
12-27-2008, 01:54 AM
Boy - that's oldskool. :) Yeah, you could do it that way, like you say - lots of tweaking.

But these days, you can get a small ATTiny for the same price (or less) than a 555... (of course, add the programmer's cost on there if that's the only thing you ever plan on programming, then it gets kinda pricey. ;) )

heat
12-27-2008, 01:58 PM
Great suggestions. Being new to this forum and to electronics in general, I'll take all the advise I can get. I had alot of formal electronics theory and application as a comm/nav troop in the USAF years ago, so taking alot of time now to blow the dust off and becoming familiar with the new technology.

Robologist... I had looked at using a 555 but wasn't convinced it was the cleanest solution. It had a familiarity factor that made me feel comfortable using that type of technology, but I'm willing to put in the time, learn something new, and dive into the microcontroller solution. I have zeee-rrrro experience using them so this is going to be a learning experience.

I'll do some more homework on microprocessors and try to figure out where to start. As I was researching last night, it seemed that if I used a microprocessor I wouldn't need the electronic speed control to run the brushless dc motor. If true, that would reduce weight, space, and cost. Without the ESC, the circuit would go from the FSR, thru an amplifier circuit (or could I go directly into the microprocessor), thru the microprocessor, and into the motor.

Adrenalynn, I'll study the ATTiny and to get familiar with it... thanks for the suggestion. Any crumbs you can throw my way are much appreciated... like clues to the puzzle. Thanks guys

robologist
12-27-2008, 02:18 PM
For motors of any size at all, there must be some type of power go-between from the micro sending signals. That can be the ESCs, or other types of signalled h-bridges, or it could be the micro driving an h-bridge directly. Microcontrollers of any type generally can only sink or source a few milliamps per pin. Small "salt-shaker" motors can start requiring a stall current (at start-up) of 100s of milliamps on up into the Amp range, easily enough to fry a micro pin trying to drive one.

People will implement this interface in any number of ways, from a micro programmed to generate the pulse signal that another micro on an ESC reads to drive it's on-board drive transistors. (ESCs can have micros or analog ciruictry to "read" the incoming servo pulse and turn it to a drive for the motor.) Other motor drivers operate off serial commands. My personal choice is generally to have my micro directly drive an h-bridge of some type, whether a monolithic like a LMD18200 chip, or a built up discrete FET h-bridge.

It's usually best to look at the motor charecteristics like voltage and stall current, then select an h-bridge or otor controller that can handle it. And then tie that to a micro that can read the FSRs and be programmed to generate the appropriate drive signals.

robologist
12-27-2008, 02:22 PM
Opps, just re-read and saw brushless, you may need 3 half-h's with a micro delivering 6 PWMs if you want to get away from the ESC idea. Could be tricky, might be easier to simply generate the drive signal for the brushless ESC.

heat
12-27-2008, 02:32 PM
Excellent Robologist... That makes sense, and I'll keep working on a solution along those lines. It also makes sense to have an esc in the circuit for a solid connection for the battery. Initially I'm going with lead acid gel cells until I figure out how much power I need (considering desired run time, weight, and cost) and then substitute in some LiPos to get the job done.

Thanks again for your info and suggestions.

heat
01-04-2009, 10:23 PM
Andrenalynn... et al, waaaay to new to this type of technology and somewhat intimidated by the operational knowledge of THIS crowd to know anything about Arduinos and how to make them work in this application. I can fly jets for a living :veryhappy:, but I know when I'm out of my comfort zone :eek:

But I think microcontrollers are the way to go here... I built a test circuit on LTspice IV using a 555 and although I got a 5ms pulse to come out, I don't know where to start to t-shoot the circuit to make it work with an ESC. I think I'd have better results learning how to program a PIC than tweaking values in varous components.

If any of you could find the time and desire to step me through this process to a working solution, I'd have a the part I need and you'd have the satisfaction of knowing you instructed a newbie in getting the job done. I know this is asking a lot even from this group of experts, but Iím willing to put in the time, $$, and effort to make this project work. Could make for a great story for the next beginner. Maybe I could exchange some flying knowledge for some electronics assistance... aaaahhh

Thanks for reading...

Paul

Adrenalynn
01-05-2009, 02:36 AM
Oh sure, I'm sure we can knock something out. Anything more specific? How large a motors? [Current draw]
I assume the control will be wireless from the ball to the device that has the motors (ideally), right?
What kinda budget are you wanting to stay inside of? Any other wants and dreams that would help us properly size the microcontroller?

If I knock something out on paper, I'd want to work with the AVR family of microcontrollers with a servo controller on the device side feeding a motor controller - prebuilt stuff on that side. Either that, or a serial motor controller to another microcontroller - but it's tough to find an ESC that talks serial for brushless which is part of your spec. Most serial robotics is done brushed...

How fresh are your soldering skills?

I think a basic block design would go something like pressure sensor -> voltage divider -> op-amp -> microcontroller -> xbee wireless ~air link~ -> xbee wireless -> servo controller (or another mcu) -> motor controller -> motor(s). If that sounds like where you're hoping to go, I can knock something together on paper tomorrow sometime with some code, you could have it built a day after you get your parts.

Parts estimate for you to build it is < $150 out to door minus motors assuming fairly small brushless motors and that you have no parts. I'll put it together with leftover junk in the lab here at home. ;)

heat
01-05-2009, 03:56 AM
Here's the motor (http://h1071307.hobbyshopnow.com/products/description.asp?prod=EFLM4160A) I've identified for the project. This ESC (http://www.castlecreations.com/products/phoenix-125.html) was recommended for the expected size motor I intend to use for the prototype. I know itís big, but Iíd rather over-motor the prototype and work my way down to operational requirements than burn something up with too much load. The mass it's moving will be tested at 100lbs (anticipated max useful load) to be accellerated to 5mph in 2 seconds (is a 2 second soft start even possible?) then sustain 5mph until stopping. The actual motor size will most certainly change after the prototype is finished and field testing progresses. Battery power will ultimately be supplied by LiPos. For cost purposes, Iíll do initial testing with lead acid gel cells to determine exact power requirements, then determine the equivalent amount of LiPo required. Hardware decisions, mounting options, fit, form, and function characteristics will all be addressed after bench testing the electrical components and building the prototype.

I know you said you were working on a wireless project, but this one will be wired. From the FSR down to the motor. Wireless would be cool, but not for this application.

Budget: less is better, no waste and high efficiency, but not afraid of dropping a few bucks on the prototype to polish up the chances of a great final product.

I may have blown it on the motor selection though. The size is great with lots of power, but the RPMs are way higher than I need for the project. Something more around 1000rpm or so would be fine. Due to weight and space constraints, I'd like to initially avoid gear-reductions and stay on a direct-drive gameplan. I plan on running an axle through the motor (replacing the stock shaft or connecting to it) to drive wheels on both ends of the shaft. Drive design is not a major show-stopper at this time.... but not getting the right motor and solid control electronics is.

Soldering skills were good back in the day but haven't been tasked in awhile. Need to get some good equipment and burn some stuff up before getting down to business.

I think we're both talking apples here, but what I have is the Force sensor -> voltage divider -> op-amp -> microcontroller -> motor controller (ESC) -> motor. Using gel cells initially until power requirements are known, then replacing them with an equivalent amount of LiPo.

The motor/esc combo (as noted above) will be a little pricey unless a better choice (rpm) can be found. That doesn't bug me right now... the electronic solution to this project does. The smarter I get along the way should help to beat the ugly out of the initial inefficiencies and get this thing ready to field test :veryhappy:

Adrenalynn
01-05-2009, 05:30 AM
Ok - if it's wired through, no problem. That cuts a good half to 3/4 out of my price estimate and simplified things substantially.

I don't see torque on that spec-sheet. Did I miss it? I might have - I'm sleepy. ;) Are you sure it will handle your load ungeared?

Doesn't matter much from the "hard part" perspective - the microcontroller drives your motor controller with PWM. It's the motor controller's job to worry about carrying the current to the motor, whatever that may be. Ideally it should be swapable at will. Whacking together a circuit and knocking out the control code is what we'll focus on from my perspective. More later! :)

heat
01-05-2009, 03:03 PM
No, you didn't miss it, the torque spec is not on the sheet. I called this morning but got the shrug on the phone. This motor is probably way bigger than I need, but I don't mind over-engineering the prototype. My assumption is that once the components are bench checked and operating, I could reduce the motor size using the same circuitry. The only modification I can see would be maybe reducing the voltage to a smaller motor so as not to smoke it. Sound correct?

Thanks for the help

Adrenalynn
01-05-2009, 03:17 PM
I haven't seen what you're planning to move. Wheel size? Without knowing what that motor generates in torque, I'd be concerned. Motors that size are generally sized for 15-18lb cars, not 100lb robots.

heat
01-05-2009, 03:26 PM
Good point. I'll get the torque answer to these motors and make sure the numbers work.

Adrenalynn
01-05-2009, 03:32 PM
They're saying "for models needing up to 2700 watts" - if thats working watts, that'd be about 3.5HP would would be incredibly over-spec'd. I've spec'd 1.1HP for my "pocket Segway", to give you an idea. 275lb capacity on 4" wheels.

(There's a difference between "work" and "current draw", so "watts" is always an annoying spec. We still don't know torque either... But 1 watt = 0.00134102209

If it's "electrical horsepower", 1HP = 746 Watts. P[hp] = ([T/(ft*lbf)][w/(r/min)]) / 5252

With a "little" work, we could derive the torque from there. Where "little" is defined as "more than I can give it at the moment" ... ;)