Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Phidgets temp sensor not working!

  1. #1
    Constant Bitrate
    Join Date
    Mar 2004
    Location
    California
    Posts
    135

    Phidgets temp sensor not working!

    My phidgets temp sensors don't seem to be outputting. I've set up the skin file as documented, and I have tried both PHIDT0 and PHIDT1 for the temp code for the port labelled 0 on the 8/8/8 interface. Any ideas?

    Demo apps work fine.
    Kevin
    Audi A4 Carputer, 80% setup.

  2. #2
    Constant Bitrate
    Join Date
    Mar 2004
    Location
    California
    Posts
    135
    I wrote my own test app, and I'm able to receive sensor values from all my temperature sensors. So I'm still a little confused on what's wrong with it in RR.
    Kevin
    Audi A4 Carputer, 80% setup.

  3. #3
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,814
    can you send me the code you made for your test app ?? all I did was follow the documentation on setting it up.. but I never did have the equip. to test it.. so I posted it was "not confirmed yet", but since you have your code working, if you let me look at it I can most definitely make sure it follows your logic..
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  4. #4
    Newbie
    Join Date
    Feb 2005
    Posts
    22
    Kevin,
    can i also have the code you wrote..? i have the 4 temp sensor and i can't get it to work with RR. I downloaded the dos and win programs to test but they don't seem to run on XP?
    anyone else using the 4 temp sensor? and is it working with RR?

    andy
    andy.morris at woodward dot edu

  5. #5
    Maximum Bitrate DjBac's Avatar
    Join Date
    Jun 2004
    Location
    GREECE/Athens
    Posts
    702
    Quote Originally Posted by guino
    can you send me the code you made for your test app ?? all I did was follow the documentation on setting it up.. but I never did have the equip. to test it.. so I posted it was "not confirmed yet", but since you have your code working, if you let me look at it I can most definitely make sure it follows your logic..
    Guino, if there is anything I can do to help you on Phidgets just ask!!! My app is based on phidgets so I know something about it!!

  6. #6
    FLAC mauri's Avatar
    Join Date
    Jan 2004
    Posts
    1,006
    Quote Originally Posted by ajmorris
    Kevin,
    can i also have the code you wrote..? i have the 4 temp sensor and i can't get it to work with RR. I downloaded the dos and win programs to test but they don't seem to run on XP?
    anyone else using the 4 temp sensor? and is it working with RR?

    andy
    andy.morris at woodward dot edu
    I use my home made temp. reader hardware type kit posted to Guino and my personal serial voltmeter hardware, 4 sensor DS18B20 and work all devices ok with RR

    Mauri

  7. #7
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,814
    Quote Originally Posted by ajmorris
    Kevin,
    can i also have the code you wrote..? i have the 4 temp sensor and i can't get it to work with RR. I downloaded the dos and win programs to test but they don't seem to run on XP?
    anyone else using the 4 temp sensor? and is it working with RR?
    andy
    andy.morris at woodward dot edu
    Is this the KIT posted on the links section of my site ?? if so, have you tried it with Hyperterminal to see if it's outputting any data ?
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  8. #8
    Constant Bitrate
    Join Date
    Mar 2004
    Location
    California
    Posts
    135
    Well, I'll paste the code, but keep in mind that it is for VJ#.NET as opposed to VC#.NET or VC++.NET. Although the beauty of VS.NET 2003 and up is that all the languages offer the same access to the .NET core and only syntax sets them apart (mostly).

    This code loads my phidgets interface, with my specific serial number, and then looks for a temperature sensor and outputs the values:

    Code:
    		PHIDGET.PhidgetInterfaceKitClass ik = new PHIDGET.PhidgetInterfaceKitClass();
    		ik.Open(false, 7252);
    		System.out.println("DEBUG: PhidgetInterfaceKit: "
    			+ ik.get_DeviceType() + " "
    			+ ik.get_IsAttached() + " "
    			+ ik.get_DeviceVersion() + " "
    			+ ik.get_LibraryVersion() + " " 
    			+ ik.get_NumSensors() + " "
    			+ ik.get_SerialNumber() + " "
    			);
    
    		for (int i=0; i<1000; i++)
    		{
    			temp1c = (ik.get_SensorValue(0) - 200) / 4;
    			temp1f = ((temp1c * 9) / 5) + 32;
    			System.out.println("DEBUG: PhidgetInterfaceKit: Sensor 0 = " 
    				+ temp1c + "C/" + temp1f + "F");		
    			temp2c = (ik.get_SensorValue(1) - 200) / 4;
    			temp2f = ((temp2c * 9) / 5) + 32;
    			System.out.println("DEBUG: PhidgetInterfaceKit: Sensor 1 = " 
    				+ temp2c + "C/" + temp2f + "F");		
    			lTemp1.set_Text(temp1c + "/" + temp1f);
    			lTemp2.set_Text(temp2c + "/" + temp2f);	
    			this.Update();
    			System.Threading.Thread.Sleep(250);
    		}
    Sample output:

    DEBUG: PhidgetInterfaceKit: PhidgetInterfaceKit true 8.2 Phidget20 DLL Version 1.0.3
    Phidget COM Library 2.0.6 8 7252
    DEBUG: PhidgetInterfaceKit: Sensor 0 = 26.0C/78.8F
    DEBUG: PhidgetInterfaceKit: Sensor 1 = 27.0C/80.6F
    DEBUG: PhidgetInterfaceKit: Sensor 0 = 26.0C/78.8F
    DEBUG: PhidgetInterfaceKit: Sensor 1 = 27.0C/80.6F
    DEBUG: PhidgetInterfaceKit: Sensor 0 = 26.0C/78.8F
    DEBUG: PhidgetInterfaceKit: Sensor 1 = 27.0C/80.6F
    ...


    Notice there is no need to "calibrate" the sensors. Most of that is hogwash anyway. The sensors report a value in the hundreds, and it has to be convert ed to a proper degree in either Celsius or Farenheit, and the "calibration" is really just the "normalization" you can do (minimum and maximum normalization), mainly used to simplify the detection of changed degrees (in other words, you could set the minimum normalization to 300 if the current value was showing 300, and then you'd get a 0 value back, then in an increase temp environment, you could see the actual increase, rather than have to store and then calculate based on orig temp, it's useless in most environments I think)


    Let me know if there's anything else I can do to help!
    Kevin
    Audi A4 Carputer, 80% setup.

  9. #9
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,814
    Hold on there.. that doesn't seem anything like the PhidGet TEMPERATURE sensor interface I looked at.. the one I made support for is of a Class: PHIDGET.PhidgetTemperatureSensor and I use the Temperature(SENSOR) method to obtain it's temperature... it just seems like you're using a different Kit or board that wasn't meant for temperature... what's up with that ??
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  10. #10
    Constant Bitrate
    Join Date
    Mar 2004
    Location
    California
    Posts
    135
    Well, the API is named differently under VJ# but it's just using the 2.0.x COM object anyway, so it's more or less the same thing.

    I'm not loading the temperature sensor object. I could never get it working under the VJ# api the way I wanted to. So, the way I'm doing it is actually much cleaner, and better in my opinion.

    Basically, I'm using PHIDGET.PhidgetInterfaceKitClass to talk to the 8/8/8 board (you could even use it for all the other boards), and calling the get_SensorValue() method (which is probably PhidgetInterfaceKit.SensorValue() in C# or C++). It lets me grab the value for ANY sensor, or input on the board, so it's not specific to just temperature sensors. Then, I convert the value to temp using the formula that Phidgets provided to do that (using Temperature = (SensorValue - 200)/4 as noted at http://www.phidgetsusa.com/viewproduct.asp?SKU=1114).

    In a much larger scale application that does autodetection, this would not work so well (i.e. to determine which port temp sensors are on, etc), but since we are specifying which phidget device port we're using in the skin, this method would work very well. Although, notice I'm specifying the serial number of the phidgets interface kit directly in my code (7252 I think it was) rather than detecting it. That is because your system could very well have multiple boards. Perhaps having that as an option in the skin would be nice as well, so you could specify specifically WHICH board your sensor was on...

    For example, maybe something like:

    L................."PHID:7252:T:0" "c2f"

    to mean:

    Phidgets, connect to kit with serial of 7252, temp sensor, port 0

    Also, you are ignoring the COM PORT field setting if using Phidgets right?
    Kevin
    Audi A4 Carputer, 80% setup.

Page 1 of 2 12 LastLast

Similar Threads

  1. Anyone Destinator working in Centrafuse ?
    By superbowl in forum Centrafuse
    Replies: 31
    Last Post: 02-05-2005, 11:30 AM
  2. Via Epia M-900 Video Drivers Not working
    By mattdisaster in forum General Hardware Discussion
    Replies: 2
    Last Post: 01-06-2005, 10:33 AM
  3. Temp displayed constantly?
    By Skipjacks in forum Engine Management, OBD-II, Engine Diagnostics, etc.
    Replies: 19
    Last Post: 12-30-2004, 03:08 PM
  4. Phidgets
    By strandtc in forum General Hardware Discussion
    Replies: 1
    Last Post: 09-04-2004, 01:44 AM
  5. motorized screen stopped working :(
    By corsamel in forum LCD/Display
    Replies: 0
    Last Post: 11-26-2002, 10:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •