4 Digit Green LED 12/24hr project clock for vehicle

Thread Starter

Rissy

Joined Nov 23, 2015
106
Hi all.

I'm sure this project has been done to death already, so i know i'm not particularly breaking new ground or anything, but i have an interest in building a small project digital clock to replace an existing unit on a car.
I'd like to make it small enough to fit into the existing footprint area which the current clock fits in. I also have a desire to make it have the same sort of functionality as the existing one, but with one exception. Currently, the existing can only display in 12hr format. I'd like to make this switchable to be either 12 OR 24 hr format, or at the least, as a 24hr format only.

Other design criteria are:
A push button to advance HRS.
A push Button to advance MINS.
A voltage sense input to auto-dim the display with sidelights switched on within the vehicle.
With the ignition off, i'd like to switch off the display altogether, but without losing the clock setting. (This is most important, as one of the biggest design criteria i wish for my project, is to be as efficient as possible with regards to power drain from the battery whilst the car is parked up and not being used.)

Does anyone know of an existing circuit for this project, or can I use this thread as a "go-to" for help/assistance/advice for progressing this circuit?

Thank you! :)
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
Hi! ...and thanks for your reply.

Numbering your links 1-4:

1. This looks like the sort of idea i had envisioned, all be it not quite to my spec as above.
2. This is interesting with the fancy LCD display, but is not necessary for my project requirements. I also do not need an alarm function.
3. This one seems quite LARGE in footprint, and overly complicated I suspect, for my requirements.
4. This one is for an Arduino thing (I have no experience of these things at all)

I had envisioned some sort of dedicated IC which is "plug and play" with the correct pinouts already done for you, ready to go (although i realise perhaps that the vehicle functionality elements might be missing from such a dedicated chip).
If not dedicated, then I've looked around quickly, and realise that some people have used PIC micro controllers to do such projects. Again, having limited experience with programming PICS, I'd be starting my knowledge from scratch again, and probably need some help with the programming side of things.
Physically speaking, from a practical aspect, i'm well versed at PCB design, soldering, schematic drawing. I've played about with KiCAD over the past year and a bit for other projects, and have become fairly good at that. I guess i just need the correct circuit design to suit my requirements and suitable through-hole components to get me started (I've never done surface mount, and i think i'd struggle with my kitchen table and a soldering iron to do surface mount lol)
 

Externet

Joined Nov 29, 2005
2,200
You would need a bunch of parts that are not simple to collect in quantity one, plus a printed circuit board, proper buttons for the switches, a proper housing where to fit all properly, and of course a not too big budget, time waiting pieces to arrive after searching them either in stores or the web.

But if you visit a car wreckyard, you can pick a clock of the size and color and flavor you want for next to nothing $ with no wait time. Then you dismantle it completely and will have all the correct parts to put it back together. You can also have fun by just buying the dedicated chip new (if can be found) and practice programming it to make all the rest work as original. More fun by reverse engineering its schematic.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
You would need a bunch of parts that are not simple to collect in quantity one, plus a printed circuit board, proper buttons for the switches, a proper housing where to fit all properly, and of course a not too big budget, time waiting pieces to arrive after searching them either in stores or the web.

But if you visit a car wreckyard, you can pick a clock of the size and color and flavor you want for next to nothing $ with no wait time. Then you dismantle it completely and will have all the correct parts to put it back together. You can also have fun by just buying the dedicated chip new (if can be found) and practice programming it to make all the rest work as original. More fun by reverse engineering its schematic.
Thanks for your reply, but I really need to start from a fresh page for this project. The original clock is 36yrs old and made from obsolete components. That's why I want to do my own to replace it with a modern solution. I wouldn't find one of these very rare clocks out and about in a scrap yard. I've already had my old one apart years ago, and repaired it. But I'm thinking to the future by wanting something ready to go as a replacement for when this old one gives up for good.

It's a project. To keep me out of mischief lol.
 

GopherT

Joined Nov 23, 2012
8,009
Thanks for your reply, but I really need to start from a fresh page for this project. The original clock is 36yrs old and made from obsolete components. That's why I want to do my own to replace it with a modern solution. I wouldn't find one of these very rare clocks out and about in a scrap yard. I've already had my old one apart years ago, and repaired it. But I'm thinking to the future by wanting something ready to go as a replacement for when this old one gives up for good.

It's a project. To keep me out of mischief lol.

The simplest thing would be to buy an old clock module chip (National Semiconductor) that usually started with MM. These had some connections for push button time-changing inputs and a multiplexed output (1 for each digit plus extras (colon, am/pm/24h) and the 7 segments for a total of 12). Easy wiring once you have the chip and 12 volts.
 

AnalogKid

Joined Aug 1, 2013
10,986
Nothing will have fewer parts, fewer connections, and more features than a microcontroller-based design. An 18-pin PIC and four digit drivers are pretty much the whole BOM for the big parts. Except for the stoopid pesky software.

Other than that, search for digital clock schematic to get hundreds of designs. They cook down to three basic piles: all discrete digital chips, an old digital clock chip, or a uC. 12/24 hour is certainly doable with counter chips and gates, but it probably will take more gates than you're comfortable with. 12/24 hour clock chips from National, Intersil, and Mostek ruled the day back when, and still are available on the surplus market, ali express, ebay, etc. If you want to solder something but not spend 6 months learning how to program a uC, consider a kit.

ak
 

Externet

Joined Nov 29, 2005
2,200
... The original clock is 36yrs old and made from obsolete components. ...
My 55 and 56 year old cars have their clocks working; one of them modernized. :) What model/brand do you need a clock for ?

I wouldn't find one of these very rare clocks out and about in a scrap yard..
Maybe. But thousands of newer others at the wreckyard that can fit/made to fit perfectly with the dimming, and buttons, color, and all you want. And making one yourself will not be much of a stock original either.
 
Last edited:

Thread Starter

Rissy

Joined Nov 23, 2015
106
I know that by swapping out the original clock for a modern home made one will ruin the originality aspect. Right now, the original is in place and working since I fixed it in 2012. I'm very pleased with it. Strictly speaking I don't *need* to make another clock. But I DO *want* to MAKE one, as a project. That IS the essence of this site is it not?

The vehicle is a 1981 DMC-12.
My style clock was only fitted to the first 1000-1200 cars roughly. After that, the change of fitted stereo/radio meant the clock was incorporated into this instead of being separate like mine on the centre console.
If my original clock dies, there is no replacement freely available to fill the hole where the clock is mounted.
I'd rather fill the hole rather than worry about unoriginality if/when that time comes.
Some people have done clocks as projects in the past, but they're not freely purchasable by the general public. I think it's more fun to make your own anyway.

Thanks in advance for any continued help and positive input.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
This site looks promising.

http://josepino.com/?anp-1224hr-led-clock1

This guy has done almost exactly what i'm after. The difference being that i want the dimming function to be set to a single lower intensity based on my lights being switched on, rather than manually selected using an input from a button as he's done.
The removal of the display altogether would come from the ignition being turned off, rather than from a button.
If i could get this to work with some small 7-segment LED clock display unit(s), this would be almost perfect.
As has been pointed out before though, i'd need to learn how to take this chaps "HEX" file, be able to read it, alter it to suit, and then be able to program the IC with it. I think i'd need help with this part.
 

djsfantasi

Joined Apr 11, 2010
9,156
It's unlikely that you'd be able to modify the Hex file. It is a binary assembled version and would be difficult to reverse engineer and understand. The source code, if still available is cheap enough.

The dimming of the the display by the lights being switched on )and vice versa) would have to be done in software and tapping into the light circuit.

The display turning off is easy enough to do by tapping into a switched accessory circuit and a resistor.

Note that otherwise, the clock would have to powered at all times. I am sure you are aware of this. Have you considered a circuit using a real time battery backed up clock? Just as s FYI, look at this project.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
It's unlikely that you'd be able to modify the Hex file. It is a binary assembled version and would be difficult to reverse engineer and understand. The source code, if still available is cheap enough.
Ah right. Gotcha. So programming from scratch is fast becoming the expected route then.

Note that otherwise, the clock would have to powered at all times. I am sure you are aware of this. Have you considered a circuit using a real time battery backed up clock?
I'm aware of this, yeah. I agree that a battery backup would be possible, but my thinking is that if the draw is small enough for a button cell to cope with it no problem, then there's no need, as i'll just allow the battery backup to come from the car battery (always left powered on).
To give you an idea, right now, my biggest current drains on my car battery when the car is idle, ignoring the alarm of course (as i wouldn't want to disconnect that as it's there for security), are the modern CD stereo (memory retention?) and the original clock (despite both of these having their displays switched off when the car is switched off). I've measured 30mA on the fuse which powers these two, but i've not tested to see how this 30mA breaks down between the two. So if I had a modern PIC clock to replace the original clock, i'm sure it'll be less of a current drain than the original is, for sure. The original clock uses an old OKI MSM5528RS chip - now obsolete. I'm almost certain this thing will have a bigger draw than a modern PIC chip will.
 

GopherT

Joined Nov 23, 2012
8,009
Ah right. Gotcha. So programming from scratch is fast becoming the expected route then.



I'm aware of this, yeah. I agree that a battery backup would be possible, but my thinking is that if the draw is small enough for a button cell to cope with it no problem, then there's no need, as i'll just allow the battery backup to come from the car battery (always left powered on).
To give you an idea, right now, my biggest current drains on my car battery when the car is idle, ignoring the alarm of course (as i wouldn't want to disconnect that as it's there for security), are the modern CD stereo (memory retention?) and the original clock (despite both of these having their displays switched off when the car is switched off). I've measured 30mA on the fuse which powers these two, but i've not tested to see how this 30mA breaks down between the two. So if I had a modern PIC clock to replace the original clock, i'm sure it'll be less of a current drain than the original is, for sure. The original clock uses an old OKI MSM5528RS chip - now obsolete. I'm almost certain this thing will have a bigger draw than a modern PIC chip will.

The PIC will take few microamps to stay in standby mode and wake up for a microsecond every second (or every minute) to update the current time. You can also leave it running without powering the LEDs - this will take something less than a milliamp depending on clock speed. It will take about 35 mA to keep the clock on all the time (Depending on duty cycle and amperage to the seven LEDs that are on at any one time. I would go with the 1 mA version for simplicity and efficiency.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
Just as s FYI, look at this project.
I've just had a look at this page (thanks!)

The use of a "DS1307" i think, is not required for my project direction. I'm not interested in date. Only time.
The problem with this project solution is that it uses four buttons: "mode" "edit" "up" "down". I'm only interested in having two manual inputs: "set hrs" and "set mins". Press and hold to fast forward to desired number, then let go to stop for each in turn.

The reason for this restriction is because the clock facia only has two holes (which i stick a toothpick through to reach each of the buttons on the PCB underneath to activate). I don't want to add more holes. On the face of it, I want the clock to appear as original as possible.
 

GopherT

Joined Nov 23, 2012
8,009
I've just had a look at this page (thanks!)

The use of a "DS1307" i think, is not required for my project direction. I'm not interested in date. Only time.
The problem with this project solution is that it uses four buttons: "mode" "edit" "up" "down". I'm only interested in having two manual inputs: "set hrs" and "set mins". Press and hold to fast forward to desired number, then let go to stop for each in turn.

The reason for this restriction is because the clock facia only has two holes (which i stick a toothpick through to reach each of the buttons on the PCB underneath to activate). I don't want to add more holes. On the face of it, I want the clock to appear as original as possible.
Just because date output is possible doesn't mean you have to display it.

The example shown was to give you a starting point. Software can easily be adapted to change the function of buttons. If you don't want up AND down, then change the meaning in software. The wiring was the important part of the example. Also, a RTC lets you do maintenance and no worry about resetting the clock each time. The RTC simplifies a lot of things (Except the wiring).
 

djsfantasi

Joined Apr 11, 2010
9,156
The DS1307 will keep more accurate time than the Pic with the Pic controlling the display, watching the buttons, doing stuff when the buttons are pressed and all the other code that keeps the thing running. An add-on DS1307 board does one thing. Keep time.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
I'm just catching up with the thread again. Interesting you say about the DS1307 for accuracy. Does this mean without it, my clock wont keep good time? What sort of drift are we talking about?

I'm limited with the footprint space available. But I do see your point. I guess i could gauge it better if i could see how big this add on is, and then incorporate it into my design if I think it'll fit in the space i have. (to make use of the existing lens etc).

So what sort of PIC would be recommended to use? I've been looking around casually, and see that the 16F84a seems to be quite popular. Are they all in and around the same to program?

http://ww1.microchip.com/downloads/en/DeviceDoc/35007b.pdf

https://datasheets.maximintegrated.com/en/ds/DS1307.pdf


...On the topic of swapping cars. Nah! lol!
 
Top