Bonjour ! Voilà j'ai fais des recherches sur le net à propos de la régulation de température et je suis tombé sur ce site : http://www.makeuseof.com/tag/make-your-own-temperature-controller-with-an-arduino/
Voici le schéma que j'ai pu en tirer :
J'aimerez savoir si je peux placer mon mosfet là ou il y a les 2 cables vert et noir (là ou c'est écrit "To RCSwitch") ?
Voici le programme pour ce montage :
#include <RCSwitch.h> //only used for remote control switches, not used if you have a relay
#define aref_voltage 3.3 // we tie 3.3V to ARef and measure it with a multimeter!
//TMP36 Pin Variables
int tempPin = 1;
int tempReading;
float desiredTempC = 28; // which temperature to maintain
RCSwitch mySwitch = RCSwitch();
void setup(void) {
// We'll send debugging information via the Serial monitor
Serial.begin(9600);
// If you want to set the aref to something other than 5v
analogReference(EXTERNAL);
//enable RC switch transmissions on pin 10.
mySwitch.enableTransmit(8);
}
void loop(void) {
tempReading = analogRead(tempPin);
// converting that reading to voltage, which is based off the reference voltage
float voltage = tempReading * aref_voltage;
voltage /= 1024.0;
// now print out the temperature
float temperatureC = (voltage - 0.5) * 100 ;
Serial.print(temperatureC); Serial.println(" degrees C");
/* now convert to Fahrenheight
float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
Serial.print(temperatureF); Serial.println(" degrees F");
*/
if(temperatureC < desiredTempC){
mySwitch.switchOn(1,1);
Serial.println("Heater ON");
}
else{
Serial.println("Heater OFF");
mySwitch.switchOff(1,1);
}
delay(1000);
}
Serait-il bon pour mon projet ? Merci d'avance.
Coordialement. breav.