Trinket-Alarme-Les-Bases

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

La théorie

Most alarm systems follow a basic design. A switch closure (or opening) triggers action by a central monitor and the alarm generates some form of annunciation.

Note:
L'unité de surveillance s'appelle "Central Monitoring Unit" en anglais. Vous pourriez donc rencontrer l'acronyme "CMU" ici et là sur le Net si vous prenez des renseignement sur le sujet.

 
Crédit: AdaFruit Industries www.adafruit.com

The sensor blocks may actually be multiple sensors in one monitoring branch. Designs can be made which give only one indication the sensor chain has been triggered or if you have a more smart design, multiple sensors will provide individual indications.

 
Crédit: AdaFruit Industries www.adafruit.com

Switches can be normally closed or normally open. When they are triggered, they change state (closed goes open, open goes closed). The monitoring unit notices the change and if it meets criteria that it believes is an alarm, it annunciates.

Annunciations can take as many forms as sensors. The stereotype alarm system has a very large horn to make an ear-splitting sound. But it can be much more subtle. The central monitor can alert a "silent alarm": making the alarm known in some way, either locally or far away. An example would be a text or SMS message on your phone stating an alarm has been triggered. The simplest alarm may only trigger a local alarm not designed to scare the intruder - this can be a nearby notification or it could be a record of alarm events for later review.

Plusieurs senseurs, un broche

You can use nearly unlimited sensor switches if you place multiple switches in a branch. The branch can sense one switch out of all that may have changed state in a branch. In this manner you can only tell if any one of the multiple sensors in the branch has tripped. You can do this using normally open sensors in parallel or normally closed sensors in series. You can use both types of sensors putting the closed switches in line and the open switches in parallel. The resistor pulls the circuit high if the loop is opened otherwise the loop is grounded.

 
Crédit: AdaFruit Industries www.adafruit.com

There are circuit methods that allow you to identify which switch in a branch was tripped if you use an analog pin. These use resistors to change the voltage values the analog pin reads. Typical "display shields" use this to read 4 to 6 switches to determine what was entered.

But many analog switch reading circuits have a problem: they cannot determine if two buttons are pressed at the same time. For a simple alarm system, this might not matter - an alarm happened but you only know it is on a specific branch. With a bit more circuit design, you can determine if multiple sensors have tripped on a single branch and which ones they were. The method most often in textbooks is the R-2R resistor ladder.

Here I will demonstrate a simplified design of my own, a parallel resistor system that uses less components and has good accuracy for Arduino-type analog inputs. The complexity grows with the number of sensors, so I will show for three sensors on a branch.

 
Crédit: AdaFruit Industries www.adafruit.com

Normally the Analog Input A1 is pulled high by resistor R4. If any of the switches S1, S2, or S3 is closed, the resistance changes in a predetermined way. Circuit-wise, each of the resistors R1, R2, and R3 would add to the total resistance using the familiar circuit formula 1/R = 1/R1+1/R2+1/R3. All we have to do is measure the analog values read by the Trinket and add them to our code. This method also works equally well for normally open or normally closed switches.

This method does take only four resistors whereas the pure R-2R ladder method requires five to six resistors for 3 switches).

 
Crédit: AdaFruit Industries www.adafruit.com

R-2R ladder (source: Wikipedia)


Source: Trinket Bluetooth Alarm System

Tutoriel créé par MICHAEL BARELA pour AdaFruit Industries. Tutorial created by MICHAEL BARELA for AdaFruit Industries

Traduit et augmenté par Meurisse.D pour MCHobby.be

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.