Tip:
Highlight text to annotate it
X
This is development board BASIC STAMP 2. With it's help and some sensors, LED's and
fans, I will control the temperature and the light from this small-scale room.
Every development board contains a chip basic interpreter, internal memory RAM and EEPROM,
5V regulator, but also a set of integrated commands for I/O pins.
This module is the most popular, because it has a storage of programming of 2KB and 16 I/O pins.
It has his own processor, memory, and clock. This is PIC16F57 which is using.
The Sensor used for measurement of light intensity and for giving a frequency output response
is TSL230RD. This is produced by TAOS. I didn`t found the THT version of this sensor so i used this one and an SOIC8 to THTadapter
Also i soldered some pins so i can fix it to breadboard.
This converts the light fall on the array of photodiodes in frequency,
sending the response to microcontroller through PIN6;
Also the sensitivity can be set by PIN 1(S0) and PIN 2(S1). For printing via's on the PCB i used the thermic(classic) method with the iron.
Also for building this room to a reduced-scale i used a cardboard box
Then i create the holes just for the cooling and heating system because i wanted to maintain a closed environment.
For the start i`ll show you how i created the excel sheet using PLX-DAQ.
This is simple to create. You can do it by your own desires. The cells for reading and writing we can set from the source code.
For e.g. here at light sensor section, i set the reading cell (D7)
and the write cell to (D6).
This will work only if we`ll activate Macros. Now it`s activated. The windows appears.
For opening this windows, we must close the debug window from Basic Stamp Editor. I set a light threshold of 100, and in function
of that threshold my LED's will turn ON/OFF. Now i turn ON the board, we download the code
to BS2 module. Oops, my usb cable was plugged out, this is why the error appeared.
So we download the code, we close debug window, then we can connect to plx-daq.
I set the light to 50 before. Now i`ll set it to 100, and right now i`m covering the
light sensor. As you can see, when i cover the sensor, the light intensity value will decrease,
and the LED`s will turn on. Now i`m gonna cover it completely and all my LED`s will turn ON.
And after i`ll get my hand, they will turn off. The sensor work this way:
The light intensity which is falling to it, is converted to frequency, the output
of frequency being direct proportional with intensity. This will be send to the microcontroller,
and the data will be sent to excel sheet. For output of the LED's i set 3 pins. And
the LED's will turn on by comparing the threshold value of the light and the read light from the room.
NOW, let`s get to measuring and control the temperature.
The sensor used to measure temperature and relative humidity is SHT15
being manufactured by Sensirion. It has a detection element build
from capacitive polimer for relative humidity, and a bandgap temperature sensor.
They are both in the same capsule. I powered the sensor from Vdd pin (5V), last PIN to ground(Vss),
and DATA pin to PIN 15, respectively Clock pin to PIN13. The sensor works this way:
It reads the analog value which then converts them to digital data, because of the built-in
ADC converter. The data is transmitted to microcontroller, then to excel sheet, and
displayed in B6,B7 Cells. The B5 CELL is for control. Here we can introduce desired temperature,
and the fans will turn ON/OFF. Right now, the read temperature is 26,3 Celsius Degree.
If i set 24 Degrees, the cooling fan will turn ON. The temperature will go down, and
when it will reach 24 Degress it will stop. So now, in this hole, cold air is coming in.
To stop wasting time to cool down, i`ll set the temperature to 27 Degrees, then the heating
fan will turn ON. This introduce warm air from the room, until the temperature will
reach 27 Degrees. As you can see, the heating fan is ON.This introduces warm air in the tiny room.
So, this was my final project, if you have questions or sugestions you can leave a comment
or don`t hesitate to contact me on e-mail from description. And don`t forget to Like/Subscribe
:) Thank you!