Hey thanks for taking time to read, this is my first post. Im getting ready to start my first project and have an UNO kit with a few different types of sensors in it but Im not sure it has the correct one for what I need. It doesnt matter if its in the kit or not, I'd rather start with the right tool for the job rather than try to make something I already have work and fight with it only to find it its not what I need. I have a metal surface at a 45 degree angle that would have a sensor maybe 2" away max, itll be used outdoors so indirect sunlight might be a factor, I can shield it from direct. What would be the best type of sensor to use to detect a ball bearing rolling down it? Its only about 2" wide (the surface its rolling on) I dont need to know how far away it is or anything just if it has passed. I have an ultrasonic sensor, IR sensor, and a few other that I dont think would work. with the indirect sunlight and itll be in a noisy environment, what would be the most reliable method. Ive also seen laser sensors, PIR sensors as well. Ill get what I need as long as im not spending more than say $50 on one single sensor. I dont know how to attack it as far as motion detection or something measuring distance or changes in it in that outdoor loud environment. It wouldnt stay outside or be in the element. Just using it as a type of switch almost to keep count, maybe one every couple of seconds but never without a delay. I thought of using a mechanical switch but I dont want to interupt the ball bearing or influence it in any way. Sorry that was so long, just didnt want to ask a question without providing the variables involve. Thanks again for taking the time to read.
adding a few line breaks here and there would have made it easier to read...
if you want to detect without contact (mechanical switch) you need to explore indeed other types of sensors.
how large is the metal surface compared to the ball bearing possibly rolling down ? is it like a rail and the ball bearing is always in the same position or it's a surface and the ball bearing can be anywhere ?
The most reliable method IMO would be a longish, lightweight lever attached to the metal, positioned to close a microswitch as the ball bearing passed your ‘checkpoint’. But if that’s ruled out for some reason, other methods before considering more complex IR/PIR etc could be:
-
Small hole in the (assumed) narrow path, holding a flush-mounted LDR. A light above would ensure that LDRs’ resistance would suddenly increase as the ball obscured it.
-
Change to a wood or plastic surface and deploy an inexpensive Hall Sensor. It might even work if positioned above the ball, avoiding need to drill the surface.
that was in the back of my mind when I asked about the width of the metal surface (Photodiodes typically have a faster response time) but next question was would it need to work at night ![]()
a piezo and vibration detection could work in any light condition. capacitive detection through the hole in the rail as well
I’m curious about the OP’s objective. Maybe a school physics project on gravity and falling objects?
Hall effect sensors detect the presence of a magnetic field. You can attach a magnet to the ball bearing and use the sensor to detect when the magnet passes by.
Maybe a tilt sensor?
Sorry for the holdup, I havent been feeling great. I attached two images, one of a project for my oldest and one of a toy for my youngest. Theyre both top down and crude so forgive me I didnt think I could attach a 3d image. Both black surfaces would be at roughly a 45deg decline, the one with circles is for a probability project, the ball would be released through the hole at the top, bounce off of the circles (pegs) and pass through one of the lanes at the bottom and drop in a container. Im just trying to count how many through each one. Second (the repurposed measurement sensors) would be a long strip going down at the same angle. the colored rectangles are cars, the single strip down the middle is a lane divider and the parallel rectangles are set points to measure when a car passes underneath. something mechanical at the top would start a timer and let the cars go and we could measure who won, which was faster out of the gate, and which was faster in the quarter. Thats why Im wanting to use something thats not mechanical that would touch or influence the subjects. The racetrack would be kept in the garage and he could play with it in there or outside if there isnt any room. It gets loud out there at times with the air compressor and pneumatic tools when Im working on a car. Sorry for leaving it up to the imagination, I though I covered everything but looking back I can tell that I didnt even provide half. The ball bearings are stainless and the cars would be both Wood and that junk metal hotwheels are made of.
dots on the parallel rectangles would be some sort of sensor pointing down the cars would trip.
I was way off with my 'school gravity project' guess then!
Even with that thorough description I think we will be able to refine our sensor recommendations only when you have finished most of the construction and we have your photos/video and observations. You could then try several sensor options . Jointly we could home in on a reliable one..
Can you confirm the board will be metal? Aluminium? Thickness? That will decide whether to rule out drilling holes for sensors. One downside of locating them above is that it might obscure a bit of the fun action.
Oh, re @J-M-L 's question, we can assume daylight/garage light, so photodiode/LDR are candidates? (They would need flush mounting.)
BTW, I assume the probability project drawing was not meant to show the real number of obstacles? I think you'd need a lot more if your objective was a realistic demonstration about randomness?
no terry, you was almost spot on! I have a couple 3d printer and im pretty good at modeling things. It is a Wood surface covered by non ferrous sheet metal that avg thickness, its flexable but stiff. What I was thinking was to print out some pillers with extended arms and have a mount for whatever sensor is used, pointed down . the sensor could measure by whichever method is best. It seems like it could be sensed a few ways. I have an engineers mind, overthinking things and looking for points of failure. from what I read, the sounds of the garage wouldnt interfere with the ultrasonic, the PIR seems like it might have too wide of range (maybe partially cover the outside perimeter?) I have a photo diode but I thought it needed some kind of direct light source and wouldnt work that close to a surface without a direct light source. Maybe a laser and reciever seems sufficient but I was trying to stay away from a 2 piece, but I absolutely will if necessary. Maybe an IR bouncing down and recieving TOF I can print up a little 1 piece pole for the side, maybe with like a 45 degree angle arm or mount pointing down, or even a narrow overhang housing the sensor? I dont know lol, I overthink everything and havent any experience with Arduinos, I tried code a website 1 time and cant get the hang of different syntax. I was thinking a top down approach, maybe itll have to be sided to side.
The one project is something like the plinko on wheel of fortune lol. Not even High School, 8th grade. Probabilities of where it will end up, dropping it from maybe 3 different points. If hes using an arduino, he better get an A. Regardless if I figure it out or not, I appreciate your time bro.
I have on but I don't have anything that will be tilting, so I cant think of anyway to incorporate it. Do you have a method in mind? I would love to make it some sort of binary/off or on sensor. That would eliminate failures or false positives I think.
If there is nothing that you can make tilt, a beam of light or a laser may be a better way.
False positives can be filtered by setting thresholds on your analog signals (hysteresis).
Needs some fiddling to get it right, but should work without trouble.
Thats what I was thinking too, just tryin to avoid that extra mounting point an hiding wires though. Definitly seems like the most accurate and correct tool for the job. I obtained some code for the ultra sonic sensor and they claim its +- .5 cm or something. That uses a real high pitched sound, you think impact wrenchs and air compressors would effect it? Theyre loud but kind of a deeper pitch. Talk to me like im 8 when it comes to code and I think it would take some niche coding to dial it in and have it trip. I dunno, I think I might make an attempt while its on the breadboard and see what happens and model it off whatever I find that I can get to work after I fail...lol Always good to get some other perspectives though for sure.
I still think a simple LDR mounted in a hole on the surface in a position whch will ensure that ambient light from above is at least significantly obscured when the ball bearing rolls over it.
Just try it with a piece of thin cardboard or plywood, and see if your DMM resistor range shows it can serve as required. A photo-diode is more sensitive and faster acting but might require a transparent cover unless it has a flat surface.
I wouldn't think about coding until you've satisfied yourself about these basic sensor issues.
![]()
Wow Terry, that was you talking to me like im 8? Pretend im 4 lol. Mounting is a non factor, I can draw something up that has some thin walls around the perimeter to minimize the indirect light. LDR would be freaking awesome as small as it is! Hell, I have 2 of them right here. That was one of the first thoughts that crossed my mind because of its size, but with no experience with this stuff and of course, worried about that point of failure. I didnt know if it would be good enough to differentiate without having direct light opposite. Ive got my uno right here and started messing with it last night and atleast got the LCD to light up and project what is was supposed to and where, just havent tied it to a date source yet. I have a code for the Usound but didnt get too far after I loaded it. I know youre probably going to laugh but im on tinkercad playing with the little code blocks like a kindergardener lmao. The LDR wouldnt be a problem at all if you think itll have enough contrast. Just writing (copying) whatever I need to get a reading off of the sensor to see if itll work. Ill try to see what I can find for the LDR, I guess I just find the threshold and set it to trigger just below it?
If you ever need something drawn and fabricated/printed let me know and Ill try to get it printed up
This is the sort of experimental work I'd suggest you do next, either with an LDR as I've done or a photo-diode mounted flushly in the same way.:
With an LDR the circuit as you see couldn't be simpler. At pin A0 of my Nano I was seeing 3.9V and 1.2V respectively in the open and obscured states respectively. My 'toy cars' were scraps of wood, one with four drawing pins to raise it a little above the surface, as that naturally affects the LDR readings.
The more important work, which I'll leave to you for now, is deciding exactly how to use those distinct readings and implementing that with your code.
damn brother, you didnt have to mock it up! I love that idea, going through the bottom, I was hung up on integrating the printer. I guess its true when your a hammer everything looks like a nail. I wish you hadnt went through the trouble, I feel bad. Man where did you learn that circuitry at? I did some mechanical engineering at Zoeller pumps so if you got a basement you probably have one. I worked with higher voltage semi-simple electrics, so I know a little bit about a little bit. switches, motors, breakers, 2 phase and 3 phase and such but nothing this fine, I try to pick up what I can where I can but I need to sit and focus and that isnt easy lol.




