0

Need Break Beam Sensor With FAST RESPONSE for Near Mach 1 Pi
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Need Break Beam Sensor With FAST RESPONSE for Near Mach 1 Pi

by maesoph on Fri Jan 12, 2018 9:43 pm

Fair warning: Mechanical engineer here... I know just enough electronics and software to be dangerous.

Had to make a ping pong ball cannon (who could resist?) and having an issue with sensor response time on my home made DAQ system. Using the standard 3mm OMRON Adafruit sensors. Write up and pictures attached.

Bottom line is that I need a break beam sensor with extremely fast response time.

Enjoy.
Attachments
Overview.pdf
Basic summary of data acquisition system for measuring speed of near Mach 1 ping pong ball. Would like a better sensor to give output closer to expected "square wave" pattern.
(362.74 KiB) Downloaded 13 times

maesoph
 
Posts: 36
Joined: Thu Mar 03, 2016 9:04 pm

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by dlleigh on Sat Jan 13, 2018 7:04 pm

The Adafruit sensor that you're using isn't operating quite how you think it is. If you read the web page and look at the data sheet (I know, it's in Chinese), you'll see that the response time for this device is only specified as "less than two milliseconds". That's far too slow for your application.

From the graphs in your linked PDF, I would venture to say that the turn-on response (the output going low) of this device is actually pretty fast. Even so, we don't know anything about it's delay before responding, nor how much error there is in that delay for each measurement. However, the graph clearly shows that the turn-off time has a substantial delay. As you mentioned, the duration of the flat part of the output is too long given the diameter and speed of the ping pong ball.

That flat part of the curve is not the result of no light reaching the sensor because the ping pong ball is blocking the transmitter. It is the result of the light level going below some threshold and saturating some circuit inside the sensor, and thus turning on a transistor and driving the output low. After light starts hitting the receiver again, that circuit has to come out of saturation and turn off the transistor, which takes a little while -- about a millisecond according to your graphs. The upward-going curve after the flat part is the RC time constant due to the combination of your pull up resistor and whatever capacitance is seen at that node.

The digital nature of this sensor is confusing you. You would have an easier time with a sensor that has an analog output, especially if it were much faster than the one you're using.

I suggest this one: https://www.digikey.com/product-detail/en/ams/TSL252R-LF/TSL252-R-LF-ND/

It has a turn-on/turn-off time of around 7 microseconds, which is well matched to the sample rate of your DAQ system. It also has an analog output so that you can see what's really going on with the light. You can hook it up in a fashion similar to your existing sensor (three pins: Vcc, ground and voltage output), and it can run from 3V to 5V. These parts are about $3.50 each from Digikey.

At 300 meters per second, your ping pong ball would travel about two millimeters in seven microseconds. The temporal resolution of the signal is actually better than 7usec because that is the spec for the output rise time, from a 10% signal level to a 90% signal level. If you had a faster DAQ system, you would be able to see detail even finer than that.

I've used these parts before and found them easy to work with.

dlleigh
 
Posts: 62
Joined: Wed Jan 30, 2013 8:08 pm

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by maesoph on Sat Jan 13, 2018 10:26 pm

Thanks for your reply! I did post a "fair warning" that I was a mechanical engineer, not a real engineer. LOL

The sensor you recommend has 0 stock - how about this one?

https://www.digikey.com/product-detail/ ... ND/3095044

Looks the same to me, but again - Lug nut here.

maesoph
 
Posts: 36
Joined: Thu Mar 03, 2016 9:04 pm

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by dlleigh on Sun Jan 14, 2018 3:43 pm

Yeah, that one's too slow. It has a 70 microsecond response time instead of 7 microseconds.

The 250, 251 and 252 models are identical except for the feedback resistor in the transimpedance amplifier. The higher that resistance, the more sensitive the amplifier, but the slower it reacts. The 252, which you want, is the fastest but the least sensitive. You don't care about high sensitivity because you're shining a light directly onto it from a couple of inches away.

You could build your own from parts, but that gets tricky.

I looked at what else is in stock at Digikey right now. This one has a 28 microsecond typical rise and fall time, with no worst case specified: https://www.digikey.com/product-detail/en/texas-instruments/OPT101PG4/296-36066-5-ND/.

This one claims to have a a 10 microsecond typical rise and fall time, with 22 microseconds worst case: https://www.digikey.com/product-detail/en/melexis-technologies-nv/MLX75305KXD-ABA-000-SP/MLX75305KXD-ABA-000-SP-ND/. It is in an SO-8 surface mount package. That may sound tricky to a non-EE, but it's really pretty easy to connect to. Adafruit sells adapters that would make the job very easy: https://www.adafruit.com/product/1212. The problem with this part is that it doesn't have a true voltage output, just a current output that you have to change to a voltage with a resistor. That resistor will have two problems: it will create a low-pass filter with whatever capacitance is attached at that point (mostly the input to your DAQ system), and it may have a lower output voltage than you would be expecting. A lower resistance value here would create a low pass with a higher frequency cutoff (good), but with a lower voltage output.

Your best bet is probably to use what you have now until the 252 comes back in stock. Or look for a different vendor that might have some laying around. Or call the company and try to get a few samples.

One speedup tip for these sensors is to not shine too much light on them. That saturates circuitry inside, which could cause delays. Larger signals also take longer because of finite bandwidth and slew rate concerns. Your best bet is to shine just enough light on the sensor so that it is above both the ambient level as well as any noise in the sensor. That way, when the ping pong ball blocks the light, the sensor's output signal doesn't have to go very far, and you'll get more precise measurements of the beginning and end of the "eclipse".

Let us know how it goes.

dlleigh
 
Posts: 62
Joined: Wed Jan 30, 2013 8:08 pm

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by maesoph on Sat Apr 07, 2018 11:01 am

Ummmmm............. You did ask me to let you know how it goes.... I fought with the sensors and the DAQ far longer than I should. I finally gave up and sent back the DAQ and got a refund even though it was way past the return period as I presented them with a steady stream of tech support EMails going back to when I first purchased the product. I am now using the sensors you recommended and a Hantek DSO5072P..... Results are usable and far less frustration, but would like to get things where they belong. Please see attached report that includes pictures, etc...

FAIR WARNING - MECHANICAL ENGINEER HERE.....
Attachments
How-Dumb-Am-I.pdf
(304.08 KiB) Downloaded 10 times

maesoph
 
Posts: 36
Joined: Thu Mar 03, 2016 9:04 pm

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by adafruit_support_bill on Sat Apr 07, 2018 11:16 am

Regarding the grounding question in your write-up: It is not necessary to have an 'earth' ground. But all of the circuits and shields should be grounded to the same place.

adafruit_support_bill
 
Posts: 66146
Joined: Sat Feb 07, 2009 10:11 am

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by maesoph on Sat Apr 07, 2018 11:34 am

I took the term "GROUND" quite literally... Will add the probe "-" to the grounding party.

maesoph
 
Posts: 36
Joined: Thu Mar 03, 2016 9:04 pm

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by maesoph on Sat Apr 07, 2018 11:58 am

OK... Roughly the same result with common ground...... A little worse actually.
Attachments
Common_Ground.png
Common_Ground.png (953.82 KiB) Viewed 106 times

maesoph
 
Posts: 36
Joined: Thu Mar 03, 2016 9:04 pm

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by adafruit_support_bill on Sat Apr 07, 2018 12:06 pm

What does the rest of the circuit look like? What is firing the ping-pong ball? Since the wacky signal stuff starts before the ball breaks the beam, I'd suspect some inteference from your firing circuit.

adafruit_support_bill
 
Posts: 66146
Joined: Sat Feb 07, 2009 10:11 am

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by maesoph on Sat Apr 07, 2018 12:13 pm

There is no firing circuit at all - it's just me poking the rear tape seal with a scissors. It's a ping pong ball travelling down an PVC pipe so it's susceptible to tons of static generation - hence the shielding. I do have long leads on the sensors that are un-shielded - that's the only weak point I see, but I don't have enough background to definitively say....

maesoph
 
Posts: 36
Joined: Thu Mar 03, 2016 9:04 pm

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by adafruit_support_bill on Sat Apr 07, 2018 12:34 pm

If the pipe is getting a major static charge during firing, you probably want to keep it more electrically isolated from the rest of your circuit. It looks like your foil contacts the pipe and you have sensor wire running very close to it too. I'd remove all the foil between the pipe and the speed-trap. And I'd route your sensor wires away from the pipe as well. You can ground the pipe. But give it its own separate ground wire all the way to the wall outlet.

adafruit_support_bill
 
Posts: 66146
Joined: Sat Feb 07, 2009 10:11 am

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by maesoph on Sat Apr 07, 2018 8:45 pm

Trimmed leads and looks pretty good...... Might do some more tomorrow and if things continue to look good and reliable, I'll break out the helium and try for Mach 2!!!!!!!!

pic_8_1.jpg
pic_8_1.jpg (129.11 KiB) Viewed 75 times

maesoph
 
Posts: 36
Joined: Thu Mar 03, 2016 9:04 pm

Re: Need Break Beam Sensor With FAST RESPONSE for Near Mach

by dlleigh on Mon Apr 16, 2018 11:02 am

Sorry for the delay in responding. I didn't notice your reply until today.

Shortening the leads is a great idea, and it looks like it helped quite a bit. I would also be wary of ambient light getting into your receivers. Are the room lights on? If the room is illuminated by anything except sunlight or incandescent bulbs, the ambient light could cause all kinds of strange waveforms on the oscilloscope.

Another question: do the waveforms that come before and after the expected pulse look the same on every experiment? Or are they shaped differently (and in different places) from experiment to experiment?

dlleigh
 
Posts: 62
Joined: Wed Jan 30, 2013 8:08 pm

Please be positive and constructive with your questions and comments.