Results 1 to 3 of 3
- 02-22-2010, 09:41 PM #1
Member
- Join Date
- Feb 2010
- Posts
- 1
- Rep Power
- 0
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.
- 02-22-2010, 10:15 PM #2
Senior Member
- Join Date
- Dec 2009
- Location
- Belgrade, Serbia
- Posts
- 364
- Rep Power
- 4
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!
- 02-23-2010, 03:59 AM #3
Member
- Join Date
- Feb 2009
- Posts
- 92
- Rep Power
- 0
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
-
problem with reading excel sheet data reading using poi libraries
By sandeepsai17 in forum New To JavaReplies: 5Last Post: 08-21-2009, 11:03 AM -
temperature program with inputs
By JingGong in forum New To JavaReplies: 3Last Post: 10-17-2008, 06:34 PM -
Temperature converstion
By jamesov89 in forum New To JavaReplies: 6Last Post: 09-29-2008, 04:51 AM -
reading dir in java applets
By willemjav in forum Java AppletsReplies: 3Last Post: 02-07-2008, 12:36 AM -
Question abt.reading xml file using java
By gvi in forum Advanced JavaReplies: 6Last Post: 11-08-2007, 05:48 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks