Author Topic: Best Method for sending I2C code long distances (300 feet/100 meters)  (Read 5561 times)

0 Members and 1 Guest are viewing this topic.

Offline K1JOSTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
I am erecting a 35 foot (11 meter) all-aluminum antenna mast in my backyard.  The mast has an unusual integrated motor as part of the base that will rotate the mast/antenna but it provides no feedback for direction.  The hard-wired controller is dumb only providing stop or go for clockwise or CCW direction.  The antenna motor has safety stops tuning off power when it reaches a full turn mechanical stop.  I would like to not only control power (CW or CCW switch) remotely but also know the direction (heading).  I am thinking of using one of the triple-axis  magnetometers for Arduino like LSM303 or HMC5883L.  I went through the code examples and it seems straightforward but I know that I2C is not intended for long two wire transmission such as the 150 feet between my mast mount in the backyard and my workbench.  Should I convert it to a pair of RS485 or maybe consider a fully wireless approach?

thanks in advance

Jerry K1JOS

(PS - Power (12vdc) for the rotor and electronics will come from 2 deep cycle marine rechargeable (solar) batteries (like though used for fishing trolling motors).  These are designed to run at a 40Amp draw for up to 2-3 hours and my rotor will be used for short bursts drawing only 7 amps @12vdc.  I am looking at winter deep cycle for my single digit January-February days  :)
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13750
  • Country: gb
    • Mike's Electric Stuff
If you're taking I2C off the board, you're doing it wrong.
 use RS485 or RS422 (over cat5) , which is designed for that sort of thing. talking to a local MCU.

Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline K1JOSTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Thanks Mike,

So just two Arduinos with RS485 shields at both ends?  Is the handshaking part of the RS485 device or does the Arduino (or MCU) need to monitor and manage that?

Jerry
 

Offline K1JOSTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
Mike
Any suggestions for a wireless solution that will cover the 100meters from yard to home (line of sight through wood framed home)

jerry
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
not sure about 100m but xbees (zigbees) can go pretty far and if you need to, it is possible to build a repeater (bridge, actually).  it would be 2 back to back units, probably not even needing a cpu between them since its flow controlled and error controlled serial ascii.  cross tx and rx and set them to different freq channels so the repeating happens on a different channel slot.


Offline mazurov

  • Frequent Contributor
  • **
  • Posts: 524
  • Country: us
You may want to try i2c buffers -> http://www.nxp.com/documents/leaflet/75016081.pdf . 100m is still kind of marginal though.
With sufficient thrust, pigs fly just fine - RFC1925
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
one trick I use for running i2c between boxes (not very far, though; on the same rack or shelf) is to use firewire cables and connectors.  you can find them from old pc tabs (pci cards or expansion tabs on the back of PCs).  its nice that they have decent red/black wires for 5v/gnd, then there are 2 shielded wires for data and that works perfectly for clock/data on i2c.

I love it when I don't have to make cables!  and the connectors are cheap, somewhat easy to get, keyed and reliable enough.   (I run i2c between audio boxes that I build, for remote control and a sort of 'management bus' between systems).

one thing has to be asked: does your requirement have to run at full i2c speeds and does latency and 'buffering' matter for your app?  if not, the store/forward method I mentioned would work, but if you need full i2c speed, xbee serial won't be fast enough to encapsulate that.  now, if you bonded a bunch of them and muxed (time division) them, .... ;)


Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13750
  • Country: gb
    • Mike's Electric Stuff
Mike
Any suggestions for a wireless solution that will cover the 100meters from yard to home (line of sight through wood framed home)

jerry
Tf you have to have cabling for power then little point doing wireless data. You can get high power Xbee modules though.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline K1JOSTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
All DC power will be from Deep Cycle solar recyclable batteries.  There will be a single coax for the antenna that is AC coupled and has special lightning protection but if at all possible it would make my life a lot lesss complex to not run AC or DC power to the far end of my backyard.... so a wireless control solution would be optimal.

jerry
K1JOS
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Moteinos are dirt cheap, and transfer data hundreds of feet wirelessly.
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
link for what rigby was referring to:

http://lowpowerlab.com/blog/2012/12/20/moteino-the-wireless-low-power-low-cost-arduino-clone/

thanks for that - I never heard of this before but it looks interesting.

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Yes, the Moteinos are great.  I'm a big fan.  They will handle both the movement command direction, and the bearing position feedback.  And you can throw in temperature and wind speed/direction almost for free.

Although, for a fixed application like that, I would just run a Cat5 cable that would handle everything (including float-charge on the battery).
 

Offline K1JOSTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
thank you to all.  The Moteino plus RFM69W/WH sounds like a winner with sleep mode, etc  I could run CAT5 alongside the RF coax but I would have to deal with lightning suppression and digging up to bury 150 feet of CAT5 since my coax was buried several years ago before the lawn was planted.  I don't think tacking it down onto the lawn for such a distance is a good idea and the wireless Moteino is worth a try

Jerry
 

Offline GreyWoolfe

  • Supporter
  • ****
  • Posts: 3651
  • Country: us
  • NW0LF
Re: Best Method for sending I2C code long distances (300 feet/100 meters)
« Reply #13 on: June 01, 2014, 12:41:45 pm »
Why not use CAT5 plenum?  you can use staples made from fence repair wire to hold it to the ground and, given some time, the grass will grow over it the same as if you laid 18ga wire down for radials.
"Heaven has been described as the place that once you get there all the dogs you ever loved run up to greet you."
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 9954
  • Country: nz
Re: Best Method for sending I2C code long distances (300 feet/100 meters)
« Reply #14 on: June 01, 2014, 12:54:18 pm »
Ya should be able to find some cheap 433mhz modules that will work.
If you do data integrity checking yourself in the arduino you can get away with using dumb TX/RX units.

Of course, since this is an antenna mast, you need to consider harmonics if this is a RX antenna and your using wireless coms
« Last Edit: June 01, 2014, 12:56:39 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Best Method for sending I2C code long distances (300 feet/100 meters)
« Reply #15 on: June 01, 2014, 12:59:01 pm »
I'd look into using the existing COAX with a LP and HP filter to send DC & some low frequency control data (biphase/FSK/DTMF/whatever) half-duplex.

Of course this advice might change if your just DXing and probably would change if your TXing 400W on LF.

Direct Burial CAT5 and apologize to your better half??
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf