Arduino Forum

Using Arduino => Motors, Mechanics, Power and CNC => Topic started by: skumar309 on Nov 10, 2015, 02:13 am

Title: FSR + Servo Motor = IDK!!!!!
Post by: skumar309 on Nov 10, 2015, 02:13 am
Hi there, I am a beginner and am trying to control a servo using an FSR, however i don't know the code  nor how to build it.

P.S is there any way to code it so that one FSR will make it go CW and making it go CCW.

Thanks!
Title: Re: FSR + Servo Motor = IDK!!!!!
Post by: jremington on Nov 10, 2015, 02:36 am
Start with the servo example (https://www.arduino.cc/en/Reference/Servo), but always use a separate power supply for the servo (a 4 AA battery pack works well). Be sure to connect the servo power supply ground to the Arduino ground.

Once you understand how the servo is controlled, find some example code and wiring suggestions for the FSR, and learn how that works. Then it will be easy to put the two together.
Title: Re: FSR + Servo Motor = IDK!!!!!
Post by: OldSteve on Nov 10, 2015, 04:00 am
What's an FSR? It's OK, I found out - Force Sensitive Resistor.
Title: Re: FSR + Servo Motor = IDK!!!!!
Post by: DuaneDegn on Nov 10, 2015, 04:30 am
What's an FSR? It's OK, I found out - Force Sensitive Resistor.
Thanks. I was wondering the same thing.
is there any way to code it so that one FSR will make it go CW and making it go CCW.
If I understand what you're asking, yes.

The example servo\knob will take you most of the way there.

I'm pretty sure you use the FSR as one half of a voltage divider. The output of the divider is read with an analog input very much like the servo\knob example reads the voltage from the voltage divider created by the pot.
Title: Re: FSR + Servo Motor = IDK!!!!!
Post by: zoomkat on Nov 10, 2015, 07:51 pm
Expect the FSR to have poor resolution output which may prove poor for servo control.