Bob's Hobby Bob's Hobby blog

USB Physical Hit Counter based on AVR ATtiny25

USB Physical Hit Counter based on AVR ATtiny25
This is a USB Physical Hit Counter. This version requires one MCU to communicate between PC and 7-segments display driver.I decided using AVR microcontroller and this is my first AVR project.The purpose of this project still same as previous version.Therefore,it used to count and display the total page hits on any website instead of using only general scripts such as PHP,Java,CGI etc.The host software no USB driver programming required.
Hardware and software on Display side

USB physical hit counter interface circuit

Physical hit counter V2

Physical hit counter V2
This is a Physical Hit Counter V2. In this version I use MAX7219 and 7-segment common cathode LED display x 8 instead using mechanical counter like the first version. MAX7219 is a 8-Digit LED Display Drivers and serially interfaced.I use MAX7219 because I got two samples from MAXIM.To interface MAX7219 with PC serial port without MCU, we must convert RS232 voltage level to TTL level.

Physical hit counter for website

Machanical counter

This is a physical hit counter.It used to count page-hits on the website instead of using software only.The counter will be connected to rs232 port through a few of electronic components that performs as a counter driver and power supply circuit.The counter that I used is a mechanical counter or electromagnetic counter model SC-212 which I get from an old coin-op game machine as show in the photo.As the counter's nameplate specified, this counter requires 12VDC power supply, this means that it requires a 12V pulse to increase the counter by 1.Also,the in the nameplate show the maximum speed is 15 CPS, but I not use beyond this speed in my project.

How to use a webcam as CCTV

Logitech webcam
I got an old Logitech QuickCam from my sister as show in the photo above and never used for any purpose.Until I heard about CCTV from my neighbor "How to use a webcam as CCTV?"He means it can be used as video recorder for surveillance in areas which he needs monitoring and he want to see that video later. After searching for this question on the internet I found many solutions.Most of the answers recommended to use 3rd party software or components and programming skills are required. However, I found a solution which I think it is cheap and simple to solve this question by using Windows Media Encoder provided by Microsoft and it free.