Home › Forums › Other Data Loggers › Teros 11 sensor on Arduino mega
- This topic has 8 replies, 2 voices, and was last updated 2021-09-13 at 9:30 PM by sandman.
-
AuthorPosts
-
-
2021-09-13 at 7:59 PM #15888
I am trying to read data from the Teros 11 sensor on an arduino mega. This is the code i’m trying to run and i convert the values to hex. But i am not getting the data i need. Could someone tell me if there is something else that i need to add?
I’m powering the sensor from the Mega with 5v.
Attachments:
-
2021-09-13 at 8:09 PM #15890
Are you at least getting the data in decimal format before you convert it to hex, or are you saying you aren’t getting any response from the sensor?
-
2021-09-13 at 8:15 PM #15891
No, im not getting any response from the sensor.
-
-
2021-09-13 at 8:22 PM #15892
Can you describe how you’ve wired the sensor to the Mega, or even better, can you post a photo showing the board and whatever setup you’re using to connecting the sensor to it?
-
2021-09-13 at 8:28 PM #15893
power to 5v and data to digital pin 11
Attachments:
-
-
2021-09-13 at 8:48 PM #15895
Based on the photo, it appears the wiring is correct, assuming the orange and brown wires are inserted sufficiently deep into the header as to make a connection with the contact down inside the hole).
Your code is different from the latest a_wild_card.ino example that we include with the current SDI-12 library files. Are you using an older example sketch or an older library? We had to make changes to the library last year in order to work properly with some Meter Group sensors, so perhaps you just need to update your library and/or try the simplified sample sketch that’s included with it (https://github.com/EnviroDIY/Arduino-SDI-12/blob/master/examples/a_wild_card/a_wild_card.ino)
Also, Meter Group sensors come from the factory with SDI-12 channel ‘0’ assigned to them. You should change it to something else first (using the “b_address_change” sketch) because they operate in a TTL protocol when they’re set to channel ‘0’, so if you intend to use them as an SDI-12 sensor, changing them to a number (or letter) will cause them to work correctly with the SDI-12 sketch, assuming you put that new channel number into the wildcard sketch.
-
2021-09-13 at 9:07 PM #15896
Ok so i changed the address from 0 to 1 for the sensor and i got this back
31 2B 32 35 32 33 2E 37 38 2B 32 34 2E 30 D A
which when i converted to ASCII i get
1+2523.78+24.0
-
2021-09-13 at 9:18 PM #15897
Sounds like it’s working, that’s a standard response string for that sensor. Is there a particular reason you’re requesting the Mega to print the result in hex instead of decimal.
-
2021-09-13 at 9:30 PM #15898
Thanks, didn’t realize address had an effect on what mode it was on. not really, just not to clutter the screen up on the serial monitor
-
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.