Difference between revisions of "FR:RPi Tutorial Easy GPIO Hardware & Software"

From eLinux.org
Jump to: navigation, search
(Circuits avancés)
(Liens utiles/Ressources)
Line 16: Line 16:
  
 
==Liens utiles/Ressources==
 
==Liens utiles/Ressources==
*[http://log.liminastudio.com/writing/tutorials/tutorial-how-to-use-your-raspberry-pi-like-an-arduino Tutorial: How to use your RPi like an Arduino] - Thorough guide to utilizing the GPIO pins in Python, Bash and C.
+
*[http://log.liminastudio.com/writing/tutorials/tutorial-how-to-use-your-raspberry-pi-like-an-arduino Tutorial: How to use your RPi like an Arduino] - Guide approfondi pour utiliser les broches GPIO en Python, Bash et C.
  
*[http://www.circuitlab.com Online Circuit Lab - Circuit Design and Simulation] - Excellent tool for experimenting with circuits (also used for the circuit diagrams used here)
+
*[http://www.circuitlab.com Online Circuit Lab - Circuit Design and Simulation] - Excellent outil pour expérimenter des circuits (également utilisé pour les schémas des circuits utilisés ici)
  
 
*[http://www.scriptoriumdesigns.com/embedded/index.php Introduction To Embedded Programming - GPIO] - In particular there is lots of detailed information about GPIO inputs and outputs for beginners to understand the principles behind the circuits.
 
*[http://www.scriptoriumdesigns.com/embedded/index.php Introduction To Embedded Programming - GPIO] - In particular there is lots of detailed information about GPIO inputs and outputs for beginners to understand the principles behind the circuits.
  
*[http://ww1.microchip.com/downloads/en/devicedoc/40040b.pdf Microchip's PIC Tips and Tricks PDF]<ref> http://www.raspberrypi.org/forum/projects-and-collaboration-general/gpios-suitable-for-microswitches-joysticks/#p35307 </ref> - Contains lots of useful example circuits for use with PIC micro-controllers, can be adapted for use with the RPi (3.3V GPIO).
+
*[http://ww1.microchip.com/downloads/en/devicedoc/40040b.pdf Microchip's PIC Tips and Tricks PDF]<ref> http://www.raspberrypi.org/forum/projects-and-collaboration-general/gpios-suitable-for-microswitches-joysticks/#p35307 </ref> - Contient des tas d'exemples de circuits utiles à employer avec des micro-contrôleurs PIC, peut être adapté pour une utilisation avec le RPi (GPIO 3.3V).
  
*[http://www.kpsec.freeuk.com/ The Electronics Club] - An excellent resource for beginner electronics, explains many basic circuits.
+
*[http://www.kpsec.freeuk.com/ The Electronics Club] - D'excellentes ressources pour les débutants en électronique, expliquant de nombreux circuits de base.
  
 
==Circuits de protection==
 
==Circuits de protection==

Revision as of 05:14, 15 June 2013

Retour vers le Hub, ou vers la page Tutoriels.


Tutoriels logiciels et matériels GPIO :


Avertissement

While most of these circuits may interface directly to the RPi, the use of a buffered interface (such as the one supplied by the Gertboard) is recommended which will help protect against damage. Alternatively, experiment with one of the #Alternative Test Platforms.

The GPIO pins connect directly into the core of the ARM processer, and are static-sensitive, so you should avoid touching the pins wherever possible. If you are carrying a static charge, for example by taking off an acrylic pullover, or walking across a nylon carpet, touching the GPIO pins could destroy your R-Pi, so always earth yourself before touching the pins or anything connected to them.

Extreme caution should be exercised when interfacing hardware at a low level, you may damage your RPi, your equipment and potentially yourself and others. Doing so is at your own risk!

Objectifs

Ce tutoriel est basé sur ce fil de discussion et a pour but de présenter des circuits électriques sommaires à utiliser avec les entrées/sorties à usage générique (GPIO) du RPi. Des connaissances de base en électronique seront nécessaires (i.e. connaître les composants classiques comme les transistors, diodes et résistances).

Il est grandement conseillé d'utiliser des circuits de protection GPIO supplémentaires pour protéger les fragiles broches GPIO si elles sont employées comme interface avec le RPi.

Liens utiles/Ressources

  • Microchip's PIC Tips and Tricks PDF[1] - Contient des tas d'exemples de circuits utiles à employer avec des micro-contrôleurs PIC, peut être adapté pour une utilisation avec le RPi (GPIO 3.3V).
  • The Electronics Club - D'excellentes ressources pour les débutants en électronique, expliquant de nombreux circuits de base.

Circuits de protection

Afin de protéger l'électronique du Raspberry Pi, il est vivement recommandé d'assurer la protection des broches GPIO d'une façon ou d'une autre pour éviter tout dommage.

Le lien suivant présente quelques manières de le faire :

Circuits de protection GPIO

Plateformes de tests alternatives

Until you have a RPi to test with, there are many alternative platforms available which will allow the testing of basic circuits. In addition, they may be interfaced with directly using the RPi in the future.

  • TI LaunchPad - A low cost development platform ($4.30 including free world shipping). Includes programmer/debug board, two processors (with 16 GPIO including I2C/SPI/UART, 8ch 10bit ADC etc).
  • Arduino - Common hobbyist development platform. Excellent community support and additional hardware.
  • STM32 Primer/EvoPrimer - Self-contained development platform. Mentioned since I may use one at some point (I bought the original Primer a long time ago). It includes a battery, acceleration sensors and built in display screen.

Tutoriels terminés

Note:
Until RPi devices are available, I can not confirm this will work on a real RPi.
For now, I shall be using the TI LaunchPad (see  Alternative Test Platforms
for details) to test the hardware on (as it is cheap and the logic levels similar).

Circuits de base

1. LED output

Directly driven (will need very low powered LED) or driven via transistor (allowing higher current). Includes example 8xLED Test Module.

3. Simple on/off switch input

With or without de-bouncing, protection resistors etc. Includes example 8xSwitch Test Module.

4. 12V relay driver circuit

12V relay driver circiut with opto-decoupler. Includes schema.

Tutoriels prévus

Circuits de base

1. LED output

Completed see above.


2. Small DC motor drive

MOSFET or Darlington Pair to provide high power drive and reverse bias diode to protect from motor coils.


3. Simple on/off switch input

Completed see above.


4. Analogue resistive sensor sampled as a digital input

Using a basic transistor switch circuit.

Circuits intermédiaires

1. Shift Registers - Multiplexing Data

An introduction to using additional ICs. In this case, using a parallel to serial 8-bit shift register to read 8 digital inputs using two GPIO pins.


2. Analogue to Digital Circuit

Use of a ADC chip to sample inputs.


3. PWM Driving Circuit

For example motor speed control.


4. Alpha-numeric 2x16 LCD Display

(IN-PROGRESS) Control via 4-wire data (total 6 GPIO) and also alternative 2-wire interface circuit.


5. Interfacing to I2C Devices

Interfacing to an I2C device connected to one of the Pi's I2C buses.

Circuits avancés

1. Contrôle matériel via Internet

Implémenter un contrôle via le web et une surveillance des composants branchés sur les GPIO.

2. Communication avec d'autres micro-contrôleurs

Communiquer avec d'autres micro-contrôleurs pour que des fonctionnalités comme des CAN puissent être utilisées.

Contribuer à ce tutoriel

Il s'agit d'un projet ouvert, aussi n'hésitez pas à ajouter vos propres sections et à améliorer son contenu.

Allez sur la page Talk:RPi Tutorial Easy GPIO Hardware & Software pour discuter de son contenu.