Propeller Based Employee Time Clock
Microcontrolled
Posts: 2,461
My dad owns a small local buisness and has been pricing time clocks for some time so that he could make sure his employees were getting paid the right amount. Each one was over $200, and well over his budget. I offered to make him one, and I came up with a simple design that worked like a charm.
The Propeller Time Clock (PTC) uses a USB connection to transfer the minutes to the computer. I have written simple software for the PC that receives the data stored on the EEPROM and puts on a console so that it can be copied and printed.
What the hardware consists of is a Propeller Protoboard USB, an RFID reader (I use those a lot), and a Gadget Gangster Monochrome LCD. It also has a green and red LED for an indicator. Only 5 users are supported to save memory. The users each have thier own card that they use to check in and out by waving it above the clock. The LEDs blink green for in, red for out. It converts the time (kept in a seperate cog) into a string value and prints it to the EEPROM. The EEPROM can hold hex $1000 bytes of memory (could someone kindly convert that to decimal?) for each user.
The PCT has worked like a charm in all the hardcore tests I've put on it (including dropping it from 6 feet, I might add) because it will have to be sturdy to take the abuse it may take. I have checked in and out and come back hours later to see how it has done, and it works every time.
At my dad's request, I have made it add up the total time for each user and print it to the console when the EEPROM is downloaded. Also, to avoid extreme data loss I back up all the variables when the card is scanned. The code for this looks very messy and unrefined, which makes me cringe, but I want it to work so I won't risk changing it.
The Propeller uses almost ALL the cogs for this, as it has:
1 printing the time on the screen
2 keeping the time (one is string and one in decimal, I should just convert it on cue but I was lazy)
1 running the USB engine
The one running the USB engine is special because it allows you to transfer data over the USB port and scan for RFID cards AND keep time all in simultanious processing! This project is not only useful, it is a good show of something that ONLY the Propeller could do. And the whole system only uses the Prop, no other ICs!
Here are some hi res pics:
microcontrolled.propmodule.com/P6170679.JPG
microcontrolled.propmodule.com/P6170672.JPG
microcontrolled.propmodule.com/P6170671.JPG
microcontrolled.propmodule.com/P6170680.JPG
microcontrolled.propmodule.com/P6170672.JPG
I've also posted the code. I'll post the .exe program when I have the chance (it's not on this PC).
I hope that you enjoy it!
Micro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my new website!!
Use the Propeller icon!!
Follow me on Twitter! Search "Microcontrolled"
Post Edited (Microcontrolled) : 6/21/2010 8:40:35 PM GMT
The Propeller Time Clock (PTC) uses a USB connection to transfer the minutes to the computer. I have written simple software for the PC that receives the data stored on the EEPROM and puts on a console so that it can be copied and printed.
What the hardware consists of is a Propeller Protoboard USB, an RFID reader (I use those a lot), and a Gadget Gangster Monochrome LCD. It also has a green and red LED for an indicator. Only 5 users are supported to save memory. The users each have thier own card that they use to check in and out by waving it above the clock. The LEDs blink green for in, red for out. It converts the time (kept in a seperate cog) into a string value and prints it to the EEPROM. The EEPROM can hold hex $1000 bytes of memory (could someone kindly convert that to decimal?) for each user.
The PCT has worked like a charm in all the hardcore tests I've put on it (including dropping it from 6 feet, I might add) because it will have to be sturdy to take the abuse it may take. I have checked in and out and come back hours later to see how it has done, and it works every time.
At my dad's request, I have made it add up the total time for each user and print it to the console when the EEPROM is downloaded. Also, to avoid extreme data loss I back up all the variables when the card is scanned. The code for this looks very messy and unrefined, which makes me cringe, but I want it to work so I won't risk changing it.
The Propeller uses almost ALL the cogs for this, as it has:
1 printing the time on the screen
2 keeping the time (one is string and one in decimal, I should just convert it on cue but I was lazy)
1 running the USB engine
The one running the USB engine is special because it allows you to transfer data over the USB port and scan for RFID cards AND keep time all in simultanious processing! This project is not only useful, it is a good show of something that ONLY the Propeller could do. And the whole system only uses the Prop, no other ICs!
Here are some hi res pics:
microcontrolled.propmodule.com/P6170679.JPG
microcontrolled.propmodule.com/P6170672.JPG
microcontrolled.propmodule.com/P6170671.JPG
microcontrolled.propmodule.com/P6170680.JPG
microcontrolled.propmodule.com/P6170672.JPG
I've also posted the code. I'll post the .exe program when I have the chance (it's not on this PC).
I hope that you enjoy it!
Micro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my new website!!
Use the Propeller icon!!
Follow me on Twitter! Search "Microcontrolled"
Post Edited (Microcontrolled) : 6/21/2010 8:40:35 PM GMT
Comments
You have been busy! Great project! I smell another Nuts&Volts article in the making!
Just finished reading your RFID acticle, very well done young man!
Jim
Advanced would be a loud CLUNK! sound when you·clock in/out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Pages: Propeller JVM
1. Looks like you bought it, and not like you ripped it out of an old computer
2. I bought things to go with in while I was developing it, so all the parts are well fitted in the case.
The case is the only recycled item, and even that doesn't show much. I've worked on this over the last few weeks, and it looks quite nice. Thank you for your interest!
Micro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my new website!!
Use the Propeller icon!!
Follow me on Twitter! Search "Microcontrolled"
The problem is that any processing happening after the waitcnt adds a delay the next time you go through the loop. The solution is to keep the "destination time" in a variable, instead of adding 1 second to the current time:
If that's the method you are using and it is still drifting, I'd like to know because I just made a clock too.
John
Cheers,
--Steve
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Pages: Propeller JVM
I was going to run the real life test starting today, but when I had it all together on Friday (and working perfect) I saw that the screen was just about 1mm off center. When prying off the glue, I damaged the ribbon cable on the screen! So now, as disappointing as it is, I am waiting for my slow order from Gadget Gangster to get through so I can get this thing running again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my new website!!
Use the Propeller icon!!
Follow me on Twitter! Search "Microcontrolled"
I also did not know that the old time clocks made a "ka-thunk" sound. I could fit that in, or a beeping sound, as there is 2 cogs left. I could also pick a random employee to play a fanfare upon scanning. Just kidding.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my new website!!
Use the Propeller icon!!
Follow me on Twitter! Search "Microcontrolled"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Pages: Propeller JVM
Nice project. Been there myself with the employee time clock project (circa 1994). Interestingly mine relied on employees to enter their employee ID directly on the keypad. I always wondered if there would be a problem of someone clocking someone in / out if they were late, but it too was a small company.
As a note, I used the DS1287 in my application, which was Z80-based, however these days if I used a Propeller I might consider the software clock running in its own COG if I had a battery backup on the system. That's always been the draw of these external RTC chips...small, cheap, battery backed and many have extra features like battery backed RAM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·
You could add SIDcog to create interesting in and out sounds.
BTW... $1000 = 4096
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
Concerning Hex to Deciamal conversion, did you miss this recent thread?
http://forums.parallax.com/showthread.php?p=915034
Jim
Post Edited (hover1) : 6/21/2010 10:26:36 PM GMT
Good work, thanks for being open and sharing your projects!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, P.E.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
www.tdswieter.com
Thanks for the recordings hover1. Lets hope they fit on RAM, I don't have a spare SD card.
I was thinking about using the NS sound driver from the Hydra to do the tone processing. I can't get my little speaker loud enough, though. How do those machines make such a loud beep with such a small speaker??
Thanks,
Micro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my new website!!
Use the Propeller icon!!
Follow me on Twitter! Search "Microcontrolled"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my new website!!
Use the Propeller icon!!
Follow me on Twitter! Search "Microcontrolled"
Micro,
How much are you spending in parts? The rule-of-thumb for business is that you should charge at least 100% mark-up for your products to be able to make a little profit. If you are spending enough below $100, then you may have found a nice market for your PTC.
Art
You may need to experiment with tones to find a "sweet spot" with your particular speaker. Also, you might check the current limiter into the base to make sure, in your desire to protect the Propeller pin, that you're not "goosing" the transistor quite enough.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
Since you did save your dad $200, maybe an SD card might not be an unreasonable request.
Jon Williams wrote a Spin Zone column that deals with using a bicolor LED with the Propeller. I think this would be a good application for one. Here is the article: www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp1.pdf.
I have tried all and everything I could to make the propeller a clock. It always drifted. Ill see if I can pull up some code later this morning when I am at my office.
I think its the crystal that is making it drift. I matched it according to the propeller data sheet but no luck. I also tried several different types of x-tals.
Got one of the codes I use - its ran in its own cog
Post Edited (Zap-o) : 6/22/2010 11:26:23 AM GMT