Panda II TempSensor

Thanks for the code, but it did not make a difference, I am still getting “Device not detected”. So, at this point I will declare it a bad e-block, and move on.

@ All, is anybody else having problems with their e-blocks, or is it just a one in a million occurrence, that happened with me?

So I’m confused.

The e-block temperature sensor that I can find in the catalog is this:
[url]http://www.ghielectronics.com/catalog/product/156[/url]
which is an NTC thermistor. The sample code / driver is
http://www.ghielectronics.com/downloads/FEZ/Component/FEZ_Components_Thermometer.cs
.

That also seems to be the device that is in the Fez Ultimate kit, if that’s what you bought.

Is that the device you have?

If so, then the code you used (back over on page 1) is totally incorrect, as is the example a few posts back. Those samples are for a One Wire device. The NTC device simply uses an AnalogIn pin to read the voltage on the pin, whereas the One Wire devices need to actually communicate with the device.

Confirm what device you have, and then wire it correctly, and try out the right sample code and hopefully you might get more from it.

Yes, I have the thermometer e-block that came with the FEZ Ultimate Kit, which is what I have. OK, I will look at the Thermometer.cs program, I hope that will solve the problem.

Thanks

I looked at the code, and it is a driver for the e-block. I am wondering why there isn’t a complete solution in the Downloads & Tutorials section. For a newbie like myself, a complete program is what I would expect, so you could test out the e-block. Maybe there is a complete solution for this somewhere.

Makes sense.

I will get one for the temperature block later today.

Please hold.

Here goes :

http://code.tinyclr.com/project/383/pandaii-temperature-eblock-quick-test/

Download the ZIP file from this page.

Thanks Rajesh, I will implement as soon as I can. The code looks very straight forward, I thought it would be much more difficult. But, I am learning something new everyday.

I just tried the program, it works. Thank You very much! It shows that the FEZ Touch works, and the temp e-block works.

The only concern that I have is temp readings, sitting in a room with the temp at 70 F, the readings that I am getting are 46 F. The temp e-block can’t be that far off, can it?

So, now I have to get back to the SD card, try to figure out what is going on. With the temp sensor working, now I have something I can datalog on an SD card, hopefully.

I dont have the eblock with me, I may buy one in the days to come and then can report back on the actual temperature reading.

I am happy that you are chugging on.

For the SD card please try with another card.

The temp eBlock is a thermistor.

46/70 = 0.657
3.3/5 = 0.66

Looks like you are running it at 3.3V, when it should be 5V.

IF you are using FEZ Connect, there is a jumper that changes the power source at An% JST sockets. Make sure that it is set at 5volt side

[url]http://www.ghielectronics.com/downloads/FEZ/Shield/Broch_FEZ_Connect.pdf[/url]

Switching it over to the 5V side is a little bit better. I put the end of the e-block temp in the same proximity as a real thermometer, and the e-block is reading 62-64 F while the real thermometer is showing 72 F. So there still a fairly large difference in the two. If the e-block thermometer is measuring correctly, I guess I will need a more accurate device.

Is there a list that shows which e-blocks should be run at 3.3V, and which should be run at 5.0V? Or it does not make any difference.

What is the “real” accuracy of the tempsensor e-block? I ran the Rajesh program again, and it is still putting out the same temp readings. It is still about eight degrees off, if that is the case for all of the tempsensor e-block’s, I guess I have to find another solution. Any suggestions?

A side note: the program that Rajesh provided is an excellent example as to how a program should be written. I am still looking at it to get a feel for what is really in the program. Thanks again, Rajesh.

You can adjust the driver to calibrate the readings.

You can also easily connect a onewire chip and get accurate readings.

Gus, your answers are very terse, how would I go about accomplishing what you just mentioned?

I do not know the details of your application and was only making some suggestions. You have the source code so you can see how the temperature sensor is handled to make any necessary changes.

About digital onewire, have you looked at our tutorial page, it always have something fro everyone Support – GHI Electronics (search the page fro “temperature”)

The temp sensor is just reading an analog value. If you want to adjust the temperature, then you should take a range of samples at different temps and figure out how to scale the analog reading to your observed temperature, and update the calculation.

NTC thermistors are usually not that inaccurate - bing it and see what you can find that talks about sensitivity and accuracy.

I was looking at the code in thermometer.cs, and came across the line adc.SetLinearScale(-22,56). In the driver code that looks like the only line of code that could possibly adjust the readout of the thermometer. Now I looked in the .NET Micro Framework… stuff and could not find an explanation for what or how adc.SetLinearScale() works. Can anybody give me some information?

[url]http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/html/1a262f71-ceb9-22b6-4f94-ea1d7f894114.htm[/url]

Just did a quick google search to find this.

“Scales the analog value when reading automatically into a specific range.” So, does anybody have an explanation as to how this relates to getting the correct temperature reading from the sensor? -22,56, this does not make any sense to me.