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

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

  • 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).

  • Theory of operation pt. 2

    Johannes06/27/2018 at 16:53 0 comments

    In the previously post I described an simplified version of the scanning array with only two sensors.

    This is, what the signals would look like if there was a single object.

    Well, what's next? With these time-discrete readings of ultrasonic amplitude we can do something simillar to a time-discrete convolution to create a 2D image.


    The white dot marks the object. In this simulation there is only one object, if there were more than one, artefacts will appear.

    To eliminate the artefacts, a threshold is applied.

    There is another artefact. The white dot is an area where the setup cannot detect objects due to shadowing. For now this cannot be eliminated.


    Here is the octave script, I used to create the images.

    %input data simulation:
    clear
    size = 10;
    f=ones(1,size);
    g=ones(1,size);
    style='rx';
    f(2)=3;
    f(5)=4;
    g(4)=3;
    g(6)=4;
    
    threshold = 4;
    
    %plot input data
    subplot(2,1,1)
    stem(f,style)
    subplot(2,1,2)
    stem(g,style)
    
    
    %create heatmap
    z = zeros(size, size);
    for r = 1:size
        for c = 1:size
            z(r,c) = f(r)*g(c)-threshold;
        end
    end
    
    z(z<0)=0;
    
    %plot heatmap
    fig = figure;
    colormap('ocean'); 
    imagesc(z); %create plot
    colorbar; %intensity bar
    


  • Theory of operation

    Johannes06/26/2018 at 21:46 0 comments

    This is an overview of the main function.

    The main part is a digital signal processor, which creates the ultrasonic burst. The Signal is send out by the transmitter, reflected by an object and received by the sensor array.


    I will focus on 2D scanning at first. Therefore the sensor array only consists of two sensors, aligned in a row with the transmitter. This also simplifies the required calculations for object detection.


    In this first prototype sensor 1 and 2 are 160mm apart, the transmitter is located in the middle between the sensors.


  • First note on this project

    Johannes06/26/2018 at 16:46 0 comments

    Credits for the background image go to LiDAR ParaView which is released under Creative Commons Attribution License 3.0, until I am able to provide my own images.

    The picture is an example of the result which I try to create with this 3D scanner.

View all 10 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

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