Pages: [1]   Go Down
Author Topic: Arduino FIO with DS18B20 Onewire temp sensors  (Read 898 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Currently working on a project where the idea is to read temperatures from multiple DS18B20 connected to a Fio. These readings are sent by xbee to a Arduino ethernet and then to pachube/cosm.

I have soldered an audio-jack (female) connector to the Fio with the V to the battery, data line to digital pin 7,ground to digital pin 8 and a 4k7 pull-up between V and data.

For the temperature sensors, I have soldered these into audio-jack plugs, and the idea is to use regular jack cables and audio splitters(see below) to be able to expand the network of sensors to the number and locations wanted.




The setup currently works fine with one splitter and two sensors(on a 1 meter cable each)  connected to the board this way. My problem is when I try to add additional sensors, or longer cable length. The problem is then that no sensors seems to be present.


According to the data sheet of the DS18b20 it should be possible to achieve substantial cable length and number of devices.


My experience in electronic components/design is very limited som hoping some of you might be able to give me some guidance

1: The fio provides 3.3v while the data sheet states a range of 3 - 5.5v. Could it be that 3.3v is sufficient for a few sensors, but not for a larger number?

2: I chose the audio jack cables/connectors due to ease of supply if wanting to expand cable length.
Any reason for this cable not being a good solution?

3: Any other idea of what might be wrong?

In advance, thanks alot for any help!

Tomas
« Last Edit: October 10, 2012, 04:49:31 am by brattest » Logged

Belgium
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Just Do it (with Arduino of course)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

1: The fio provides 3.3v while the data sheet states a range of 3 - 5.5v. Could it be that 3.3v is sufficient for a few sensors, but not for a larger number?
Yes. It also depends on how long the cables are in total, reflections at each connector due to impedance mismatches etc.

Quote
2: I chose the audio jack cables/connectors due to ease of supply if wanting to expand cable length.
Any reason for this cable not being a good solution?
No, but you should try to avoid a "tree" structure with your cables, rather aim at a "chain", and not too many of your "splitters", because the contacts there will decrease the signal quality

Quote
3: Any other idea of what might be wrong?
IIRC, One thing is that the 4k7 resistor should ideally be placed at the "far end" of the bus, i.e. close to the farthest sensor (in the 3.5mm jack as well). You can try with 2 4k7 (one at each end of the chain), it shouldn't hurt.

In general, since you only use 1 pin/chain, it's a good idea to keep the number of sensors on a chain to a minimum (3-5). You have many pins on a Fio anyway :-)

Can you check with a 5V arduino if it works better ?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First of all, thanx alot for taking the time to answer =)

Quote
Can you check with a 5V arduino if it works better ?

Tried with a Arduino Ethernet board and then it works with two "splitters", three meters of cable and three sensors. Great! (Did not try with any more basically as I dont have any more splitters/cable avaliable at this time)

On the Fio, I did also try to move the 4k7 resistor to the end of the cable but without any luck.

I currently power the Fio from a 3.7v lipo battery. I have tried to optimize the code with regard to power consumption and have managed to get down to around 0.30mah during sleep. Basically the Fio is supposed to sleep for 5 minutes and then send the temperatures.

Would one solution be to change into a higher voltage battery and power the sensors from the battery? If so, any way to reduce power consumption during "sleeping"?

I am also planning to charge the battery by the on board usb charger. I guess this limits the voltage on the battery I can connect? any suggestions on battery?


Tomas


« Last Edit: October 11, 2012, 01:55:10 am by brattest » Logged

Pages: [1]   Go Up
Jump to: