Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animatronic Eye v2 #25

Open
zuperninja opened this issue Aug 11, 2018 · 13 comments
Open

Animatronic Eye v2 #25

zuperninja opened this issue Aug 11, 2018 · 13 comments

Comments

@zuperninja
Copy link
Owner

zuperninja commented Aug 11, 2018

Context

Propose a new stage for a festival in vietnam based on https://zuperninja.github.io/blog/portfolio/quete-zome/

Object

Améliorer la constructiond e la dernière fois, notament de l'oeil, avec meilleur moteur et programation plutot que télécommande

Process

  1. Connaitre mieux les moteurs
  2. Imprimer un petit modèle d'oeil
@zuperninja
Copy link
Owner Author

zuperninja commented Aug 12, 2018

Connaitre mieux les moteurs en testant un stepper

Différence entre les steppers.

Pour apprendre la différence entre les moteurs, j'aime bien utiliser la technique de trier un tas d'objet. J'ai une caisse avec plein de stepper motor au fablab qui sont pas triées. Je vais donc les trier en fonction de ce que je pense être une ressemblance ou une différence. La forme, le nombre de wiring, de pôle, la taille etc.
Tom Sachs l'a très bien démontré dans l'une de ses vidéos, où il fait trier à un apprenant des vis.

Et après c'est plus facile de lire les docs de gens qui s'y connaissent en vrai pour réélement comprendre ce que l'on a observé.
https://learn.adafruit.com/all-about-stepper-motors/types-of-steppers

Matos

  • Breadboard
  • Stepper Motor Driver Carrier : https://www.pololu.com/product/1182
  • Arduino
  • Alimentation de téléphone portable
  • Alimentation
  • Capaciteur
  • Stepper motor
  • airpax s42m100S18

image

Assemblage

https://www.youtube.com/watch?v=5CmjB4WF5XA

Connecter les pins VDD et GND à la carte arduino pour fournir le courant nécessaire au driver.

Puis 1A et 1B à un coil du motor. Et 2A et 2B à l'autre coil du motor.

Comment savoir le quel est le quel ?

VMOT et GND à une alimentation pour le motor. Avec un "decoupling capacitor with at least 47 µF for protecting the driver board from voltage spikes."

@zuperninja
Copy link
Owner Author

Imprimer un petit modèle d'oeil, correspondant à celui que j'ai fait la dernière fois : https://www.thingiverse.com/thing:2846536

@zuperninja
Copy link
Owner Author

zuperninja commented Aug 21, 2018

Mouvement simple

👍 Comprendre le script de base du servo et jouer avec un peu. Source

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 50;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  for (pos =50; pos <= 80; pos += 1) { // goes from 50 degrees to 80 degrees
                                      // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(30);                       // waits 15ms for the servo to reach the position
  }
  for (pos = 80; pos >= 50; pos -= 1) { // goes from 80 degrees to 50 degrees in step of 1 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(5);                       // waits 15ms for the servo to reach the position
  }
}

👍 Rajouter une fonction pour attendre un instant avant de recommencer à bouger. Add randNumber et delay

#include <Servo.h>
long randNumber;

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position




void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  for (pos =0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
                                      // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(30);                       // waits 15ms for the servo to reach the position
  }
 randNumber = random(2000, 6000);        // generate each time a different time between 2s and 6s
  delay(randNumber);                    // waits before moving again
  
  for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees in step of 1 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(30);                       // waits 15ms for the servo to reach the position
  }
}

@zuperninja
Copy link
Owner Author

Changement de mode de mouvement

@zuperninja
Copy link
Owner Author

Mapping led light
processing + LX Studio + raspberry pi ?

@zuperninja
Copy link
Owner Author

Yeux du dragon avec gemma et neopixel

@zuperninja
Copy link
Owner Author

zuperninja commented Sep 17, 2018

@zuperninja
Copy link
Owner Author

zuperninja commented Oct 23, 2018

LED RGB Strip - Adressable

Sur le dragon j'ai besoin de 3 "lignes" lumineuses. Cad 3LEDs qui réagissent pareil au même moment. Ce qui me fait deux lignes de 17LEDs et une de 16LEDs.

En branchant directement la LED RDB strip sur l'arduino je n'ai aucun soucis pour tester mon code. En pratique, je brancherai le 5V sur une source d'alimentation externe.
Vert = data = Pin 9
Rouge = 5V
Blanc = GND

Pour tester, j'ai utiliser la librairie FastLED et l'exemple ColorPalette.

Light LED 3 by 3

Code arduino pour allumer 3led à la fois, puis passer aux 3autres leds, etc

    for(int dot = 0; dot < NUM_LEDS-2; dot++) { 
      leds[dot] = CRGB::Red; 
      leds[dot+1] = CRGB::Red;
      leds[dot+2] = CRGB::Red;
      FastLED.delay(33); 
      leds[dot] = CRGB::Black; 
      leds[dot+1] = CRGB::Black;
      leds[dot+2] = CRGB::Red;
    }

@nicolasdb
Copy link

Masta badge women in tech powaaaa

image

@nicolasdb
Copy link

sorry, c'est le seul meme que j'ai trouvé sur #womenintech
:)

@zuperninja
Copy link
Owner Author

hahahahah c'est triste que ça soit le seul meme !!!!

@nicolasdb
Copy link

nicolasdb commented Oct 24, 2018

oui, c'est pas terrible comme exemple.
Tu te débrouille bcp mieux, même en situation de jungle.

@zuperninja
Copy link
Owner Author

zuperninja commented Nov 19, 2018

Servo

  1. Calibrer les servo avec pulsemin et pulsemax
  2. Mapper les 3 servos

image

Servo + RGB LED

  1. Amener power pour servo driver et RDB LED strip
  2. Fusionner les deux codes
  3. Prier

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants