About clocks

Mar 16, 2014 26 Replies

I added a clock display to my solar powered geiger counter logger... here it is shown synched to GPS. The little cut earpiece is the alarm, I promoted that to speaker, has the right impedance to be driven by the NPN PNP pair you see on top of the PCB [1].

formatting link
This way the thing draws about 70 mA or so.



The 100:100 is the alarm time, this way it will be off, as it never gets to 100:100, you can set the alarm time via RS232.



Here the GPS module is switched of, the clock keeps in sync, few minutes at most in a day, speed can be calibrated via RS232 too:

formatting link
Now it consumes only 30 mA. I can further reduce this by switching of the geiger counter HV supply...



[1] bases tied together, input via 50k pot to PIC output, PIC timer generates tones.

So you switch it on, push the blue GPS button, it syncs in a minute or so, and then leave it, or you can release the blue GPS button and then it will run on its own speed. Note the GPS time is UTC, and one hour earlier than the radio clock shows. The OLED is very readable (at double hight here) at night, unlike LCDs.



So, as to the mentioned problems receiving a good time signal, if anybody wants that PIC code, let me know. This is much better than a radio clock in areas where that signal is weak,\ as you can see GPS works just fine here with the EM-411 dealextreme GPS module indoors. In fact I tried to stop it by wrapping it in alu foil, and it would not lose signal until I really pushed on the foil (and shorted the module supply). So... Why still bother with radio clocks...


On a sunny day (Sun, 16 Mar 2014 16:45:18 GMT) it happened Jan Panteltje wrote in :

Actually that was the wrong picture, in that one it is waiting for GPS to lock, this is the local one (with GPS off):

formatting link

What kind of circuit are you using for the geiger counter supply and how long does it require for peak voltage from initial start? I am curious because I am currently doing something that requires 30kv, but I have only 500mA at 12 vols to work with.

Output current loading is very very low and the circuit is to detect slight variations in loading current on the HV side, which is the next part that needs to be done. These currents may reach down into the nA range so that is the next step. Jamie

On a sunny day (Sun, 16 Mar 2014 14:11:45 -0500) it happened "Maynard A. Philbrook Jr." wrote in :

OK, here is an old schematic:

formatting link
that was a week or so back, the 3.3V series regulator for the SDcard is now replaced by a TPS73133 3.3V low dropout regulator. the audio amp by a BC547/BC557 complementary pair. Still waiting for a MCP73831T Lipo charger chip. But that has nothing to do with the HV. The HV works as follows: PIC generates PWM, and this switches a BC547 si NPN that has in the collector a 1:10 miniature audio transformer. The PWM frequency is about 4 kHz IIRC, now runs at 147/255 ratio (with slow start of pulse width). Secundary is rectified (the positive pulse) and the PIC comparator sees this via a 120M / 375k divider, and switches off the PWM when 400V or so is reached. bang off, bang on. The HV takes about 4 to 5 mA that way (with no load). PIC ADC also measures that volatge, and you can see and set it via RS232 too.

For 30kV I have something like this:

formatting link

That is an other PIC doing PWM at 15kHz driving a step up transformer that drives a diode cascade multiplier (3x IIRC), the transformer and multiplier is from an old Philips laser player supply. It can make really big sparks, I am using it at a much lower voltage here, just a few kV. Basically any old transistor CRT color TV / color monitor HV transformer circuit will give you a few mA at 25kV or a bit more. You may need to fiddle a bit with the drive and load without scan coils... Anyways this thing uses very little current too, do not remember exactly, 9-12V maybe at a hundred mA?

At those very low currents you mention maybe a 5x or more diode cascade would work fine, even 10x keeps the voltage on the caps low. Any old BW TV output transformer run at 15625Hz with some resonable pulse width could then drive it, color TV HV cascades should be cheap now? ebay..

My approach is a little more in depth for the driving side of the transformer. I need to limit current and thus I monitor the (I) in the source of the mosfet, which is what drives the transformer.

I don't let it go over 300mA so that I can have a little reserve, since I only have 500 mA supply to play with.

I also have a cap across the primary because I need output that is a reasonable sine wave.

The return side of the secondary will have a sense R and a gas discharge protection clamp there. I decided on a gas discharge as the protection clamp, thinking leakage would be less than using silicon. My thinking maybe flawed there but we'll see when I get to that point.

This R&D project is the results of an accidental find while doing something else totally unrelated to what I want to apply this to.

Thanks for posting your work.. don't see much on paper these days:)

Jamie

On a sunny day (Sun, 16 Mar 2014 21:21:01 -0500) it happened "Maynard A. Philbrook Jr." wrote in :

Yes, PIC has 2 comparators, here I use the second one for current limit, but actually use a current transformer in the drain:

formatting link

Very useful thing, been my lab supply now for several years.

mm, then you will need high turn ratio to get to 30 kV from a low DC supply.

Some circuit diagram would help here. All that neon stuff has high tolerances... age issues. Use semiconductors if you can.

Ah, physics!

Paper makes it easy to make changes,,,,

Maybe I should get one of them digitizers one day, but pencil and eraser works so well :-) Can you sketch like that on them 'pads'?

Here's a clock that's high on the cool factor, not so good on accuracy.

formatting link

My hands are not as steady as they used to be, but yes, I make sure I keep 10x10 grid paper around to help with that now :)

For testing concepts, lately have been using a program to lay out a board for best part location but I usually end up using a proto board for concept testing, the cad program helps with making it look a little better and easy to follow.

My colleagues would have an eye twister seeing a board with that many wires jumped all over the place! :)

Btw, they make square hole punches that makes your life much easier for things like that LCD display hole. ;)

Jamie

Now that's a cool idea!

Jamie

Did some coding, wanted bigger characters for the OLED GPS clock, considered drawing seven segment, but this is nicer:

formatting link

I presume that is a graphics display?

Jamie

Philbrook Jr." wrote in :

It is a 128x64 pixel OLED: ebay object number 171069574803 The large pins make it easy to interface. The problem here is that I am using it with i2c, and in that mode it cannot read back display data (only write), and the PIC I am using does not have enough RAM to hold a copy of the display memory, so no read-modify-write, and no write a screen at once. So 'graphics' is hard. If you use it in 8080 mode (there are solder bridges for that on that display board, and that is actually is the default), then yes it is is a usable graphics display. But then you are forced to an 8 bit bus, not the 4 bit busses you have on normal 128x64 graphics displays.

Nevertheless I wrote tons of code for it

formatting link

The character generator... works really nice, added many more functions, time zones, local clock, huge clock, small clock, date, what not, alarm (with audio tones), and other things, Maybe I will update the website in the weekend with the latest code. Or ask for it here if you need it (GPL). I use it now as alarm clock, with contrast set to minimum this display is still very bright at night.

PIC code memory was full, now ran 3 rounds of code size optimization, and have hundreds of bytes free after adding all that stuff...

Time zone is now set via RS232, maybe it can be set automatically from GPS latitude, if there is enough code space... :-) GPS clock is very accurate and continues very accurate if signal is lost, in fact I just switch on GPS once a day to sync it, makes battery last longer. Writing the big digits display routine I wrote an universal character display routine (any size), so more code space can be created by using that to replace the small and medium size routines.. But then it needs testing again, everything, testing gets more complex with ever more stuff added that interacts, How do you test different GPS locations its effect on the time zone (local clock)...:-) [1] Travel around the worlds in 80 days,,, Already sort of did that, no longing to do it again. Well, maybe with a sailboat.... OK, stop here. :-)

[1] GPS generator

On a sunny day (Fri, 21 Mar 2014 07:59:50 GMT) it happened Jan Panteltje wrote in :

Longitude

How much of it is political, could be problematic. No space for a city database.

No? mmm LOL

You really need a detailed border map between countries (and time zones in some big countries) and the used time zone and daylight summer time rules, which requires a lot of data space and these could change every year :-).

For instance in the double city of Haparanda/Tornio between Sweden and Finland, the Haparanda part is at UTC+1 and Tornio past at UTC+2 and add 1 hour extra for daylight saving time in both countries.

On the eastern border of Finland, on the Finnish side there is UTC+2 or UTC+3 (Std/Dst), while on the Russian side it is always UTC+4. If you use the principle of closest city, the error can be up to 2 hours.

On a sunny day (Fri, 21 Mar 2014 10:40:30 +0200) it happened snipped-for-privacy@downunder.com wrote in :

Yes, now you can enter time zone with +1, +2, -1, -2 etc via RS232, maybe I should leave it like that, Or perhaps ask user to enter local time (hours) and store the difference. That code is already there basically.

So say GPS clock shows 17:00 then if it is locally 19:00 user types 19ENTER and from then on 2 hours is added (or whatever) to GPS time. It is simpler than a city database, faster too. Now the difference is saved in EEPROM too. So this will release the user of the burden of subtraction or addition of a 2 digit number.... OTOH if user cannot even do that what does he need this thing for...

I am all for UTC everywhere and no daylight saving times either. 'Earth time'.

I have one mechanical clock synchronized to DCF77 and setting the time zone was real easy, just move the hour hand to show the correct hour. After that I have not touched the clock except for replacing the battery every few years. The DCF77 signal contains the Std/Dst info and the clock uses it.

Anyway, a mechanical clock with two or more hour hands that can be moved relative to each other would be nice to show the time for _nearby_ time zones.

I also have two LCD DCF77 clocks, with simple "+" and "-" buttons to modify the hour (time zone). The other is used for local time but the

off, so I have to change the time zone manually on the UTC clock twice a year.

The DST is a remanent from WW I, when they tried to use as much day light in ammunition factories. In England, pubs had to close in the

they tried to get workers back to arms factories after lunch.

The justification for both conventions has been obsolete for decades and I hope that also this stupid DST convention will finally be removed, Russia did it already, hopefully the EU will follow.

The closest to 'Earth time' would be the single UTC+8 zone used in the whole China, previously they had 5 time zones. Just wondering how they handle this in practice. Does work and school start later and later when you move to Western part of China or do people have to go to work several hours before the sunrise in Western provinces ?

On a sunny day (Fri, 21 Mar 2014 15:53:32 +0200) it happened snipped-for-privacy@downunder.com wrote in :

Yes, we could follow China, or just internationally agree on something. It is much easier, I recall calling home to Europe from US west coast, east coast, and waking up people in the middle of the night. If you have one time, and know for example days start at 11:00 where you come from then no more math and wondering how far you are offset required. Yes schools and work would start at different times in different places.. but that is normal anyways, and then you do not have to adjust 2 times a year. Hell I have to set 6 to 12 clocks twice a year, the idiot who came up with that crap must have a been a politician.

And it is better for interplanetary trade too, companies can just state their opening times on their interplanetary website, and that is it, ;-)

There was once a discussion about Mars colonies and what time system to be used. The day is slightly longer on Mars than on Earth. For interplanetary communication, you have to specify either Earth transmit time or Mars reception time (or vice versa), since the propagation delay varies significantly, if we are on the same side of the Sun (opposition) or the opposite side of the sun (at exactly opposite side of the Sun would require a communication "planet" with additional propagation delay).

There are no easy solutions.

On a sunny day (Fri, 21 Mar 2014 17:55:12 +0200) it happened snipped-for-privacy@downunder.com wrote in :

So we need a true galactic time, I am sure relativity will now be mentioned...

Sure there is. Venus Equilateral. ;)

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required