Animatronic hand

Hi everyone,
I’m building a robot hand that mimics a human hand. I’m using a simple glove with sewed in flex sensors on each finger and for the actual robot hand (to move the fingers) I’m using 5 servo motors TowerPro SG 90.
I also wrote a simple code for processing to keep track the gloves finger movement. Arduino UNO reads analog pins (where the flex sensors are connected) and moves the servos accordingly. Also sends the data to processing which then graphs the bending of each finger.
The servos are connected to an external power supply. The signal pins for the servos are all PWM pins on arduino UNO.
Now, everything works fine, except for a small detail. Looking at the graph, finger bending is smooth when the servos aren’t connected, but when I do connect them - small pulses appear (more of them as I attach more servos). This results in a twitching motion of the servo. Even if I attach a small diode instead of a servo the pulses still appear.
I don’t understand what is causing this and how to remove it. :S
I’ve attached two photos of the graphs for one finger:

  1. servos are attached to Arduino (not powered on, though)
  2. servos are not attached to Arduino
    The grounds are all connected.

sum1.jpg

sum2.jpg

What are you plotting there - is it the input from the flex sensors? I suggest you post a drawing / circuit diagram showing how the sensors and servos are connected and powered.

The flex sensor is connected in voltage divider circuit with a fixed resistor. the signal from there goes threw a simple RC filter and to the Analog pin of Arduino.
Here’s a drawing of how it looks. It’s my first drawing so bare with me. :smiley:
Imagine everything times 5 (for each finger).

I assume the black wire to your flex sensor actually goes to ground - in that case the circuit looks OK.

When you say the servo is 'not attached' to you mean the wires to it are disconnected, or is this a reference to Servo.attach()?

I suspect a power supply issue. You are powering the arduino and the servos off the same power bus, assuming the upper + bus is connected to the lower + bus.

Yes, the black wire from the flex sensor goes to the ground, sry about that.

When I say "not attached" I mean their signal wires (yellow) are not connected to Arduino. Everything else stays the same including the code.

The power for the arduino is via USB, and the power for the servos is a 2250mA, 5V source. Only the grounds are connected.