What’s one way for recognizing an object (pre guidance for making a device)

armavrdetectionmicrocontrollerpic

I want to make a device that will recognize an object, for example: cube, sphere etc. I have two sensors that make a pulse for measuring distance between the sensor and an object as shown in this picture:

enter image description here

Due to picture, T4 is the width of the pulse and the T2 will change due to object.
I can recognize the object by this amount. For this job, it is necessary that first I put the objects one by one under the sensors and save the amounts from the sensors (with the name of objects).

Next, for exmaple, for recognizing an objects, I put the object under the sensors and the MCU (or processor) says the name of that object. There are two sensors and the 100 objects. For each object I want to sample 20 times. Thus, for each object, I should save 40 amounts. Which processor or microcontroller is suitable for this job? AVR, ARM based microcontroller, FPGA… Any suggestion on a device to do this job?

Best Answer

You are straightening deck chairs on the Titanic. Lots of micros can so this. That's not your problem.

First you need to understand the physics, the nature of the measurements, and what exactly you want to measure from the signal. It is not clear you have a good grasp of this since you say "T4 is the width of the pulse" when it is clearly not from your own diagram.

You say you want to measure T2, and maybe that is correct, but are you sure you don't really want T1+T2? Are these perhaps ultrasonic rangefinder pulses?

It would help if you said what the range of the various Tx intervals are. If these are nanoseconds, then forget about it with your current level of knowledge. If they are 10s of µs to ms, then you have a chance.

Many microcontrollers have a capture feature that can be used to measure the time between edges. I am familiar with the Microchip PIC line, so I'd chose a PIC24H or dsPIC33F with a few "input capture" modules, which is most of them. A snapshot of a free running timer is saved when the specified edge is seen. By doing a unsigned integer subtract of the last edge snapshot minus the previous edge snapshot, you get the time between the edges.