Pages: [1]   Go Down
Author Topic: SDI-12 HELP  (Read 945 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have some sensors that only have SDI-12 output. Is there an easy way to interface them with an Arduino?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 168
Posts: 12430
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have more information about the SDI-12 protocol?
or a datasheet of the sensors maybe?

Most sensors can be connected to Arduinbo although some of them are not so easy
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 168
Posts: 12430
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Found this one myself - http://en.wikipedia.org/wiki/SDI-12 -

"all SDI-12 communications are transmitted in ASCII at 1200 baud with 7 data bits and an even parity bit."


if you use Serial.begin(1200) you should be able to get data in, you need to strip off the parity bit and then you can strat interpret the bytes...

not tested but this could be the starter
Code:
NewSoftSerial nss(3,4);  // use software serial so hardware serial is free for PC

void Setup()
{
  Serial.begin(9600);
  nss.begin(1200);
}

void loop()
{
  if (nss.available() > 0)
  {
    int val = nss.read();
    val = val & 0x7F; // strip of one byte
    Serial.print(val, DEC);
  }
}

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Kansas City, MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

from another post I made earlier.

Quote
I've just received one of these devices. I've yet to hook it up and try it yet, but I thought I would provide the link. I work for the National Weather Service and we use quite a bit of SDI-12. I wanted to see if I could interface with our SDI-12 sensors effectively.

http://www.vegetronix.com/Products/SDI-12.phtml
Logged

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

I have just created an SDI-12 Serial library for Arduino

I would love feedback

https://github.com/joranbeasley/SDISerial
Logged

Pages: [1]   Go Up
Jump to: