LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fuzzy control using Labview and arduino

Dear all,

I have been trying to control the output of an LED using a fuzzy logic controller, based on temperature and humidity values that I receive from the DHT22 sensor via arduino in the LABVIEW setup, but the problem is, I am not sure how to set up the PWM pin of arduino for that purpose. I have used an arrangement for the setup but it has not given any LED signal so far. The VI is attached herewith.  PS- I have connected the LED to pin 6 (PWM pin) of the arduino UNO board.

 

As far as the data acquisition part is concerned, the setup is working fine and I am being able to get the values of temp, humidity and light intensity.

 

Any help in this regard would be highly appreciated.

0 Kudos
Message 1 of 6
(4,176 Views)

If I do not use the fuzzy controller and just try to record the sensor values then the vi I have used works perfectly fine and is attached below...The problem starts only when I try to configure the labview for PWM LED control...

0 Kudos
Message 2 of 6
(4,161 Views)

Just start with a simple VI commanding a PWM, and put a meter or a scope to see if the output changes.  If you can't get any output there is likley a problem with your setup.  If you are driving more than an LED you'll need some kind of buffer circuit or opamp to increase the current capabilities.  These micros can't drive much power so if you intend on using this PWM for controlling temperature and humidity you won't be able to drive it directly.

 

Also be aware that your loop time is going to be relativly slow, and not deterministic.  Most control systems like PIDs need to have tight timing to ensure that the system stays stable while having a decent response time.  Since temperature and humidity change pretty slowly this will likely work just fine.  But know that the time it takes to send a command to the Arduino, have it go out, take a sample and then send it back over serial won't be consistent.

0 Kudos
Message 3 of 6
(4,128 Views)

HELLO

im very happy to finally find a person whose project is almost as the same as me. i would really apreciate if you could help me with that.i want to control temperature and humidity with fuzzy controller and i want to tune the fuzzy controller in labview. i have the problem with communication between labview and Arduino board . i saw your vi and the difference between mine and yours is that for sending the control signal i am using the visa write but unfortunately it doesnt work. i want to know why you are using the ardunio write function? i am not using that because it does not work for me thats why i use write visa to send the control signal. i am also wondering why you are using a write visa in receiving sensor signals?.

however. the main reason that mine does not work is that the Arduno program has a problem that i can not solve it .can you please instruct me how to program in Arduino to receive control signal and send it to the actuator with digital output of arduino board. i will really be grateful if you can help m and i can proceed in this project after 3 months getting stuck in communication part

0 Kudos
Message 4 of 6
(3,028 Views)

This topic is 3 years old, and the poster hasn't posted anything in over a year.  There is a good bet you won't hear back.  I'd suggest making a new topic.  Also do more research in the different Arduino toolkits, and test out the included examples.  There are plenty of youtube videos demonstrating Arduino and LabVIEW communication too.

0 Kudos
Message 5 of 6
(3,016 Views)

i surfed the net a lot and i couldn't find a communication between labview fuzzy controller and arduino. because the out put of fuzzy controller can be any value and i should read it in arduino make some changes on it and then write it on digital output of arduino. so i need to write code in arduino....i need to have a protocol for communication between arduino and labview. this project is very important and i couldn't solve it yetSmiley Sad


@Hooovahh wrote:

This topic is 3 years old, and the poster hasn't posted anything in over a year.  There is a good bet you won't hear back.  I'd suggest making a new topic.  Also do more research in the different Arduino toolkits, and test out the included examples.  There are plenty of youtube videos demonstrating Arduino and LabVIEW communication too.



@Hooovahh wrote:

This topic is 3 years old, and the poster hasn't posted anything in over a year.  There is a good bet you won't hear back.  I'd suggest making a new topic.  Also do more research in the different Arduino toolkits, and test out the included examples.  There are plenty of youtube videos demonstrating Arduino and LabVIEW communication too.



@Hooovahh wrote:

This topic is 3 years old, and the poster hasn't posted anything in over a year.  There is a good bet you won't hear back.  I'd suggest making a new topic.  Also do more research in the different Arduino toolkits, and test out the included examples.  There are plenty of youtube videos demonstrating Arduino and LabVIEW communication too.


 

0 Kudos
Message 6 of 6
(3,009 Views)