Go Down

Topic: SDI-12 compatibility (Read 5 times) previous topic - next topic


Hi all,

I don't suppose anybody has found a sdi12.h library? I have a very nice anemometer that uses SDI-12 communication.



Here is a newbie thought. Please tell me if this is a dumb one:

If I tie a couple of Rx and Tx pins together, and wrap all Tx serial commands in toggling the interrupt register OFF then ON.

For example for pins 14 & 15:

PCICR |= (0<<PCIE2);                 // disables  interrupts on pins 8-15
serial.print(13, BYTE);
serial.print(10, BYTE);
PCICR |= (1<<PCIE2);                 // enables  interrupts on pins 8-15

Would this allow me to communicate over the same SDI-12 line using standard serial commands? If yes; here comes the next question:

How can I apply this to say pin 30 and 31 using the NewSoftSerial.h library. I can't even figure out what the pin-change-register is for pins 30 and 31. Besides that, it would be even better to figure out how to modify the NewSoftSerial library to pull this trick.



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.




Had a look at that board. Nice, but the mega should simply be able to talk SDI-12. It is just a matter of finding the trick.



I modified the software serial code to work for some sdi-12 sensor I was working with. The documentation for sdi-12 isn't the best but it wasn't to hard. Just invert the digitalRead part of the code and reduce it for a 7 bit string. Let me know and I'll post the modified softwareSerial.

Go Up