Pages: [1]   Go Down
Author Topic: Controlling a Furby DC motor  (Read 1203 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, i'm new to arduino and i'm trying to control the DC motor of a Furby, so i can send it commands to sleep / act surprised. I've read that the motor controls the eyes, the mouth and the ears all at once so moving every part individually is not going to work. Right now all i can do is make everything move in a constant loop. I can make it stop too but then it starts off from where it stopped before….

http://f.cl.ly/items/2e3G0P0H140x2N3a200X/IMG_0126.MOV

I did this by using the following code:
Code:
int motorPin = 9;

void setup() {
  pinMode(motorPin, OUTPUT);
  Serial.print("setup");
  Serial.begin(9600);
}

void loop() {
    for(int i= 0; i < 255; i++) {
        analogWrite(motorPin, i);
        Serial.print(i);
        delay(5);
    }
}

At first i thought that the value written to the pin with analogWrite() controlled the movement, so that when i would change it from 100 to 130 it would correspond to a movement that for example looks like the Furby is going to sleep(instead of changing the speed).

Is there a way to say at what moment in the loop of movements it should start or stop?

Thanx for helping!
« Last Edit: December 09, 2012, 06:26:15 am by YaHe » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I expect the Furby has internal switches or optical interrupters to provide position feedback.  You could tape into them to get the same feedback the Furby's internal processor has.

http://mechatronics.mech.northwestern.edu/design_ref/other/Furby_schematics.html
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanx for the help, johnwasser!
Apparently position feedback is provided by the part that i've selected here http://cl.ly/image/0z0m1E2P2Q2t
I should be able to get the data from the yellow and green wires on the side of the Furby!
Logged

Pages: [1]   Go Up
Jump to: