Pages: [1]   Go Down
Author Topic: How to create a I2C BUS  (Read 544 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

Hi
Maybe this isn’t the right place for this question but here it goes.
I have a ardunio uno. I want to read 4 temperature/humanity sensors at 50 meters distant. One is at 10m, the second at 25m, the third at 40m and last one is at 50m.

First problem is that the sensor I have is the DHT11. It is not I2C.
Question: how can I convert it to I2C and is it worth? Or just keep it stupid and go with all digital and a cable for each one. What will it be the great distant that I can use with digital?
I want to put more devices like a display, 7 led displays and same relays, a RTC and a SD card reader to write same data.
So I will need all the digital pins that I can get.  smiley
This is my first project so, maybe, silly ideas and question.
Any help will be appreciated as well direction for forums, sites that could help me address these problems.
I don’t know must of electronics so bear with me. smiley-red
Thanks
EL Club
Logged

Best from ElC

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 597
Posts: 33303
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
how can I convert it to I2C
There is no easy way to do this. The hard way is to have a micro controller doing the conversion but that defeats the point.

Quote
Or just keep it stupid and go with all digital and a cable for each one
Yes but that is not stupid, the sensor is made to communicate over a distance I2C is not. That is the sensible answer.

Quote
So I will need all the digital pins that I can get
There are lots of ways to get more digital pins. Shift registers or port expanders are easy to use.
Look at the MCP23S17 chip, that gives you 16 I/O lines.


Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why do you need such distances ? For a greenhouse ?

First of all, the DHT11 humidity is very inaccurate. Use the DHT22.

For a first project you can connect the DHT22 to the Arduino.

For those distances, a good and practical solution is to use an Arduino at every point and use RS-485 to connect to the wires. You can use a twisted pair (plus shielding for ground), or Cat5 cable.
For the RS-485 you can use a serial port with a RS-485 driver chip.

Bye the way, the I2C bus is for a distance of 50cm or so.

If the distance would be 50cm, it would be a small project. But the distance of 50 meters makes it an advanced project.
« Last Edit: June 16, 2013, 02:51:40 pm by Erdin » Logged

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

Thanks for the replays.

With digital what is the far length that I can get?

Best
Logged

Best from ElC

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 597
Posts: 33303
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

With digital what is the far length that I can get?
There is no simple answer, a lot depends on the wiring and the pull up resistor you use.
The data sheet implies it is goo for distances over 20 meters but doesn't say what. It is the sort o thing you have to experiment with.
You can add amplifiers called line drivers to increase the range, but there are no clear cut answers.
Logged

Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1750
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

from DHT11 tech data sheet;-



high light text is "super long transmission range"



recommend ues 5k for <= 20m transmission range, for >20m  adjust R value. It does not indicate value, but I guess it will be smaller than 5k. OP plan use it at 5m, nothing is needed to do.
Logged

Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1750
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

10m, R=5 k
25m, R=4.3 k
40m, R=3.3 k ?
50m, R=3.3 k ?

?  start value and test.
Logged

Pages: [1]   Go Up
Jump to: