Introduction: Thermostat Raspberry Pi
salut,
voici comment j ai construit mon thermostat raspberry pi avec du matériel réutilisé. Je me suis pas mal inspiré de plusieurs projets trouvé sur le net et aussi fouillé dans mon garage pour trouver toute les pièces ( vous ne trouverai certainement pas les mêmes pinces :/)
prérequis:
- raspberry pi
- écran lcd avec keypad ( Adafruit RGB Negative 16x2 LCD+Keypad Kit )
- ancien thermostat ( récupération relai 3v et pont en H )
- chargeur 5v (ancien chargeur téléphone démonté nokia D500)
- dongle wifi
- sonde température (AM2302 humidity and temperature sensors)
- du bois (pour la boite)
- gomme (pour les boutons)
- 1 LED + résistance 100ohms
Step 1: Plan De Cablage
Pour commander la chaudière j'utilise un relai 3V cependant impossible de brancher le relai en direct avec les pins (pas assez de courant) du coup j'ai récupéré un morceau du CI sur mon ancien thermostat pour commander le relai. Je pense que vous pouvez utiliser un relai groove ca devrai faire l'affaire.
PS: Il faut faire attention a ne pas utiliser des Pins utilisé par le LCD.
Step 2: Software
Le raspberry récupéré les informations de la sonde de température toutes les x secondes et va les enregistrer dans une base de donné (sqlite).
table temperature:
dateTime | temp | humidity | stateChauffage | température souhaité
C'est la base de données qui me permet de synchroniser les différentes manière de changer la température souhaité. Et le script thermo.py me permet de centralisé le changement de température extérieur, l'allumage du chauffage et la modification de la température souhaité.
Pour contrôler la température il y a plusieurs moyen:
- via les boutons du lcd
- via une interface web
- via la crontab du raspberry pour la programmation
les boutons du lcd:
Tout est fait par le script thermo.py qui catch l'appuie sur une touche et fait l'action associé.
Crontab (programmation):
pour modifier la température j'ai fait un script qui modifie la dernière valeur de température souhaité setTemp.py
exemple de crontab
50 6 * * 1-5 /home/pi/setTemp.py -t 21 > /dev/null 2>&1 ## augmentation du chauffage à 6h50 21°C du lundi au vendredi
interface Web:
Une petite interface web me permet d'afficher un graph de la température et de pouvoir modifier la "température souhaité"
Pour cela il faut installer lighthttpd avec le fichier de conf en pièce jointe et désarchiver le httpd.tar dans votre home.(/home/pi/httpd)
Step 3: Construction De La Box
pour faire la boite j'ai utilisé des baguettes et une planche de 5 mm d’épaisseur pour faire le tour et la façade.
La difficulté a surtout était de faire les trou pour les boutons bien aligné.
Pour les boutons j'ai découpé une gomme blanche (d'écolier) pour pouvoir contrôler la température.
Je n'ai pas mis la sonde de température dans la boite car ca chauffe trop. Pour l'aeration j'ai fait des trou en haut et en bas de la boite.
Le raspberry tiens dans la boite car il est emboîté dans sa boite en plastique d'origine reçu avec le raspberry, j'ai juste enlevé une partie et collé la le plastique sur le fond.
7 Comments
7 years ago
could be a good thing, however my Spanish (I think it is) is a bit rusty. hope there would be an English version soon
Reply 4 years ago
Its French.
7 years ago
Translated:
Hello,
here's how I have built my raspberry pi thermostat with recycled material . I 'm quite inspired several projects found on the net and also delved into my garage to find all the pieces (you will certainly find not the same tongs : / )
prerequisite :
raspberry pi
lcd screen with keypad ( Adafruit RGB Negative 16x2 LCD + Keypad Kit)
old thermostat ( 3v relay recovery and H-bridge )
5v charger ( charger old nokia phone disassembled D500 )
wifi dongle
temperature probe ( AM2302 humidity and temperature sensors )
Wood (for the box)
gum ( for buttons )
1 LED + 100 ohm resistor
To order the boiler I use a 3V relay , however, impossible to connect the live relay with pins (not enough current) suddenly I got a piece of the CI on my old thermostat to control the relay. I think you can use a relay groove ca have to do the trick.
PS: Be careful not to use Pins used by the LCD .
7 years ago
I wish Instructables had a translate feature! I would recommend a DD-WRT system - the pi's SD card will get corrupted if it isn't shut down properly. You want to run the system from RAM.
I'm guessing the 3V relay is a solid state relay? The other thing I might change is if the HVAC system uses 24-28VAC you can use a bridge rectifier into, e.g. http://www.mouser.com/ProductDetail/Murata-Power-S... and not have to run a separate power wire.
Really cool project though!
Reply 7 years ago
If you're viewing it using the Chrome browser you have the option to translate ~ worked for me.
7 years ago
French evenly rusty.
7 years ago
I love having a programmable thermostat at my house. But a with a raspberry pi you could make a thermostat that is so much more versatile.