I need to detect and count a number of metal plates coming by my sensor. I need to do it cheap as possible. There are around 1-2 centimeters between the plates, and they are 3 centimers thick. The sensor can get pretty close to the plates: ~1cm.

What do you see as my options?

I have tried an IR distance sensor, which works OK. Problem is that the plates are black, so I need to use a lot of power in my emitter LED to light up the black. Besides day light and other light sources might interfere.

I've looked into inductive proximity sensors, but I haven't found any IC's are reference designs for this. The ones that you can buy for automation are to expensive.

Any other ideas? :)


To clarify. Actually it is a stack of weight plates that is moved up and down (like in a gym machine):

enter image description here

I need to count how many plates passed a curtain point. I was thinking if it is possible to do something electromagnetic? Create a long coil (the blue line in the drawing) or something similar?

  • 2
    \$\begingroup\$ Depends on the circumstance. You need to describe your scenario better. Are the metal plates ferromagnetic? Are they passing the sensor at hypersonic speeds? Are they underwater? Is there a significant voltage differential between the plates and the sensor? Do lives depend on the counter not missing a plate? Etc. etc. etc. \$\endgroup\$
    – Dampmaskin
    Mar 14, 2017 at 15:36
  • \$\begingroup\$ Also...can the plates sometimes be END-TO-END.. i.e. no gap. \$\endgroup\$
    – Trevor_G
    Mar 14, 2017 at 15:41
  • \$\begingroup\$ How square are the end cuts for IR reflection? Daylight blocking filters in PD mitigate all light interference issues. Is motion stop random? Did you try precision PD type with a fixed R or imprecise phototransistor type? \$\endgroup\$ Mar 14, 2017 at 15:53
  • \$\begingroup\$ Hi all, check update. @Dampmaskin yes they are ferromagnetic. It is pretty slow moving. No lifes on the line :) \$\endgroup\$
    – Jolle
    Mar 14, 2017 at 15:56
  • \$\begingroup\$ What exactly is this mechanism? \$\endgroup\$
    – Dampmaskin
    Mar 14, 2017 at 16:01

2 Answers 2


Optical break the beam type may be best though it depends on the contamination considerations. They must be kept clean at all times.

As you say, industrial inductive, capacitive and hall effect sensors are not cheap. However, they are extremely rugged and simple to use.

You do not describe what "Coming by my sensor" means. If the plates are on rollers then something as simple as a lever-arm micro-switch under the plate path may be sufficient.

However, without a lot more information it is almost impossible to answer this question. Even then, a lot if it is preference.

Question Edit - Answer Update

Ok, so that is an entirely different scenario.

In that case I would use optical break the beam type sensing.

enter image description here

In order to make such a system pretty much insensitive to ambient light, it is best to modulate the IR LED at some frequency and use the receiver photo-led in a non-saturated analog mode and detect the frequency modulation arriving at the output of that.

If you want to make it really sexy you can use a fibre-optic transceiver on your board and just run up some dual optical fibre up to the sensing points. That method also gives you much better EMI immunity.

At those distances though you probably need to enclose the sensing side, and have a plate with a slot or small hole in it at some distance in front of it such that only light coming from the general direction of the LED will fall on the sensor.

An alternative is a hall effect sensor, but they have to get pretty close to use them, and arranging the magnetics to make that work can be difficult. Other issue will the hall sensor in the sides of the plates need to be physically similar and stacked perfectly.

  • \$\begingroup\$ The microswitch option occured to me too, but the OP stated that the sensor can be ~1 cm from the plates. If this is a minimum distance or not, and why, I have no idea. \$\endgroup\$
    – Dampmaskin
    Mar 14, 2017 at 16:00
  • \$\begingroup\$ A microswitch connected to the equal "=" key of a calculator. If the calculator is solar powered, it may not have an automatic time out "Off" function, which is a problem if the count is stopped to long. Most calculators have an automatic constant function, so entering "1 ++" may count up each time the "=" is pressed. It's cheap and simple. \$\endgroup\$ Mar 14, 2017 at 16:19
  • \$\begingroup\$ @trevor I made a new question, please post this nice answer there, then I will delete this question :) electronics.stackexchange.com/questions/292331/… \$\endgroup\$
    – Jolle
    Mar 14, 2017 at 16:22
  • \$\begingroup\$ @Jolie, that is an entirely different question. If I were you I would leave this one as is. There is no limit to the number of questions you can ask on here as far as I know.... other than the being irritating part ;) \$\endgroup\$
    – Trevor_G
    Mar 14, 2017 at 16:31

The first thing I would try is shooting an IR beam across the top of the weight stack, and count the output yielded by the gaps, rather than the plates themselves. You would have to, of course, take the steps to eliminate any ambient light interference. I think this is similar to what @Trevor is suggesting, but I am unable to see any images for some reason.

I'd then feed the output of the sensor into the counter. The issue here would be that you are also going to get a count on the return trip of the stack - giving a number that is twice the actual plate count. If you need the result to be an actual count without halving the result manually, you can put a Flip-Flop (CD4013) set to toggle in between the sensor's output and the counter's input - taking the output from only one of the two available.

So: Sensor Out to Flip-Flip Clock In, then Flip-Flip Q Out to Counter In

This will divide the count in half by passing along every other gap sensed, giving you the number of plates as the output.

The only other issue I could foresee with this method would be whether or not the entire stack is moved beyond the sensor in either direction - negating the idea altogether.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.