Outils pour utilisateurs

Outils du site


issue105:arduino

I recently took up homebrewing and wondered how I could incorporate the Arduino. I think I can. I thought I’d use this article to show my thought process and planning before I even pick up an Arduino, or think about writing code. The Basic Idea Ideally, I need to keep my fermentation vessel between 18-25°C. The spare room that I’m using is sitting at about 16°C, so I need to find a way to control the heat around the vessel. I can’t put anything in the vessel as this may introduce contamination, or break the seal on the vessel. I’d also like some lighting to let me see what’s happening inside the vessel since the vessel is semi-transparent. Any other info would be a boon. OK, so I know what I roughly want. Let me look at the pros and cons of the various things.

Récemment, j'ai récupéré un appareil de brasserie maison et je me suis demandé comment je pouvais y associer l'Arduino. Je crois que je peux. J'ai pensé que j'utiliserais cet article pour montrer mon raisonnement et le déroulement, avant même d'avoir pris un Arduino et réfléchi à l'écriture du code.

L'idée de base

Idéalement, j'ai besoin de maintenir la cuve de fermentation entre 18 et 25° C. La pièce libre que j'utilise est à environ 16° C ; aussi, j'ai besoin de trouver une solution pour réguler la température autour de la cuve. Je ne peux rien mettre dedans, car j'introduirais une contamination ou je détruirais le confinement de la cuve. J'aimerais aussi avoir un peu de lumière pour voir ce qui s'y passe, car elle est semi-transparente. Toute autre info serait un plus.

Bon ! Je sais en gros ce que je veux. Laissez-moi étudier les avantages et les inconvénients des différents points.

Vessel Heating This is the one thing I really need, so this is the priority. Initially I was looking to modify something that’s readily available like a heated car seat, or a pet blanket. Mainly those as they’re low power (around 12V), but after more reading I’d be as well sticking with what I have just now, a reptile heat mat that I can wrap around the vessel. I just need to find a way to control the heat mat. Temperature Reading Like I mentioned earlier, I can’t put anything in the vessel so I’m going to have to make do with a reading from the outside. I know I can accomplish this with the DHT temperature/humidity module that I’ve used before. I’ll just have to make sure it’s firmly touching the outside of the vessel but not too fixed as it will need to be removed before cleaning the vessel.

Chauffage de la cuve

C'est la seule chose dont j'ai vraiment besoin, c'est donc une priorité. Au départ, je pensais modifier quelque chose d'immédiatement disponible comme un siège chauffant de voiture ou une couverture chauffante d'animal de compagnie. La plupart sont en basse tension (environ 12 V), mais après avoir lu un peu plus, je préfère m'en tenir à ce que j'ai déjà maintenant, un tapis chauffant pour reptile avec lequel je peux entourer la cuve. J'ai juste besoin de trouver comment en contrôler la température.

Lecture de la température

Comme indiqué précédemment, je ne peux rien mettre dans la cuve ; ainsi, je dois me satisfaire d'une lecture de l'extérieur. Je sais que je peux le réaliser avec un module DHT de température/humidité que j'ai déjà utilisé. Je dois juste m'assurer qu'il est en contact serré avec l'extérieur de la cuve, mais pas trop fixé pour que je puisse l'enlever avant de la nettoyer.

Temperature Control Now that I have those two nailed, I can try to figure out a way of controlling the heat mat. After a lot of research I think a relay switch is the best option. With this I can use the Arduino’s 5V to trigger the switch to an on/off position. I’ve not used switches much, but the gist behind them is to put the live wire from the heat mat through the switch, which will break the circuit, then, when required, energise the switch with 5V to complete the circuit and the heat mat will come on. Controlling the heat mat, I’ll probably use the figures from the DHT module with code something like: if temperature <19 turn on heatmat else if temperature is >22 turn off heatmat My thinking for the 19 and 22 is that the final temperature should be around 20°C to 21°C, but either way anything from 19-25°C is fine.

Régulation de température

Maintenant que j'ai traité ces deux éléments importants, je peux essayer de trouver une façon de contrôler la température du tapis. Après beaucoup de recherches, je pense qu'un relais est la meilleure option. Avec lui, je peux utiliser le 5 V de l'Arduino pour commuter l'interrupteur entre les positions ouvert/fermé. Je n'ai pas beaucoup utilisé d'interrupteurs, mais l'essentiel, c'est de traverser l'interrupteur avec le fil actif venant du tapis chauffant, ce qui coupera le circuit, puis, quand c'est nécessaire, d'alimenter l'interrupteur avec 5 V pour fermer le circuit ; alors le tapis chauffera.

Pour piloter le tapis chauffant, j'utiliserai probablement les exemples du module DHT avec un code dans le genre de :

si température < 19

     alimenter le tapis chauffant

autrement si température > 22

     couper le tapis chauffant
     

Mon idée à propos de 19 et 22, c'est que la température finale soit autour de 20-21 °C, mais n'importe quelle valeur entre 19 et 25 °C est correcte.

Another reason for the not-so-strict heating in my pseudo-code is that the heat mat will take about 20-30 seconds to reach full heat. I’m not worried about this as it is never hotter than about 32°C, it will take a while to heat the liquid inside, and, conversely, it’ll take quite a while for the liquid to cool down. Hence, while the heat mat may be on for a little while it should need switching on/off only every few hours, at least, so it’s not like I’d be switching it on and off every few minutes. Well, that’s the theory. We’ll see how that pans out in the practical phase.

Une autre raison pour le chauffage pas-vraiment-précis dans mon pseudo-code est que le tapis chauffant demande environ 20 à 30 secondes pour atteindre la pleine température. Je ne suis pas inquiet à ce sujet, car il n'est jamais plus chaud que 32 °C, il faudra un bon moment pour que le liquide chauffe à l'intérieur et, inversement, il faudra encore un bon bout de temps pour que le liquide refroidisse. Donc, parce que le tapis chauffant sera sans doute branché pendant un petit moment, il ne devrait être commuté sous/hors tension que toutes les quelques heures, au moins ; aussi, ce n'est pas comme s'il devait être allumé et éteint toutes les quelques minutes. Bon, c'est la théorie. Nous verrons comment ça se passe dans la pratique.

Logging I still have a spare ESP WiFi module, so I can probably do like I did with my plant monitoring project where I send the data to ThingSpeak. I’ll probably note the temperature and humidity over day and time. Of course, day and time may mean I need to use a real-time clock module. Unless ThingSpeak tags on the day/time. Not sure. Can’t remember if they do. I could also log the brightness of the room using an LDR, but the light level has no bearing on the brew, so scratch that. I’d like to have an alert system where I can get an SMS/email should the temperature go haywire. This is a possibility using ThingSpeak and Twilio, but is not something I’ve tinkered with before and will leave this to the end as it’s not critical.

Enregistrement

J'ai toujours un module WiFi ESP de rab ; aussi, je peux probablement faire comme pour mon projet de supervision de plante où j'envoie les données à ThingSpeak. Je noterai probablement la température et l'humidité avec l'horodatage. Bien sûr, avoir la date et l'heure signifie que j'ai un module horloge en temps réel. Sauf si ThingSpeak marque le jour et l'heure. Pas sûr. Je ne me rappelle plus si c'est le cas.

Je peux aussi enregistrer la luminosité de la pièce grâce à une photo-résistance, mais le niveau lumineux n'a pas d'effet sur le brassage, donc on oublie.

J'aimerais avoir un système d'alerte qui m'enverrait un SMS/mail si la température se détraque. C'est une possibilité en utilisant ThingSpeak et Twilio, mais je ne l'ai jamais fait avant et je laisserai ce sujet pour la fin, car ce n'est pas critique.

Lighting Lighting is not critical, and will be manually controlled, so I’m not too worried about this. This will be a strip of 12V LED lighting with a transformer and a switch. No need for the Arduino to control the lighting. One major consideration for the lighting though is that it must be removable as the vessel has to be bleached sterile after use. I’ll probably just attach the light strip(s) to the vessel with some tape or blu-tac.

Éclairage

L'éclairage n'est pas critique et sera piloté manuellement ; aussi, je n'ai pas de crainte à ce sujet. Ce sera un bandeau de LED 12 V avec un transformateur et un interrupteur. Pas besoin d'Arduino pour le contrôler. Cependant, une considération importante pour l'éclairage est qu'il doit être amovible, car la cuve doit être stérilisée après utilisation. J'attacherai probablement la (ou les) bandeau(x) lumineux à la cuve avec du scotch ou de la pâte à colle.

Additions I have a spare IP camera that doesn’t seem to move up/down or left/right properly, so I might use it to view the fermenting vessel by putting it near the top rim to see in. My only query here is that if the camera switches to night vision mode, will the IR lights reflect off the vessel and bleach the image making it useless? Not sure, but that’s something to test. A further addition could be an LCD screen. If I put the screen near the top of the vessel, and within range of the camera view, I could monitor the temperature remotely. As a quick visual-at-a-glance aid, I may add some LEDs to show if the temperature is within a certain range. Maybe between 20-22 could be a green LED with 25+ being red. Maybe 19 or less is a yellow LED.

Additions

J'ai une caméra IP inutilisée qui ne semble pas bien bouger en haut/bas et droite/gauche ; aussi, je pourrais l'utiliser pour regarder la cuve de fermentation en la mettant près du rebord supérieur pour voir dedans. Ma seule question ici est : si la caméra passe en mode vision de nuit, est-ce que les lampes infra-rouges se réfléchiront sur la cuve et grilleront l'image, la rendant inutilisable ? Pas sûr, mais c'est une chose à tester.

Un complément pourrait être un écran LCD. Si je mets l'écran près du haut de la cuve et dans le champ de la caméra, je pourrais surveiller la température à distance.

Comme aide pour un contrôle visuel rapide, je peux ajouter quelques LED pour montrer si la température est dans une certaine plage. Peut-être qu'entre 20 et 22 degrés, la LED serait verte, devenant rouge au-dessus de 25°C. Et peut-être une LED jaune pour 19 et en dessous.

Conclusion The basic idea of controlling the temperature of the liquid with a heat mat is definitely possible. Same with the logging. Shouldn’t be a problem. The lighting (to see inside) isn’t a necessity and not Arduino controlled, so it’ll be left until last probably. Same with the IP camera. Nice, but not a necessity, and not Arduino controlled. I’ll more than likely include the LCD screen as it’s a nice visual guide to the reading from the DHT and I can compare that against the thermometer that’s stuck to the side of the vessel. NEXT MONTH: The project begins with the LCD screen, DHT and WiFi modules.

Conclusion

L'idée de base de la régulation de la température du liquide avec un tapis chauffant est vraiment possible. Pareil pour l'enregistrement. Ça ne devrait pas être un problème.

L'éclairage (pour voir dedans) n'est pas une nécessité et ne sera pas piloté par l'Arduino ; aussi, je pense le mettre à voir en dernier. Pareil pour la caméra IP. C'est bien, mais pas nécessaire, et ce n'est pas piloté par l'Arduino.

Il est plus que probable que j'incorpore l'écran LCD parce que c'est une bonne aide visuelle pour lire les valeurs issues du DHT que je peux comparer au thermomètre que j'ai collé sur le côté de la cuve.

LE MOIS PROCHAIN : le projet commence avec l'écran LCD et les modules DHT et WiFi.

issue105/arduino.txt · Dernière modification : 2016/02/06 18:53 de auntiee