12" distance what sensor to use if something is closer?

Hey everyone.

I am going to be designing a little project.

Want to know what sensor is best, cheapest, and easiest application for control.

I am going to have 2inch tall legs.
Above the legs will be connecting rods.
The object will pass below the connecting rod, and between the legs.
The object is 1inch tall, and 3inch diameter.

The project shape will be a horse - shoe "U". 5 Segments hence, leg - leg - leg - leg - leg - leg

The distance between the cups will not change, but the angle between the cups will.

example.

pattern could be straight line.
pattern could be n.
pattern could be zig-zag. "z" of the segments.

Any advice of project guidance is appreciate. Please thoroughly explain or provide links with data sheets etc. for your component advice.

Thanks

Sounds like homework.

Can you show us a diagram? The crappiest sketch is better than “leg leg leg”.

You can use ultrasonic sensor HC-SR04 for obstacle detection.

You can also use IR sensor but ultrasonic would be a better option.

something along these lines

I was thinking of using the HC-SR04 sensor. However with the size, I was hoping there was a smaller less expensive sensor component I could possibly find. Being able to place the sensor in one of the legs, and then allowing the sensor to spin with the connecting rod above it for proper detection of puck traveling through section seemed a bit bulky and unnecessary.

b3y0nd:
However with the size, I was hoping there was a smaller less expensive sensor component I could possibly find.

Oh, come on!

Cheaper you will not get and it isn't that big.

OK, if you must, perhaps this.

With the legs having to spin in a circular motion and lining up with the above connecting rod, yes the size is an issue. Having to spin a sensor that is roughly 45 mm in width in a circular motion can be very space consuming, compared to spinning a smaller, sensor, like a infrared sensor.

Hence this post, was confiding in the group to give me guidance, not slam me for asking.

How about a clear description of what whatever this is, is?

Legs and some things about them isn't enough, just begs more questions

Yes. I placed that further in the posting.

Puck can hit the legs. The spinning legs and then what happens?

You can sense from above in the cross members with IR reflect. The sensors have to be a bit less than 1 puck width apart and 1/2 width from the legs. The IR led points at an angle to down and the sensor is set to catch the reflection from a close surface (the puck not the ice below). These are sold for industrial use, cheap by the box or you can find/make smaller. The reflection angle should be perpendicular to the line of sensors, not along them.

Many sensors can be connected and read quickly using input shift register chips on SPI bus (4 wires data + 1 power + 1 ground to get many-many inputs or outputs or both. Serial Peripheral Interface bus on Arduino at default speed transfers 512KB/sec both ways at the same time, it is possible to set outputs and read inputs in the same cycles as SPI is in a way circular. If you have 8 sensors per arm that is 1 input register chip, with standard wiring they could plug-chain. Maybe even put a led on top to flash when the sensor detects the puck.

An Uno/Nano could do the job and run a user terminal as well, maybe work through a phone with way more code + an addon mini-board.

PS -- nothing spinning means less energy, less mechanics, less cost.

b3y0nd:
With the legs having to spin in a circular motion and lining up with the above connecting rod, yes the size is an issue. Having to spin a sensor that is roughly 45 mm in width in a circular motion can be very space consuming, compared to spinning a smaller, sensor, like a infrared sensor.

Hence this post, was confiding in the group to give me guidance, not slam me for asking.

your first post said nothing about confined space
your mention of the HC-SR04 sensor would lead on to believe it might work in your application, but desire, not physical constraints was pushing for something smaller.
Paul__B offered the gy-vl53x0xv2 sensor
that sensor is about as tiny as you will get. make your own circuit board, buy the chip and mount it.
use wires, not pins and Bob's Your Uncle.
as you get smaller, prices go up so expect to put some financial investment into your project.
as manufacturing increases, availability and costs can bring the price down. so if you wait a few years, the part may (or may not) become popular and come down in price.
these are facts, we are not slamming you.
if you said you have to spin a sensor and had only a 45mm space, I am pretty sure that the responses would be to get a MEMS chip, and make your own circuit board.
since you are bringing those requirements up, it does focus the solution to the problem.
since you may not be able to solder the chips, there are many board houses that offer soldering chips for your for a small fee.
however, I would suggest you get one as linked and test the heck out of it before investing in quantity or fabrication

Thanks for the input everyone. You all have a higher knowledge on this topic than I.

I am trying to incorporate a "motion" sensor so that the puck traveling between legs will be demanded by lights and auditory commands.

This is for my son to practice stick handling and keeping his head up.

My thought was to use a motion sensor as seeking advice on which to use to detect the puck traveling across the called for section, which would be roughly 12" in length between each rotatable section.

I was going to use an Arduino nano to control the lighting of the section and reading of the motion sensor, as I have worked with Arduinos before and seemed comfortable enough to atleast attempt this project and the coding involved, other than the cell phone interfacing.
Is there another alternative to consider? :confused:

I was hoping to keep the amount of motion sensors to a minimum as the inputs on the micro controller is limited as well. There would be 5 sections, each requiring a motion sensor, and each requiring a single light.

Incorporating a cell phone display to relay information and eliminating an LCD screen to be implemented into the project design is a consideration. Any thoughts and guidance on the components needed? Just a Bluetooth module to send the information to the cell phone?
I was also looking into having my son choose which stick handling pattern to practice from his cell phone, which would also receive information in regards to his effort. IE time taken to complete the given pattern, total patterns completed, average time of each pattern etc.

I was hoping to turn a little game into his stick handling, so that he will be encouraged to practice more in the garage.

I am currently working on a wiring diagram so that the help I receive has aim towards creating a better project with incurring the least amount of cost.

The puck is going to hit a leg now and then. A spinning leg will add to the fun of that.

If the sensors are connected on a bus you won't need many controller pins to read them all.

Making one spinning sensor leg will be slower, many times harder to build and far more expensive than a few IR reflect sensors.