IR Counter

Hey all,

Looking for help with a simple project - but I'm new to the code aspect of Arduino.
I want to build an IR counter.

It would have a 3 digit LED screen showing count, with a separate light that illuminates every 100 (for 5 seconds then stops).

I would also have a button that resets the counter to 0 when counting has stopped.

Can anyone point me to the layout and code to make this happen?

Thanks!

/rsr

I did find some code for a 4-digit LED display...

Hi and welcome.

Its not great code and will give you some problems with your counter idea.

What hardware do you have now? And what exactly do you mean by "IR counter"? Counting objects braking an IR beam?

Paul

Paul,

Thanks for taking an interest and answer my post.
Yes - I plan to use it to count objects that break an IR beam.

This will be used to count rocks coming out of a grader and falling into bags (100 per bag).

I have an Arduino Uno.
IR Beam - looking at something like this:

Thanks again!

/rsr

Ok, i think next step would be for you to post a schematic showing how you will wire up the sensor and the display to the Arduino. It can be hand drawn and photographed, or use a scematic editor like Fritzing in schematic view.

To keep things simple for your first project i would recommend a display like this. It has a built-in driver circuit which will make using it much easier for you.

Those sensors don't appear to use a modulated IR light. That's OK in an indoor / controlled environment but if you have variable light conditions (i.e. outdoors) you might get stuck tweaking it constantly.

I'd recommend using any discrete red, white, or IR led as the emitter and a TSSP4038 (or TSSP58038) IR receiver for the receiver. Regarding the choice of LED, just about any small LED will work; these receivers are quite sensitive and capable of meters of range. Regarding these specific parts for the receiver, compared to typical receivers used with TV remotes and the like, they're different in that they're designed for continuous signals.

For your display i would recommend something like this. It will make your project simpler overall.

Paul and Chagrin,

Thanks again for the input.
Being new to Arduino. I'm having trouble getting started.
I know what I am trying to achieve - but using the Arduino to integrate it is my catching point.

I don't know how to wire the sensor and LED unit to the Arduino.
I also don't know where to begin with the code.
There are several examples of code (like the examples I listed above).

I just need a good kickoff point.

Thanks!

/r

OK, how big and what colour display do you need? Sounds like it needs to be used outdoors, so will need to be as bright as possible? Also this extra light that indicates the count of 100; any ideas on that?

I think the ir beam break detection is the crucial thing to get working first. For now you can send the count back to a laptop and see it updating on the serial monitor. If you can't find a way to make that work right, there's not much point wasting time working on the display.

So have a look at Chargin's link or this link.

Awesome - I'll start with the IR Beam in an outdoors setting.

The count of 100 - I'm guessing I'll run with a second Display that counts in 100's.
I'll also use an LED that will simply flash for about 5 seconds just to indicate 100 was reached. The LED will extinguish after that until the next 100 is reached.

I'll start on the count and message if I run into any snags.

Thanks again for all your help!

/r