Showing posts with label debugging. Show all posts
Showing posts with label debugging. Show all posts

Monday, June 8, 2020

Antiques and heirlooms

Among amateur watch repairers, it is good advice refuse to work on antiques or valuable heirlooms.  Doing so without sufficient experience can lead to frustration!  Old watches also have non-standard parts and other oddities that can trip up the unsuspecting would-be repairer.  I have followed this advice until recently... and ended up in a bit of an adventure.

What tempted me down this path was an antique heirloom watch that was in very poor shape.



It was apparently my great grandmother's watch.  It is quite pretty, but when I received it, it had not been well kept by its owner.  Furthermore, it had been to some very poor watchmakers!  Slowly, over the course of three years, I made a number of repairs, none too difficult:
  1. I replaced the missing glass with an acrylic face.
  2. The case wouldn't close because it was slightly out of round... I put it back into the round, so the case opens and closes correctly.
  3. I remade a case screw that someone had snapped the head in half (!). There are marks on the plate where the screwdriver skidded off after snapping the screw, so clearly way too much force was involved.  Ouch!
  4. The winding stem that was acting up, because a brake was tensioned incorrectly.
  5. I put the hairspring back in order because it was twisted badly.
  6. Finally, recently, I took the movement apart and cleaned it.  This was completely uneventful.
It now runs reliably, but gains about 5 minutes per day.  That's terrible, of course.  But given that I don't have a replacement hairspring and given the age of the watch, it's well within what I'm willing to tolerate.

I had a very different experience -- and it's not over -- with a watch from my wife's family.



This watch wouldn't run, but didn't have anything visibly wrong with it.  Upon disassembly, I found that the lever fork cock was ever so slightly bent and was pinning the fork down.  Since it couldn't move very well, that kept the train stuck.  That wasn't the only problem...

As I was reassembling the balance, I was a bit less careful than I should have been.  I noticed the balance was not able to turn freely in both directions.  The balance was simply on the wrong side of the fork, and needed to be carefully lifted over the fork.  Unfortunately,  I couldn't visualize what was wrong.  Instead of the correct move, I gave the balance a sound push the other way.  That was not a good plan, and I really did know better!  Disaster!  The impulse pallet jewel was shattered!

After carefully sizing the missing pallet (seems to be about 19/1000"), I realized that it would be useful to make the pallet out of blued steel.  It should have nearly the same characteristics, and it should "just work."  (I also ordered a ruby impulse pallet, but I'm not confident of my measurements...)

It took five tries to make and install the impulse pallet, because I lost the first three pallets I made, and although the fourth worked, it was very poorly made.  The fifth looks nice enough and seems to be working. 

Of course, the first step was to disassemble the balance.  I removed the old pallet by heating the roller table with a soldering iron with a fine tip at roughly 250 degrees F.  Using a needle, I cracked off all the old shellac.

First, I trued up the end of a 0.5mm blued steel rod, using an arkansas slip.


After truing, I rounded and burnished the end.  Next, under the microscope, and on a soft piece of wood, I ground a flat surface using the arkansas slip.  In the picture below, the flat is visible as the slight smear at the end of the rod.  (The flat is about 1 mm long.)


This made the rod into a D shape.  I kept grinding the flat until the rod barely entered the hole in the roller table.  Then, I burnished the flat surface.

Unfortunately, the rod was too large to fit the slot in the lever fork.


So, I ground a fine taper to the rod by hand, by eye, under the microscope until the rod would just barely bind in the lever fork as I rotated it with the tip in the fork.

Then I switched to a steel burnisher to smooth the surface of the rod.  After burnishing, the rod freely fit the lever fork, with the base of the taper still fitting the roller table.

To cut the pallet off the rod, it's important to cut it to the precise length.  Since I ended up making five pallets, I was able to zero in on the correct length by comparing with an earlier attempt.  But in any case, I reversed the rod in the pin vise, and then used a narrow file as a saw to slice off the pallet.


Once again, I switched back to the arkansas slip to true the end, and then polished it with the burnisher.  Even though this cut end is completely invisible, this was an important step because the cutting raised burrs.  Burnishing removed those burrs.

OK, now the pallet was small!  It's the apparent "grain of sand" on the left of the frame in the balance cock in the picture below.


Getting the impulse pallet into the hole in the roller table was... irritating.  The pallet is slippery by design, and rounded... which means that holding it too tightly (or gripping the wrong surface) with tweezers will launch it across the room.  I lost three attempts irretrievably and lost another one for a very long time.  Eventually I got it pressed in place.

To anchor the pallet, I gripped the balance in surgical clamps and applied shellac.


Someone before me was way too liberal with the shellac and glued together several turns of the hairspring.  I was able to knock them apart, but if it impacts timing, I may have to immerse the spring in alcohol.  I'm loathe to do that because the spring has a nice overcoil and is very, very delicate!

Here is the balance reassembled with the new impulse pin installed in the roller table.


And a zoom-in:

 
But the balance reassembly did not entirely go well the last time...  I bumped the attachment point with the tweezers, and snapped the spring at the balance attachment point.  Previously, I had thought it nice that there was a removable clamp that made removing the balance easy.  However, that clamp was installed very permanently onto the hairspring.  It took a good two hours to remove the old pin (brass, extremely tightly fit; I think it was staked in place at the factory!), fashion a new pin (I used soft copper, and much longer, since I wanted be able to get it out in the future if needed), and get everything back to working order.  As wooden clockmaker Clayton Boyer says, "Mistakes take a lot of time. I spend some of my best woodworking time making them."  Yeah, I agree.

Still, after all that, the watch still would not run.  What!?!  No visible trouble... actually, not.  I had never worked with a watch with an overcoiled hairspring.  It can happen that the overcoil turn can foul on both the balance cock and the main turns of the spring.  That was the problem.  A very slight touch on the spring attachment point fixed the overcoil's path, and the watch sprung to life!

The movement is now running, which is a relief!  It sounds different from the other movements I've repaired, because it's quite a bit lower frequency (around 2 Hz) than other movements of the same size (typically 4-6 Hz).  Assuming it all goes back together, I wonder if it will keep reasonable time?

One final thing, though.  The winding works for this watch is not the usual Swiss mechanism.  It's a bit simplified, which seems elegant at first.  Here it is when correctly assembled.



However, should the stem get loose and you simply try to reinsert it, you will likely knock the cylinder gear assembly off its retaining spring.  This is rather subtle.  In the picture below, the lower retaining spring is supposed to be running in the cylindrical groove right below it.  All you need to do to repair it is slip the stem back in, and push the spring down gently.  It reseats easily, and then you can carefully withdraw the stem, leaving everything in place.


This process is extremely annoying, because although fixing it takes mere seconds, to access this mechanism you have to uncase the movement, dismantle the hands, and dismantle the dial.  Reassembling the movement into the case involves reinserting the stem, which has a tendency of knocking the winding mechanism out of order... so you need to back up, disassemble everything and try again...

Thursday, March 5, 2020

Fluidyne experiments

A fluidyne is a piston-driving heat engine whose only moving part consists of a column of fluid (usually water).  It is a kind of Stirling engine, and it seemed like a neat idea to try to make.  The initial design was invented by C. West, and is described in a nicely written report.

Rather than starting with the "easy" standard design, I tried making a 3-piston version described later in West's report, after describing his initial design.  Here's my rendition.


I did some analysis of this design.  My model sets a displacement for each piston (water column) and temperature for each cylinder (air column).  Half of each cylinder is hot, and half is cold.  The engine is driven into oscillation because the cylinder isn't centered between these two sides, so sometimes it's heating and sometimes it's cooling.  The weight of the pistons acts as restoring force, so assuming they're all of the same length, they have the same resonant frequency.  Surprisingly, the cross sectional area of the cylinders and the length of the cylinders doesn't matter in the analysis.

Here is a typical plot of running frequency as a function of the length of the pistons and temperature difference. 
The engine seems to stall below a certain temperature difference between hot and cold sides, and the stall temperature depends strongly on the coefficient of temperature flow into/out of the cylinders.

The way the engine is supposed to run is that you point a heat gun at the three copper tubes on one side.  These are the hot sides of the cylinders, while the others are cold.

The sad part is that while this engine runs beautifully in theory, I could not get mine to start.  Keeping the temperature of all cylinders the same is critical or the pistons get out of order, and even with that managed, it never started. 

Just to verify that I wasn't completely crazy, I decided to modify the plumbing to make a more standard single piston machine.


I didn't do the analysis of this engine, but it also seemed very unwilling to run unless I flooded the hot cylinders with the pistons. 


Under this condition, the tops of the pistons boiled, which raised the pressure substantially.  Since the water vapor then condensed on the other (cold) side, the piston didn't boil away completely! 

Just to make sure that the fluidyne plumbing wasn't superfluous, I disconnected the plumbing and flooded the hot cylinder on its own. 

Here is a video of this test. 


You can see the top surface of the cold side of the piston oscillating slightly, but much less than when plumbed.  So the fluidyne was "running", even though the boiling seemed very wrong, at least from the original report's description.

However, at this point I recalled reading a rather different design by Morris Dovey.  He described a simple prototype that seemed worth trying, at least by modifying the materials I had at hand.  Although he claims that his design does not depend on resonant frequencies to run, that is dubious at best.  Forced or loaded resonances can vary a bit from their natural frequencies anyway.

I disconnected most of the pipes, added the cold cylinder just hanging off to the side of the hot cylinder, and plugged the cold cylinder with a small screwdriver.


This machine really runs!


It even (sometimes) starts nicely...


But I ran into temperature problems all around, as the clear vinyl tubing is not really able to take the heat from the heat gun.  After a minute or so of running, the tubing invariably springs a leak and the machine stops.

I tried flipping the positions of the hot and cold cylinders -- basically just plugging the end of the hot cylinder and leaving a big air bubble below it -- but this did not work.  I have not done the analysis of Dovey's design to get a more analytical handle on its operating regimes, but it is still definitely a resonant device.  You can feel it try to start running once the heat is sufficient, which is a sure sign that there's a forced resonance.

Sunday, September 15, 2019

Misadventures with an ESP-01 board (ESP8266 wifi module)

To add wifi capability to an electronics project, the ESP8266 chip is apparently a popular choice.  It is a microcontroller with a wireless ethernet stack built in.  We got three ESP-01 boards that feature this chip, an antenna, and some flash memory (1 MB).  They are very small!


The tutorials on this board are generally quite confusing, as you can incorporate it easily into a project of your choosing in many ways.  Many makers are familiar with the Arduino platform and are comfortable with its development tools, even though this isn't entirely necessary.  Also, there appears to be a tradition of "hello world = flashing LED" tutorials for Arduino.  This tradition extends to ESP-01 boards in a somewhat unfortunate way. 

The ESP-01 board ships with an old-school Hayes-modem "AT" command interface.  It talks to a host via serial at 115200 baud out of the box -- though with 3.3 V signaling instead of 5 V or RS-232 levels.  (Nearly everyone warns you that 5 V will kill the device, but that actually seems a bit suspect.  I imagine RS-232 levels would really toast it, though!)  In any case, if you hook up a serial terminal, you can talk AT commands and pretty easily connect the board to a nearby access point.  The commands are

AT+CWMODE_CUR=3
AT+CWJAP_CUR="<ssid>","<pwd>"

If you want to see what access points are visible, use

AT+CWMODE_CUR=3
AT+CWLAP

If you want to see what IP you've been assigned once connected, use

AT+CIFSR

The documentation for all the commands is located here. a nice short listing of commands is here.  It's essentially like a cross between old-school modem commands and sockets programming.

Since modern computers don't have a hardware serial port (and most old hardware serial ports don't support 115200 baud), you typically use a USB-to-serial converter.  There are many of these available -- I have several -- but for a quick hack you can coerce an Arduino into helping.  Actually, "coerce" is the right word, because what you do is hold the Arduino in a reset state (it's effectively disabled) while you hijack its USB-to-serial chip.  Here's the circuit that I used.  The resistors form a voltage divider that brings the Arduino's 5 V signaling down to 3.3 ish volts.  (It didn't make much of a difference when I hooked the RX lines directly together, though that is apparently ill-advised...) 


Since I am using an Arduino Mega held in reset, it seems that plenty of 3.3 V is available for the ESP-01, contrary to the many tutorials warning that a separate power supply is required.  I imagine you might have problems if you allow the Arduino to boot up.


OK, back to the unfortunate part of the story.  Since the tradition is to make an LED flash as your first project, there are many tutorials explaining how to make an ESP8266 flash an LED.  This involves -- naturally enough -- overwriting the flash memory with a program that simply toggles one of the GPIO pins.  However, this means that the modem firmware gets overwritten!  If you're a newbie (or even if you're not), this means that the ESP-01 board is now useless as a wifi dongle!  Putting the original firmware back is not exactly a trivial task.

I was faced with the task of reflashing 2 of the 3 ESP-01 boards we have.  (The remaining one was fortunately unharmed, so I was able to figure out how it was supposed to work!)

First of all, you need special software that understands how to flash memory on the board with the ESP8266 chip.  Fortunately, the right tool for the job is an open source python script esptool which has minimal dependencies.  Starting this up was no problem, and I started by re-using my existing circuit.  I figured that I would start by clearing the flash memory, since I already knew it to be useless...

$ python esptool.py --port /dev/ttyACM0 erase_flash

Sadly, this just hung while "connecting".  I hooked up my logic analyzer to the TX and RX lines, and was able to verify that data was getting transferred, so it looked like the chip was merely ignoring the commands.  After digging some more, I found that the right course of action was to ground the GPIO0 pin first.  This puts the ESP8266 chip into a "flash mode", which is required for programming it.  To start programming, you briefly pulse the RST pin to ground to reset the chip.  Then it happily started flashing the memory, or so I thought. 


However, as it turns out my board has a flash chip that doesn't like the default SPI settings.  Unfortunately, they appear to work just fine, and the files I flashed even verify correctly through esptool.  But they are wrong!  There are some dark words in Amazon reviews for the ESP-01 about defective boards, but that didn't seem to add up.  The boards were indeed talking -- I could watch the data transfer both directions on my logic analyzer -- so I didn't think they were defective. 

After a bit more poking, I found the solution.  The problem is that the default setting in epstool optimizes runtime, using the fastest protocol to write the flash.  Apparently this isn't supported by all flash chips, and it silently causes problems with some of them.  There's a detailed explanation of what's going on in the esptool documentation and on the Wikipedia page for the Serial Peripheral Interface. 

OK.

Let's flash the board correctly!

You can use the stock firmware, by following detailed instructions about the flash map in their documentation.  But there is also an enhanced version of the firmware that adds a few additional AT commands.  It's a little easier to flash the enhanced version since it's all in one contiguous block starting at address 0x00000 rather than several separate files flashed into different addresses, which is how the stock firmware is distributed.  In any case, the command to do the job is

$ python esptool.py --port /dev/ttyACM0 write_flash 0x00000 AiThinker_ESP8266_DIO_8M_8M_20160615_V1.5.4.bin --flash_mode dout

This set things right, and the boards once again respond to AT commands!

Friday, July 5, 2019

Clock 4 now runs with intermittent impulsing

"Intermittent" can be a problem, but not in this case!  Based on the numerous power budget calculations I've done, impulsing the pendulum in Clock 4 every minute is too much to ask.  After having gotten the escapement to impulse every period (2 seconds) reliably, with run times around 8 hours, it seemed like the right time to go back to trying to get the intermittent part working again.  Especially, the run times without intermittent escaping were limited by drive cord length -- I had a four fall pulley in place for the clock to run that long. 

Therefore, I added more deep cuts to the count wheel, now five in total.


This means that the escapement should be triggered every 30/5 = 6 pendulum periods, or every 12 seconds.  The pin wheel has 30 pins, so will then have a period of 12 seconds * 30 = 360 seconds = 6 minutes.  The pin wheel is driven through a 1:10 mesh for the drive wheel, so it should make a rotation every hour.  I can therefore drive the minute hand from the drive wheel, although it will run counter clockwise.

With some tuning, the Clock 4 runs with 8 lb of drive weight, directly driving a barrel of 1.2 inches.  The clock's run isn't perfect, as (1) the count wheel double counts immediately following an impulse and (2) sometimes this double-counting skips over an impulse.


But given these issues, Theodore measures the following periods in current configuration:
  • 53 seconds for the count wheel
  • 4 minutes 24 seconds for pin wheel

Given these measurements the drive barrel will make one rotation about every 44 minutes.  In that time, the weight will have dropped 3.7 inches. 

Thus the power consumed is:

3.7 inches / (12 in/ft)  * 8 lb / (44 min * (60 s/min)) = 9.4 * 10^(-4) ft lb / s = 1.28 mW

Monday, May 13, 2019

More power calculations with Woodward's intermittent grasshopper

By joining the count wheel pusher lever of the the Woodward escapement to the escapement trigger, you can make the escapement trigger once per period.  This is the most frequent that the intermittent grasshopper can be triggered.  Triggering every period already happened by accident, but I decided to force it to occur by linking the mechanisms together without using the count wheel.  This way, I could debug the escapement mechanism... and there were indeed problems there.  I think I've resolved them, and this modified mechanism reliably runs until the weight hits the floor.

Currently, the mechanism runs on 1 lb 14 oz, falling 3.9 inches every 10 minutes.  Converting to standard units, this means that the weight falls

3.9 inches * 25.4 mm/inch / (10 min * 60 s/min) = 0.17 mm/s
1 lb 14 oz = 0.85 kg = 8.3 N

Thus the power consumption is 0.17 mm/s * 8.3 N = 1.37 mW.

This is substantially more pessimistic than my previous figure of 0.325 mW averaged over one minute for the count wheel assembly.  This is even with an improvement resulting from a few changes I made.  The pendulum is now hung from two sharp brass points resting in brass cups.


This new hanger ensures a positive positional lock and a definite axis of rotation for the pendulum with substantially less friction than before.


I also made a number of small improvements including reshaping one of the pin wheel pinion teeth, aligning the impulse hook, and stopping the detent's fall a bit earlier.  Finally, I removed every other pin in the pin wheel, which means that the period of the pin wheel is one minute.

Update: 5/13/2019.
By clipping off the tail of the locking detent to make it somewhat more delicately balanced, I can reduce the drive weight by 6.5 oz.  Thus, the power consumption is

3.9 inches * 25.4 mm/inch / (10 min * 60 s/min) * (1.47 lb * 4.43 N/lb) = 1.08 mW.

Sunday, April 21, 2019

Restoring a pdp-11/45

When I was a student at RPI, I found a pdp-11/45 on the JEC loading dock.  The machine had no power supply and had a destroyed memory management board (M8108).  I cobbled together a power supply and replaced the board, and it was running well enough to flash its lights. 


That was about eleven years ago -- the little boy in the video above is turning 13 tomorrow -- and the machine stopped working shortly after the video was taken.

This month I started investigating the cause of the trouble.  I found that the +5V power was sagging severely when the machine was powered, which isn't terribly surprising because the CPU alone draws something like 40A!  Evidently the industrial power supply I had purchased wasn't doing its job.  Unfortunately, what used to be a $50 power supply was now upwards of $400, since the manufacturer had closed.  A little looking around, I decided to replace the +5V only at 50A. 

The resulting power supply got the machine to start up, but it was very erratic. It would crash at various weird places, and for no particular good reason.  This had me going for a long while, but fortunately the machine was made to be debugged... you can select from two internal clocks: a crystal (the default) and an RC oscillator.  You can adjust the frequency of the RC oscillator, but it's not very stable.  You can also wire in a single-step switch, which I had done in the past.  None of this seemed to help, but I learned that my frequency counter is pretty stable in the process.

Accidentally, I found that the machine would crash when I bumped the power supply wiring harness.... and found that the screws that connected the harness to the power supply were loose. 


Tightening the screws fixed that problem!

But there were more problems.  Several of them were easily resolved by polishing all of the card edge contacts.  This is not hard, but takes some doing.


This got the machine to the point where it had been before it stopped working.  It could load my custom, simple OS, EMON, and run programs entered from the console. 

But I had previously wanted to load other software, could I do that now?  Since I do not have any peripherals aside from serial lines, using a emulated TU58 tape drive seemed the best option.  Since I last checked about a decade ago, tu58fs has been written, and seems to be the most convenient.  So I tried to get XXDP and RT11 running, but both failed.

XXDP in particular was stopping at address 000550, this seemed to be similar to what was described here.  Using the disassembly provided there, I agreed that this was a checksum error.  But since the tape file booted on SIMH, I knew I had a good image. 

By manually digging through what the boot loader had loaded into the pdp-11's memory, I verified that everything was perfectly loaded.  The checksum was being computed incorrectly!  I wrote a simple program to compute the checksum of that good block... and the checksum came back wrong.  After simulating the code carefully in python, I determined that the cause was that the carry bit was getting set way too often. The carry was set whenever it should be, but also whenever the highest bit of the destination register was set.

I traced this back to the output of one multiplexer chip.  It was being held low when it shouldn't be, but only about 0.9V... an uncertain level.  Fearing the worst, I replaced the chip.


I socketed the replacement just in case I had to replace it again.  This is perhaps unnecessary, and it might cause issues if I ever get a floating point unit.  But since this board is the frontmost large board, it's not a problem.


Sadly, this didn't do the job... the carry still was getting set incorrectly.  Tracing forward, it turned out that the destination register's highest bit has a special active LOW line that runs on a trace parallel to the carry bit.  A tiny bit of solder had bridged those two lines at the following chip.


Evidently, this chip had been replaced previously -- not by me -- and the job was not done carefully.  Cleaning up the solder job and removing the bridge fixed the carry problem.

The machine now boots XXDP!


But, as the screenshot shows, there are still problems...  I originally had 32 kW of memory loaded, for a total of 28 kW available for programs.  (The top 4kW is always reserved for memory mapped I/O.)  I have verified that all of this memory can be accessed and used without issue.  Although the memory management unit is not needed to access 28 kW of memory, apparently XXDP prefers to have it available.  The memory management unit (embodied in the M8107 and M8108 boards) is actually installed, but it is evidently not working correctly.


In order to get XXDP to boot, I had to pull the top 16 kW out, which is the four cards above that are obviously displaced.  (The memory lives in a separate cabinet above the CPU because I had trouble finding a sufficiently powerful power supply for it.  Since it takes unusual voltages, I didn't fancy building an appropriate power supply from scratch.)


Here's a video of the entire boot process, in which I key in the boot loader using the front panel.

Monday, February 18, 2019

"Hidden" power losses in Woodward's escapement

I have been thinking about how my implementation of Woodward's intermittent grasshopper is not successfully transferring enough power to run.  The pendulum power requirements I computed earlier are certainly sobering -- even though this clock's pendulum already appears to be substantially more efficient than my other clocks -- they are not the only power loss. 

Since the escapement runs intermittently, I can dramatically increase the power supplied by the escapement by repeatedly triggering the escapement.   In one experiment I tried, the triggering mechanism got jammed, which triggered an impulse every swing.  This was enough to run the mechanism until the pin escape wheel got stuck. 

But even when triggered every swing, the power supplied is only marginally sufficient, even setting aside the pendulum losses.  If I look at the amplitude immediately before and after an impulse, it's not noticeably different.  This indicates that there are substantial additional losses that occur during the triggering and impulse.

What can cause this? The most obvious (though probably not the only) energy losses are caused by the fact that it takes a definite amount of energy (force times distance) from the pendulum to move both the triggering lever and impulse hook.  Since both of these fall back to their original positions after the impulse without returning this energy to the pendulum, all of this energy is lost!  So, the return counterweights should be heavy enough to ensure a reliable positive action, but otherwise as light as possible. 

(I recall now a similar issue with Clock 3, where my initial attempt at a sprung detent resulted in too much energy loss.  Since I couldn't get the wooden spring weak enough without breaking it, I ended up opting for a light counterweight.  It's probably still too heavy, and may account for much of the need for a heavy drive weight.)

Saturday, January 26, 2019

Clock 4 pendulum pivot

In an effort to reduce the pendulum pivot friction for clock 4, I have decided to try setting the pivots on metal points rather than wood.  The points and matching cups are cut from brass.


While a little hard to see, the pins mount in holes drilled in the end of the pendulum's hook-shaped protrusion.  Once mounted, I marked where they sat on the hanger, and drilled holes to receive the cups.  It sounds more complicated than it is; here is a zoom-in of the installation.


In the process of installing the pins, I snapped off the pendulum's hook.  So that is now gluing.  Once it's dry, I'll be able to tell if this helps to reduce the pendulum's running friction.

Update: after drying, for the unloaded pendulum, I get a median of 71 full periods for the amplitude to halve.  That puts the unloaded Q = 320, which is a little bit better than before.

Thursday, January 10, 2019

Clock 4 current power consumption

Continuing the thoughts from the previous post... How much power does the current Clock 4 pendulum and count wheel consume?  Especially, how much weight is really necessary to drive it?

I'll treat the pendulum rod and bob as two separate weights...

Rod = 28.86 oz = 0.818 kg, centered at 24" = 0.61 m
Bob = 26.75 oz = 0.758 kg, centered at 45" = 1.14 m

Potential energy for a swinging weight = m g L (1-cos(angle))

The amount of energy at the top of the test swing (4.8 degrees) is

( 0.818 kg * 0.61 m + 0.758 kg * 1.14 m ) * 9.8 N/kg * ( 1 - cos (4.8 degrees) ) = 0.046850 J

At the bottom of the test swing (2.4 degrees), the energy is

( 0.818 kg * 0.61 m + 0.758 kg * 1.14 m ) * 9.8 N/kg * ( 1 - cos (2.4 degrees) ) = 0.011718 J.

Assuming one period of the pendulum is 2 seconds (it's not, but will eventually be):
  • The unloaded pendulum takes 65 periods to consume that energy = 0.270 mW
  • The pendulum driving the pulling pallet consumes this energy in 54 periods = 0.325 mW
  • The complete count wheel assembly consumes this energy in 50 periods = 0.351 mW
We can conclude that
  • The count wheel assembly consumes 0.081 mW,
  • of which 0.026 mW is due to the backstop.
These power figures are somewhat in line with my previous clocks.  Clock 1 runs on 0.5 mW and Clock 3 runs on 0.8 mW.  So thus far, Clock 3 is more efficient by a bit.

Assume that the escapement is triggered once per minute, is geared through a 10:1 gear mesh, and is driven by a 1" diameter barrel.  How much weight is required for all of these power requirements?

The weight falls at an average speed of pi * 0.0254 m / (36000 s) = 2.216e-6 m/s.

Thus, it takes
  • 12.4 kg = 27.4 lb to drive the unloaded pendulum,
  • 3.7 kg = 8.2 lb to drive the count wheel (without the pendulum), and
  • 16.1 kg = 35.5 lb to drive the pendulum and count wheel assembly.
Way too high, I think!  I need to either improve the pendulum's Q or scrap the idea of the 10:1 gear mesh.

For testing purposes, if I were to drive the clock from the pin escape wheel directly, which has a 3/4" pinion, the weight falls at an average speed of pi * 0.75 in * 0.0254 m/in / (3600 s) = 1.6624e-05 m/s.  The amount of weight necessary to drive the pendulum and count wheel assembly becomes 2.16 kg = 4.8 lb.  (This may not be entirely safe since the pin escape wheel arbor isn't very strong.)

Wednesday, January 9, 2019

Clock 4 pendulum measurements

Here are some measurements of the clock 4 pendulum, trying to get a handle on its performance issues.  Woodward is adamant that limiting count wheel friction was major concern in his designs.  He employed a number of countermeasures, including anti-friction rollers, a polished acrylic count wheel, lightweight stainless steel pallets, and the merest hint of watch oil.  I don't know that my situation calls for such measures, but I figured I ought to investigate.

The pendulum is a solid square black walnut rod about 2" on a side, and is 48" from knife edge to bottom.  It weighs 28.86 oz, which is fairly uniformly distributed along its length.  The pendulum was fitted with a crude bob constructed of short copper-clad steel rods bound together with a rubber band located 45" (on center) from the knife edge, weighing 26.75 oz.

I measured pendulum amplitudes as deflections from equilibrium. 

Provided the amplitude is greater than 2.5" (3 degrees) and less than 5" (6 degrees), the count wheel advances reliably.  The count wheel does not advance at all when the amplitude is less than 2.25" (2.6 degrees). Double counting occurs when the amplitude is greater than 5.5" (6.6 degrees).

Here are counts of pendulum full periods starting at 4" (4.8 degrees) and ending at 2" (2.4 degrees), which is basically a half-time.  Pendulum Q can be estimated from this by Q = 4.532 * number of periods to halve the amplitude.
  • Unloaded pendulum: 65, 72, 68.  Median Q = 308
  • Pendulum driving pull pallet and count wheel, but no backstop: 58, 54, 54.  Median Q = 245
  • Pendulum driving count wheel normally: 52, 45, 50.  Median Q = 226.
This indicates a count wheel-only reliable run time of about 100 seconds, which I've confirmed approximately on previous days.  If you push it a bit, you can sometimes do better on occasion.

There definitely is a noticeable change in loaded Q caused by driving the count wheel, as Woodward warns.  But, the unloaded Q figures are probably the source of my trouble, though.  The unloaded Q is around the same as a marine chronometer's balance (and not a good one at that), and that needs an impulse every period to keep running!  (I already know that the clock can run if it impulses every second.... it's not supposed to do that, though!)

Although this is probably excessive for my needs, Woodward has a table that lists a "heavy seconds pendulum" at Q = 15 000.  I think I need a better resonator!

Triggering the escapement certainly consumes energy, possibly a large amount of energy.  But it's unclear how exactly to measure that accurately...

Monday, January 7, 2019

Clock 4 escapement triggers

The next step of constructing Clock 4 is the intermittent triggering mechanism.  Once per minute (one rotation of the count wheel), it triggers the impulse hook to grab one pin of the pin escape wheel.

The impulse hook was cut from the pendulum rod (mostly for aesthetics).  This version has a brass hook rooted in the block and anchored with super glue.  I later replaced this with a stiffer steel one.


The hook is counterweighted by filling the wooden block with lead.  This was sufficient for the brass hook, but not for the steel hook.  I added a screw and nut outrigger counterweight for that.  The steel hook turned out to be a good idea because the brass one was really very pliant, and was getting distorted by each impulse. 

The hook assembly rides on a brass pin on the pendulum.


The impulse hook is triggered by an assembly that sits behind the count wheel.  The straight segment gets grabbed by the count wheel driving pallet (hook) once a minute, and pushes the flat segment against the impulse hook to engage it.


I also made a wood and brass key to wind the clock.


Here is a video the escapement being triggered successfully from the count wheel.  (Hemostats are useful to keep parts in place...)


This has taken the past two days to get it adjusted.  Here is a video of an amusing -- and vexing -- fail mechanism.  Watch to the end... it gets worse!


Next up: the pendulum is indeed not running long enough (as the previous post probably suggests...).  I suspect I do need to increase the weight of the pendulum bob, regardless of the power needs, and figure out how to reduce the friction.  That first requires finding where the friction is...

Sunday, January 6, 2019

Should you add more weight to the pendulum bob when the clock doesn't run?

Short answer: no!

Medium answer: adding more weight to the bob increases the per-period energy requirement of the clock, but only up to a limit.  So once you have the clock running reliably, you can (and should) add more weight to the bob to improve its timekeeping stability.

When clock doesn't run because not enough energy is getting refreshed into the pendulum (or other resonator), it's tempting to look for easy fixes.  Adding more weight to the pendulum bob certainly delays the inevitable, since the clock will run longer before stopping.  But it has a certain futile feel to it... will you ever add enough so that it will never stop?  Sadly, you cannot.  Fixing the frictional losses (best) or increasing the drive power are the only solutions.

The reason is a straightforward derivation ending in a simple formula.

First of all, let the angular deflection of the pendulum be A = A(t), a function of time t.  For small angles, this is governed by

A'' + (c/m) A' + (g/L) A = 0,

where m is the pendulum bob mass, g is the acceleration due to gravity, L is the length of the pendulum, and c is the frictional loss constant.  By the usual process for solving such a differential equation, the envelope of the oscillations will naturally decay like

A(t) = exp( - ct/(2m) ) A(0) ( .. trig functions .. ).

If T is the time of one period, the max amplitude is given by

A(T) = exp( -cT/(2m) ) A(0).

Now switching to discuss energy, the height of the pendulum is found by a little geometry...

... to be given by

h = L(1-cos A(t)).

Therefore, the energy change from one period to the next is

dE = mgL(cos(A(T)) - cos(A(0))) = mgL(cos(exp( -cT/(2m) ) A(0)) - cos(A(0)))

again applying a small angle approximation,

This expression is the one we're after, and really we want to know how it changes as we change m.  Clearly at m = 0, the change in energy is zero. Taylor expanding in m, we have the behavior for large m is approximately

Here is a plot of the overall behavior

The takeaway is that as you increase the mass of the pendulum bob, you must supply more energy to sustain oscillations, but only up to a limit.  For stable, reliable operation, you should ensure that the drive supplies at least that limiting amount of energy first first, before increasing bob weight.  Minimizing frictional losses should be the first priority -- which decreases c -- before trying to increase drive weight.  Only after the clock runs reliably should you attempt to increase the pendulum bob weight.

Tuesday, January 1, 2019

Clock 4 detent works!

Remaking the detent a few times did the trick.  Each time it worked a little better than the one before, as I flushed out the bugs.  I had a scare where I damaged the gate, but a little super glue seems to be holding it together.  Here is the detent that finally does the job.


The detent properly releases one pin at a time when recoiled by hand with a weight of just about 2.2 lb on the great wheel.

I did not have to modify the pin wheel. It is helpful to have a banking so the detent is held in a convenient position if all the weight is removed.  This also gave a good opportunity for testing the winding mechanism, which does indeed work.

Monday, December 31, 2018

Clock 4 detent issues

I installed a new(er) 1/3 hp 1725 rpm motor on my lathe since the bearings on the old one were dead.  It runs much better than before!

The detent mechanism for Clock 4 uses a gate invented by Philip Woodward (I think).  The detent sits on a pivot near the pin escape wheel.

The detent is fairly long, but just press fit into the frame.

The detent is cut from a small piece of white oak.

Here is the detent after shaping.

There are many issues with the detent, and it doesn't run at the moment:
  • The gate is very thin.  I broke two detents already
  • Woodward didn't seem to bank his detent, but it looks like I need to since wood has more flexibility than metal
  • The catch for holding the pin is very touchy as to how deep it is.  Woodward suggests that it might work as just a small depression, but this caused the pins to jump out.  Too deep, and they can't clear when the escape wheel recoiled... in which case the pins stick.
  • The pins of the escape wheel are too inaccurate in their placement
  • The pins of the escape wheel are too inaccurate in their vertical alignment
  • The pins of the escape wheel are not all the same diameter (because some of them split in the process of being installed).
  • The relative positioning of the catch and the gate slot is quite delicate, and there isn't much clearance.
  • The counterweight portion of the detent governs how much weight is needed to run the escapement.  This needs to be very light.
A few times, I could feel the escapement "almost working" under my hand, but it wasn't consistent enough to run under a weight.

Thursday, December 28, 2017

Transistor oscillator

I have been looking for a simple, easy to understand oscillator circuit that uses a single transistor.  Well, I found one!  Twice, it seems.  The first place was in a classic vacuum tube circuit, as described in

Morecroft, Elements of Radio Communication, Wiley, 1929.

After suitable edits to make it transistorized, I then found the same circuit in a hand-drawn schematic that my father had squirreled away in the 1944 edition of the ARRL Handbook. Certainly not new!

For my and Edwin's benefit, I built the circuit using snap circuits.
 

Here's the schematic:

The different parts of the circuit are indeed easy to understand:
  • The tank resonator is an inductor-capacitor (LC) circuit, which sets the frequency.
  • The keying turns on and off the oscillator.
  • The bias ensures that the transistor is turned "on" and not saturated.
  • The transformer affords feedback from the tank to the input of the transistor.  It also contains the inductor part of the tank.  In the snap circuits version, we don't have much control over this (it's in a plastic package), but too little inductance will cause the circuit to fail to oscillate.
  • The 200 ohm feedback resistor sets the gain of the transistor amplifier.  Reducing the resistance increases the gain, which drives it harder.  Increasing the resistance makes for a cleaner signal, but can also stop the oscillations. It seems to stop around 1000 ohms or so, but with the 200 ohms it is noticeably overdriven.
  • The signal purity can be increased by selecting a higher voltage for the power supply.  I got it to work with 3 volts, but the output was more clipped.