Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronic Content > Electronic Projects


Electronic Projects A collection of small electronic circuits and projects you can build.

Reply
 
Tools Display Modes
Old 8th August 2008, 04:10 PM   #1 (permalink)
Default K8LH Novelty Single Chip Clock

Hi Guys,

After designing this single chip Charlieplexed 24 hour Clock/Calendar/Timer well over a year ago, I finally found some time to prototype it and it seems to work pretty well.



The Charlieplexed display uses direct I/O drive on the segment lines and this limits 'peak' and 'average' current and display brightness. I'm using relatively efficient displays but the display is by no means "full brightness".

Software was written using the free/Lite version of Sourceboost BoostC.

I'm using a four push button "diamond" configuration to control everything. The buttons are fully debounced (both press and release cycles) and there's a short switch press beep through the piezo speaker for positive feedback. The Left button is used to toggle between "display" mode and "set" mode. The <up arrow>, <down arrow>, and <right arrow> buttons perform different tasks depending on whether you're in "display" mode or "set" mode.

In "display" mode, pressing the <up arrow> or <down arrow> buttons cycles the display between the 'Clock', 'Timer', 'Calendar, or 'Display Off'. Use the <right arrow> button to toggle a function associated with the current display on or off. For example, pushing the <right arrow> button while displaying the 'Clock' will toggle the display between local time and UTC. Pushing the <right arrow> while displaying the 'Timer' will toggle the Timer on and off (the red timer LED indicates Timer on/off status). Currently there is no <right arrow> function for the Calendar display.

Press the "set" button to enter "set" mode to edit the current display data (Clock, Timer, or Calendar). The left most display group (Hours/Months) will flash at a 2 Hz rate. Use the <up arrow> and <down arrow> buttons to increment or decrement the display group. The group values will roll over from upper limit to lower limit, or vice versa. Use the <right arrow> button to move to the next display group to the right. When you're at the right most display group, pressing <right arrow> again will move you back to the left most hours/months display group. When finished editing press the "set" button to copy the edited data back to the source (Clock, Timer, or Calendar).

Check for source code updates here; LED_Clock.c

The displays are non-multiplexed common anode type. The NPN transistors are 2N3904. The NPN base resistors are missing on this prototype but should be between 500 and 1000 ohms.

Regards, Mike
Attached Thumbnails
K8LH Novelty Single Chip Clock-clock-2v1-small-.jpg.JPG
Views:	1010
Size:	83.2 KB
ID:	21525   K8LH Novelty Single Chip Clock-charlie-clock-1.png   K8LH Novelty Single Chip Clock-charlie-clock-3.png   K8LH Novelty Single Chip Clock-charlie-clock-2.png   K8LH Novelty Single Chip Clock-charlie-detail.png  


Last edited by Mike, K8LH; 12th August 2008 at 10:29 PM.
Mike, K8LH is offline  
Old 9th August 2008, 12:47 AM   #2 (permalink)
Default

Do you really need the base resistors? At nominal voltages MCU pins drive LEDs pretty well.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Old 9th August 2008, 01:04 AM   #3 (permalink)
Default

Are you confusing the NPN base resistors with something else?
Mike, K8LH is offline  
Old 9th August 2008, 03:11 AM   #4 (permalink)
Default

Mike, this sets the standard for what a project should look like. Nicely done, nicely documented, with all of the parts in place.

Well done!
BeeBop is offline  
Old 9th August 2008, 11:01 AM   #5 (permalink)
Default

I'm pleased with how well the project turned out but I can't say that I presented it or documented it very well (not a proper schematic, no BOM, etc.).

If I had time I would try to do a more professional presentation like Bill (Blueroom) does in his manuals.

Mike

Last edited by Mike, K8LH; 9th August 2008 at 11:14 AM.
Mike, K8LH is offline  
Old 21st August 2008, 04:44 PM   #6 (permalink)
Default Good looking Clock

Hi all.

Digital clock looking good, I would like to build one just for fun. Could someone look at my drawing and tell me if anything is missing. Also please tell me how to connect timer relay, I'm not sure how to connect it. Disregard arrow keypad I forgot to put in my drawing.

Below are parts that I'm planning on using. If someone has part# for seven-seg display please share. Thanks

Quantity Description
1 16F88
7 BJT_NPN, 2N3904
6 SEVEN_SEG_DECIMAL_COM_A_GREEN
5 LED_green
1 CRYSTAL, 16MHz
1 Small speaker
1 RELAY, 9001-05
2 22pf caps
1 680 omhs resistor
Attached Thumbnails
K8LH Novelty Single Chip Clock-digital_clock.jpg  
sananh is offline  
Old 21st August 2008, 06:37 PM   #7 (permalink)
Default

Hi sananh,

Your schematic is incorrect. Charlieplexed or N(N-1) type multiplexing is very different from standard multiplexing. Please see attached drawing below. Yes I know it looks like a wiring nightmare (grin)...

As for RA2 relay control output, that is up to you. RA2 is an active high output which can drive an NPN or N-channel MOSFET transistor as a sinking driver to activate a 5v or 12v relay. You wire relay output pins in series with AC or DC voltage source and the load. !!! Please be careful !!!

Best wishes. Mike
Attached Thumbnails
K8LH Novelty Single Chip Clock-charlie-clock-4.png  

Last edited by Mike, K8LH; 26th August 2008 at 12:26 PM.
Mike, K8LH is offline  
Old 21st August 2008, 06:56 PM   #8 (permalink)
Default

My was waaay off. Thanks for a schematic, I'll give a try. If I run into a problem I will post.
sananh is offline  
Old 25th August 2008, 07:42 AM   #9 (permalink)
Default

I am a little confused. The schematic shows base current limiting resistors on the 2N2222A transistors that power CA (common annode) digit pins. The wired board does not.

My 7 seg displays are too dim with base current limiting resistor of 100R. The base current is 3.6mA without a resistor. Do you think it is OK to run without the resistors or should I start looking at even smaller values? They are so dim you have to view them in a room with the lights off with a 1K base resistor.

I am thinking the since the pic can easily handle the 3.6mA there is no downside to not using resistors here.

EDIT: The value of 3.6 mA was taken with the display muxtiplexing. That means the current while it is flowing is about 3.6*6 or 21.6mA which is much closer to the 25mA max. I need to do an actual measurement but will wait till morning. But I am less comfortable about not using a resistor. Back to bed

These are displays are surplus units from electronic goldmine and I can not find a real datasheet on them. I have found this
Quote:
This is a yellow two digit seven segment LED display with two decimal points. It is marked at one side as QDSPK347. The voltage drop at 20 mA is 2 Volt (per segment).
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Wacker,
The 15 Minute Printed Circuit Board! (+drill time)

Last edited by 3v0; 25th August 2008 at 09:33 AM.
3v0 is offline  
Old 25th August 2008, 10:44 AM   #10 (permalink)
Default

Hi 3v0,

I'm not using base resistors on the 2N3904 transistors or current limiting resistors on the LED segments on this prototype.

The 0.4 inch Fairchild displays I'm using provide decent brightness in a well lighted room but you can tell they're not full brightness. Some 0.56 inch Fairchild displays that I tried were noticeably dimmer. So, getting good results with this novelty one chip design depends a lot on your choice of displays.

I would be happy to post a much better 2 chip Clock design, if anyone is interested. It uses standard multiplexed display wiring and provides full brightness with PWM brightness control using an 8 bit serial-to-parallel sinking driver IC like the TPIC6C595, MIC5821, or A6821 (or an 8 bit serial-to-parallel constant current sinking driver like the A6275).

Mike
Attached Thumbnails
K8LH Novelty Single Chip Clock-clock-2v2-temp.jpg  
Mike, K8LH is offline  
Old 25th August 2008, 12:17 PM   #11 (permalink)
Default

Thanks mike. I was not actualy building this clock But it looked like a good context for asking the question.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Wacker,
The 15 Minute Printed Circuit Board! (+drill time)
3v0 is offline  
Old 9th September 2008, 04:40 AM   #12 (permalink)
Default

This one is software adjustable in case it runs slightly fast or slow.
Attached Files
File Type: doc Clock.doc (123.7 KB, 131 views)
Space Varmint is offline  
Old 9th September 2008, 02:41 PM   #13 (permalink)
Default

Quote:
Originally Posted by Space Varmint View Post
This one is software adjustable in case it runs slightly fast or slow.
What a horrible piece of code and it uses Timer0. If you do a search Mike (the OP) posted a very good method to adjust for crystal inaccuracies in software.

Mike.
Pommie is offline  
Old 9th September 2008, 02:49 PM   #14 (permalink)
Default

Personally I'm one of those types who tries to match the crystal frequency to the task at hand. Using the generic 4MHz or multiples thereof for everything always baffled me, after all crystals are about the same price and there are many common frequencies available. 19.6608MHz is a handy for both RTC & UART stuff.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is offline  
Old 10th September 2008, 01:37 AM   #15 (permalink)
Default

Just use current limiting resistors on the segment lines and connect the transistor collectors to 12 volts and you can have whatever brightness you want.

If you want to keep it a one power supply project, use 12 volts as the power supply and generate the 5v with a voltage regulator (7805).

Mike
wy6k is offline  
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Title Starter Forum Replies Latest
Single Chip BCD Clock Mike, K8LH Micro Controllers 4 3rd November 2008 04:00 AM
Drive 2 displays with a single 4511 chip? ghall426 Electronic Projects Design/Ideas/Reviews 1 18th December 2006 08:45 PM
Program a single modem chip without AT-Cmd? liupengjian Micro Controllers 0 26th July 2004 08:48 AM
About a suitable Single Chip CCD girishns Datasheet/Parts Requests 1 29th January 2004 02:42 PM
Single chip H-bridge Exo Datasheet/Parts Requests 4 24th November 2003 09:41 PM



All times are GMT. The time now is 12:29 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker