Results 1 to 3 of 3
  1. #1
    michaelwest is offline Member
    Join Date
    Feb 2010
    Posts
    1
    Rep Power
    0

    Default Reading a temperature sensor in Java

    I am beginning to program a data acquisition system for a piece of machinery. What I am stuck on is how to actually hook my thermistor to the computer so it can read it. I know this project is probably too much for my knowledge, but can someone point me in the right direction for beginners? I need to hook up a thermistor to my pc and to read its value every few seconds. The programming part I think I can handle, what I need help with is the hardware to begin.

  2. #2
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    Why don't you send e-mail directly to manufacturer and ask them.

    If they don't answer post your question on some hardware forum,
    with details : model, interfaces, manuals, links...

    Sometime device comes with interface to connect to PC
    sometimes you have to make adapter for it and connect to PC.

    good luck!

  3. #3
    rdtindsm is offline Member
    Join Date
    Feb 2009
    Posts
    92
    Rep Power
    0

    Default

    Don't mean to be critical, but your question does show naivete about the hardware because it is very open ended about how you will be interfacing with the thermocouple. I apologize if I am misreading your level of knowledge.

    You wouldn't read a thermocouple directly. First, you would need a circuit to drive the thermocouple and create an output voltage. This most likely would be a relatively simple op amp circuit. Then you need an ADC (analog to digital converter). Chips are readily available. Then you will need an interface circuit, i.e., registers that can read and return the ADC value when addressed by the computer. This is the type of project that could be done by an undergrad engineering student, possibly as a multi-session lab, but might be a much more difficult project in JAVA than in C/C++ because of an extra level of development.

    Different processors have different methods for addressing these types of devices. INTEL has an instruction to read hardware specific input ports, most system simply treat hardware as memory that can be read and written to.

    I am not an expert in JAVA, but would have thought that C and C++ would be much better for this type of task and that JAVA would be an inappropriate choice for this type of task. A few minutes with google pointed out that one of the restrictions of designing machine independent code is loosing the ability to read the hardware directly.

    C/C++ use pointers to access memory mapped ports and have the ability to use assembly instructions if you need to use assembly IN and OUT instructions on an INTEL chip. The same search points out that there are methods to link to native code - the machine level code generated by the compiler that will read your interface circuit.

    I found this link

    Java performance Issues (IV) - Hardware interfacing | Java Tips Blog

    I also am seeing some references that suggest that you can read the serial port through the comm interface, and that parallel port is also accessible.

    Hope this points you in a correct direction.

Similar Threads

  1. Replies: 5
    Last Post: 08-21-2009, 11:03 AM
  2. temperature program with inputs
    By JingGong in forum New To Java
    Replies: 3
    Last Post: 10-17-2008, 06:34 PM
  3. Temperature converstion
    By jamesov89 in forum New To Java
    Replies: 6
    Last Post: 09-29-2008, 04:51 AM
  4. reading dir in java applets
    By willemjav in forum Java Applets
    Replies: 3
    Last Post: 02-07-2008, 12:36 AM
  5. Question abt.reading xml file using java
    By gvi in forum Advanced Java
    Replies: 6
    Last Post: 11-08-2007, 05:48 PM

Posting Permissions

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