LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW LCD (16x2) with DHT11 (LIFA)

Hi,

 

I have a project which involves a DHT11 (Temperature and Humidity) sensor, a 16x2 LCD w/o I2C, Arduino, and LabVIEW as the main coder (LIFA).

 

When I first tested the DHT11 sensor using the LIFA DHTXX LV09 Rev B, which I got from one of the forums here, the results were okay.

I was getting around 31-33 temperature and humidity of around 69-71. Although when I added the code blocks for the 16x2 LCD, the sensor's data went from temp of 31 to 48 to 71 to 48 then back to 31 again as well as the data for humidity (attached below).

I am sure about the code for the LCD. It shouldn't affect the sensor's data since the LCD was only used for data output.

Any help would be greatly appreciated!

P.S. attached below is the code block used in labview. (pin 9 is DHT11 pin)

0 Kudos
Message 1 of 14
(5,765 Views)

Hi,

 

Since the results at first were ok, and after you added the code blocks for the 16x2 LCD, they changed. I recommend you to use the "Diagram Disable Structures" which helps you to run select portions of your code, in order for you to easily debug the error and to see if this still happens.

Link: http://www.ni.com/white-paper/3684/en/

 

Regards,

0 Kudos
Message 2 of 14
(5,711 Views)

Thanks for your suggestion, though I don't actually know what part of the code I should cease from working since it's a pretty simple code. Also, do you have any example of LCD 16x2 with or without I2C to work on LINX? I am currently trying the LINX environment if it would be any better than LIFA. I have searched almost all sites and I have not found a single working LCD 16x2 on LINX, is it even possible? Thanks again!

0 Kudos
Message 3 of 14
(5,690 Views)

Hi paolo26 I know of something you can try with your original code. Put your DHT read subvi in line with your LCD code. Do not branch the arduino resource line as you are working with serial. I bet you are getting an error with one of the 2 close subvi's depending on the race condition of which one closes the resource first. Hopefully this will help.

 The creator of the LIFA toolkit stopped support and development of it when he went on to develop LINX. LINX supports more devices and is better documented if you want to add something that isn't already supported. But even with LINX the forum support seems to be lacking at LabVIEW MakerHub. 

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 4 of 14
(5,685 Views)

Thanks GovBob for your suggestion! I have tried it with both the LM35 Temperature sensor as well as the DHT11 Humidity and Temperature sensor but both sensors gives the same problem as before on the non-linear code block. I really don't understand how come that a display device such as an LCD can affect the data on my sensors. Thanks again anyway!

0 Kudos
Message 5 of 14
(5,678 Views)

Hello again, I have tried working with LINX and it really is better and bug-free compared to LIFA. I'm just trying to configure the LCD cursors to have the string "Temp: " displayed with the reading beside it. Thanks again! 😄

0 Kudos
Message 6 of 14
(5,676 Views)

I'm glad you are making some headway. Did you find some vi's in the LINX toolkit that support your 16x2 LCD display? If not you will probably have to find a arduino library that works on your particular hardware and create a custom command for it according to the LabVIEW MakerHub documentation that Sam K. put together. 

As to why you should not branch the Arduino Reference wire Sam's FAQ's describe it pretty well in layman's terms. 

When you get this working why not post your solution as I'm sure a lot of people will benefit from your solution? Probably the best place to do this is the MakerHub LINX forum under a new topic with a link to it from this forum. 

 

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 7 of 14
(5,666 Views)

Hi, sorry for the late reply. I was a bit busy preparing for our presentation on the said project. Regardless, can you recommend or teach me how or where I can post the project online in order for me to share it with everyone else? Thanks again! 🙂

0 Kudos
Message 8 of 14
(5,646 Views)

Hello, I do the same job using DTH11 and when executing the program I get the same error. Please, if you have found the solution very helpful. Sorry for the English I'm from Argentina

0 Kudos
Message 9 of 14
(5,536 Views)

20180828_191448.jpg20180828_191545.jpg

0 Kudos
Message 10 of 14
(5,519 Views)