Analog sensor long range

CAI_Support said:
If you are have two wires, you can run that over the I2C bus, since that can run on any clock speed, to transmit data.  SPI bus is also fine, one clock line, one data line.
What device would i need at the other end?. 
 
I mean I have an analog sensor 0-5v, so how can I turn it to I2C ?
 
Is it possible to transmit data in 1 cable only? 
 
We have a long metal wire from the ''wc32'' and the place where i need to place the sensor....
 
Do you need to power devices using the same long metal wire?
That RF link device can be interesting, it has four pins, using PLC code, you can encode using two pins for parity, and other two pins as clock and data. Receiver can connect to two TTL input pins which causing I2C or SPI to read input from the other side, one byte at a time.
 
BTCAD said:
I saw this little 2km LOS transmitter/receiver kit.  Can i use it to transmit data from my picaxe 08m2+ ?   It looks like only high/low input pin to remote high/low output pin.
 
Specs are vague and ambiguous, linked files are missing or incomplete. I'd avoid it.
 
If you have a wire (you say a "single wire" but I presume you mean at least a PAIR of conductors?)... I'd still be seriously considering 4-20mA loop. It's what it's designed for!
 
You will need power locally for the sensor you indicated, so perhaps something like this will be useful?
http://www.ebay.com.au/itm/DC0-5V-turn-4-20MA-Voltage-to-Current-Transducer-Converter-ref13211-/301339924708?pt=LH_DefaultDomain_15&hash=item46294258e4
 
Otherwise, there are remote-powered 4-20mA loop interfaces, as long as your instrument is very low powered, they could work also - and you can run both power and analog values back over the same single pair of wires.
 
rossw said:
If you have a wire (you say a "single wire" but I presume you mean at least a PAIR of conductors?)... I'd still be seriously considering 4-20mA loop. It's what it's designed for!
 
 
No this is a single conductor. A 8 AWG steel wire.
 
CAI_Support said:
Do you need to power devices using the same long metal wire?
 No, i can use a little battery and a little solar pannel.
 
CAI_Support said:
That RF link device can be interesting, it has four pins, using PLC code, you can encode using two pins for parity, and other two pins as clock and data. Receiver can connect to two TTL input pins which causing I2C or SPI to read input from the other side, one byte at a time.
Can you eplain this deeper? I have 3 of these kits at home. I already linked a pair over 3 km (LOS) sucessfully!
 
If only one wire to connect between them, you will need to use ground to be the feedback loop.
If you use WC32 with WC32 I/O board, it has optical isolation input on TTL, that can tolerate the noise from environment. Then you can use counter feature of WC32 to count the pulse in certain time in PLC, clear it after finish reading a byte.  On WC32 later firmware, there are 3 TTL input can act as low to medium speed counter,   If pulse incoming is slow enough, you can use local clock to filter the possible noise.  In that way, you don't need to have another wire acting as clk for I2C or SPI.
 
If you have another wire, then you can have one act as CLK, one as MISI on SPI bus to read incoming pulses.  Both I2C and SPI bus clock can be as low as 0HZ, so that slow speed does not make any trouble for that interface to READ in pulsed numbers.
 
CAI_Support said:
If only one wire to connect between them, you will need to use ground to be the feedback loop.
ground feedback loop over 2km? Really possible?
 
Now I think the project is possible. It could be wired or wireless. So I think it should be easier to run a cable instead of wireless. Wireless architecture need more knowledge, dealing with terrain topology, objects, interferance  etc.
 
Supposing that i use a brand new cable 2 conductors or more, at least 24awg, is it possible to add sensors on the line then send more information on this cable? Such as temperature sensors, barometric sensors ?  Wich technology need i use I2C , SPI , ... ?
 
 
Thank you Ross and CAI to support me !
 
BTCAD said:
Supposing that i use a brand new cable 2 conductors, 24awg, is it possible to add sensors on the line then send more information on this cable? Such as temperature sensors, barometric sensors ?  Wich technology need i use I2C , SPI , ... ?
 
If you are running a cable, DON'T sell yourself short and only do a single pair.
You cannot (practically) run either SPI or I2C over 2 conductors. (I2C may say "2-wires" but it's "2-wires-plus-ground" and then you still need power.
You won't get I2C working over 1km without substantial effort with line drivers.
 
If you want multiple devices, you might actually be better considering RS485, which does multi-drop, AND long distances. It takes one (or optionally two) twisted pairs. Your devices will require some power, so adding an extra pair to at least provide low-power to sensors along the way would be prudent.
 
(Or, devise something a little clever.... but it will be entirely your own work to make it work and keep it going!)
 
I designed a 2-wire system that provided power AND two-way communications to up to 9 devices over distances potentially up to 2km or more, over a single figure-8 cable. It uses a WC8 at the "head" end, and my own design interface to the line, and my own boxes downrange. It uses an unusual system, power at 12V (pulses up to 24V to send data to downrange devices, protocol allows selecting an individual device, or "broadcast" to all), and remote ends send back by pulling down the 12V rail a bit. Low bitrate serial communications, worked fine, but anything but "standard")
 
Okay Ross,
 
 
 
rossw said:
I designed a 2-wire system that provided power AND two-way communications to up to 9 devices over distances potentially up to 2km or more, over a single figure-8 cable. It uses a WC8 at the "head" end, and my own design interface to the line, and my own boxes downrange. It uses an unusual system, power at 12V (pulses up to 24V to send data to downrange devices, protocol allows selecting an individual device, or "broadcast" to all), and remote ends send back by pulling down the 12V rail a bit. Low bitrate serial communications, worked fine, but anything but "standard")
You said you designed a 2-wire system, this is not I2C or SPI, is it your own communication based system? I'm confused a little bit.
 
I don't know how to use rs485. Maybe google could help me.
 
Also I think i can use a picaxe to send data from analog sensors to rs485 .
 
BTCAD said:
You said you designed a 2-wire system, this is not I2C or SPI, is it your own communication based system? I'm confused a little bit.
 
Yes, entirely my own system, drawing on some traits of various things I've seen or made over the years.
For example, each transmission starts with a "sync bit" - that serves to let all devices "wake up", and sets the basic timing of the entire link. Everything measures the length of the first pulse to know when to sample subsequent bits.
 
BTCAD said:
I don't know how to use rs485. Maybe google could help me.
 
RS485 is a very well-known standard, and yes google will help you.
 
BTCAD said:
Also I think i can use a picaxe to send data from analog sensors to rs485 .
 
picaxe can certainly do the work. The main things the picaxe needs to do in this case are:
 1. Read analog values. PICAXE has multiple ADC inputs.
 2. Scale and convert into some form you can use elsewhere. Picaxe is programmable and can do this.
 3. Create serial data and other handshake signals as required, and the picaxe can do this too. It has hardware UART to send serial, and extra pins to put your RS485 driver into the appropriate states.
 
Additionally, the picaxe runs on very low power, and could even be driven from parasitic power from the communications line itself. (You may not be so lucky with your sensors of course)
 
rossw said:
Yes, entirely my own system, drawing on some traits of various things I've seen or made over the years.
For example, each transmission starts with a "sync bit" - that serves to let all devices "wake up", and sets the basic timing of the entire link. Everything measures the length of the first pulse to know when to sample subsequent bits.
 
Really interresting. I would like to know more deeper about this.
 
Where I live, we are plagued by summer thunderstorms - and I've observed cloud-to-cloud lightening that's induced a voltage and current high enough to cause a visible arc on a length of wire only several hundred feet long.  For that reason alone I'd favor an RF solution with batteries (and solar if budget is not a problem).
 
mwester said:
Where I live, we are plagued by summer thunderstorms - and I've observed cloud-to-cloud lightening that's induced a voltage and current high enough to cause a visible arc on a length of wire only several hundred feet long.  For that reason alone I'd favor an RF solution with batteries (and solar if budget is not a problem).
 
This is exactly why we use twisted-pairs. Common-mode noise, such as nearby lightning, is induced in both conductors more-or-less equally and therefore cancels out.
An actual cloud-to-ground strike causes a completely different issue, and that is one of voltage drop through the ground. A long cable with a low resistance, can have a huge potential difference from one end to the other - not because voltages induced in the cable, but because of voltage drop through the ground. If both ends are grounded, you have a massive circulating current. If only one end is grounded, you can have a high potential difference between the other end and its local ground, which can cause flashovers etc. The only real cure to that is adequate protective grounds and sufficiently high isolation ratings of the cable and equipment.
 
In old days, telephone companies ran two wires twisted, each wire has its own lightening protection before connect to a telephone terminal, in addition, there is a protection in between this pair of wires. It maybe worth to have an optical isolated circuitry before connected to any input pins, so that any lightening damage will be only to the optical isolator chip.
 
CAI_Support said:
In old days, telephone companies ran two wires twisted, each wire has its own lightening protection before connect to a telephone terminal, in addition, there is a protection in between this pair of wires. It maybe worth to have an optical isolated circuitry before connected to any input pins, so that any lightening damage will be only to the optical isolator chip.
 
Optical isolation of analog signals can get complicated.
Transorbs, MOVs, gas discharge tubes etc are all devices that are frequently used to minimise damage.
 
One must ask, at the end of the day, is it really worth spending $500 to protect a $50 item?
 
Back
Top