Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
that highly depends on the object itself (if it was glass or ???), on the speed of it and size of it and ....
What should be detected at all (there should be at least 2 different states)
I do not think you can measure any range/distance or similar with that, but you can check if the pill is there (or not). But probably I misunderstood something
Not enough information to say. As stated you can use them to detect a change in state. One example is an encoder that switches between black and white lines.
A Photo transistor would not be the best choice since distance of the moving object would not effect the transistor unless the change is reflective to that device. Maybe looking into IR or look here; https://en.wikipedia.org/wiki/Passive_infrared_sensor to possibly modify detection of a small object at a distance. Even then the reaction thresh hold time may not be fast for a moving object that small.
Not enough information to say. As stated you can use them to detect a change in state. One example is an encoder that switches between black and white lines.
Hi Michaelk, can elaborate further what do you mean by switching black and white? What's an encoder?
You may want to detect if that thing moves, spins, you may want to identify that object (shape of it), you may want to measure its size, or there is a pattern on it you want to identify, want to know its weight, color ...
So there can be a lot of things .... In some cases you may need an encoder to do the job, but I do not think we need to go into details right now.
If you want to know only if there is something in between the LED and that transistor your setup may work properly (although you will not be able to tell if that was your finger, a screwdriver or a pill).
The pill is in stationary mode, it's not moving. I only want to know whether in the holder, there is a pill and I am thinking whether a Phototransistor is able to do the job.
The pill is in stationary mode, it's not moving. I only want to know whether in the holder, there is a pill and I am thinking whether a Phototransistor is able to do the job.
If the pill is contained and not in motion then an interruption on when the pill enters and remains in position could be done by interruption of the beam from a source to the photo-transistor. As long as the state remains then that could be sense for the pill or whatever is breaking your beam for the Photo-transistor. Your pill and beam should be contained so there are no leaks for the threshold settings of the detection. Your source beam must be finite and not cause to much flooding. The container material will need to have the beam and sense transistor aligned to provide a path to be broken by the pill. Ambient light could be factored in for the sense levels to allow bias of the Photo-transistor. Or use opaque material for the container then align the source and photo-transistor so a proper trigger point will occur.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.