Outils pour utilisateurs

Outils du site


issue108:arduino

Not much left to do on the Brewduino now. I’ve added some LEDs just to indicate what’s going on. The green LED is to show that the device is on and OK. The red LED shows that the switch is on and, thus, the heat mat is on and heating up the fermenting vessel. Finally, the blue LED shows that the switch, and heat mat, are off, and that the vessel is cooling down to room temperature. The best way, I found, to test the whole device is to have the DHT22 under the lamp because, when the lamp comes on, the heat from the bulb will bring the temperature up and the whole system goes into an on/off cycle. The lamp heats the DHT, and when it goes off, the DHT cools down, the threshold is reached, and the lamp comes back on again. And so on. The only adjustments to the code are to define the LED pins: int power = 43; int red = 47; int blue = 39; Then, set the modes to output, and put the (power) green LED on (code is shown on the next page, top right).

Maintenant, il ne reste plus grand chose à faire sur le Brasse-duino.

J'ai ajouté quelques LED pour tout simplement indiquer ce qui tourne. La LED verte sert à montrer que l'appareil est sous tension et en bon fonctionnement. La LED rouge montre que l'interrupteur est fermé et, donc, que la couverture chauffante est sous tension et chauffe la cuve de fermentation. Enfin, la LED bleue montre que l'interrupteur et la couverture chauffante sont hors tension et que la température de la cuve descend vers celle de la pièce.

La meilleure façon que j'ai trouvée pour tester l'ensemble de l'appareil est d'avoir le DHT22 sous la lampe parce que, quand la lampe s'allume, la chaleur de l'ampoule fait monter la température et tout le système rentre dans un cycle marche/arrêt. La lampe chauffe le DHT et quand elle s'éteint, le DHT se refroidit, le seuil bas est atteint et la lampe se rallume. Et ainsi de suite.

Les seuls ajustements du code sont pour définir les picots des LED :

int power = 43; int red = 47; int blue = 39;

Ensuite, mettez les modes sur sortie et allumez la LED verte (mise sous tension) - le code est présenté en haut à droite, sur la page suivante.

The temperature check statement now includes the states for the red and blue LEDs (code is shown bottom right). You’ll note that I’ve also fixed the SSR state so that the light is LOW (on) when the temperature is below 24, and HIGH (off) when above 24. This is the correct procedure for the heat mat. Well, we’ve pretty much come to the end of the Brewduino. Apart from swapping out the lamp for the heat mat, everything is in place and working. Obviously, everything will need to go in a nice box, and the Arduino will need a power supply (as I need my laptop!), but everything is working, and that’s the main thing. No doubt I’ll be tinkering with the code between writing this up, and you reading it, but the code referred to here is at: https://gist.github.com/ronnietucker/7fc62df161107116cf93, and marked as revision 6. If you can think of anything to add/change in the Brewduino, please feel free to email me your suggestions: ronnie@fullcirclemagazine.org

La déclaration de vérification de la température inclut maintenant l'état des LED rouge et bleue (le code est visible en bas à droite).

Vous noterez que j'ai aussi réglé l'état du SSR de telle sorte que la lampe soit allumée (LOW) quand la température est en-dessous de 24 °C et éteint (OFF) au-dessus de 24. C'est la bonne procédure pour la couverture chauffante.

Bien ! Nous arrivons près de la fin du Brasse-duino. À part le remplacement de la lampe par la couverture chauffante, tout est en place et fonctionnel. Évidemment, chaque objet doit être placé dans une belle boîte et l'Arduino aura besoin d'une alimentation (parce que j'ai besoin de mon portable !), mais tout fonctionne et c'est le principal.

Je vais sans doute encore bricoler le code entre maintenant où je l'écris et le moment où vous le lirez, mais le code auquel je fais référence ici se trouve sur : https://gist.github.com/ronnietucker/7fc62df161107116cf93, et marqué comme la révision 6.

Si vous pensez à quelque chose d'autre à ajouter/modifier au Brasse-duino, n'hésitez pas à m'envoyer un courriel avec vos suggestions à : ronnie@fullcirclemagazine.org.

issue108/arduino.txt · Dernière modification : 2016/05/03 14:42 de andre_domenech