Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Advice on measuring the time delta among pulses on as many as 6 inputs

netduino plus 2 ultrasonic sonar

  • Please log in to reply
7 replies to this topic

#1 jdlogicman

jdlogicman

    Member

  • Members
  • PipPip
  • 12 posts

Posted 18 January 2013 - 04:44 AM

Greetings!

 

I'm new to the DIY electronics scene but I've done some robotics professionally, so please forgive me if I seem like a total newbie.

 

My project involves an underwater robot, so I'm starting with figuring out how to determine the direction of ultrasonic chirps emitted from an emitter I'll be wearing.

 

As I understand it, humans determine direction by measuring the difference in the arrival time of a sound in both ears. To do that on a robot in 3 dimensions, I'm imagining 6 sensors that translate the sound into a 0-5v signal based on intensity.

 

Sound travels pretty fast in salt water, so I need to be able to measure the time with a granularity of 0.5m / 1500m/s = 300ns.

 

Can a Netduino plus 2 read 6 inputs that fast?

Would it be best to poll for analog signals or interrupts, detecting the leading edge of the voltage spike? I have seen some resources online about how to limit the voltage as to not damage the board.

Since I'll be running motor control and other sensors that are not time-critical, is there a way to have these inputs served at a realtime level?

 

Any hints or links to similar projects will be greatly appreciated.

 

Thanks!



#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 18 January 2013 - 10:07 AM

If I were in you, I would split the idea into two stages: the first is the "sensor acquisition engine", and the second is the robot brain (which takes the sensor data and decides on how to move).

While the second stage could be realized with a Netduino (I'd suggest any of the new "2" versions), the sensor engine is very far from being easy to do. I would seriously consider a good DSP, or even a fast-acquisition ADC stage followed by a FPGA logic.

I don't believe it will be an easy task, though.

Cheers


Biggest fault of Netduino? It runs by electricity.

#3 jdlogicman

jdlogicman

    Member

  • Members
  • PipPip
  • 12 posts

Posted 18 January 2013 - 09:46 PM

I agree - I figured the sensor part would be the hardest.

 

I know I can do it with something like this from NI (http://sine.ni.com/d.../ds-218/lang/en), which can sample at 48K/sec, but if I was going to do that, I might as well do a pico ITX Atom board and run real .net ;-}

 

Any options with Netduido, like dropping into microcode? I have experience in x86 assembly and device drivers, so it's not necessarily out of my grasp.



#4 emg

emg

    Advanced Member

  • Members
  • PipPipPip
  • 129 posts

Posted 18 January 2013 - 11:22 PM

If you are trying to locate by using TDOA (time difference of arrival), would the sensors not need to be a few feet apart to get a measurable time difference?  How far are the sensors apart?

 

What about sensing peak intensity or how 'loud' the chirp is to derive a general directional bearing? So you would poll their last reading and adjust heading so the front sensor has the highest reading? You could then use an ultrasonic rangefinder to provide a distance measurement and collision avoidance.



#5 jdlogicman

jdlogicman

    Member

  • Members
  • PipPip
  • 12 posts

Posted 19 January 2013 - 05:06 AM

Yes, I was planning on using TDOA. With the weight of the batteries to power the motors for 1.5 hrs plus compute power and optional lighting, I'd need a pretty big rig to have enough internal volume to achieve neutral buoyancy, so 2 ft between sensors is no problem.

 

I also thought about trying to measure intensity of the signal, but without experimentation I don't know if the falloff over 2ft will be detectable within the 12bit resolution of the netduino. Salt water is REALLY good at transmitting sound. Initial googling indicates 0.1dB attenuation over 1m, which is not a lot.

 

In advance of doing some really inconvenient tests requiring 15-20 ft of salt water, I was hoping to figure out if another solution was possible. I have also read about phase difference, which could be done in analog, but I have read that it isn't used for ultrasonic, probably due to the wavelength being so small relative to the separation.



#6 libor

libor

    New Member

  • Members
  • Pip
  • 1 posts

Posted 19 January 2013 - 09:49 AM

tests requiring 15-20 ft of salt water, I was hoping to figure out if another solution was possible.

For proof of concept tests it is absolutely not necessary to do it in water. You can do the sound source localization tests in air (if you wish to simulate the sound's faster speed in water just put your sensors 4 times closer to each other).

Anyway I would start with 2-3 sensors attached on a table's surface (or a window plane) which is even more challenge regarding the speed of sound in solid materials, and would try to localize where I am clicking the surface with my fingernails  (btw. Why not add a USB HID device interface simulating a mouse pointer to it when it is ready and this thing would make a poor man's touch surface usable on any hard surface, just glue on 3-4 sensors on a shop window's corners and you made a huge touch-screen)



#7 emg

emg

    Advanced Member

  • Members
  • PipPipPip
  • 129 posts

Posted 19 January 2013 - 11:41 AM

Would you not get a large attenuation between the sensor closest to facing the emitter and the one farthest away, facing the opposite direction, masked by the body of the robot?



#8 jdlogicman

jdlogicman

    Member

  • Members
  • PipPip
  • 12 posts

Posted 19 January 2013 - 04:22 PM

Interesting idea - thank you! I'm going to have to set up an experiment to see if that is true. Since water is so good at conducting sound, it might come down to how well I can measure it. But I should be able to prototype & test it in air, then test in a jacuzzi, then finally in some salt water.

 

Looks like I'm gonna crack the seal on that netduino board afterall.

 

BTW - I'm still interested in learning about going more low-level if need be. Any pointers to good examples/documentation on how to interoperate with custom microcode? In regular .NET you have to buld and unmanaged assembly then use DllImport to call those routines.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.