Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Automatic control and display of Room temperature

Status
Not open for further replies.

AFTERDATE

New Member
hello every one and i hope they all ok could u help me


A temperature sensor is to be interfaced with a PC and an output signal is to control the flow of hot air into the room. A high level language

could i use by this way , by use PIC 16F877 and i thing this chip because there is A/D (analog to digital)convertor.and the PIC 16F877 it will read the temperature from temp sensor LM35 , i thing this LM35 because it's more sensitive to tempreture and the output is constant 10mv/1c and it's linear , then it will convertor to digital then send to PC by serial port.

now the problem i do't know how to do the program in a high level language?

is this my way right. and how to do the program?

thank you very much

best regards
 
There's no need to use a high level language, the project is simple to do in assembler - and one of my tutorials already does pretty well what you require, it reads an analogue input and sends it out as RS232 to a PC.
 
thank you very much
akg and Nigel Goodwin
Excuse me Sir Nigel Goodwin which Tutorial .
thank you

the best regards
 
Hi AFTERDATE,did you mean to write the 'high level language' program for the PIC or for the PC?

If I'm not misunderstanding you.What you're trying to do with the PIC is just using it as an interface,for both the temperature input and the heating control output.

Well programming the PIC is simple as referred to by Nigel.Now the question is do you need to control the temperature using the computer?If you do,then you have to use something as Visual Basic or Visual C++ depending on your personal flavor.I've been using VB,with this language you can go with the MSCOMM component.It will help you communicate with RS232 devices.You can customize your protocol.Find some tutorials on this issue too,they will help.
 
hello Alex
Thank you very much Alex

Description:
A temperature sensor is to be interfaced with a PC and an output signal is to control the flow of hot air into the room. A high level language is to be used to provide the control algorithm to maintain the temperature in the room by controlling a flow valve.
A real-time visual display of the temperature should also be provided.


i mean how to program the PIC16F877. i want this PIC to read the signal from sensor and at same time read the information from PC (at any language C or any thing bec, iam not very well in Programming ) and compare what iam set in the Program i mean the Temperature( like e.g if i set the temp at 25 then when the PIC16F877 do campare between the Sensor then send the signal to feedback to Fan or any thing.

thank you
the best regards
 
AFTERDATE said:
hello Alex
Thank you very much Alex

Description:
A temperature sensor is to be interfaced with a PC and an output signal is to control the flow of hot air into the room. A high level language is to be used to provide the control algorithm to maintain the temperature in the room by controlling a flow valve.
A real-time visual display of the temperature should also be provided.


i mean how to program the PIC16F877. i want this PIC to read the signal from sensor and at same time read the information from PC (at any language C or any thing bec, iam not very well in Programming ) and compare what iam set in the Program i mean the Temperature( like e.g if i set the temp at 25 then when the PIC16F877 do campare between the Sensor then send the signal to feedback to Fan or any thing.

There are basically two approaches to your problem.

One way is outlined in the second paragraph. The PIC senses the temperature and depending upon the temperature w.r.t a set temperature, the PIC calculates the fan speed (either ON/OFF or high/low speed). The communication to the PC is limited to the current temperature and receiving the setpoint temperature.

However, you also mentioned that you are "not very well in Programming ". This will probably preclude you from programming anything sophisticated in PIC assembly language. You therefore intend to write in the C programming language.

This raises a second option: The PIC senses the temperature and sends this info via serial communications to the PC. All control calculations are done on the PC and the result of the calculation (either fan ON/OFF or fan speed setting) will be sent back to the PIC to control the fan.
 
AFTERDATE said:
hello Alex
i want this PIC to read the signal from sensor and at same time read the information from PC (at any language C or any thing bec, iam not very well in Programming ) and compare what iam set in the Program i mean the Temperature( like e.g if i set the temp at 25 then when the PIC16F877 do campare between the Sensor then send the signal to feedback to Fan or any thing.

thank you
the best regards

I don't think this is a good idea.Because then you will have to run the whole algorithm on the poor PIC.And leave the PC - which is a thousand times more powerful than the PIC - broadcasting only your temperature setting.And I bet you will find it annoying to modify your algorithm code over and over again by reprogramming the chip.

As
I said:
just using it as an interface,for both the temperature input and the heating control output.
I would suggest the PIC used only as a control and feedback interface.Make up a simple duplex serial protocol,in which the temperature readout is uploaded to the PC and control data is sent back to the PIC.The control data is calculated according to an algorithm based upon the value of temperature readings.Also use graphical functions provided by the PC software to draw temperature curves.

This will take you much effort,but you will succeed eventually.Good luck.
 
Status
Not open for further replies.

Latest threads

Back
Top