Project wire variable numbers of sensors

Hi all
Im in the early, early stage of developing a arduino weather station.
I would like to be able to attach and deattach sensors. So maybe some day i dont need the soil moisture sensor and then i deattach it.
What should the approach to this be?

Do i need to find sensors that uses usb, or could i attach usb to sensors?

Hope someone can help

Regards
Jakob

Use a terminal strip similar to

They are available in many numbers of connections.

Weedpharma

Is there a more "user-friendly" approach?
If i deside to sell this weather station it should be easy for the user to attach new sensors.

Im thinking that the "only" way is to use sensors with usb, or is there other alternatives?

Maybe some kind of usb-to-?? converter?

Decide whether you prefer a star topology, with all sensors connected directly to the Arduino, or a daisy-chain topology with one sensor connected to the next one. With I2C both topologies are possible, provided that every sensor has a unique address.

I was thinking of connecting directly to the arduino.
Is it possible to make lets say 5 usb ports. behind the usb port i put a usb-to-i2c, and then to the arduino?

That way i limit the station to 5 sensors, but i can sell some of the sensors later on to the customer.
Perhaps i could label all 5 usb ports to the sensor i used for. So the client connects the soil temperature sensor to the temperature usb port

USB is the wrong choice. I2C will do what you want but it's limited in how long the wires can be. More than a meter or two is not reliable without special effort. (USB is also limited to 16ft maximum.) I think 1-wire can go further but I've not done much with that system.

Wireless networks are the best choice these days anyway. Look into Moteino or JeeNode.

With the variety of sensors, numbers of wires and interfaces, you will find it hard to cater for all.

Select the types of sensors and interface and work from there.

Weedpharma

Should i look for wireless sensors?

Every wireless sensor consists of the sensor and some sender, typically connected and controlled by another controller. You can use an Arduino for that controller, best one with an on-board sender, and build your own wireless sensors.

If it has to be cabled, and so the customer is able to plug extra sensor in. What will the easyist thing to do? And we Are talking 2-3 m for the cable

You need to decide what sensors are to be used and configure the connections to suit. You cannot have a universal input as sensors have variable outputs. Some will be voltage, others current. Some need supply of 12v, others 24v others 5v.

By all means, remove or replace sensors of the same type as required. But you cannot simply remove one type and change to a different type.

Weedpharma

You can have a set of post-sensor connector "terminators", each something different - say 24V to 5V resistor divider on 1, 12 V to 5V resistor divider on 2, straight 5V input on 3, 250 resistor for 4-20mA input on 4, maybe 5V thru 1K out to drive external resistor divider type sensor.
Then a set of internal header pins the user can connect for the input selected. Add a MOV or something to prevent the post-header voltage from exceeding 5.5V and damaging the arduino input.

I'd go for I2C or SPI, several sensors and other devices are available with these interfaces. If you want a very reliable bus system, a couple of other bus or interface systems are available, like CAN, at elevated price.

One parameter is the device selection, which can be by protocol (I2C), select line (SPI), or by some more complex multiplexer (RS232/422). The master controller has to use the known address of each device, or a distinct select/enable line for each device, or it must switch (multiplex) all data lines for point-to-point interfaces (serial).

Another parameter is the signal level and interference immunity, affecting the allowed line length and transmission speed. E.g. a serial connection can use either TTL (5V) logic level signals, RS232 (24V level converters), or long distance RS422 (20mA senders/receivers), where the different sender/receiver electronics are exchangable without special coding. This exchangability applies to all interfaces using unidirectional lines (1 sender, one or more receivers), while interfaces with bidirectional lines (I2C..., each device can act as a sender at the same time on the same data line) require more sophisticated transmitters or level converters (3.3/5V).

I'd suggest that you start experimenting with the cheap and simple interfaces (I2C, SPI), to find out whether these match the intended environment (noise immunity, line length, transmission speed) and hot-pluggability (attach/detach sensors without system restart). Then you are free to build your own sensor modules; for other high-reliability interfaces you better use readily available sensor modules, unless you are very familiar with the construction of the related electronics.

Finally you have to select appropriate connectors, which can be specified by the bus system, or you choose your own connectors which may be universal or sensor specific (non-reversible). E.g. you can choose an specific (or coded) connector for each sensor type, with a feedback line (sensor connected, sensor type...), and provide a fixed number of dedicated connectors on your base station. Or you provide a number of general connectors, where any sensor can be plugged in at any place, or one or more connectors with the ability to line up any number of sensors (daisy chain). Outdoor applications may require rugged (water proof, shielded...) cables and connectors. You can offer multiple (in-/outdoor...) versions, if you want to sell your own system, or leave such details to the user.

But don't worry too much right now, start simple and improve your design later, until it fits your expectations :slight_smile:

Thanks for all the answers :slight_smile: