0-5v to 1-wire

Hi All,

I would like to make a board for convert 0-5v analog to digital signal, address it and using 1-wire interface to send data one of the arduino digital pin.
The reason I would like to do this:

  1. Analog signal dont work well 30-50m long distance so I have to use a ADC converter.
  2. There are more then 100 sensors around the house so 1-wire interface save lots of cable cost.

Speed is not important the sensors are photocell, co2, pir etc...

Thank You

Could you use Arduino boards, each board with a number of sensors, and transmit the data wireless ?
You need a OneWire chip with analog input ? They exist of course, like the DS2450.

Thank You for fast answer Peter!

First of all I would avoid wireless communication.
Yes I'm looking for OneWire chip with analog input, DS2450 No Longer Available by Maxim.

A good option can be using arduino with ethernet shield in each room and send data by ethernet. In this case I can reduce the analog cable length to sensor max 15-20m.
Using analog opto isolator with separate dc power. 12v for sensors should be get better analog quality.
I'll try this first.

The Ethernet Shield uses more power than other boards, and the W5100 chip gets hot.

No wireless... hmmm... what about RS-485 over CAT5 cable (or any other twisted pair) ?
I mention that because using an Arduino to collect data from sensors is the best solution in my opinion.

I have tested cat5e shielded 100m using 0-5v photocell sensor and co2 sensor. By co2 the wire drop 0.5v. Both working well got usable signal. First I got horrible noisy signal using simple poor cat5 cable without shielded. So full copper AWG24 shielded is ok!
So next step to save some km cable :money_mouth_face:

RS485 seems good choice (maybe the best) I'm thinking about using it, but I have to think forward.
Ethernet disadvantages you need ethernet switch, more power for shield any else?
Advantage fast communication you can upload sketch via ethernet witch can be helpfully if there are about 10-15 Arduino board anywhere, some of them on the ceiling :cold_sweat:

My basic idea for home automation

  • Of course lots of sensor anywhere each protected by optocouplers using separate isolated regulated powers
  • Every circuit switch by relay (needs more the 500 relay)
  • DMX512 for led drive and for 230V dimmered devices (DMX triac dimmer max 1A)
  • Menage by Openhab open source home automation software all the devices using debian server on cubietruck. Openhab has lots of binding serial, UDP, TCP...

So firs I have test how to work openhab serilal bindig to use RS485
although I have to make UDP communication binding also if I chose ethernet

With the Arduino Yun, you can use wifi. Or is that also too wireless for you ?

Using simple modules like the NRF24L01+ seems the right transceiver for this. There is software for some kind of net/grid/network between many of those modules.

I would not put a sensor at the end of a long wire. If you are going to use a cable anyway, I would use 12V and some kind of serial data over the cable. At the end an Arduino that has a DC-DC converter for the power, and the sensors that are connected to the Arduino.

Dear Pater,

No WIFI no RF it should be too easy :slight_smile:
I decided now to make more arduino centre in the house and wire them by ethernet together.
So the sensor max distance from arduino reduced max about 15m.
For sensors I use 4x0.22 shielded alarm cable.
What is your opinion about it? Better to use shielded CAT5?

Thank You

I can't tell that. It depends on the electric noise from electric devices, the kind of sensors, the impedance and so on. Others use often CAT5 because it is also cheap.

mayerf wrote:

more arduino centre in the house and wire them by ethernet together

What do you mean by 'more Arduino centre'?

And what do you mean when you say 'wire them by Ethernet together', wire what together?

mayerf wrote:

you can upload sketch via ethernet witch can be helpfully if there are about 10-15 Arduino board anywhere, some of them on the ceiling

How is that possible, do you have details about how this can be done?

mayerf wrote:

if there are about 10-15 Arduino board anywhere

If you you Ethernet, you will need an Ethernet port for each board. For 15 Arduino boards, this means 4 normal 4 port routers, unless you get a router with more ports.

For sensors, you do not need transmission speed, in fact using a multidrop RS-485 network will prove more than capable and reliable for your needs, with less electronics and less to go wrong than using an Ethernet star topology.

You can buy the little RS-485 boards cheaply and you simply use CAT5 UTP cable.

In your software, do more than simply read the analog port for the value, do some loss pass filtering, say by averaging, to get rid of any noise that comes from the sensor into the analog port.


Paul

mayerf, take a look at this product to see if it suits your needs, I just found it in another forum section, at CATkits and Kittens - long distance sensor connections over CAT5 cable - Products and Services - Arduino Forum

They are called CatKits, and can be found at their website CatKits

Maybe it gives an idea for you.


Paul

What do you mean by 'more Arduino centre'?

My basic idea was using 15-20 arduino in a central place and using star point wiring topology. Now I mean using more central places so need shorter wires for sensors and high voltage devices. These arduinos cantral places using ethernet communication.

How is that possible, do you have details about how this can be done?

Yes it is working I have tested it. You can upload sketch via ethernet, working perfect.
Need reset arduino and you have 5sec to upload new sketch. You can make sofware reset but if you use open network be carefull security protection.

Please read:

http://forum.arduino.cc/index.php?topic=208945.0

In your software, do more than simply read the analog port for the value, do some loss pass filtering, say by averaging, to get rid of any noise that comes from the sensor into the analog port.

Yes averaging is the way how I tested 100m long cable and get more then perfect usable analog signal.

I have RS485 module at weekend I tested it and working good.
RS485 vs Ethernet is a long discussion, each has advantage and disadvantage. My basic question was get data from sensor. For this RS485 more then perfect, but didn't tested more then 20 arduino together. I guess it will be slow. If I simple switch on the lamp and RS485 busy the lamp will switch on in 1 sec I guess I'm going to hate it.

I'll write more about this project...

mayerf wrote:

or this RS485 more then perfect, but didn't tested more then 20 arduino together. I guess it will be slow. If I simple switch on the lamp and RS485 busy the lamp will switch on in 1 sec I guess I'm going to hate it.

I think you will find using RS-485 with a good protocol it will be so fast, you will not notice any delay.

These sort of networks have been used in industry on industrial sites for many years with very large networks for real-time industrial control.

I think you will find that you will have bottle necks elsewhere which will give you delays, such as, how will you initiate an action like turning a lamp on? What interface will this be.

You can also think about current loops over long distance, where a device controls the current on the transmission line rather than a voltage. Again, in industry, we have used this for many years, 4-20mA current loops. Simply put a precision 250Ω on such a loop at your analog sensing to derive the voltage again for direct reading into your analog port.

Nothing wrong with going Ethernet, but I think you'll soon find you need more equipment and more configuration and more potential issues that may arise, and at a greater cost.

Make sure you know if and how you can have the master Ethernet address each sensor node, and also understand the protocol will you use for any limitations.


Paul