Mechanical Bull for Dolls

by PeckLauros in Circuits > Arduino

8297 Views, 30 Favorites, 0 Comments

Mechanical Bull for Dolls

DSC_1282.JPG
DSC_1281.JPG
DSC_1276.JPG
This mechanical bull was created as a weekend hobby. The creation process was simple and did not last more than two hours. The materials I already had at home. For those who wish to make an equal, will be a good opportunity to recycle materials and learn how to use the joystick shield with Arduino. Hope you enjoy.

Materials:

- A volunteer (doll)
- Pieces of cardboard
- An empty soft drink
- Two servomotors
- A Arduino Uno
- A Joystic Shield
- Arms for the servants
- Three screws
- nuts and a washers
- Hot glue, scissors, knife, etc. ...

Creating the Model

DSC_1190.JPG
DSC_1191.JPG
DSC_1192.JPG
DSC_1193.JPG
DSC_1195.JPG
DSC_1197.JPG
DSC_1198.JPG
DSC_1199.JPG
DSC_1200.JPG
I used a can of soda as a model for the doll bull riding. After that, I drew on the cardboard, cut out the template and glued using hot glue.

Joining the Servomotors

DSC_1201.JPG
DSC_1202.JPG
DSC_1203.JPG
DSC_1204.JPG
DSC_1206.JPG
DSC_1207.JPG
DSC_1209.JPG
DSC_1210.JPG
DSC_1214.JPG
DSC_1216.JPG
The servo motors are fixed on each other as shown, using a piece of cardboard to position them correctly and hot glue.

Attaching the Mount

DSC_1221.JPG
DSC_1223.JPG
DSC_1224.JPG
DSC_1222.JPG
DSC_1224.JPG
DSC_1225.JPG
DSC_1228.JPG
DSC_1230.JPG
DSC_1233.JPG
DSC_1231.JPG
DSC_1237.JPG
Joining small pieces of cardboard with a hole in the center, was made a bracket to hold the mount in servants.

Joining the Servants and the Mount

DSC_1253.JPG
DSC_1254.JPG
DSC_1252.JPG
DSC_1239.JPG
DSC_1241.JPG
DSC_1243.JPG
DSC_1248.JPG
DSC_1249.JPG
DSC_1251.JPG
DSC_1255.JPG
DSC_1256.JPG
DSC_1257.JPG
I used a bolt, a nut and washer to secure the mount in servants, according to the figure.
Also used a piece to make the linking of movement between the servo arm and mount. This part should be a little slack for not hang with the movements.

Fixing on a Base

DSC_1260.JPG
DSC_1259.JPG
DSC_1261.JPG
DSC_1264.JPG
DSC_1266.JPG
DSC_1267.JPG
The base was made ​​with a simple cardboard cutout. I made the design of servo arm that controls the base, cut out and pasted it on cardboard with hot glue.
I used a part of the soda can as a handle to hold the puppets up on it.

Assembling and Programming the Controller

DSC_1269.JPG
DSC_1270.JPG
DSC_1273.JPG
DSC_1272.JPG
DSC_1274.JPG
DSC_1275.JPG
Software:
#include <Servo.h>  // incluindo a biblioteca dos servos

Servo SRx;

Servo SRy;

const int VRx = A0;

const int VRy = A1;

int sensorVRx = 0;      

int sensorVRy = 0;

int outputVRx = 0;

int outputVRy = 0;

long tempo_anterior= 0;

long intervalo= 100; //milisegundos

unsigned long tempo_atual;

void setup()

{
  Serial.begin(9600);

  SRx.attach(9);

  SRy.attach(10);

}

void loop()

{

  tempo_atual = millis();// o tempo atual é igual ao tempo de funcionamento do uC  

  sensorVRx   = analogRead(VRx);  

  sensorVRy   = analogRead(VRy);  

  outputVRx   = map(sensorVRx, 0, 1023, 0, 180);

  outputVRy   = map(sensorVRy, 0, 1023, 0, 180);  
    
  if(tempo_atual - tempo_anterior > intervalo)// se o tempo atual menos o tempo anterior for maior que o intervalo com que eu quero fazer minha acao

    {

      tempo_anterior = tempo_atual;//tempo anterior recebe o tempo atual

      Serial.print(outputVRx); 

      Serial.print(",");

      Serial.print(outputVRy);

      Serial.print(",");

      Serial.println("");

    }

 

  SRx.write(outputVRx);

  SRy.write(outputVRy);

  delay(2);                    

}

Running: