Using the temp sensor with JeeNode?

Questions about Modern Device and JeeLabs Sensors
Post Reply
vrillusions
Posts: 5
Joined: Sat Jan 14, 2012 6:47 am

Using the temp sensor with JeeNode?

Post by vrillusions » Sat Jan 14, 2012 2:38 pm

I bought a temp sensor and jeenode to hopefully have a simple temperature sensor setup. There were a couple issues with migrating the LibTemperature library to arduino ide 1.0 but after that got fixed all I get on serial console is "Temp: " with no temperature. I tried plugging it into the jeenode in a couple configurations and couldn't get anything. Then looked up the actual pin outs and from what I can tell the jeenode does analog ports 0-3 where this wants ports 2-5. Is there a way to specify the ports to use in libtemperature? Looking at it and only ports I see mentioned are pins 16 and 17 for ground and vcc.

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: Using the temp sensor with JeeNode?

Post by paul » Sat Jan 14, 2012 3:39 pm

Jean Claude has bit-banged the I2C on ports ("manually" controlling the pins).
The LibTemp library uses the I2C pins - which BTW are available on the JeeNode toward the power end of the board.

So - you can either hook it up to the I2C pins
OR - we can write another library with Jean-Claude's I2C class.

I'll see what I can do on this front. Jean-Claude is fairly brutal about not commenting his code but I'll ask him for help if I have to.

Hope that makes thing clear anyway.

Paul

vrillusions
Posts: 5
Joined: Sat Jan 14, 2012 6:47 am

Re: Using the temp sensor with JeeNode?

Post by vrillusions » Sat Jan 14, 2012 5:06 pm

Should it "just work" off those I2C pins? Tried it since I noticed the 4 pins in the center match the gnd, pwr, data, clock on the sensor and it still just outputs "Temp:" and nothing else.

vrillusions
Posts: 5
Joined: Sat Jan 14, 2012 6:47 am

Re: Using the temp sensor with JeeNode?

Post by vrillusions » Sat Jan 14, 2012 5:25 pm

OK I finally found out how someone else did it. Took their code, stripped out the thermostat stuff and now it just says "256.00 Deg C 492.79 Deg F" which I found out just means it's not getting any data (gives the same thing if it's disconnected) But it may help with writing a ports version.

vrillusions
Posts: 5
Joined: Sat Jan 14, 2012 6:47 am

Re: Using the temp sensor with JeeNode?

Post by vrillusions » Sat Jan 14, 2012 9:41 pm

(can't seem to edit posts? (edit) I guess you can but only for a certain time)

Found another link on that site that has just the temperature sensor code already. Tried that, made sure to change port back to port 1, verified I have the wires hooked up like the picture shows, and still nothing (well, always 256C)

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: Using the temp sensor with JeeNode?

Post by paul » Sat Jan 14, 2012 10:19 pm

vrillusions,

Our I2C code should work from the I2C pins. You need to identify the power and ground and hook them up too.
The "map" of the pins is a bit obscure since it's all so small.

I'll be glad to send you some temp sensors to play with if you think you hosed the one you have. I'd like to get the JeeLink code worked out solidly - and I'm camped out on another project for the next ten days or so. Send us some email and we'll send you some sensors to play with, in the event you've missed something.

Paul

vrillusions
Posts: 5
Joined: Sat Jan 14, 2012 6:47 am

Re: Using the temp sensor with JeeNode?

Post by vrillusions » Fri Feb 03, 2012 1:28 pm

So last night I went ahead and desoldered the header (desoldering headers are such a pain...) and move them to the other 4 and now it works. I just assumed that both sets were the same but I guess not. perhaps it should be mentioned somewhere that it MUST go in the 4 holes that are pictured (second picture when looking at the product page)

emdeex
Posts: 3
Joined: Tue May 01, 2012 8:00 pm

Re: Using the temp sensor with JeeNode?

Post by emdeex » Tue May 01, 2012 8:15 pm

I'm trying to get this TMP421 sensor and a JeeUSB working. No luck so far.

I've got the TMP421 soldered to its header, the same way as in the photo. In line with the grnd, vin, sdi, scl labels.

I'm not sure how to plug it into the Jeenode ports which are 6 pin headers.

This http://www.ka1kjz.com/?p=520, says the TMP421 is not pin compatible with JeeNode. Is that right? Do I have to make a breakout board?

I thought this TMP421 sensor would have been plug-n-play with the jeenode. I think the product page needs to be updated to reflect on how to get this working with jeenode.

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: Using the temp sensor with JeeNode?

Post by paul » Wed May 02, 2012 2:51 pm

This http://www.ka1kjz.com/?p=520, says the TMP421 is not pin compatible with JeeNode. Is that right? Do I have to make a breakout board?


Sigh - yes you have to remap ground, power, sda, scl to their proper JeeNode locations if you want to use a port.
The other way that works is to use the 8 pin header that includes sda and scl. Then I think our code will work

Here's a picture of the idea.[img]TempJeeNodeLashUp.jpg[/img]

Guess it's time for a respin of the sensor with a proper JN Port header.
Attachments
TempJeeNodeLashUp.jpg
(169.66 KiB) Downloaded 10611 times

emdeex
Posts: 3
Joined: Tue May 01, 2012 8:00 pm

Re: Using the temp sensor with JeeNode?

Post by emdeex » Wed May 02, 2012 5:56 pm

paul wrote:This http://www.ka1kjz.com/?p=520, says the TMP421 is not pin compatible with JeeNode. Is that right? Do I have to make a breakout board?

Sigh - yes you have to remap ground, power, sda, scl to their proper JeeNode locations if you want to use a port.
The other way that works is to use the 8 pin header that includes sda and scl. Then I think our code will work
In that image, can I confirm you've got the mapping like:

TMP421 - Jeenode port3 header
ground-ground
vin-dio

TMP421 - Jeenode I2C header
sdi-sda
scl-scl

emdeex
Posts: 3
Joined: Tue May 01, 2012 8:00 pm

Re: Using the temp sensor with JeeNode?

Post by emdeex » Mon May 07, 2012 5:53 pm

*bump* Is there any better way of getting a prompt reply from Modern Device? I've been waiting for some advice. What is the best support email address to use?

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: Using the temp sensor with JeeNode?

Post by mndless » Mon Jun 11, 2012 8:35 pm

Any updates on this?? I'm ready to order a temp sensor for a JN? Unless there is another one you'd recommend... just need temp...

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: Using the temp sensor with JeeNode?

Post by paul » Wed Jun 13, 2012 11:00 am

Sorry guys - I have never been able to get the forum to send me messages 100% reliably.

In the photo above I'm using the actual sda and scl pins on the jeenode's 8 pin header.

The white wire is going to 3.3V - it is not going to the DIO pin as it might appear.
The pin that is underneath the power pin on the temp sensor is PWR - which might or might not work depending on how the board was powered.
TMP421 - Jeenode port3 header
ground-ground
vin-dio // That is not going to DIO but to the 3.3V line

TMP421 - Jeenode I2C header
sdi-sda
scl-scl
So the pins on the sensor are, in order from the left in the photo.
GND, PWR (but not over 5V), SDA, SCL

There is also no reason why the temp sensor can't be used on a jeenode port - the code is out there by others.
I just haven't hooked one up that way. I'll put some photos and code on the blog TODO list.
*bump* Is there any better way of getting a prompt reply from Modern Device? I've been waiting for some advice. What is the best support email address to use?
Support and sales@moderndevice.com do get read every day, but it's a small company and things sometimes fall through the cracks. Just bump us again.




Paul

mndless
Posts: 17
Joined: Sun Jul 03, 2011 3:24 pm

Re: Using the temp sensor with JeeNode?

Post by mndless » Wed Jun 13, 2012 4:43 pm

Thanks Paul.... got a couple on the way, I'll play with it a couple of ways and post a pic, if it turns out ok :)

Post Reply