Go Down

Topic: Controlling a Furby DC motor (Read 1 time) previous topic - next topic

YaHe

Dec 09, 2012, 12:14 pm Last Edit: Dec 09, 2012, 12:26 pm by YaHe Reason: 1
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: [Select]

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!

johnwasser

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
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

YaHe

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!

Go Up