Lately i’ve been working with an Arduino Uno, which i want to use as a DAQ to control a centrifugal pump according to temperature readings. The idea is, if the water at the entrance gets hot (it is a closed system with water flowing all the time) i want the pump to accelerate. With a tutorial I found on youtube (I’m sorry that it is in spanish Control de Temperatura con Arduino y Labview - YouTube ), i was already able to get readings from the DS18B20 temperature sensor. The things I did were:
I modified the “Labviewinterfaceforarduino.h” file that is uploaded onto the Arduino, so i included the variables, the functions and the corresponding case that allowed me to read from the sensor. That is, i found the code ( http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html )that worked correctly with Arduino IDE, and copied that to the .h file i just mentioned. Now I want to use a X9C103P digital potentiometer that works with a PWM input, to control the speed of a pump (the digital potentiometer would be connected to a frequency inverter that according to resistance would change the value so the speed of rotation of the pump is the one i want) according to the temperature reading.
A person already wrote some lines of code ( http://forum.arduino.cc/index.php/topic,68074.0.html ) to be able to read from this kind of potentiometer, but i have a question about it. For example, in the DS18B20 code (a .h file) i could see clearly where the variables and the functions were. In the code of the potentiometer i am mentioning there are extra inputs and i dont really know how to couple that with the code i upload on the Arduino, and the work i have to make afterwards when making the control diagram on LabVIEW. Any advice would be enormously appreciated.
This is the code that goes onto the Arduino (I added the case 0x35). I want to know how to modify it so i can control the potentiometer with an input, and how could i do that on LabVIEW (Setup the inputs and outputs for this case).
Thank you very much!
The new 'Labviewinterfaceforarduino.ino" : LabVIEWInterface.ino - Google Drive