Pages: [1]   Go Down
Author Topic: How to identify multiple sensors?  (Read 396 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all,
am new to arduino and am trying to interface several sensors (dht11, pir, others) to a single board.
I would like to be able to identify each sensor ... or each sensors brick (I am creating bricks where possible).

I know I can banally point each sensor to an arduino pin, but I'd like to setup a bus like system with serial communication to reduce cabling and have only one cable reach arduino, so I need to identify devices to understand where the reading is coming from.
I would also like to ensure the address is preserved in case of power failure.

Finally (am demanding smiley )I do not want to buy 1-wire/new sensors (there are models with address embedded) as have already most sensors.
Was thinking of employing I2C eeproms (24LC256) or similar... does anyone have better ideas or guidance?
Am not very knowledgeable in the components space therefore any suggestion is welcome.

Thanks
Marco
« Last Edit: November 18, 2012, 07:02:09 am by ravensburger » Logged

Brisbane, Australia
Online Online
Edison Member
*
Karma: 33
Posts: 1121
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Marco

Since you won't let me tell you to buy all different sensors, you've set quite the challenge smiley

The products you've bought so far presumably are all interfaced like the DHT11 you mentioned, with a single data line, power and GND, but no address capability.  Many devices which use that setup are not even digital, but will return an output voltage from 0V to VCC with a linear relationship to the value returned (eg LM35 / TMP36 types for temperature, or Allegro current sensors for two).

You could potentially add that functionality by dropping an ATtiny (say) at each sensor.  The sensor would talk to its local microcontroller directly, on its dedicated input pin, and that microcontroller could be addressed on a bus via I2C (say) from the Arduino.

I don't completely understand for all that added complexity (cost, headaches etc) what you'd be gaining though.  The direct attach is really nice and simple, if not as elegant as you'd prefer.

Was thinking of employing I2C eeproms (24LC256) or similar... does anyone have better ideas or guidance?
These EEPROMs are a great way of expanding the non-volatile storage on your Arduino, but on their own would not be useful for adding a bus capability to these sensors.  Reason being, they're just storage with no processing capability so they can read and write their own storage when instructed by the Arduino, but can't help you interfacing additional sensors on their bus.

Cheers ! Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

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

Thanks Geoff,
yes as you say direct attach is the easiest (it is how I started)... and am not throwing it away, the challenge is wiring for connecting 30 sensors in a range of 25mtrs.
If I cannot find better I will direct connect, but your suggestion of using an attiny is not a bad one as well.

Thanks for now smiley
Marco
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There is no way you'll be able to connect different sensors to a single bus, they have all manner of different interfaces.

The only way I can see is to do what Geoff says, have a processor at every node working as Bable fish to convert all the different formats to a single protocol you define.

If you're not in a hurry you can be a beta tester for my sensor network next year sometime. smiley

______
Rob
« Last Edit: November 18, 2012, 08:51:57 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: