Difference between revisions of "User:Reyninho/FabLab-Reykjavik/Electronic-components"

From Fab Lab Wiki - by NMÍ Kvikan
Jump to: navigation, search
Line 8: Line 8:
  
 
=== The components ===
 
=== The components ===
[[Image:CR_electronic-components.jpg|200px]]
 
 
# Arduino UNO starter kit.
 
# Arduino UNO starter kit.
 
# HMC5883L gyroscopic component
 
# HMC5883L gyroscopic component
 
# HC-SR05 utrasonic mesuring component (X2 - head detector and presence detector)
 
# HC-SR05 utrasonic mesuring component (X2 - head detector and presence detector)
 
# Servomotor (360°)
 
# Servomotor (360°)
 +
::[[Image:CR_electronic-components.jpg|200px]]
  
 
=== The softwares ===
 
=== The softwares ===
 
# Fritzing - for shematics
 
# Fritzing - for shematics
 
# Arduino code editor - To code
 
# Arduino code editor - To code
 +
::[[Image:CR_code-softwares.JPG|80px]]
  
  
Line 23: Line 24:
  
 
=== Controling the servo with the Gyroscoic macgnetometer ===
 
=== Controling the servo with the Gyroscoic macgnetometer ===
[[File:vinyl_glass_project.jpg|thumb|The vinyl project]]
 
 
With the HMC5883L library we can use the exemple included and download it to the arduino microprocessor. It will sent you the informations that the sensor HMC5883L calaculate. You can read theme by the serial monitor window.
 
With the HMC5883L library we can use the exemple included and download it to the arduino microprocessor. It will sent you the informations that the sensor HMC5883L calaculate. You can read theme by the serial monitor window.
 
then i changed the code in orer to use the heading degree data with the servomotor. So I said him to go on the same position a the heading degree is. So if the sensor has an orientation of 45° from the northe, the servo will go to the position 45°. The delay is very short (few miliseconds) and it calculate and position the servo in the good position each time the loop is calculated (so each few miliseconds).
 
then i changed the code in orer to use the heading degree data with the servomotor. So I said him to go on the same position a the heading degree is. So if the sensor has an orientation of 45° from the northe, the servo will go to the position 45°. The delay is very short (few miliseconds) and it calculate and position the servo in the good position each time the loop is calculated (so each few miliseconds).
Line 29: Line 29:
  
 
<gallery>
 
<gallery>
fritzing_HMC5883L-servo.JPG|Une légende.
+
fritzing_HMC5883L-servo.JPG|Cabling schema.
HMC5883L_cabling.jpg|Une légende.
+
HMC5883L_cabling.jpg|Cabling picture.
Tomato.svg|Une légende.
+
code_arduino-uno_gyro_servo_video.zip|Downloadable compressed pack with arduino code (.ino) & a video.
Tomato.svg|Une légende avec un [[Wikipédia:Liens internes|lien]].
+
Tomato.svg|Une légende.
+
Tomato.svg|Une légende.
+
 
</gallery>
 
</gallery>
 
{{multiple image
 
| width = 200
 
| footer = Cabling shemas and code
 
| image1 = fritzing_HMC5883L-servo.JPG
 
| alt1 = Cabling schema
 
| caption1 = Avertissement
 
| image2 = HMC5883L_cabling.jpg
 
| alt2 = Cabling photo
 
| caption2 = Expulsion
 
}}
 

Revision as of 11:05, 17 February 2017

Electronic components

what components must do in my project?

Regarding to my master degree, my personnal project need a lot of electronic components to work. I use to study differents fields but the electronic and the code never yet. Everything must strat one day! To explain my project I want:

  1. A spectator controle the orientation of a pojector on 360° using his head. For that I want to use a gyroscopic component that takes into account this orientation included in the headphone he will wear by a servo.
  2. The projector light on only when the spectator is under it and if he wears the headphone. For that I want to use two ultrasonic components that takes into account the distance that there is between it and an obstacle in front of it.
  3. All of that would be managed by an Arduino card / code linked to my computer (I work with Windows pc).

The components

  1. Arduino UNO starter kit.
  2. HMC5883L gyroscopic component
  3. HC-SR05 utrasonic mesuring component (X2 - head detector and presence detector)
  4. Servomotor (360°)
CR electronic-components.jpg

The softwares

  1. Fritzing - for shematics
  2. Arduino code editor - To code
CR code-softwares.JPG


Devices

Before the final prject I must learn and create each part of what I want separatly. In this part you will see all of theme separatly.

Controling the servo with the Gyroscoic macgnetometer

With the HMC5883L library we can use the exemple included and download it to the arduino microprocessor. It will sent you the informations that the sensor HMC5883L calaculate. You can read theme by the serial monitor window. then i changed the code in orer to use the heading degree data with the servomotor. So I said him to go on the same position a the heading degree is. So if the sensor has an orientation of 45° from the northe, the servo will go to the position 45°. The delay is very short (few miliseconds) and it calculate and position the servo in the good position each time the loop is calculated (so each few miliseconds). On these pictures you can see the Fritzing schema, the real cabling and the Arduino cde bellow.