Forum

Connecting with Apo...
 
Notifications
Clear all

Connecting with Apogee SIL-411

4 Posts
2 Users
0 Reactions
899 Views
Posts: 9
Admin
Topic starter
(@liudr)
Member
Joined: 16 years ago
[#8]

I'm posting this question here so everyone can see how it gets resolved

Hey there!
I’ve got a quick question for you hoping for some guidance after purchasing your raspberry pi sdi-12 usb adapter a while back.

I can’t seem to get the pi to recognize the sensor I’m trying to use and was wondering if you could confirm its compatibility. It may be that this sensor sends data in an unrecognized format or something. The Pi does recognize the usb device.

My setup: RPi 5, your sdi adapter, connected with a 9V external power source to power this sensor: https://www.apogeeinstruments.com/sil-411-commercial-grade-sdi-12-digital-output-standard-field-of-view-infrared-radiometer-sensor/&source=gmail&ust=1726850847450000&usg=AOvVaw3YOblP-d3orK87aiJWfR_ 0"> https://www.apogeeinstruments.com/sil-411-commercial-grade-sdi-12-digital-output-standard-field-of-view-infrared-radiometer-sensor/

The specs are available on that page. Thanks for your time, it’s greatly appreciated!


3 Replies
Posts: 9
Admin
Topic starter
(@liudr)
Member
Joined: 16 years ago

The adapter definitely works with the Apogee sensor. I've used similar sensors from Apogee (different field of view) with no problems. So the problem must be other than the sensor.

You said the RPI recognizes the adapter, which what I think means you can see the serial port somehow, maybe using thonny or listing resources like ls -l /dev/ttyUSB*

This means the adapter isn't damaged. So what comes next is how you are reading the sensor. The sensor is not simply recognized by the RPI. It is a common understanding that if you wire an adapter to a sensor, data simply voluntarily flow out of a sensor and onto the computer because the physical connection.

The correct understanding is, the adapter simply acts as a bridge between a computer USB interface and a sensor SDI-12 interface, without which there would be no way to transfer the commands or data across these dissimilar interfaces. With this adapter, either a person or a program has to issue proper SDI-12 commands to tell the sensor to measure and then return data.

 

So the question is, are there any programs running to issue these commands? I have a list of Python programs that can do that:

https://liudresllc.com/gadget/sdi-12-usb-adapter/

Scroll down until you see the code. If you've tried the code, tell me which code and what you see.


Reply
Posts: 2
(@cojoschmi)
New Member
Joined: 2 years ago

Thanks for your help in advance!
Here is what happens when I try to run the sdi_12_config.py and the sdi_12_logger_v1_5_0_2021.py files:

sdi_12_config.py:

nunya@bus:~/sdi12 $ python3 sdi_12_config.py
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
SDI-12 Sensor Configuration Tool for Dr. Liu's SDI-12 USB adapter
                Dr. John Liu 2016-02-03 V1.0
                Free software GNU GPL V3.0

Compatible with Windows, Linux PC, and Raspberry Pi

This program requires Python 3.5 and PySerial 3.0 or newer
For assistance with customization, telemetry, etc., contact Dr. Liu.
         https://liudr.wordpress.com/gadget/sdi-12-usb-adapter/ 

Please only connect one sensor to the adapter to configure its address.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Detected the following serial ports:
0) /dev/ttyAMA10
1) /dev/ttyUSB0

Select port: (0,1,2...): 1
Raw response: b'\x00'
No valid response from sensor. Please check connections and try again.

sdi_12_logger_v1_5_0_2021.py:

nunya@bus:~/sdi12 $ python3 sdi_12_logger_v1_5_0_2021.py
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
SDI-12 Sensor and Analog Sensor Python Data Logger with Telemetry V1.5.0
Designed for Dr. Liu's family of SDI-12 USB adapters (standard,analog,GPS)
        Dr. John Liu Saint Cloud MN USA 2017-11-06
                Free software GNU GPL V3.0

Compatible with Windows, GNU/Linux, Mac OSX, and Raspberry PI

This program requires Python 3.4, Pyserial 3.0, and urllib (data upload)

Data is logged to YYYYMMDD.CVS in the Python code's folder

Visit  https://thingspeak.com/channels/359964  to inspect or retrive data

For assistance with customization, telemetry etc., contact Dr. Liu.
         https://liudr.wordpress.com/gadget/sdi-12-usb-adapter/ 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Detected the following serial ports:
0)      /dev/ttyAMA10   (USB VID=0000)
1)      /dev/ttyUSB0    (USB VID=0403)

Select port from list (0,1,2...). SDI-12 adapter has USB VID=0403:1
Total number of data points:5
Delay between data points (second):5
Time stamps are generated with:
0) GMT/UTC
1) Local

Select time zone.1
Enter all SDI-12 sensor addresses, such as 1234:1
Collect analog inputs (requires SDI12-USB + Analog adapter)? (Y/N)n
Using address: 1
Sensor address: 1  Sensor info: 
Saving to 20240919.csv
Traceback (most recent call last):
  File "/home/heron/sdi12/sdi_12_logger_v1_5_0_2021.py", line 131, in <module>
    total_returned_values=int(m.group(0)) # find how many values are returned
                              ^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'

 I get a similar response when trying the sdi_12_reading_v1_0.py file.

Edit: I have tried using minicom to communicate with the sensor using the "?!" command, but hangs and does not give a response. I used baud rate of 9600, and stop bits 7E1.

Thanks!


Reply
Posts: 2
(@cojoschmi)
New Member
Joined: 2 years ago

I printed out the "ser" variable and this was the output:

Serial<id=0x7fff29880910, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=10, xonxoff=False, rtscts=False, dsrdtr=False).

Tried Minicom again using the 9600 8N1, no luck.


Reply
Share: