Close
0%
0%

Ultrasonic 3D scanner

This project's goal is to gather 3D images via ultrasonic distance measurements and a sensor array.

Similar projects worth following
After some years with no progress because of too few free time I'm going to set this project on hold.
Maybe someday I'll continue with more omnidirectional senders and receivers, I think this is whats needed instead of the ones I used.

Ultrasonic distance measurement is old hat, it relies on time-of-flight measurements of ultrasonic pulses. This is commonly seen in cars for parking aid or in industrial applications for part detection, etcetera.

While getting the distance to the nearest object is nice for this, why not go a step further? There are projects which create volumetric data by scanning with a single sensor an stepper motors. This works but is slow. It should be possible to create volumetric data of a large room without the need to move the sensor mechanically: What I'm thinking of is ultrasonic interferometry.

What's needed is not a single sensor but a sensor array.

I will be working on three major topics:

  • theoretical background
  • analogue data aquisition
  • analysis of data

  • Talking about different sensors

    Johannes10/16/2019 at 22:38 0 comments

    I had some time since my last log and a lot of thoughts about the current setup.

    One thing I thought about is lobes of the sensors. There is a HC-SR04 datasheet here, where this image can be found:

    I guess, I will need a much broader directivity, at least for the sender.

    Second thought: signal strenght.

    Maybe a more powerful sender can enhance signal strenght on the receiver part.

    This leads to the topic, I'll cover next: different sensor types.

    I found some random sensors on e*ay.

    First, I'll take measurements about their directivity and power then I'll make changes to my test rig.

    After all I do want to believe that this project will succeed.

    HC-SR04

    K-14WP10
    Something I call "the cone"; with potetially very broad directivity. I have no idea, what this thing was used for, I could not find any datasheet.

    ####
    Edit1:

    To measure directivity I created a small test-rig.

    There is a sender-element at the end of the rail, connected to my red box. The rail has a wheel attached that can be rotated.
    I guessed that eccentric mount does not affect the measurement a lot, so I mounted the sensors a little bit of centre, because it was easier this way.

    Likewise with "the cone". Here my HC-SR04 Sensor mounted inside the plastic case.


    I did modify the red box a little bit, so it can be connected to my scope.

    So after all was set up, I took measurements of signal strength over several angles.

    Blue is directivity of HC-SR04 and red of 'the cone'.

    I'm very happy that I somewhat could reproduce the diagram from the HC-SR04 datasheet.

    Earlier I did mention another sensor K-14WP10, this sensor will need a preamp which I didn't want to build right now. Therefore I just compared the two.

    Just as said before, broad directivity is important for me, so next time I'll use 'the cone' for taking measurements.

    ####

    Edit2:

    In the diagram above each sensor directivity is normalized against its amplitude at zero degrees.

    For 'the cone' aplitude at 0° is lower than the amplitude of HC-SR04.

  • first real measurement and - nothing.

    Johannes06/28/2019 at 10:14 0 comments

    So I set up a test rig.

    sensor
    real volumen
    probes
    signal

    Then the raw data was analysed with octave.
    Therefore I wrote a script that reads the file my oscilloscope writes to an USB flash drive.

    raw signals
    filtered signals

    Finally the filtered data should create an 3D image. Which - so far - does reproduce something that looks nothing like the first image. Bummer.

    What I rate as success is that the filtered data looks like I anticipated. Maybe I made a mistake with calculating the 3D volume, anyway I'll keep hacking until this works.

  • Data aquisition

    Johannes02/20/2019 at 22:04 0 comments

    I've tried to get the PCI cards running, so far with no success. When I asked on the Stack, Krzysztof pointed me in a new direction:

    I will try to use a microcontroller from the microchip dsPIC33 family for acquisition with a small RAM chip for storage.

    These devices offer fast ADCs and are fast enough to add some signal processing.

    I will then interface multiple ADC-controller with a host controller or my computer, this connection can be slow as data is stored in RAM.

    With this new concept I'll soon start working on a prototype ADC board.

  • Short update jan 2019

    Johannes01/01/2019 at 10:21 0 comments

    Last month there had been three major drawbacks on this project. Firstly some pipe in my workshop broke, so this had to be taken care for. Secondly water from this pipe killed my computer I used to use in theworkshop and thirdly also my oscilloscope is damaged.

    Therefor I will continue to write updates, once I've taken care of these spokes in my wheel.

  • DAQ

    Johannes11/11/2018 at 09:19 0 comments

    Some time ago I was lucky to obtain several measurement daq PCI cards.
    With my card, I'm able to acquire data from 8 channels simultaneously at 200kHz sample rate. Those sold at several hundred € which is quite cheap. If you're curious about the the card, this is the company's homepage with more details.
    One reason I chose this model is that it's supported by the open source driver comedi and I'm using Linux on my computer.

    I've been working with devices like these cards for a long time, but not for my personal projects, especially high-end cards sell for several k€s which is all right when working on a project for a big company but not if it's your personal budget.

    In my last project log I mentioned the red box. It will act as an adapter between my sensors and my daq card.

    For safety reasons I added ESD protection inside the red box. This is just an 1kΩ resistor followed by two diodes per channel.

    To trigger the ultrasonic burst a push button is connected to the HC-SR04s trigger lines.

    Finally an external power supply delivers 5V to all four boards.

    Right now as I'm writing this, I did not take any photos, but will add them later.


    Now the next  step is writing software to read out data from my daq card and analyse the waveforms.

  • Not reinventing the wheel.

    Johannes10/31/2018 at 23:04 0 comments

    Some days ago I got tired of messing around with my circuits and finally ordered some HC-SR04 boards. There is everything I need packed together on one board: Transmitter and receiver and some controller.

    Here I found a really good analysis of the HC-SR04. It seems like its receiver circuit is quite simillar to mine, allthough it works ways better.

    With this plan on hand, it took me only a few minutes to capture the next two images.

    What can be seen is the input of the receiver after the third input stage (analogue, I want to capture this) and the related output of the controller (TTL, won't be useful for me).

    With different distances to an object moves the time between sended and received pulse, on the first measurement the distance was ~35cm, the second time it was shorter.


    Update:

    Here is a photo of one transmitter/receiver (top) and three receivers:

    Note that I removed the transmitter and added a pull-down on Trigger-In line.
    For connecting the boards I used USB cable, it's got a shield and hopefully running power and signal lines together is no big deal for this application. If signals are bad, I'll swap the cable or add a second, shielded cable for the analogue signal.


    Update 2: more photos!

    This is how the boards look like from the back

    And this is the box, where all sensors will plug in.


    Details on the box will follow with my next project log.

  • Scanner-Board - second prototype

    Johannes09/19/2018 at 17:57 0 comments

    For the second version of scanner-board I did a spice simulation.
    (I should have done this before building the first prototype.)

    The circuit has three parts:

    • first the input stage with input amplifier because of the small signal from the US sensor,
    • second a comparator / envelope detector for creating a lower-frequency signal and
    • third output amplifier.

    The signals: input voltage (blue) and output voltage (red)

    I've read this document from TI (pdf warning) which gave me some hints for the input stage.
    Virtual GND for U1 is created by R3 and R4. This is necessary because I use all opamps in single-supply.

    The envelope detector acts like a comparator paired with a lowpass filter. Because there is no feedback-loop U2 outputs only 0V or 5V. C4 together with resistors R8 and R9 set rise and fall time. A simple lowpass filter wouldn't do the trick since I'm interested in the peaks of the signal.

    Next step will be building this circuit and testing. I'll install potentiometers for R6/R7 R8, R9 and R10/R11 to adjust the values during live-tests. Probably there will be a lot of adjusting before everything is good.


    I'm excited since signal acquisition and first tests of 2D images are getting close!


    A little update:

    Here is the image of the signal after the preamp:

    Soo, I need to eliminate all low frequencies below 50Hz.
    There will be another update when I created the highpass filter and the signal is clean.

    Something else I think about: ~15ms may be too long for the burst.
    Soundwaves travel at approx. 300m/s.
    While sender is active, the receiver may also pick up the outgoing burst and this results in a 'dead-zone' of ~2.25 meters. (300m/s*0.015s = 4.5m).
    With a burst length of 3ms this dead-zone can be reduced to 0.5m.


    In other news: I managed to capture an image from an old HP oscilloscope via serial port.
    No more need for low quality screenshot-photos :)

  • Sender-Board - first prototype

    Johannes09/06/2018 at 19:10 0 comments

    Well, after I had some drawbacks with the scanner-board, I focused on another part of the project: the sender-board.

    This device will provide an ultrasonic pulse (or burst).


    I learned some things while etching the first board, which led to great improvements for the second board.

    So here we go, the board is ready for assembly:

    This time I first built some parts of the circuit on protoboard to test my concept and changed one or two things. So the current schematic looks like this:


    Update: Finished prototype of sender-board

    Yesterday I finished the sender board.

    I had to fix two things as I had the polarity of the NE555's output wrong (pulses were sent when no trigger was present, see photo below) and the TRIGGER line was missing a pull-down resistor.

    After that, here is the result:

    There is a BNC wire which is used to trigger the scope

    The burst is now 11.44ms long. Maybe this has to be adjusted later.

    The oszcillator is set to 40.08 kHz but will surely drift in time.

  • Scanner-Board - first prototype

    Johannes08/27/2018 at 17:17 0 comments

    Allright, summer holidays have passed, time to move on.

    I started the first prototype board for the scanner, just to learn that I'm missing some parts.

    So far, have a look at the board, I'v already ordered the missing parts and more images will follow.


    Good news, everyone! I finished the prototype and it's - not working.
    It seems like I made a mistake with the power suppy for lm324 which only receives single supply but needs dual supply.
    All right, I'll run it through SPICE once more and we'll see what happens.

  • Schematic diagram - first drafts

    Johannes07/05/2018 at 16:42 0 comments

    I chose ultrasonic transmitter MA40S4S and receiver MA40S4R. In the German data sheet there are many application notes with many examples of schematics. I did not find these documents in English though.

    The following diagrams were created with KiCad/Eeschema based on the data sheet.

    My plan is to build sub-modules that transmit and receive. Both use the same interface, which will also be used by a measurement-device. For this device all I have so far is a vague concept which I will refine in a future post:

    - maybe a box with several interfaces (minimum of four) for connecting sub-modules, which
    - output the 'burst*
    - analogue input from three sensors
    - ADC for said analogue inputs. maybe a 1 bit ADC (aka schmitt trigger)
    - inside some kind of digital signal processor. may even be a small 8 bit µC
    - output of scanned image. maybe a display or connector for a computer which runs 'display software'

    For now I will focus on creating some sub-modules and test them with an oscilloscope.

    Ideally this will allow me to test my concept (in 2D for I only own a two channel oscilloscope right now).

View all 13 project logs

Enjoy this project?

Share

Discussions

bienonline wrote 05/24/2020 at 20:45 point

The "cone" is part of an electronic whiteboard. It sents US signals to a special pen that answers with an IR signal. Having two of them allows you to compute the position of the pen via triangulation.

  Are you sure? yes | no

Johannes wrote 05/30/2020 at 19:59 point

Thank you very much for sharing this, I always wondered what it was.

I got it some time ago from a shop for discontinued hardware where it is no longer available.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates