RE: Um...My Temp in F Degrees is the Same as the C Degrees/Dang!

Hello Dennis,

Seth here. Thank you for all that info. I will look further into the specification sheet on this particular product. Now, I know this is not your issue but here goes…

I try to finish each book I get, i.e. no matter the changes in the kernel, image, and/or software I use. It is just a hobby for me as of now. I get the V and mV difference. I get basic math but I was unaware of the offset. The book, Programming the BeagleBone Black (Monk), stated something different. I was not expecting to see my readings as similar values. I understand a little more now.

The book had the readings at various temperatures, e.g. Fahrenheit was a completely different value compared to Celsius. This is the only reason I am in awe. I thought it was as easy as software, hardware, book, and understandings. I know now that I will need to delve deeper into learning before asking anything.

Seth

P.S. Sometimes I take time out to try out new books and software on the BBB and the other variations of that specific board. I am far from a “real McCoy” programmer that knows everything. I really do appreciate you helping me to better understand.

On Sat, 8 Jul 2017 18:22:41 -0700 (PDT), Mala Dies
<functt@gmail.com> declaimed the following:

Hello Dennis,

Seth here. Thank you for all that info. I will look further into the
specification sheet on this particular product. Now, I know this is not
your issue but here goes...

  Mostly I ran through all those equations to confirm what might be
happening; I'm not certain I even own a TMP36 in the back corner (my
apartment is a mess and I have to dig just to get to the
BBB/RPi/Arduino/TIVA/etc. stuff).

  There was also that matter where someone recommended that factor of
4096 was needed -- but I have trouble believing two books, both using the
same sensor and bonescript, could overlook such a factor.

  Compounding that, is an old report
analogRead does not work on Beaglebone Black · Issue #39 · jadonk/bonescript · GitHub that says the version of
bonescript on the old Angstrom OS already scaled the analog reading into
the 1.8V (well, 1800mV) range -- so the multiplication by 1.8 (or 1800)
wouldn't be needed for them. Yet the documentation at
http://beagleboard.org/Support/BoneScript/analogRead/ (which of about the
same time frame as the other report) states it returns a float between 0
and 1, where 1 => 1.8V, hence the scaling factor IS needed here.

  I'm tempted to ask you to try
http://www.toptechboy.com/tutorial/beaglebone-black-lesson-9-reading-analog-inputs-from-python/
(which is using a simple potentiometer to set values, and does not use
node.js weird [to me] "everything is an asynchronous callback"). I believe
recent builds of the Debian OS already include Adafruit_BBIO, but if not it
isn't difficult to fetch.

  Maybe also try using a different Analog input pin. The advantage to
trying with the potentiometer is that you can easily sweep through the
entire range from 0.0 to 1.8V. If you still keep getting 0.0, then either
you are wired to the wrong pins, the pins are configured for digital (GPIO
0/1), or you have a faulty ADC [burned out from overload with >1.8V at some
time -- but without killing the rest of the BBB].

  Note that the Python version of the TMP36 exercise is on page 102 of
[Chavan]; [Monk} is only bonescript, so no help

I try to finish each book I get, i.e. no matter the changes in the kernel,
image, and/or software I use. It is just a hobby for me as of now. I get
the V and mV difference. I get basic math but I was unaware of the offset.
The book, Programming the BeagleBone Black (Monk), stated something
different. I was not expecting to see my readings as similar values. I
understand a little more now.

  The main problem is that you aren't getting /valid/ readings; and the
invalid readings are noise close to the point where Celsius and Fahrenheit
scales manage to cross over (-40 is the same temperature in both, but +40
is a cold day in Fahrenheit, and a deadly heat wave in Celsius).

  Try with a potentiometer (you could even use the same program, just
pretend the setting is a temperature)... [Use a fixed pitch font to view
diagram]

1.8V ---+
        >
        $--- ADC
        >
GND ---+

(where $ is the potentiometer). With the pot all the way down you should
get "temps" of -50degC, and turned all the way up should get 130degC,
half-way should give 40degC.

Hello Dennis,

Seth here, again. Thank you again for all this info. I will look into it. It may take me a while to reply next time. I need to order some POTs and try the task at hand.

Seth

P.S. I could have burnt it out a while back on the TMP36. I will try a different pin too. I should be able to get back to you on the different pin soon.