Wiki

Reso-nance numérique | Arts et cultures libres

Outils du site


projets:zohrawasnotborninaday:accueil

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
projets:zohrawasnotborninaday:accueil [2016/08/11 00:07]
resonance [Description]
projets:zohrawasnotborninaday:accueil [2016/09/19 17:37] (Version actuelle)
resonance [Dispositif technique]
Ligne 1: Ligne 1:
 ====== Al-Zohra n'est pas née en un jour ====== ====== Al-Zohra n'est pas née en un jour ======
   * Porteur du projet : [[user:lamirza|Randa Mirza]]   * Porteur du projet : [[user:lamirza|Randa Mirza]]
-  * Date : juin 2015 +  * Support électronique et programmation : [[user:jerome|Jérôme]] (reso-nance) 
-  * Licence : code libre ! image copyright RandaMirza +  * Date : juin 2015 - ... 
-  * Lien : www.randamirza.com+  * Licence : code libre ! image copyright Randa Mirza 
 +  * Lien : http://randamirza.com 
 + 
 + 
 +{{tag>mythologie photo arduino stepper}}
  
 ===== Description ===== ===== Description =====
 +Mythologie arabe préislamique
 +
 {{ :projets:zohrawasnotborninaday:venus-f2.jpg?600 |}} {{ :projets:zohrawasnotborninaday:venus-f2.jpg?600 |}}
  
Ligne 13: Ligne 19:
  
  
-===== Matériaux ===== +===== Scénario ===== 
-  * photo retroéclairé +{{:projets:zohrawasnotborninaday:venus-pictures-all.jpg?800|}} 
-  * arduino + 
-  * shield motorshield +===== Dispositif technique ===== 
-  * moteur pas pas +Suivant le scénario, la carte Arduino contrôle la luminosité d'une LED puissante avec un MOSfet et sa position verticale avec un moteur pas à pas.  
-  * ruban de leds (sert au retroéclairage+ 
-  * alimentation 12v +<WRAP center round info 60%> 
-  * led jaune (lamp dans le programme)+Avec le classique pilote de moteur L298, le moteur pas à pas faisait trop de bruit. Nous avons donc essayer une nouvelle solution avec le pilote SilentStepStick, basé sur le Trinamic TMC2100. Le résultat est tout à fait concluant. Voir notre page sur l'utilisation du [[materiel:silentstepstick:|SilentStepStick]]. 
 +</WRAP> 
 + 
 + 
 +Mise à jour (08/2016)  : 
 +  * Arduino UNO 
 +  * [[http://www.watterott.com/en/Arduino-FabScan-Shield|FabScan Shield]] (avant c'était le [[https://www.arduino.cc/en/Main/ArduinoMotorShieldR3|Arduino Motor Shield]]) 
 +  * [[http://www.watterott.com/en/SilentStepStick-TMC2100-5V-with-Pins|SilentStepStick 5V]] ({{:projets:zohrawasnotborninaday:silentstepstick_v12_5v.pdf|}}, {{:projets:zohrawasnotborninaday:tmc2100_datasheet.pdf|TrinamicTMC2100-StepperMotorDriver.pdf}}) avec une [[http://www.gotronic.fr/art-alimentation-rs100-24-20111.htm|alimentation 24V]] 
 +  * [[http://www.watterott.com/en/SilentStepStick-Protector|SilentStepStick Protector]]  
 +  * Moteur pas à pas [[http://openbuildspartstore.com/nema-17-stepper-motor/|OpenBuilds Nema 17]] ({{:projets:zohrawasnotborninaday:mt-1704hs168a-ts_reva.pdf|1704HS168A.pdf}}) 
 +  * Guidage linaire avec courroie [[http://openbuildspartstore.com|OpenBuilds]] 
 +  * [[http://boutique.semageek.com/fr/94-module-mosfet-tinkerkit-7640152110863.html|TinkerKit MOSFET]] pour contrôler la lumière 
 + 
 +{{:projets:zohrawasnotborninaday:dsc_6461.jpg?600|}} 
 + 
 + 
 +Connections Arduino :  
 +  * SilentStepStick (pins 2,3,4
 +  * Mosfet (pin 11, 5V, GND) 
 + 
 +{{:projets:zohrawasnotborninaday:2015-06-16-19.08.45.jpg?600|}} 
 + 
 +{{:projets:zohrawasnotborninaday:mosfet.png?400|}} 
 + 
 +===== Code Arduino ===== 
 +  * Fichier : {{:projets:zohrawasnotborninaday:venus_silentstickdriver.zip|}} 
 + 
 + 
 +++++ Nouveau code Arduino (08/2016) | 
 +<code cpp> 
 +/* 
 + * Al-Zohra n'est pas née en un jour  
 + * Zohra was not born in a day 
 + *  
 + * Artistic installation from Randa Mirza 
 + *  
 + * Code : Jérôme Abel 
 + * Date : 09/08/2016 
 + * License : GNU/GPL v3 
 + * Website : http://reso-nance.org/wiki/projets/zohrawasnotborninaday/accueil 
 + *  
 + * Electronic setup :  
 +     + Arduino UNO  
 +     + FabScan Shield 
 +     + SilentStepStick 5V (Trinamic TMC2100 Stepper Motor Driver) with 20V-28V power supply 
 +     + SilentStepStick Protector  
 +     + Motor stepper Nema 17 (1704HS168A) 
 +     + TinkerKit MOSFET (for the light) 
 +      
 + * Wiring setup :  
 + * SilentStepStick (pins 2,3,4) 
 + * Mosfet (pin 11, 5V, GND) 
 + *  
 + * Main principle :  
 + * An Arduino controls a light with a mosfet and a motor stepper with a quiet driver (for inside installation) 
 + *  
 + */ 
 + 
 +// Pins Stepper Driver (TMC2100 SilentStick 5V) 
 +#define EN_PIN   2 
 +#define STEP_PIN 3 
 +#define DIR_PIN 
 +#define MS_PIN   A5 // HIGH for 16 microstepping, LOW for no microstepping 
 +#define STEPS 200 // 200 pas pour un tour 
 +#define MICROSTEPS 16 // microstepping 1/16 
 + 
 +// Pins Mosfets Lamp 
 +#define LAMP_PIN 11 
 + 
 +// ---------------- Variables du scénario ---------------- // 
 +int wait = 29000; // temps d'attente de départ 
 + 
 +int lamp_fadein = 29000; // temps de fade in 
 +int lamp_intensity = 200; // intensité de la lampe (entre 0 et 255) 
 +int lamp_fadeout = 5000; // temps de fade out 
 + 
 +int motor_turns = 5 ;// nombre de tours en montéé 
 +int motor_turns_ms = 20000; // temps par tour en millisecondes 
 +int motor_break = 7000 ; // temps d'attente en position haute 
 + 
 +//---------------- Démarrage ---------------- // 
 +void setup() { 
 + 
 +  // Setup Stepper Driver 
 +  pinMode(EN_PIN, OUTPUT); 
 +  pinMode(DIR_PIN, OUTPUT); 
 +  pinMode(STEP_PIN, OUTPUT); 
 +  //pinMode(MS_PIN, OUTPUT);   
 +   
 +  digitalWrite(EN_PIN, HIGH); // Désactiver le driver 
 +  digitalWrite(DIR_PIN, LOW); // LOW or HIGH 
 +  digitalWrite(STEP_PIN, LOW); 
 +  //digitalWrite(MS_PIN, LOW); // No microstepping 
 + 
 +  // Allumer la lampe au démarrage 
 +  pinMode(LAMP_PIN, OUTPUT); 
 +  analogWrite(LAMP_PIN, 0); 
 + 
 +  delay(2000); // Délai de sécurité 
 +  digitalWrite(EN_PIN, LOW); // Activer le driver 
 +
 + 
 + 
 +//---------------- Boucle du scénario - programme ---------------- // 
 + 
 +void loop(
 +  delay(wait); 
 +  fadein(LAMP_PIN, lamp_intensity, lamp_fadein); // pin (lamp), intensity max, temps total 
 +  motorON(); 
 +  motorGo(motor_turns, motor_turns_ms); // nombre de tours,  millisecondes par tour (minimum 7000 !) 
 +  delay(motor_break); 
 +  fadeout(LAMP_PIN, lamp_intensity, lamp_fadeout); // pin (lamp), intensity max, temps total 
 +  motorOFF(); 
 +
 + 
 + 
 +//---------------- Fonctions utiles ---------------- // 
 + 
 +void motorON() { 
 +   digitalWrite(EN_PIN, LOW);  
 +
 + 
 +void motorOFF() { 
 +   digitalWrite(EN_PIN, HIGH);  
 +
 + 
 +void motorGo(int _tour, int _tourms){ 
 +  
 +  // Delai entre chaque pas (vitesse en millisecondes) 
 +  int _delay = (int) (_tourms / (STEPS * MICROSTEPS) ) * 1000 / 2; 
 + 
 +  // Exécuter le nombre de tours 
 +  for(int x = 0; x < (_tour * STEPS * MICROSTEPS); x++) { 
 +    digitalWrite(STEP_PIN,LOW);  
 +    delayMicroseconds(_delay);  
 +    digitalWrite(STEP_PIN,HIGH);  
 +    delayMicroseconds(_delay);  
 +  } 
 +
 + 
 +void fadeout (int _pin, int _intensity, int _time){ 
 +  int new_time = (int) (_time / 255); 
 +  for (int i = 0; i <= 255; i++)  { 
 +    int lampBright = 255 - i; 
 +    analogWrite(_pin, map(lampBright, 0, 255, 0, _intensity)); 
 +    delay(new_time); 
 +  } 
 +
 + 
 +void fadein (int _pin, int _intensity, int _time){ 
 +  int new_time = (int) (_time / 255); 
 +  for (int i = 0; i <= 255; i++)  { 
 +    analogWrite(_pin, map(i, 0, 255, 0, _intensity)); 
 +    delay(new_time); 
 +  } 
 +
 +</code> 
 +++++
  
  
-===== Tutoriel ===== 
  
 +++++ Ancien code Arduino (2015) |
 <code cpp> <code cpp>
  
Ligne 129: Ligne 292:
 } }
 </code> </code>
 +++++
  
 ===== Photos ===== ===== Photos =====
-{{:projets:zohrawasnotborninaday:image2.jpg?500|}}+{{:projets:zohrawasnotborninaday:image2.jpg?400|}} 
 +{{:projets:zohrawasnotborninaday:2015-06-15-18.25.43.jpg?400|}} 
 +{{:projets:zohrawasnotborninaday:2015-06-15-18.26.19.jpg?400|}} 
 +{{:projets:zohrawasnotborninaday:2015-06-16-17.49.05.jpg?400|}} 
 +{{:projets:zohrawasnotborninaday:dsc_6457.jpg?400|}} 
 +{{:projets:zohrawasnotborninaday:venus-box-h-all.jpg?400|}}
  
-{{tag>[mythologie arabe preislamique]}} 
/home/resonancg/www/wiki/data/attic/projets/zohrawasnotborninaday/accueil.1470866865.txt.gz · Dernière modification: 2016/08/11 00:07 de resonance