sairo tokagawa
Posts: 1
Joined: Sat Sep 24, 2016 5:14 am

can i use ultrasonic sensor to capture an image?

Sat Sep 24, 2016 5:31 am

I need to know if it is possible to capture image in Raspberry Pi using a sensor or automated programming. and to store the photo together with various of information

User avatar
mikronauts
Posts: 2779
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: CAN I USE ULTRASONIC SENSOR TO CAPTURE AN IMAGE?

Sat Sep 24, 2016 2:14 pm

no
sairo tokagawa wrote:I need to know if it is possible to capture image in Raspberry Pi using a sensor or automated programming. and to store the photo together with various of information
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

tenochtitlanuk
Posts: 156
Joined: Fri Jul 06, 2012 8:51 pm
Location: Taunton, Somerset, UK
Contact: Website

Re: CAN I USE ULTRASONIC SENSOR TO CAPTURE AN IMAGE?

Sat Sep 24, 2016 4:00 pm

Yes. ( sorry, mikronauts! Couldn't resist the lure of your terse reply!)
But only slowly.... and in a sense.... and not quickly!

Sairo- don't read on if your programming and physics is not yet moderately advanced! Mikronaut has given a link to an example of ultrasound detection as such... :D

Most ultrasound sensors are 40kHz. This means wavelength in air is 340/40000 which is 8.5mm. This means anything you do will require you to understand diffraction.
You will have to scan in x and y directions, and use an analogue amplified ultrasound detector and a fixed ultrasound 'illuminator'.
One way is to move the detector in a raster pattern behind a suitable aperture in a board with a hole in it. (Another is to create a tighter ultrasound detector beam with a small parabolilc reflector and point it appropriately.) The 'image' will be a diffration pattern and can be transformed into what we normally think of as an image.

I remember doing this with two stepper motors years ago on a BBC B computer. There was a published article in Physics Education ( long out of print)

User avatar
mikronauts
Posts: 2779
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: CAN I USE ULTRASONIC SENSOR TO CAPTURE AN IMAGE?

Sat Sep 24, 2016 7:00 pm

not in a useful manner :)

common sensors such as ping, hcsr04 etc have a 15 to 30 degree angle of view, and a 3-5cm to 4-5m range

so basically you can build a depth map of approx 12 pixels by 12 pixels, maybe twice that if you don't mind some averaging, and it will be a depth map picture, not visual information... and don't forget to correct for the angles
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

tenochtitlanuk
Posts: 156
Joined: Fri Jul 06, 2012 8:51 pm
Location: Taunton, Somerset, UK
Contact: Website

Re: can i use ultrasonic sensor to capture an image?

Sun Sep 25, 2016 8:16 am

Again no. I'm talking about raw sensors, not ultrasound range-meters. May seem dark ages to you, but easily available now and for decades. But certainly not a beginner project. Several Pi ( and other) projects have indeed scanned horizontally with range-meters and drawn a 'map', but this is not an image in the sense I believe the OP intended.

The methods I mentioned require an analogue amplifier ( preferably logarithmic) and AtoD conversion.
Beam angle depends on aperture, which is why suggested expanding the aperture with a parabolic horn.
Sin( theta) = lambda /aperture.

Think pinhole camera. A ( ultrasound bathed) area is scanned by the u/s microphone in an x/y raster from the other side of a large board with its own aperture. But I agree resolution will be low ( tho' your guess is pessimistic) and the process slow.

Perhaps I'll rig up a test. I particularly like this kind of interfacing. See http://www.diga.me.uk/bmp2line.html which I could easily reassemble.

But away from my machines travelling for the next month. I played also years ago with a u/v detector scanned up and down and rotating around a vertical axis to plot u/v light intensity over the whole sky, and this worked similarly. But of course now out of date since camera/lens sensors became so cheap and easy to use. What a difference a couple of decades make!

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: can i use ultrasonic sensor to capture an image?

Mon Sep 26, 2016 3:35 pm

sairo tokagawa wrote:I need to know if it is possible to capture image in Raspberry Pi using a sensor or automated programming. and to store the photo together with various of information
If you want a timed event or an ultrasonic sensor to trigger the raspberry pi to capture an image from a USB camera or Pi Camera then yes, this can be easily achieved.

If you want to create an image based on the data captured from an ultrasonic sensor then refer to the answers above.
Doug.
Building Management Systems Engineer.

User avatar
mikronauts
Posts: 2779
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: can i use ultrasonic sensor to capture an image?

Mon Sep 26, 2016 3:47 pm

Actually, I was trying to stay within the constraints of the OP's original question, and his idea of getting a visual image somehow with ultrasonic sensors (however depth maps are a lot of fun).

As you say, a pinhole camera could be constructed with x/y servos and say a photo transistor, but it would be kind of slow (if neat).

The reason I referred to ping/hcsr04 is that is what I thought the OP wanted to use :)

Your UV rig sounds like a nice rig!
tenochtitlanuk wrote:Again no. I'm talking about raw sensors, not ultrasound range-meters. May seem dark ages to you, but easily available now and for decades. But certainly not a beginner project. Several Pi ( and other) projects have indeed scanned horizontally with range-meters and drawn a 'map', but this is not an image in the sense I believe the OP intended.

The methods I mentioned require an analogue amplifier ( preferably logarithmic) and AtoD conversion.
Beam angle depends on aperture, which is why suggested expanding the aperture with a parabolic horn.
Sin( theta) = lambda /aperture.

Think pinhole camera. A ( ultrasound bathed) area is scanned by the u/s microphone in an x/y raster from the other side of a large board with its own aperture. But I agree resolution will be low ( tho' your guess is pessimistic) and the process slow.

Perhaps I'll rig up a test. I particularly like this kind of interfacing. See http://www.diga.me.uk/bmp2line.html which I could easily reassemble.

But away from my machines travelling for the next month. I played also years ago with a u/v detector scanned up and down and rotating around a vertical axis to plot u/v light intensity over the whole sky, and this worked similarly. But of course now out of date since camera/lens sensors became so cheap and easy to use. What a difference a couple of decades make!
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

Return to “Automation, sensing and robotics”