Welcome

Software

I wrote a daemon for this piece of hardware. I wrote it for Linux, but I think it should work on most Unices. It basically listens on a Unix domain socket, and whenever a connection to it is made, it sends a pulse to the counter and closes the socket. You can use e.g. a php-script running on a webserver on the same machine to connect to that socket whenever a certain page is pulled from the webserver. The software is licensed under the GPL and can be downloaded here.

If you decide to build your own version of this project, please send me some pictures of it. I would love to see some more real-life webpage hitcounters.

« Prev 4 

46 comments

asdlfkjasljk wrote at 8 Dec 2015, 21.45:

What happens when two people visit your site at the same time? Do you implement a queue of hits in that case?

T. wrote at 18 Jan 2013, 15.43:

What do think about connecting and powering it from the gpio of the raspberry pi?

DiGGiT wrote at 15 Jul 2010, 20.28:

Hi Iam writting because i used your idea and built mechanical hitcounter too :) perfect thing. I\'ve written software part in python, (it\'got output messages in czech) but this is bit original, own web pages are on some web hosting server, my script downloads the page, find line 357 and in this line is it looking for string which follows this number, Script compare this number with another saved in file which represents mechanical counter. Because if my computer is offline, web can be visited by another people. When is the script started, it checks online counter compare it with number in file and count quantity od ticks to be sended into mechanical counter. When it\'s balanced, script sleeps 300 seconds a then trying it all again. If someone want to use it, he must change the part which is looking for web counter data. This part is uniqe for used web. video and source-code in python here: http://www.megaupload.com/?d=QVKNPUYX ENJOY and THX !!!! ps: crazy captcha ;)

RDX wrote at 4 Apr 2010, 13.23:

Dude. ur absolute genius.

KillGuta wrote at 6 Oct 2009, 16.35:

Dude, that's freaking awesome! Wished I could build and code that kind of stuff :(

Nop wrote at 4 May 2009, 17.06:

Great stuff! Hope it clicked still and a lot.

elektronica wrote at 17 Mar 2008, 19.35:

i need a program with i can control somehow from webpage an relay or led. i know to do that from paralel port, is simple, but i don`t know how to do that from a web page. so what i want is a program instaled on my webpage how allow me to control the paralel port from internet, from web page. if you can help me please write me to info@elektronica.us

malc_hurn wrote at 20 Nov 2007, 17.52:

PS; does the software tally up the count between activating the solenoid counter, doing it in real time would make for missed counts. Hardware hacking and Steampunk appeals to my early 80s beginnings in electronics, too much of the 90s and newer stuff has no soul, there was still good stuff hanginga round in the 80s, 90s with the CAD CAM revolution, electronics became transient and throwaway too quickly. I bodged up an old Cherry terminal keyboard for my ZX81 way back when ZX81s were cool and new, those were the days.

malcolm wrote at 20 Nov 2007, 17.45:

Rotary decade counters would be an interesting variant, something along the lines of the power meters in 'Forbidden Planet'. Just need to find some suitable cheap nylon gearing and a solenoid to drive the digit counter.

Eroen wrote at 20 Nov 2007, 8.43:

We can haz webcam?

PlastBox wrote at 16 Nov 2007, 14.14:

Soooo cool! Too bad I don't have any of those counters laying around, or I'd make one on the spot! Of course, the only website I have mostly just get hits from myself, it beeing a dev-and-experimentation-site. ^^ Still, awesome! Might implement something like this when I get my internet connection, home control center (computer-controlled christmas lights, door loggers, other random stuff) up and running. =D

fhayashi wrote at 31 Oct 2007, 19.06:

You need a webcam pointed at the counter, and display that as a webpage hitcounter.

LcNessie wrote at 31 Oct 2007, 15.44:

Hello Sprite, Nice job!... However, I think you could have added a diode right after pin 3 to the rest of the circuit, to prevent the elco from being charged, should the polarity be switched the wrong way. It would cost you about 0.6 volt on the whole, but that shouldn't matter too much, would it?

Sprite_tm wrote at 28 Sep 2007, 10.01:

The software for the counter is provided; just download it, it comes with sources.

Steviano wrote at 26 Sep 2007, 15.57:

Hello, How did you write to the serial port? I am somewhat familar with programming but I am not familar with unix. I am somewhat familar with c++,javascript,v-basic and i am very familar with assembly though I am not sure how to write code in an application on the pc and have it communicate with the outside world.

Keehun wrote at 12 Jun 2007, 20.54:

Nice work... I'd love one! But your CAPTCHAS are way too hard. yes I'm a human but it is really hard. Dark dark green blended with dark dark purple is too hard. I think the background is from an image which makes it even harder... I can barely make out the first few letters sometimes... C'mon. I'm not colorblind but think of people who are. Add like a sound option if possible.

Brian wrote at 6 Jun 2007, 13.53:

Now what you need to do is point a webcam at the counter and have it generate the counter image on your website (the circle is complete). Or maybe a live video of the counter?

ibanex wrote at 22 May 2007, 20.16:

Vette Mod sprite :) ik had vroeger ook altijd van die counter en dan met een knopje aan mijn deur gemaakt. Jammer dat ik ze niet bewaart heb ;)

Sprite_tm wrote at 18 May 2007, 20.35:

Nope, it queues the requests (implicitely, by using a kernel feature actually) and processes them with a set minimum time between them. I haven't seen it miss any hit yet.

Eric wrote at 18 May 2007, 17.59:

Very creative way of powering the counter. I probably would have tapped into the webservers power supply myself. You could still use a transistor hooked up to the serial port to act as a switch. This also eliminates the need for the large capacitor (and any explosions that may go along with it). I am curious, what happens if you get a couple of hits really close together? Does it miss one?

Oli wrote at 15 May 2007, 12.37:

Power to the anaolgue ish

John wrote at 14 May 2007, 20.49:

Can you make something that will send a small jolt of electricity to my boss every time he reaches for the intercom button to buzz me?

doddo wrote at 14 May 2007, 18.01:

Neat!! I'll add it to my page as well great work. Clever!

Gerald wrote at 5 May 2007, 3.39:

Here's an impulse counter http://www.goldmine-elec-products.com/prodinfo.asp?number=G15343 (unf. $10 minimum purchase + shipping). This appears to be [similar to ]the counter in this project. http://www.electronicsurplus.com/ccc1694-counters.htm has a list of counters, varying prices. http://www.wttool.com/product-exec/product_id/10839?utm_medium=cpc&utm_source=froog is another place. It doesn't seem to have a $10 minimum order, but I could be wrong. I have no affiliation with any listing here. I'm merely suggesting it as FYI for anyone who cares to read this far :). Google search: Durant counter helps bunches!

Larry wrote at 4 May 2007, 18.22:

Wow, you're a freakin' genius! How do you know so much about electronics?

Danny wrote at 1 May 2007, 5.43:

JPE - thanks for the link, but i just found out how easy it is to output via a com port in a program, pretty simply stuff. So now I just need to figure out how the crap I'm supposed to get MS Visual Studio working in Vista, and I need to get ahold of a mechanical impulse counter, which is a lot harder than i thought, then figure out how to put the contents of an online .txt file into a string, then I'll have it all together, and I'll post a link to my version of this amazing creation/hack

JPElectron wrote at 1 May 2007, 0.08:

A windows version which drives an LED segment display is available here: http://www.jpelectron.com/readme/dnsrled.asp The software was originally intended for something else, but it would just take some simple code to get a web 'hit' to run "count.exe J"

Pewps McGee wrote at 30 Apr 2007, 3.02:

Nice mod, is it out of the question to pulse it until it turns 999999 every night? Not sure how quick it goes.

Danny wrote at 28 Apr 2007, 0.38:

But ya... this is absolutely amazing work. Quite possibly one of the coolest hacks/creations I've seen in an extremely long time! Amazing work!

Danny wrote at 28 Apr 2007, 0.29:

Could someone write a script in cgi/php/whatever that would work by sending the pulse through a com port to a mechanical counter whenever it's called? This way I and others could use it on any OS based webserver. Basically I want to be able to have it connected to my personal computer, and have my website (remote server) call the script from my personal computer running apache/whatever so I could essentially have it count hits to a remote website. Or even better would be a VB/C program for Windows that can check the contents of a txt file at an http location that has the total hits for a website in the txt file, and for every number it goes up it sends a pulse via a com port to the mechanical counter, and it would check every 10 seconds or so... I want one of these things so badly!

Mike wrote at 27 Apr 2007, 23.53:

With the serial port limited to 20mA, and you storing that through a capacitor, what is the maximum "hit rate" the counter can keep up with?

Ryan wrote at 27 Apr 2007, 21.21:

would be awesome to set up a dashboard of these, labeled for each input, ie: hits / login attempts / days server running / error message hits / etc. could even get out the oldschool label-punch :) if you ever decide to make things with nice custom casings, check out www.emachineshop.com You draw it, they make it.

MarcusKara wrote at 27 Apr 2007, 8.44:

Hoi Sprite, Dat 10+ en 10- verkeerd om zijn is omdat volgens de RS232 standaard een 1 staat voor -10V op de lijn. En een 0 voor +10V. Ik had voor een ander project ook zo'n raar verschijnsel maar dit bleek het te zijn. Als je met TTL op je com poort wilt zitten (wilt tegenwoordig wel) moet je ook een inverter gebruiken. Ik hoop dat je hier wat aan hebt, en de elco ontploft inderdaad niet (misschien over een lange tijd wel, er ontstaan immers gassen) maar het is hoe dan ook niet aangeraden :)

Matt wrote at 26 Apr 2007, 13.15:

Competition! http://embeddedether.net/mhc.html

Sprite_tm wrote at 26 Apr 2007, 9.35:

Moritz: You could do that... but atm my site gets about 10K hits a day... and I wouldn't want to send the counter 90K impulses every night ;-) Btw, I updated the schematics to explicitely include the protection diode, so people with counters which don't have one built into them won't fry the transistor or PC.

Jones wrote at 26 Apr 2007, 9.33:

Why not use a car odometer (with the trip odometer so you can reset it daily) which comes in both analog (driven by a cable) and digital (driven by an impulse sent from the transmission)......it all runs on 12 volt (and most of it will run on 10v....albeit not as bright)? Personally this isnt my thing but its cool you did it!

Moritz wrote at 26 Apr 2007, 9.06:

To reset the counter (mine do have a reset button) you could write a script that sends the additional pulses till you reach zero again (e.g. after 10 hits during the day on a 4digit counter you make the script send another 9990 pulses), will be noisy though and might take a while.

Moritz wrote at 26 Apr 2007, 9.02:

Nice, Dude! You gotta watch the voltage spikes from the inductance, though. That could destroy your serial port. Maybe add a diode across the counter (the electrical part is nothing more than a coil). For those, who want to build something like this, I have loads of these mechanical counters and I'm willing to sell them for a buck + shipping. Contact me per ICQ: 148883846

Sprite_tm wrote at 26 Apr 2007, 7.09:

I didn't do anything with a reset cause there's no easy way to reset the counter _at all_. I had to do it after a testing run and I basically had to take the counter apart, manually turn the digits to 0 and put the thing together. These counters usually are used to count something over the complete lifetime of a device, so there's no need to reset them there.

MS3FGX wrote at 26 Apr 2007, 3.11:

I like the concept a lot. It doesn't even have to be limited to web hits, you could use it to show how many SSH login attempts your server gets per day, emails coming in, FTP logins, etc, etc. Anything would be pretty much fair game.

Hammy wrote at 26 Apr 2007, 1.00:

I am sure something could be set tho hit(realy hit) the reset every day. I also like the web cam idea! last pick of the day saved so you can track your hits.

Dan wrote at 25 Apr 2007, 23.20:

Too bad there isn't an easy way to reset the counter to 0 every day. I want it to count my daily hits! I say 'easy,' because I know it's possible to keep a tally of increments, then increment MAX_VAL-hits number of times each day.

Sprite_tm wrote at 25 Apr 2007, 23.13:

Henry: I thought about that, but atm it's a bit too much hassle. I might do it in the future, though. Hannes: Oops, I thought I mentioned that: The counter has an integrated protection diode, so it wasn't needed in my schematic. I'll add it to the schematic when I have the time, tho'.

Henry wrote at 25 Apr 2007, 22.55:

Neat! You could point a webcam at it and have that hosted on your webpage.

hannes wrote at 25 Apr 2007, 22.54:

Hi, nice idea! However, coil drivers like the one probably used in the mechanical counter sometimes like to emit high voltage when switched. You might want to google for "back emf" and add a diode over the two contacts to protect your server from a voltage spike... Apart from that I love this project :)

UnixFan wrote at 24 Apr 2007, 17.06:

Hey Man, That's really clever! Nice work! Always find sites like yours interesting.. Unfortunately It's not very easy. (Hackaday is not too bad I guess..) Do you know of any sites.. Similar to yours? Anyway, Cool projects pal! :-)

Leave a comment:

Your name:

What does this picture say?
Sorry, this is a captcha

Your comment:


© 2006-2022 Sprite_tm - Contact