Tick Tock timing application

steirny

Member
Hippy I would like to adapt, if possible, the concept expressed in your post “Very accurate 18X Timing” 12/06/07, however the link is currently inaccessible. Do you still have that code archived somewhere?

Its not so much the accuracy I’m after, as the method, although accuracy will be a bonus.

In the August 08 Silicon Chip, a reader requested a device to balance pendulum clocks. The Editor misunderstood his request to be a rate calibrator and was of little help. I may be able to help out here but I want to do a feasability first.

As background, a pendulum must swing equally in both directions with respect to the escape mechanism. If tilted to one side it will overrun the escape lever in one direction and underrun in the other. This will eventually cause the pendulum to lose power and stop. The escape mechanism actually adds power to the pendulum via the clock spring or weight to overcome losses due to air drag etc.

Over 12 years ago I built such a device for a colleague of mine who restored tower clocks. It consisted of a piezo pickup, an amplifier, some logic, 2 counter/LCD drivers and 2 LCDs. It also used an LM386 and speaker to listen to the movement. The counter/drivers were quite expensive 7224 devices.

My original design simply displayed the period of the left and right swing. The piezo listened to the escape ticks just like an automotive knock sensor. If the clock is unbalanced then the tick periods will be different due to pendulum overrun.

These days I believe it could easily be done with the same analog front end, picaxe and 2x16 LCD.

I thought it might be fun to revisit an old project using current technology. I am planning to use the analog derived monostable pulse to interrupt and then read the count value of the 32 kHz input.

A picaxe design could show both periods on the bottom line. The top line could display a rolling character to simulate the pendulum position. Optionally, the differential time could be displayed by a mode select switch.

The way I see it, the counting has to be real time, back to back for each swing. There is no time for display code unless counting is in the background. With background counting, the only lost real time will be the interrupt routine. This will stop the count and copy it to a word variable, then reset and start the counter. I think your earlier post could be the critical core of the required code. As I haven’t seen your code, is this possible?

Even with a really short pendulum such as a mantle clock, I should have at least 300ms to do houskeeping, check battery, display data and messages before the next interrupt. Big Ben would give me several seconds to play with. This gives an idea of the count range. They can be arbitrary units unless I want to calibrate rate as well.

Rate accuracy will be limited by crystal drift and the interrupt routine execution time. But might be useful for initial setting of pendulum length.

Happy to hear any thoughts or ideas from anyone.

Cheers
Alan
 

hippy

Technical Support
Staff member
Thanks again eclectic - I may have to offer you a job as "Personal Secretary ( On-Line )".

I already have a friend who fills the role of "Personal Secretary ( Off-Line )". How they can guess better than me where I'm likely to have filed/left/lost something in my own house is a mystery, but very useful.
 

PhilHornby

Senior Member
Over 12 years ago (25 now!) I built such a device for a colleague of mine who restored tower clocks. It consisted of a piezo pickup, an amplifier, some logic, 2 counter/LCD drivers and 2 LCDs. It also used an LM386 and speaker to listen to the movement. The counter/drivers were quite expensive 7224 devices.

My original design simply displayed the period of the left and right swing. The piezo listened to the escape ticks just like an automotive knock sensor. If the clock is unbalanced then the tick periods will be different due to pendulum overrun.

These days I believe it could easily be done with the same analog front end, picaxe and 2x16 LCD.
I claim the prize for resurrecting the oldest thread on the forum :D

Having (finally) being allowed a Grandfather clock, this looks like a good starting point for experiments...

Can anybody point me at a suitable design for an analogue amplifier , to turn the signal from a Piezo 'sounder' into something a Picaxe might read. I only need a logic signal - sound present or not present, I believe.

(When tapping two screwdrivers together, in the vicinity of a piezo sounder, I get a signal like this (about 5KHz @ 40mVpk-pk))

24966

I'm thinking - something FET-based?
 

hippy

Technical Support
Staff member
You might be able to get away without using an amp at all - https://picaxeforum.co.uk/threads/composite-video-signal-detector.19289

That uses an on-chip comparator with the level to match against set to a very low level. With 8-bits that should allow detection of a 20mV signal - Unfortunately it's only a 5-bit setting so may not be enough, but you never know.

I'm not your man for analogue electronics but would suspect any high-gain transistor or FET would do the job.
 
Last edited:

AllyCat

Senior Member
Hi,

You might be able to use the internal comparator, which is basically a high-gain differential amplifier, around which you could apply (negative) feedback (via a single resistor) to give a more "defined" (and not excessive) voltage gain. But this would consume at least a couple of PICaxe pins, whilst a single exernal bipolar transistor (or perhaps FET) should be able to give sufficient amplification. Personally, I prefer bipolars (e.g BC548) because their input bias voltage is more predictable (i.e. Vbe =~ 600mV). A basic configuration is to ground the emitter and connect the collector (output) via a few kohms to the supply rail. There are several ways to set the bias, so that the quiescent output is approximately Vcc / 2:

The simplest uses a moderately high value resistor from collector to base (typically 100k), that gives both ac and dc feedback to define the "gain" and bias level. With higher supply voltages, add a resistor across base to emitter to define the bias level (i.e. a potential divider to give 600 mV on the base when the collector is at about Vcc/2). But for lower supply voltages you can just estimate that the base current (via this feedback resistor) will be about 1% of the collector current, which should be about Vcc / (2 * Rcb). Ideally, you need a capacitor-coupled input to avoid upsetting the bias: The piezo sounder may be capacitive by nature, but you'd definitely need an input coupling capacitor with a magnetic/moving-coil transducer and probably for a "Condenser" or Electret microphone..

Then at the output you need a "detector" to convert the ac signal to a logic signal that the PICaxe can recognise. A simple diode detector (i.e. a diode driving a parallel capacitor and resistor to ground) may be good enough, but I'd try a "diode pump" circuit, basically the same with a small coupling capacitor between the (collector) output and the diode, and a second diode from this capacitor/diode junction to ground. Then, with each audio cycle, the coupling capacitor is charged via the grounded diode and dumps (most of) its charge into the output (filter) capacitor. Thus the voltage risetime will depend on the ratio of the two capacitors, and on the frequency. The fall time is simply determined by the parallel RC time constant and the system threshold(s) are determined by the PICace's "TTL/MOS" input gate levels, i.e. typically 25% to 50% of Vcc.

Cheers, Alan.
 

PhilHornby

Senior Member
Thank you both - I shall read and inwardly digest :)

I found a promising looking circuit here (#3) but it does seem to use a lot of transistors. There again, it says "If the piezo is attached to, say for example a door, even a slight knock over the door will be easily sensed " which sounds ideal.

I will blow the dust off my copy of "Student Manual for The Art of Electronics" and see if I can cobble something together...
 

PhilHornby

Senior Member
You might be able to get away without using an amp at all - https://picaxeforum.co.uk/threads/composite-video-signal-detector.19289
A quick update on this - since there was an 08M2 on my breadboard.

As it stands, it's not sensitive enough to detect my "two screwdrivers being hit together" ... but it does detect when I tap the Piezo sounder itself.
It may be it would work if the sounder was connected directly to the body of the clock mechanism.

(Recently I seem to be spending my time making interfaces to 'awkward' objects (Solar Inverter in the under-drawing, the Electricity Meter in an outside wall cupboard - and now something that requires step-ladders to reach :) ))
 

AllyCat

Senior Member
Hi,

Which is the "it" that's not sensitive enough, the sync detector or the comparator? I wouldn't expect a "sync detector" to work very well with your signal; CVBS is normally 1 volt peak-peak (or even 2V if unterminated) with about 30% sync, so it's likely to need up to 300 mV peak-peak.
I found a promising looking circuit here (#3)
That amplifier doesn't appear to have a "detector" as such. I guess it just overdrives the final (PNP) transistor, which switches on for around 50% of the time (i.e. the negative-going portion of the input signal) and this "square wave" signal is sufficient to activate the relay (which has enough inertia to act as a low-pass filter). But that's not a very useful signal for the PICaxe to monitor, unless the program takes multiple samples and performs an averaging/filtering process itself.

Cheers, Alan.
 

rq3

Senior Member
I claim the prize for resurrecting the oldest thread on the forum :D

Having (finally) being allowed a Grandfather clock, this looks like a good starting point for experiments...

Can anybody point me at a suitable design for an analogue amplifier , to turn the signal from a Piezo 'sounder' into something a Picaxe might read. I only need a logic signal - sound present or not present, I believe.

(When tapping two screwdrivers together, in the vicinity of a piezo sounder, I get a signal like this (about 5KHz @ 40mVpk-pk))

View attachment 24966

I'm thinking - something FET-based?
I think I may have exactly what you need. It's a piezo sensor used to detect the contact of a 3D printer nozzle with its printing bed. It's PICAXE based, and I can even give you, and and only you, a working unit. Go here: https://reprap.org/forum/read.php?424,885697
 

PhilHornby

Senior Member
Which is the "it" that's not sensitive enough, the sync detector or the comparator? I wouldn't expect a "sync detector" to work very well with your signal; CVBS is normally 1 volt peak-peak (or even 2V if unterminated) with about 30% sync, so it's likely to need up to 300 mV peak-peak.
The "it" in question, was @hippy's circuit and code, as published. It did detect direct "tapping" on the piezo!

I came across an interesting snippet, on another website, which said "Diodes D1,D2 stop you destroying the opamp with large signals from the piezo device if you drop it" - now that's not something I'd thought about!

I went ahead and built a simple transistor pre-amp, as you suggested: (1M bias resistor, 2K2 collector resistor and a BC547.)

This gives me much bigger signals to work with:

24974

(That's tapping two screwdrivers enthusiastically, at a range of about 10cm)

One of our oldest datasheets to go with the oldest thread!
Ah ... yes ... it's all coming back to me now :)
I think I may have exactly what you need...
That's a very kind offer. At the moment, this is very much about "the journey", rather than "the destination", so I'm happy to stumble on blindly for a while :D.
(I've found the discussions on this, from earlier in the year, here and here for my reference. I now need to go research "seismic mass" ;) )

I found a lot of interesting ideas on this web site ("Using Piezo Contact Mics right")

I probably need to figure out if it's the sound of the clock mechanism I need to respond to, or the vibrations it causes.

The next step, is to extricate the clock from its cabinet and come up with some sort of jig, to position it in the vicinity of my PC/Scope/Breadboard/Bench PSU. That ought to be marginally easier than moving the aforementioned items to the vicinity of the clock ;)
 

AllyCat

Senior Member
Hi,
That circuit probably looks rather complex, but a well-known method of electronics cost-reduction is to start with a circuit which is known to work well, and "Remove components one at a time until it stops working, then put the last component back in again". ;) That's not a "design" method that I normally subscribe to, but if done intelligently might be appropriate here:

Firstly, an Electret microphone (for which that amplifier is intended) requires a dc bias voltage (via R1), but a piezo transducer doesn't, so R1 can go. :)

C1, R3 and Q1 are exactly what I described in #8 so need to stay. RV1 is a gain/sensitivity control, but can only reduce the gain which is unlikely to be needed (when you read on*) so can be replaced by a fixed resistor around 2k2 or 4k7. C2 reduces the gain at high frequencies to reject HF noise and maybe stabilise the stage. It might be needed but is probably a candidate for redaction. C3 is required (in some form) because the dc level at the collector of Q1 is probably too high for the subsequent stage(s).

RV2, R5, R6, R7 and Q2 give additional amplification, but *the Electret mic typically gives at least 10 x lower output than your piezo, so probably the whole stage can go. :) However, you can't connect C3 only to D1, because it will just charge up in one direction until the detector stops working. So reinsert R7 (with a higher value) or better, replace it with a diode from this junction down to Earth, to provide an alternative direction for the current flow (i.e. anode to 0v) without excesively loading the previous amplifier.

Q3 and R8 form a unity gain amplifier to give a low output impedance (generally a desirable feature), but the PICaxe input pins have a high input impedance. If Q3 has a current gain of 100 then the 10k on its emitter is basically the same as 1M on the base. That's a high value, but the .PDF says that it gives a time constant around 0.5 seconds, so a resistor of something over 100k should be fine for this application and the transistor can go (base linked to emitter). However, C3 and C4 are shown as similar values, so would be more a 1:2 "capacitor divider" (similar to a potentiometer) than a low-pass filter. So increase their ratio to at least 1:10, probably by making C3 = 47nF or less.

That's reduced the amplifier/detector from 16 components to 9 (and with only one transistor), much as I outlined in #8, but was too lazy to provide a circuit diagram. :)

Cheers, Alan.
 
Last edited:

PhilHornby

Senior Member
So, something along these lines:-

24976

I couldn't find a BC548 (or rather, not with one long enough legs for a breadboard!) but I found a BC547. My meter says its Hfe >320 ... so I increased R3 to try and get the collector voltage to be mid-rail.

I've not fabricated the whole thing yet - just Q1,R3 + R1.

I notice that the RevEd design has a "Set-zero" pot. which is no longer part of the design.
 

Attachments

Buzby

Senior Member
Slightly OT, a few months ago I met a man who had a neat clock/watch measuring machine.

I was an oscilloscope type of device, but it only produced a circular trace. The 'scan time' of the trace, i.e. once round the screen, was set with a rotary switch to certain speeds, all relating to various 'tick tock' rates.

The trace was Z-modulated, so all that appeared was a dot for each tick of the clock. If the dot moved CW, then the clock under test was fast, CCW was slow.

I don't know if it showed both tick and tock, but if it did, unbalance would be indicated by the tick and tock dots not being diametrically opposite each other.

If I can get in touch with him again, I'll see if I can find how the tick detector worked.

Cheers,

Buzby
 

AllyCat

Senior Member
Hi,
So, something along these lines:- ....
I notice that the RevEd design has a "Set-zero" pot. which is no longer part of the design.
Yes, that's (almost) what I had in mind. The BC547 just has a slightly higher voltage rating than the BC548 and C1 may be unnecessarily large. Neither a problem, but it may take a few seconds when power is applied for C1 to charge up. However, R8 should be much larger, depending what fall time is required at the output , but I'd start at around 100k.

Yes, I have always tried to avoid using (preset) Pots. They're bulky, costly, potentially unreliable/unstable, and somebody has to be told how to set them up! Reading the .PDF, it appears that the pot was intended NOT to bias the amplifier at a mid-point, but just at the point of turning off. Thus it conducts only on half-cycles to act as a detector (like a diode) as well as an amplifier. Similarly, replacing D1 with a (NPN) transistor could enhance the pump circuit, but I'd see how well the basic circuit works first.

Q1 will probably have enough gain to "clip" between the supply rails, generally desirable to drive the diode "pump" well. Due to the diode forward voltage drops, the pump won't even start to work until driven by at least 1 volt peak-peak. It might be too sensitive at high frequencies, in which case you could "roll off" the gain of Q1 with the original C2 (probably in the 100 pF range).

Cheers, Alan.
 

rq3

Senior Member
A quick update on this - since there was an 08M2 on my breadboard.

As it stands, it's not sensitive enough to detect my "two screwdrivers being hit together" ... but it does detect when I tap the Piezo sounder itself.
It may be it would work if the sounder was connected directly to the body of the clock mechanism.

(Recently I seem to be spending my time making interfaces to 'awkward' objects (Solar Inverter in the under-drawing, the Electricity Meter in an outside wall cupboard - and now something that requires step-ladders to reach :) ))
Attached is a very brief video of one of my "TAP" sensors resting against the face of one of my clocks. It detects the escapement quite well. There is no amplifier at all. The piezo has back to back signal diodes to clip the potentially 90 volt signal from the piezo. There is a 100k resistor across the piezo to bleed the capacitive charge. And there is a 10k resistor in series with the ADC input on the Picaxe 08M2 to provide current limiting.

The trick is to glue a 50 caliber bullet or 1/2 inch metal ball to the center of the piezo side of the disc. This makes it a jerk detector, rather than an acceleration detector, or contact microphone.

It also ouputs an 80msec pulse when the LED flashes.

Code:
#REM
Piezoelectric bed leveling sensor using piezo disc
with jerk mass. Output acts like normally closed
microswitch, actively pulled low when not actuated,
and tri-stated when actuated to allow printer microprocessor
to pull output high via 4K7 ohm resistor on controller board.                                
1/21/21 by RQ3 / Ack Emma LLC
#ENDREM

#Picaxe 08M2
#no_data
#no_end

symbol LED=C.4                ;LED drive pin
symbol OUT=C.2                ;open collector output                
symbol PIEZO=C.1                ;sensor ADC input pin
symbol DELAY=80*8                ;output pulse width, milliseconds*8
symbol TRIGGER=24                ;sensitivity (millivolts),0-1023(max-min),nom.24

init:
setfreq M32                    ;run at 32 MHz
pullup %01000                ;apply pull-up to unused pin 4 (C.3)
adcsetup=%00010                ;make C.1 ADC input
adcconfig %011                ;use internal reference and circuit ground
fvrsetup FVR4096                ;step references per Microchip errata sheet
fvrsetup FVR2048                
fvrsetup FVR1024                ;use internal 1.024 volt reference
pause 1000                    ;settling time 

main:
    do while w0<TRIGGER        ;loop ADC while piezo output is less than trigger
        readadc10 PIEZO,w0    ;read the ADC
    loop
        input OUT            ;tri-state output pin to allow external pull-up
        high LED            ;turn on LED
        w0=0                ;re-set ADC value
        pause DELAY            ;wait for bounce settling
        low LED,OUT            ;re-set outputs active low
goto main
 

Attachments

Last edited:

PhilHornby

Senior Member
That's a very convincing demonstration of the method...
... I need to track down a suitable mass (a "50 caliber bullet" would probably land me in a UK jail o_O ) ... oh, and some glue :)

As an aside, why the 3 x fvrsetup commands?
Code:
fvrsetup FVR4096                ;step references per Microchip errata sheet
fvrsetup FVR2048               
fvrsetup FVR1024                ;use internal 1.024 volt reference
The reference to the Microchip errata sheet implies that it's not accidental.
 

rq3

Senior Member
That's a very convincing demonstration of the method...
... I need to track down a suitable mass (a "50 caliber bullet" would probably land me in a UK jail o_O ) ... oh, and some glue :)

As an aside, why the 3 x fvrsetup commands?
Code:
fvrsetup FVR4096                ;step references per Microchip errata sheet
fvrsetup FVR2048         
fvrsetup FVR1024                ;use internal 1.024 volt reference
The reference to the Microchip errata sheet implies that it's not accidental.
A 1/2 inch diameter steel bearing ball, with a flat spot for glue, works just as well. For glue, I use a high temperature epoxy called JB-Weld, but any epoxy should work. Just make sure the piezo ceramic and the ball are lightly scuffed. Epoxy doen't like to stick to silver very well (especially tarnished silver), and the piezo ceramic is typically coated with silver for soldering purposes.

Support the piezo disc at three points on its rim, and you should be good to go.

I spent weeks going in circles with Microchip as to why you "can't" use the internal 1.024 volt reference for the AD converters. Ultimately they confessed that they really didn't know why they had that restriction, but an old Errata Sheet suggested that if you DO use it, step down through the internal references (from 4.096 volt, to 2.048 volt, to 1.024 volt).

It works fine for me, and I regularly cook this sensor under the bed of a 3D printer, which is often heated to 110 degrees Celsius. Doesn't seem to bother the reference voltage at all, and the 1.024 volt reference gives you exactly one A/D count per millivolt. On my surface mount circuit board, a sensitivity setting of about 2 or 3 millivolts is right at the edge of the noise (the red LED will randomly flicker). A setting of 5 or 6 millivolts will detect a gentle step on a concrete floor 10 feet from the workbench where the sensor sits. The 24 millivolts in the code is what I use for the printer, which has all kinds of whining stepper motors and monkey motion that the sensor must ignore, until it gets a gentle signal from nozzle to bed contact.

The circuit board basically consists of a 5 volt linear regulator and the Picaxe. It will run for at least a day on a 9 volt transistor battery.

To save you web wandering time, a complete discussion document, schematics, and gerber files are here: https://www.thingiverse.com/groups/anycubic-predator/forums/general/topic:52143#comment-5364482

There are also smart phone apps that basically do exactly what you want (listen to a clock or watch for regulation purposes), but where's the fun in that?

Hope this helps.
 
Last edited:

PhilHornby

Senior Member
A 1/2 inch diameter steel bearing ball, with a flat spot for glue, works just as well.
I can't find anything resembling that in my bits box (I had a major clear-out two years ago when I moved house, so there's a lot of things I can't find :( ). I've ordered some 1/2" balls from eBay, which seem to be intended for use with catapults, rather than as bearings. Hopefully, they'll be poorly enough made, that I can 'machine' a flat on one side. Otherwise, if they're too hard, I suppose, a washer or two might do the job.
For glue, I use a high temperature epoxy called JB-Weld, but any epoxy should work.
As it happens, JB-Weld is available in the UK.
To save you web wandering time, a complete discussion document, schematics, and gerber files are here: https://www.thingiverse.com/groups/anycubic-predator/forums/general/topic:52143#comment-5364482

There are also smart phone apps that basically do exactly what you want (listen to a clock or watch for regulation purposes), but where's the fun in that?
I see you've provided detailed instructions, so I've got enough information to proceed.

I tried one of the Android apps and that approach seems to work as well. The clock keeps time amazingly well, considering how erratic its Ticks and Tocks appear to be!

I've come to the conclusion that a piezo sounder probably wouldn't be the best choice for an audio-based solution though.
 

rq3

Senior Member
I can't find anything resembling that in my bits box (I had a major clear-out two years ago when I moved house, so there's a lot of things I can't find :( ). I've ordered some 1/2" balls from eBay, which seem to be intended for use with catapults, rather than as bearings. Hopefully, they'll be poorly enough made, that I can 'machine' a flat on one side. Otherwise, if they're too hard, I suppose, a washer or two might do the job.

As it happens, JB-Weld is available in the UK.

I see you've provided detailed instructions, so I've got enough information to proceed.

I tried one of the Android apps and that approach seems to work as well. The clock keeps time amazingly well, considering how erratic its Ticks and Tocks appear to be!

I've come to the conclusion that a piezo sounder probably wouldn't be the best choice for an audio-based solution though.
A grinding wheel will put a small flat spot on a bearing ball in short order, unless it's tungsten carbide or similar.

The clock in the video is a Tiffany tall case, purchased by the family of my great-great aunt somewhere around 1890. It's been running continuously for over 130 years, except for very occassional moves when a family member passes away and the clock gets a new home (4 times to my knowledge). I do not know who made the works; certainly not Tiffany!

We too relocated about 2 years ago (the 4th move for the clock), and one of the prime requisites for the new house was ceilings in excess of 8 feet to accomodate the clock. We were very fortunate to find a home of the same vintage as the clock, but the previous owner was almost 7 feet tall, and had raised all of the ceilings to almost 9 feet. Very rare in old New England farm houses.

It keeps time to better than 5 seconds per month. There is a small dish of odorless kerosene in the base of the cabinet, which has always been there, and gets refilled every 5 years or so. The kerosene fumes are all the lubrication that it has ever required, and seems to have no effect on the cat gut suspensions for the chime tubes, which are still hanging on after all that time.

Have fun. We don't own these machines, we're just caretakers.
 

papaof2

Senior Member
"It keeps time to better than 5 seconds per month."

"Unscented kerosene for lubrication." Comparable to the cast iron Hunter ceiling fans which had the bearings running in SAE10 motor oil for incredibly long life? (Their high end fans are still built that way.) Possibly from a similar period of mechanical design thought?

When that clock was made, the "big clock" was "standard time" for the household and possibly some neighbors. No wireless then to get the time from the not-yet-built 60kHz NIST time signals and no cell phones with to-the-second network time ;-) That reminds me - my somewhat older Tracfone popped up a "You need to upgrade your phone or service will go away" which isn't the first phone I've gotten that message on - I tend to use them until they are obsolete and I've gotten my $100 out of them. The replacement Samsung phone will be a bit more at $150 (pretty good for an 8 core processor, 4GB RAM and 128GB data storage) but I'll also keep it for multiple years ;-)

Wonder if the original owners of your clock used the sunrise/sunset times from "The Old Farmers Almanac" or possibly the local newspaper to set the clock initially/occasionally...

There's a PICAXE clock (20X2) in the basement with a crystal-controlled clock chip (1307?) which probably isn't much more accurate than that - but it's been running a LONG time ;-) I built that to have an I2C plus LCD display project and to have a clock/calendar at the desk I used when programming PICAXE chips - using a Micron laptop running Windows 98 and with a real serial port. Other than needing a new CMOS backup battery, that laptop still works - probably says a lot about the quality of their construction.
 
Last edited:

PhilHornby

Senior Member
I've never heard of 'odorless kerosene'; my first google hit for "odourless kerosene uk" says it's £10.68 per litre (smallest quantity 10Litres - and trade only)! - sensibly-priced supplies may take some tracking down :unsure:

My clock was locally made - which is one of the reasons I was allowed it. It was made in the mid 1800's (supposedly) and its hand-painted local scenes show an England that hadn't changed much in hundreds of years. (By contrast, where I'm from in the North, the Industrial Revolution had been fully embraced - with 'Dark Satanic Mills' everywhere (the design of which was 'borrowed' for those in New England!)

The clock came from a local antique dealer, but I found it online in an Auction catalogue from the back end of last year. That solved the mystery of why its pendulum doesn't fit properly - it's acquired the pendulum from the previous lot :cry:

I've constructed a rough-and-ready spacer to align the next section with the crutch (At least, I think it's called the crutch!)

24981

With some judicious bending and tweaking the clock now runs without stopping, but that Android app. reveals that it's a long way out of symmetry.
(Forget timing the swing, you can see visually that the Tick and the Tock are different!)

24982
 

papaof2

Senior Member
My question would be whether the two parts of the swing were EVER equal. Does one side of the swing have power from the spring/weights but the return swing moves mostly by gravity or is the swing powered in both directions? Even if powered in both directions, the spring/weight power might not be equal in both directions.
In the end, the important thing is the time for the minute hand to make one revolution, not the symmetry of the 'tick' versus the 'tock'. The reported "5 seconds a month" says the gearing works well for the actual tick and tock periods ;-)
Will you be counting gear teeth to see how they convert 3883.09BPH into 1 revolution per hour?
Interesting project.
 

hippy

Technical Support
Staff member
In the end, the important thing is the time for the minute hand to make one revolution, not the symmetry of the 'tick' versus the 'tock'. The reported "5 seconds a month" says the gearing works well for the actual tick and tock periods ;-)
Will you be counting gear teeth to see how they convert 3883.09BPH into 1 revolution per hour?
Time progression may well be more important than any spot-checked tick-tock timing, what the average is over a longer periods of time. There may be periods of faster progress during some periods which are balanced out by slower periods, similar to how mains frequency speeds up and slows down but maintains a very accurate 50Hz or 60Hz average over longer periods.

An alternative to audio sensing may be to go for opto sensing. It might be possible to place an opto such that it is hidden from view with wires brought out without drilling holes in the clock itself. Alternatively a battery powered inductive couple may be able to pass the ticks through the casing.
 

PhilHornby

Senior Member
Even if powered in both directions, the spring/weight power might not be equal in both directions.
I believe it is powered both ways. Asymmetry seems to be a major cause of these clocks stopping, rather than affecting accuracy. My clock would only run for a few minutes when I got it. The Tick and Tock stopped and the 'anchor mechanism' just rocked back-and-forth on the spot, until finally the pendulum came to rest. Coupled with the fact that the presence of the wrong pendulum was introducing a secondary movement around the suspension spring, that's not altogether surprising!

The reported "5 seconds a month" says the gearing works well for the actual tick and tock periods ;-)
Will you be counting gear teeth to see how they convert 3883.09BPH into 1 revolution per hour?
"5 seconds a month" is @RQ3's magnificent timepiece, not mine ;)
The BPM and BPH figures from that app. seem a bit nonsensical to me. Surely 60 beats-per-minute and 3600 beats-per-hour are the correct target?

This is my clock (a rather more rudimentary example!)

I found a guy in California, whose web site shows the art of adjusting the 'beat'. (He's originally from my neck of the woods and his Yorkshire accent has survived 30 years of being in the USA :) )
 

oracacle

Senior Member
I have only scanned through this thread, but for sound detection there are off the shelf solutions.
SparkFun Sound Detector - SEN-12642 - SparkFun Electronics
I made this up on a bread board to do a little experimenting with and it works extremely well, the board is actually available on amazon.
But seeing as its a pendulum, I would be very tempted to go for optical sensing. Its alot less likely to be affected by other things in going on around the clock.
Beyound that, my horological knowledge is very limited.
 

rq3

Senior Member
I've never heard of 'odorless kerosene'; my first google hit for "odourless kerosene uk" says it's £10.68 per litre (smallest quantity 10Litres - and trade only)! - sensibly-priced supplies may take some tracking down :unsure:

My clock was locally made - which is one of the reasons I was allowed it. It was made in the mid 1800's (supposedly) and its hand-painted local scenes show an England that hadn't changed much in hundreds of years. (By contrast, where I'm from in the North, the Industrial Revolution had been fully embraced - with 'Dark Satanic Mills' everywhere (the design of which was 'borrowed' for those in New England!)

The clock came from a local antique dealer, but I found it online in an Auction catalogue from the back end of last year. That solved the mystery of why its pendulum doesn't fit properly - it's acquired the pendulum from the previous lot :cry:

I've constructed a rough-and-ready spacer to align the next section with the crutch (At least, I think it's called the crutch!)

View attachment 24981

With some judicious bending and tweaking the clock now runs without stopping, but that Android app. reveals that it's a long way out of symmetry.
(Forget timing the swing, you can see visually that the Tick and the Tock are different!)

View attachment 24982
Phil, you stole that clock! It's a beauty.
Assuming its clean and properly lubricated, level the clock with good bubble level so that the case is vertical both left and right, and fore and aft.
It also needs to be on a solid floor.

Then adjust (bend) the pendulum crutch VERY carefully so that the clock is in beat, with equal ticks and tocks from center (you can see that this has been done many times over the years by the condition of the crutch).

The rate, or speed, is strictly the length of the pendulum. Mine has a micrometer screw at the bottom of the pendulum bob. A fraction of a turn makes a large difference, and the rate will vary with temperature, and even the phase of the moon (due to gravitational change). But you should be able to get it to average to at least a minute per week, or even much better if you have the patience.

You may be able to get odorless kerosene at a ship yard or airplane maintenance shop. It's used to fill magnetic compasses. Sometimes known as "water white, acid free kerosene, or paraffin". It may also be available at hardware stores for fillig Tiki torches. Here it costs about $1 a quart, which is more than a life-times supply.
 
Last edited:

JPB33

Senior Member
Interesting stuff! If you adjusting the beat its important that you try it with a minium swing, ie so that its just going through the escapement and on a longcase clock like this its often possible as a trial to pack underneath the seat board that the movement sits on before you bend the crutch to get it in beat. Other thing that tells the health of a longcase clock is to watch the recoil (going backwards slightly) of the second hand if fitted or escape wheel
after its ticked.
 
  • Like
Reactions: rq3

papaof2

Senior Member
Would the current iteration of "lamp oil" be close to "odorless kerosene"? It's intended for lamps that originally burned kerosene so probably very similar in viscosity and possibly evaporation rate and usually available in quart/liter bottles. Otherwise, find someone who heats with 1-K kerosene (highly refined clear kerosene with very little scent during combustion) and beg enough to fill the dish?
In the US, WalMart has a gallon of 1-K for $8.97US. Other vendors may be twice that price.

We've used a kerosene heater more than once (examples: power off during an ice storm for 3 days; the almost new gas-fired furnace died in January and the "3 day" repair turnaround on the controller board took 14 days - that event had low temperatures of 17F/-8C).
 

PhilHornby

Senior Member
I think 'odorless kerosene' might just be what is known as Paraffin in the UK. You used to be able to buy it at a Petrol Station, but it disappeared long ago (along with the two-stroke oil dispenser). This web site sheds some light on the differences ... including this key passage:-
Is there any difference in the odours they give off?
So, whilst kerosene does carry a noticeable odour, paraffin tends to include additives that help reduce the odours it gives off.
...
If you have ever used kerosene for your home heating system, then you may have noticed that it can carry a particularly strong odour. While this isn’t really a problem when you are using it for your boiler, it would be an issue if you were using it indoors.
I can relate to the last paragraph - the home Heating Oil I use is referred to as Kerosene-28 on occasion and that definitely smells.

What I haven't actually figured out, is how mere 'fumes' would be enough to lubricate the mechanism?

(I'm going to leave the clock mechanism alone until it actually stops. I wonder how much attention it's received over the last 170 years? (That's 2.7 x 10⁹ ticks and 2.7 x 10⁹ tocks!))
 
Last edited:

PhilHornby

Senior Member
I have something working ...

It's a hybrid of the Piezo Sounder as contact microphone, coupled with use of an ADC to detect the 'pulse' (since it's not logic level).

24983

So long as the 'sounder' is held in contact with the wooden case of the clock (it's in a plastic case with two holes), then it is exceedingly sensitive to the Tick/Tock (and remarkably unaffected by ambient sound).

I haven't tried the 'seismic mass' approach, since my eBay supplier managed to send the wrong size balls :(

The current 08M2 code isn't far from @rq3's original :-
Rich (BB code):
#picaxe 08m2
#no_data
#terminal 38400

symbol LED=C.4                ;LED drive pin
symbol PIEZO=C.1              ;sensor ADC input pin
symbol HalfaSecond=500*8
symbol TRIGGER=50            ;sensitivity (millivolts),0-1023(max-min),nom.24
symbol LEDTime = 65535        ;*1.25uS = 82.5mS

init:
      setfreq M32             ;run at 32 MHz
      pullup %01000           ;apply pull-up to unused pin 4 (C.3)
      adcsetup=%00010         ;make C.1 ADC input
      adcconfig %011          ;use internal reference and circuit ground

      fvrsetup FVR4096        ;step references per Microchip errata sheet
      fvrsetup FVR2048               
      fvrsetup FVR1024        ;use internal 1.024 volt reference
      
      low LED                 ;Turn off LED (and set pin as output)
      pause 1000              ;settling time 

do
      W0=0                    ;re-set ADC value

      do while W0<TRIGGER     ;loop ADC while piezo output is less than trigger
            readadc10 PIEZO,W0;read the ADC
      loop
      
      Pulsout LED,LEDTime     ;flash the LED
      
      Pause HalfaSecond
loop
Just to prove it works:-


24986
 
Last edited:

AllyCat

Senior Member
Hi,

(IMHO) With that ratio of C3 : C4, it's acting more as a simple "dc-restored, peak-peak detector" rather than as a "diode pump". I can't say which might be better (in your application) but a "pump" (with C3 < C4) will take several cycles to reach the threshold voltage, so may be more resistant to spikes, pops, thumps and general Low-Frequency "noise".

Cheers, Alan.
 

PhilHornby

Senior Member
I did try C3 with a much lower value (47nF) as you suggested, but I couldn't get any discernible output signal. I increased it to 470nF with no joy and it only started working when I tried the 1uF.

(The value originally shown for R3 was wrong - I must have measured the wrong side of the Preset.)
 
Last edited:

PhilHornby

Senior Member
I'm not actually sure if C3 + D2 do anything useful ...

Blue trace is at collector of Q1 (AC coupled)
Red trace is at junction of C3/D2

24987

Blue trace is at collector of Q1
Red trace is at junction of C4 / D1 (in response to similar agitation of the piezo)

24988

(It takes nearly 600mS to decay away below the currently selected triggering voltage)
 
Last edited:

AllyCat

Senior Member
Hi,

Hmm, C4 * R8 has a time constant of only 33ms, so what I think is happening is that C3 becomes discharged when Q1 turns on (since both Q1 collector and D2 are at ground potential, with low impedance). Then when Q1 returns to "normal" bias level it lifts the voltage on D1 and C4 and it is the recharging time constant of C3 via R8 which you are seeing (i.e. the capacitor current falls so the voltage across R8 drops). But 600 ms still seems surprisingly long (1.33uF * 100k = 133ms).

Cheers, Alan.
 

rq3

Senior Member
So, something along these lines:-

View attachment 24976

I couldn't find a BC548 (or rather, not with one long enough legs for a breadboard!) but I found a BC547. My meter says its Hfe >320 ... so I increased R3 to try and get the collector voltage to be mid-rail.

I've not fabricated the whole thing yet - just Q1,R3 + R1.

I notice that the RevEd design has a "Set-zero" pot. which is no longer part of the design.
You are over thinking this. A piezo disc will output over 90 volts if tapped directly. No amplication is required, indeed, you need to protect the ADC input with clipping diodes, but that is all that is required. Glue a nut or any other handy mass to the center of the piezo ceramic area to shift from acceleration (meters per second squared), to jerk (meters per second cubed).

A microphone detects acceleration, which is what you have. A jerk detector detects changes in acceleration, which is what you want. NOT when a tik or tok occurs, but the difference between them from an arbitrary zero point.
 
Last edited:

PhilHornby

Senior Member
But 600 ms still seems surprisingly long (1.33uF * 100k = 133ms).
That circuit has another quirk - though I don't think it affects my use of it. If the Piezo is disconnected and C1 is connected to the +5V rail, it oscillates!

The collector of Q1 deviates from its 2.5V quiescent state - first to nearly +5V (give or take the odd diode drop?) and then some 75mS later it drops to almost zero. It repeats every 600mS or so!

24989
 
Top