industriesyer.blogg.se

Dht11 flow sensor library for proteus 8
Dht11 flow sensor library for proteus 8












dht11 flow sensor library for proteus 8 dht11 flow sensor library for proteus 8

The line temperature = 223 means adding the degree symbol (°). The number 48 is used to convert decimal numbers to AscII because the LCD works with AscII format. For example if the temperature value is 42 => 42 / 10 = 4 and 42 % 10 = 2. TestPin: It is used for simulation purposes only. Ao (Out): It’s an analog output signal from the sensor. This sensor carries 4 pins in total, named: V (Vcc): We’ll provide +5V here. This line means the 7th character of the array is equal to the tens of temperature value temperature = Temp % 10 + 48 (Temp%10 equals to the remainder of Temp/10)Īnd this line means the 8th character of the array is equal to the ones of temperature value. You can see in the figure above, I have placed one Soil Moisture Sensor inside the Proteus workspace.

dht11 flow sensor library for proteus 8

For example the temperature value is copied to the array temperature as follows: temperature = Temp / 10 + 48 Humidity and temperature values are copied to the previous arrays before displaying it. The values of the humidity and temperature needs to be displayed on the LCD after the reading, and for that I used two character arrays named: temperature (char temperature = “Temp = 00.0 C “ ) and humidity (char humidity = “RH = 00.0 % “ ). Since the DHT11 sensor resolution is 1, the values of the humidity and temperature are stored in two variables with type byte (8-bit unsigned), I named them RH (for the humidity) and Temp (for the temperature). This library initiates the DHT11 sensor and reads the values of the humidity and temperature. In this interfacing I used DHT sensors library (DHT11, DHT21 and DHT22) from Adafruit. The 10K variable resistor is used to control the contrast of the LCD screen and the 330 ohm resistor supplies the LCD backlight LED. A pull-up resistor should be added to the data pin with a value between 4.7K and 10K. As show in the circuit schematic the DHT11 sensor has 4 pins: VCC (+5V), Data, NC(not connected pin) and GND (from left to right).














Dht11 flow sensor library for proteus 8