Newbie: Count IR beam breaks per interval, output that to text file. Doable?

Hi all,

I'm in the process of obtaining an Arduino with an IR sensor setup, and I want to know the feasibility of this project.

I want to count the number of beam breaks in a set interval (say, total number of beam breaks per 10 minutes), then "push" that number to a text file, preferably with a time stamp. Some intervals may end up with very few or zero breaks, others will end up with many more. I may need to Data Logger shield with the real time clock to do this, I'm not sure.

I'd ultimately like something like this:

Date_Time / Counts

052514_0900 / 105 052514_0910 / 210 052514_0920 / 200 ... 052514_2100 / 005 052514_2110 / 000 052514_2120 / 000 ... 052614_0900 / 110 052614_0910 / 302

Etc.

Please let me know if this is doable and how I should go about doing this if you guys get the chance.

Thanks very much!

Please let me know if this is doable

Perfectly doable.

how I should go about doing this

Start with the hardware and the IR sensor. Use a modulated beam and a TSOP4038 light barrier sensor.

Get a real time clock module, plenty about, and an SD card. Get the hardware working first and the write the real code.

It will go much easier if you don’t make the light into a beam but rather restrict the sensor with an aperture.

Great, thanks very much. I went ahead and ordered:

Starter Pack for Arduino (Includes Arduino Uno R3) IR Break Beam Sensor - 5mm LEDs Adafruit Assembled Data Logging shield for Arduino

I'll try to get the basic beam breaking thing up and running, then move on to the "interval counting" thing. If I have any questions I'll come back here.

Can you post links or addresses to those parts?

Generally I find that modules are cheaper than shields and that often you can make your own.

For example a roll your own beam break uses a 5 cent led, a 10 cent phototransistor/light detector, wire, a 2 cent resistor and maybe a 10 cent transistor, cardboard and tape (to narrow the view of the detector and whatever you need to mount those.

You can even make your own SD adapter rather than buy an under $2 module that won't be as long term reliable and still costs less.

The UNO R3 is a good investment. It's easy to use and most examples I know are made for UNO. The 328P is a socketed DIP chip that you can replace. It was made that way so that you can develop the project on the board then pry the chip out and put it in your final product and put a new bootloaded chip in the UNO. And you can buy bootloaded 328P chips for twice the price of the bare chip or bootload your own..... using your working UNO!