Engineer
ITALY • + Follow
Edit Project
Components
|
Arduino UNO R3 development sensor expansion board |
x 1 | |
|
TMP36Analog Devices
|
x 1 | |
|
PTV09A-4225F-B203Bourns Inc.
|
x 2 | |
|
NHD-0216XZ-FSW-GBWNewhaven Display Intl
|
x 1 |
Tools, APP Software Used etc.
|
TinkerCad |
|
|
arduino IDEArduino
|
Description
A thermostat made with arduino
a potentiometer is used to set the temperature and one to adjust the contrast of the LCD display. The sensor sends its values ??to the system, which reports them on the display.
P.s. the project is written in Italian
Link to project on tinkercad: https://www.tinkercad.com/things/amvYOwL7Arc?sharecode=QphMeV2895zfUBXDt0Ugjx3k83XbGaxDgQxdCmvUGE8
Code
Code
C/C++
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
// costanti
const int tSens= A5; // linea analogica sensore di temperatura
const int tSet = A0; // linea analogica potenziometro Temp desiderata
const int Cald = 8;
// variabili
unsigned int tSensVal=0; // temperatura ambiente letta dal sens
unsigned int tSetVal=0; // temperatura impostata dal potenziometro
boolean statoCald=0; // stato caldaia on off
int pot;
void setup() {
lcd.begin(16,2);
// inizializza la linea cald come output (attivazione caldaia)
pinMode(Cald, OUTPUT);
// inizializza seriale per l'invio dei dati al PC
Serial.begin(9600);
lcd.print("T. Impos.:");
lcd.setCursor(0,1);
lcd.print("T. Amb.:");
}
void loop() {
delay (200);
tSetVal=analogRead(tSet); //legge Tset del potenziometro
tSetVal=map(tSetVal,0,1023,0,50); // trasforma in Temp tra 0 e 50 T
tSensVal=analogRead(tSens); // acquisisce Tamb
tSensVal=map(tSensVal,0,1023,0,110);
if(tSensVal>tSetVal+1) statoCald=LOW; // verifica le soglie e statoCald
else if(tSensVal<tSetVal-1) statoCald=HIGH;
// aggiorna l'uscita digitale
digitalWrite(Cald, statoCald);
// invia dati via seriale
Serial.print("T ambiente = ");
Serial.println(tSensVal);
Serial.print("T set = ");
Serial.println(tSetVal);
Serial.print("Caldaia = ");
Serial.println(statoCald);
lcd.clear();
lcd.setCursor (10,0);
lcd.print(tSetVal);
lcd.setCursor(8,1);
lcd.print(tSensVal);
lcd.setCursor(13,0);
lcd.print ("C");
lcd.setCursor(11,1);
lcd.print ("C");
lcd.setCursor(0,0);
lcd.print("T. Impos.:");
lcd.setCursor(0,1);
lcd.print("T. Amb.:");
delay(5000);
}
Schematic and Layout
Oct 16,2022
889 views
A thermostat made with arduino
A small thermostat made with arduino! Forgive any inaccuracies, but I'm just a guy who is studying arduino and trying to learn, even just ha
889
0
0
10.00 (1)
Published: Oct 16,2022
Purchase
Donation Received ($)
PCBWay Donate 10% cost To Author
Copy this HTML into your page to embed a link to order this shared project
Copy
Under the
Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)
License.
Topic
- Comments(0)
- Likes(0)
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP
0 / 10000
Remove
It looks like you have not written anything. Please add a comment and try again.
View More
View More
VOTING
1 votes
- 1 USER VOTES
10.00
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Design
1/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Usability
2/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Creativity
3/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Content
4/4
-
10design
-
10usability
-
10creativity
-
10content
10.00
More by Engineer
You may also like
-
Open Source Very Large Stick - Freejoy & MMjoy2 breakout board
512 0 0 -
RF Control training board for students based on ESP32 C3
691 0 2 -
Aquarius+ Computer, Standard PCB
913 0 4 -
KINETIC COASTERS with a TWIST! Laser or 3D Print some DIY Magic
609 0 1 -
RPI - 8 IO PLC With ATTiny85 Watch Dog
536 0 1 -
Nintendo Famicom HVC-001 Controller Shells
631 0 1 -
COMMODORE 128 DIAGNOSTIC REV.785260 KEYBOARD DONGLE
597 0 4 -
COMMODORE 128 15KHz DISPLAY ADAPTER (C128 80 COLUMN ADAPTER)
806 1 7 -