DST1200_0 is stuck in sonar quiet mode

Any hardware type questions or problems for all other Phidget devices.
gregbalco
Phidgetsian
Posts: 9
Joined: Fri Sep 25, 2020 12:01 pm
Contact:

DST1200_0 is stuck in sonar quiet mode

Postby gregbalco » Thu Oct 22, 2020 7:31 pm

I am attempting to find out if a DST1200_0 sonar distance device can be used as a snow depth gauge. Step 1 of this is that I have mounted it about 4 meters off the ground facing down. It appears that this is too far for a reliable return in the default quiet mode, so I am attempting to turn off quiet mode. However, I can't do this.

1. In python, when the device is attached, calling getSonarQuietMode() always returns 1. setSonarQuietMode(0) does not appear to either produce an error or do anything -- if I setSonarQuietMode(0) and then getSonarQuietMode(), it still returns 1. The device is definitely attached and I can change other parameters.

Putting setSonarQuietMode(0) in an attach handler results in the device failing to attach -- openWaitForAttachment times out. An error handler doesn't throw any particular error.

2. Using the Phidgets control panel on a Mac (10.15), the window for the sonar Phidget shows a checkbox marked 'Quiet Mode', which is checked. However, clicking the checkbox causes the window to disappear and reappear with the box still checked, which I take to mean something bad is happening and the software has to reattach. The point being that I can't turn quiet mode on and off with the control panel either.

The device appeared to work fine at short distances, but at no time was I able to turn off quiet mode.

So, what am I doing wrong? There is another forum posting about this, but that focused on whether or not the device was attached when sending the set command. That's not what's happening here -- the device is clearly attached, I can set other parameters (dataInterval, etc.).

Other stuff:

The device is plugged into a wireless VINT hub.
The VINT cable is pretty long -- probably like 25 meters.

User avatar
Patrick
Lead Developer
Posts: 3200
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: DST1200_0 is stuck in sonar quiet mode

Postby Patrick » Fri Oct 23, 2020 11:01 am

It's definitely detaching - probably switching out of quiet mode draws more power, and the long cable has too much of a voltage drop. Does it work with a shorter cable? My testing with a HUB5000 and short cable works fine.

-Patrick

gregbalco
Phidgetsian
Posts: 9
Joined: Fri Sep 25, 2020 12:01 pm
Contact:

Re: DST1200_0 is stuck in sonar quiet mode

Postby gregbalco » Fri Oct 23, 2020 2:05 pm

Aha. It works fine with a 3-meter cable. Unfortunately the needed location is a lot more than 3 meters from the hub. Thanks.

I just used the 26 gauge 3-conductor hookup wire that you sell to extend the VINT cable to 25 m. I assume you have messed around with long VINT cables before, so do you have any sense as to whether using, say, 18-gauge speaker-type wire instead would make it work? Or am I stuck moving everything closer together?

gregbalco
Phidgetsian
Posts: 9
Joined: Fri Sep 25, 2020 12:01 pm
Contact:

Re: DST1200_0 is stuck in sonar quiet mode

Postby gregbalco » Fri Oct 23, 2020 2:17 pm

Or, obviously I could figure that out if you can give me an idea of what the maximum allowable voltage drop is. Looks like I should have tested this before going straight to the long cable.

User avatar
Patrick
Lead Developer
Posts: 3200
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: DST1200_0 is stuck in sonar quiet mode

Postby Patrick » Mon Oct 26, 2020 10:39 am

Hi,

Using a voltage drop calculator, looks like 26 gauge, 25 meters, 5.6 mA gives a 0.75%.

https://www.calculator.net/voltage-drop-calculator.html

5.6mA is the max current consumption of DST1200 from the product specs.

I'm not sure what the max allowable voltage drop is for this device - nor whether disabling quiet mode may be driving higher current spikes causing even lower drops - someone from the hardware team could comment on that. A 0.75% drop is definitely not going to cause detaches - so it must either be drawing more power, or something else is going on (EMI, etc.).


-Patrick

fraser
Engineering
Posts: 280
Joined: Thu Nov 19, 2009 4:41 pm
Contact:

Re: DST1200_0 is stuck in sonar quiet mode

Postby fraser » Mon Oct 26, 2020 1:28 pm

Yes this is unfortunately an issue of cable length/current draw, the v-drop is pretty severe at long cable lengths, so the only solutions would be to: increase cable size (lower gauge); lower cable length; a combination of the two; or to run in quiet mode.

gregbalco
Phidgetsian
Posts: 9
Joined: Fri Sep 25, 2020 12:01 pm
Contact:

Re: DST1200_0 is stuck in sonar quiet mode

Postby gregbalco » Sat Oct 31, 2020 10:43 am

Just to complete this thread, I hooked it up with 22 meters of 18 gauge wire and it works. It successfully switches out of quiet mode and detects the ground at 4 meters.

Now I have to wait for it to snow to find out if it can actually see the snow surface.

gregbalco
Phidgetsian
Posts: 9
Joined: Fri Sep 25, 2020 12:01 pm
Contact:

Re: DST1200_0 is stuck in sonar quiet mode

Postby gregbalco » Sat Oct 31, 2020 10:50 am

Actually I have one more question. Do you know what sound velocity in air is assumed by the sensor? I am guessing it is the standard value of 331.3 m/s?

fraser
Engineering
Posts: 280
Joined: Thu Nov 19, 2009 4:41 pm
Contact:

Re: DST1200_0 is stuck in sonar quiet mode

Postby fraser » Mon Nov 02, 2020 11:39 am

It looks as though a value of 340.4 m/s was used. 331.3, to the best of my knowledge, is used for 0C. Any errors due to temperature swings (ie if you're temperature changes 20C while measuring your 4m distance), would be pretty unsubstantial. Off the top of my head, 10m/s error is about .1% error, which at 4m distance would be about 4mm of error. The senor only has 10mm of resolution so you likely wont even see the error.

However, you can always calibrate your device to an actual known distance for precise values if you're worried, and use a temperature sensor to correct for temperature swings.

gregbalco
Phidgetsian
Posts: 9
Joined: Fri Sep 25, 2020 12:01 pm
Contact:

Re: DST1200_0 is stuck in sonar quiet mode

Postby gregbalco » Tue Nov 03, 2020 7:28 pm

Yeah, OK, maybe the 0 C value is not ideal for a robotics application. Anyway, the observation is that usually sonic snow depth sensors seem to have a thermometer involved, so I looked it up. The variation in the sound velocity turns out to be 0.61 m/s per degree C, or 0.2% per degree, which is bigger than I thought. So a 15 degree day/night temp variation would be almost 3%, or like 10 cm at 4 m. Hence, it seems like a temperature correction is probably a good idea. I am interested to see if the device is stable enough that this actually matters.

thanks for all,


Return to “All Other Phidgets”

Who is online

Users browsing this forum: No registered users and 1 guest