Model Engine Maker

Supporting => Engine Ancillaries => Topic started by: MJM460 on May 01, 2020, 08:10:30 AM

Title: A digital governor for model engines
Post by: MJM460 on May 01, 2020, 08:10:30 AM
There have been some wonderful governor builds as part of recent and current build logs.   I am continually amazed at the workmanship, even of those which do not actually control the throttle plate.  And the ones that do are just fabulous.

Not feeling that I am up to such a task yet, I decided to try a different approach.  To see if I could come up with a digital governor to bring the state of the art, or at least the understanding, up to the present day technology.

The flyball governors we have seen on this forum were of course invented quite early, but those not familiar with modern factory machines might not realise that they are behind the works of  modern governors, and there are many of them on high speed machines even today.  Not in the recognisable form of steel balls whirling around in plain sight, but a miniature, high speed version buried deep inside a boring looking, cast steel or aluminium casing.  About the only obvious change from the original is the incorporation of hydraulics to operate the throttle valve instead of a direct governor powered lever system.  So the fly balls (not even spherical on the last ones I saw) operate a shuttle valve in the hydraulic system, which in turn operates a larger piston, and a hydraulic pump provides the necessary pressure to operate the valve quite precisely.

At the end of the day, despite the different external appearance, deep inside they were the same analogue device as the original flyweight type.  A force usually described as centrifugal force, which is proportional to the square of the rotational speed, causes the weights to fly outwards, lifting a collar which moves a lever in a proportional manner to operate a tiny shuttle valve which in turn drives a piston to cause the required movement of the throttle plate with what ever force is needed to operate the high pressure steam throttle valve.  I have a vague memory showing through the mists of time, of a Dynamics lecturer over fifty years ago, talking about governor power, and how much work can done by the action of the flyweights.  I have often wondered how much that scales down on a miniature, where the masses are so small, but the governor still has to overcome friction of the valve stem seal plus any out of balance force on the throttle valve stem.

However, the most recent machines I installed prior to my retirement had digital governors.  They were sufficiently new at the time that electronic devices were not accepted as independent over-speed trip devices, and a much less consistent and less reliable traditional mechanical device had to be installed as well, to back up the much more accurate and reliable electronic governor.  Not even additional totally redundant electronic over speed trip systems were not accepted.  (I believe this anomaly has since been eliminated and a good triple redundant electronic is acceptable these days.)

As part of preparing the training program for the plant operators, I wanted to work out and explain how these digital governors might work, not only for myself, but as part of the training program I had to prepare for the operators who, when construction of the plant was complete, might meet a digital governor for the first time.  You might guess that I am never happy with the “black box” description.  This was some 20+ years ago, but I did work out a scheme that might be what the governor implements inside.  I  recall that I used pictures out of a Richard Scarry children’s book, with a Nicky Bunny holding a pendulum to measure the speed of a water wheel, and a lever to adjust the gate of the water sluice at the top of the wheel.  I wonder how many of the kids who read that book realise just how clever those pictures were.  We wore those books out reading them to our kids.  And it turns out that we can now make a very good digital governor with low cost, readily available components, that is suitable for our model engines.  I just had to try it.  I hope forum members will find it interesting.  It will not replace the fascination of the fly balls whizzing around for display purposes, but for functionality, I have high hopes.  I envisage it all hidden in the base with a shaft from a servo unobtrusively “helping” to move the throttle valve.

A governor is designed to provide "closed loop" control with negative feedback.  Closed loop means the effect of any control action must be fed back to change the input, thus again affecting the required control action.  Negative feed back means that when a deviation (in speed for a governor), the control action must be to change the speed in the opposite direction to the speed change.  A governor, on detecting the speed to be too high, must move the throttle plate to cause a reduction in speed, and vice versa.  I have drawn a schematic to illustrate this in the first attachment.

On a flyweight governor, the weights or balls move out (and up) when speed increases, and a  linkage must be set up to close the throttle plate when the balls move out.  And the whole thing is analogue, a continuous effect with no discrete values.  Note that at no stage does the actual speed need to be measured and displayed, though a scale could be put at an appropriate point on the linkage and calibrated to read speed.

Normally a governor has a adjustable spring to resist the throttle lever movement, so changes the force necessary to move the throttle.  This is used to adjust the speed at which the engine operates when the force developed by the weights just balances the spring force.

I decided as proof of concept, to just emulate that basic blind governor with a simple speed adjustment.  I did make one change however.  Obviously with the flyweight governor, when the engine is stopped, the weights fall to the lowest position, with the valve fully open (to increase the engine speed).  Hence the engine is usually started on a separate manual throttle valve and carefully brought up to speed until the governor takes over by starting to close the governor valve.  It is not really practical to do anything else with the mechanical linkage.  However, with a digital governor, the logic can be altered depending on whether the engine is running or not, so I have made the logic set the valve at minimum running position if the engine is stationary, and then opens up slowly to increase the engine speed to the set speed once it detects that the engine is running. 

Enough introduction, and a post that is long enough already, so next time, let’s make a start on the actual design.

Thanks to everyone who has hung in there to get this far,

MJM460
Title: Re: A digital governor for model engines
Post by: Admiral_dk on May 01, 2020, 11:29:36 AM
Quote
(I believe this anomaly has since been eliminated and a good triple redundant electronic is acceptable these days.)

I should certainly think so .... If not, you would not have all the airplanes from the last 30-40 years or modern cars and motorcycles that are "Fly-by-Wire" (the Wire being electric) ....

Your latest project should give the bit between the ears some challenge - unless you made a number off those before.

Per
Title: Re: A digital governor for model engines
Post by: MJM460 on May 01, 2020, 01:25:40 PM
Hi Admiral, thanks for looking in.  In that comment, I was referring specifically to an over speed trip, separate from the speed control, which has obviously been in widespread use for quite a long time.  Couplings can break (though a very rare event) when they are used at maximum power 24/7/365, and a turbine rated at several MW, suddenly relieved of its load, accelerates to destruction very quickly.  The machines I am familiar with, have a separate over speed trip which is supposed to operate to protect the machine in that admittedly rare event as an exploded rotor is not a pretty sight.

It is also written in the context of my experience in the oil industry, which is very conservative on those things, and most of the standards require everything to be well proven in operation before anything new is accepted.  Electronic governors were acceptable, but more common was a Woodward fly weight governor with hydraulic actuators for the steam valve.  The set point for these governors was normally managed by electronic instruments.  But there was a requirement for a totally independent mechanical over speed trip device as a last resort protection.  Independent triple redundant over speed devices, they even had separate toothed wheels, were available and much more reliable than the mechanical trip, and they were installed.  But the industry was reluctant to say that separate mechanical device could be left off, so a steam turbine often had a governor, triple redundant electronic over speed trip and deep in the shaft, a mechanical trip bolt.  Basically all intended to reduce the probability of requiring a shutdown for maintenance before the intended period, often three years or more, but they don’t have to be light enough to fly.

The aircraft industry has very different requirements but at the end of the day, I am sure that they are well focussed on avoiding a plane falling out of the sky.  But I believe they do push things to the limit so they can fly at all, and then to maximise the payload of passengers and freight.  Then they use very intensive maintenance to avoid premature breakdowns.  I am not familiar with the details of their specifications, but I suspect that they don’t normally shut down the engine suddenly without warning, to prevent an engine failure, mid ocean, especially on a single engine aircraft.

I hope that gives my comment a clearer context.  Perhaps I should have avoided the diversion and just talked about the governor.

By the way, I notice there is a word or two missing from the section you quoted, I will edit that after I post this reply.

Yes there will be quite a lot of head scratching before this post is complete.  I have not done it before, definitely a “proof of concept” project.  More on that as we go.

Thank you for commenting.

MJM460
Title: Re: A digital governor for model engines
Post by: Don1966 on May 01, 2020, 07:04:35 PM
I worked in the oil field for 55 years As a Tech and Marine Electrician and quit familiar with electronic speed control. I have thought of electronic governors for our engines also and glad to see your taken the initiative to start a thread on it. You have covered a lot of requirements needed. The loop also needs stability control, time control, droop control and speed control. by speed control meaning over speed shutdown or missing pulse ( loss of mag pickup) shutdown.  It being inverse or direct proportional control. It needs an ability to know when your ready to start the engine to produce an Adjustable output for starting and Time ramp to final speed without overspeed.
One of the main issues is to have the output power to drive the device that will control the engine speed with. It will need to be a proportional valve that throttles to outPut signal by PWM or Proportional current control.
My two cents worth. Looking forward to more information as you progress.

Regards Don
Title: Re: A digital governor for model engines
Post by: MJM460 on May 02, 2020, 12:57:01 AM
Hi Don, thank you for looking in.  It will be great to have your experienced eye looking over my shoulder as I progress on this one, and it will be most interesting to see how much I can achieve.  That is a great check list of desirable functions to try and include, thank you.

My plan is to start with the most basic functions of a flyweight governor, which is only proportional control, and has none of the extra fault protections, and add features one by one until the little chip can no longer manage it.   And there are more powerful chips in the range if the little one runs out of grunt.  I don’t really know where the limit will be.

My plan is to use a standard radio control servo operating a butterfly type throttle valve in the steam line.  Amazingly, these servos have standardised the wiring and control protocol across the industry, so apart from some using a different connector on the end of the input wire they are basically interchangeable, and the Picaxe has no problem driving them cleanly with a very simple to use command.  There is a very wide range available, ranging from ultra miniature used for rudders on small flying models to quite powerful ones used in robotics.  I am expecting that my throttle valve will seal well while only requiring a servo at the smaller end.

Here’s hoping for big things ahead.

MJM460


Title: Re: A digital governor for model engines
Post by: steam guy willy on May 02, 2020, 03:07:27 AM
Hi MJM. an interesting concept and project...When I was in the Army as a control equipment technician working on the Tanks gyro controlled gun stability system they had a negative  feedback speed control Cct coupled to the rotating azimuth and elevation motors. these were small DC generators...and...one of the favourite tricks of the tutors were to connect the wires in reverse !!! this had the effect of the turret revolving at an alarming rate when the grip switch was operated  !!! really scary .. Also on the Beeleigh Mill engine the governor had a separate handle that disengaged it from the butterfly valve main cock...On one of my engines I attached a magnet to the flywheel and this triggered a bicycle speedometer to give an indication of speed !!>Willy
Title: Re: A digital governor for model engines
Post by: crueby on May 02, 2020, 03:53:51 AM
Very interesting project MJM, going to be following along. There are some of the guys in the rc sub community doing contrllers for pitch and depth control with very small processors.


And Willy, that picture of the handwheel includes some official bailing wire, looks like!
Title: Re: A digital governor for model engines
Post by: Roger B on May 02, 2020, 08:09:46 AM
I will be following this with interest  :ThumbsUp:  :wine1:  I started some experiments to design the governor for future engine builds here:

http://www.modelenginemaker.com/index.php/topic,8690.msg192197.html#msg192197

http://www.modelenginemaker.com/index.php/topic,5545.msg162158.html#msg162158

This is a completely enclosed design which worked reasonably in the trials but I have some other problems with the engine design to resolve before I can go any further.

When I started my petrol injection trials Chuck Fellows was interested in using an Arduino to control the relationship between the throttle opening and injection pump stroke.


Title: Re: A digital governor for model engines
Post by: gary.a.ayres on May 02, 2020, 12:28:15 PM
Electronics is a dark art as far as I'm concerned, and here I feel like a Barbarian standing before the gates of Rome!

I have no doubt that it's at least as unforgiving as mechanical engineering is (and maybe more so) if you don't get it right.

Fascinating project, though, which I'm sure will be very rewarding as it progresses.

Very interesting exposition on the development of governors too.

gary
Title: Re: A digital governor for model engines
Post by: MJM460 on May 02, 2020, 01:25:16 PM
Hi Willy, magnets and a Hall effect sensor like some forum members use for electronic ignition systems can also be used for speed measurement with these processors, and you can program the internal maths to read out rpm directly.

Disconnecting the governor is I guess an early approach to bringing the engine up to speed slowly as the governor starts calling for the valve full open.  They have a tendency to not close quickly enough to a more reasonable opening as the speed gets near running speed, so over speed is a real possibility.

Hi Chris, the possibilities for these processors are indeed limitless, it’s all about selecting the sensors, and there are so many available.  Accelerometers, gyros and gps are all available in miniature and at quite reasonable cost.  Once you can drive a servo, the processor can control an amazing range of things.  Arduino uses a very similar processor, but a different system for programming and controlling the chip.  It is also quite suitable for this type of project.

Hi Roger, thanks for reminding me of those threads.  I was obviously following them at the time but they escaped my mind when I was looking for them.  Certainly a great idea for a neat totally enclosed governor.  I will definitely keep an eye out for your further experiments with those.

Hi Gary, I must admit that I also like the mechanical aspects as it is usually so easy to see what is going on, and intuitively predict how they might respond.  It is not the same with electronics, especially with integrated circuits used in these microprocessors.  If the circuit does not do what you expect, it is quite difficult to see what is going on.  But you are not alone in finding electronics a bit of a black art and I will be trying not to leave anyone behind while still keeping it interesting for the experts among us.  Don’t hesitate to ask a question if something seems to obscure.

It is great to have you all on board.  Thank you so much for responding.  You are inspiring me to push on and stay the course.  I hope we can all enjoy the ride.

MJM460

Title: Re: A digital governor for model engines
Post by: deltatango on May 02, 2020, 01:31:18 PM
Hi MJM,

This is a great project, thanks for sharing it and taking us along for the ride.

I've built a couple of things using the Arduino and you've just given me the idea for another!

David
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 02, 2020, 02:34:06 PM
Hi MJM, with the cycle speedo you can type in the speed by using the diameter of the wheel to show MPH. and possibly change that to read RPM  I shall fiddle about with it to see if that works !! Thanks for the explanation of the governor handle....  good to see the interest here... :popcorn: :popcorn:

willy
Title: Re: A digital governor for model engines
Post by: MJM460 on May 03, 2020, 04:57:33 AM
Thanks Willy and Delta Tango.  Your interest is always very encouraging.

David, I don’t see why it can’t be done with an Arduino, especially if you are more familiar with that system.  It may even be easier to manage the calculations.  I will be delighted if this thread inspires you to give it a go.  Preferably after you finish that engine, we are all anxious to see that proceeding, and don’t want to interrupt your progress.

MJM460
Title: Re: A digital governor for model engines
Post by: MJM460 on May 03, 2020, 05:01:28 AM
More Detailed Design Thoughts

The simple schematic in the previous post showed the essential elements of an engine control loop with feed back.

Of course, once this much is working, I have a few ideas to make even better use of the processing capability of these tiny chips.  But l had better start simple.

We know that a digital governor has to have a speed pickup, a calculation of an appropriate output response and a control valve to change the speed, all connected to give the appropriate negative feedback.  It also needs a means to adjust a set point speed for the governor to control to.

With a flyweight governor, the speed set point is adjusted by the initial compression of a spring which resists the throttle movement as the force from the fly weights increases.  For an electronic governor, I can emulate that spring with an analogue input to the processor, using a potentiometer, and scaling that input to adjust the set point speed.  The controller includes an easy to use analogue to digital converter on an input pin, which is connected to the slider terminal on a simple potentiometer.

The speed pickup is achieved by a toothed wheel that interrupts a light beam, which is detected by a photo transistor.  The necessary LED and photo transistor come prepackaged in a quite cheap package ready to connect up with just 3 wires.  You can see it in the attached photo, along with my “toothed” wheel.  (Oops, I forgot to include a miniature penny!). That had to be made before any electronics could do much.  (I will include more detail on how I made it next time, but the post was getting too long and I wanted to include a picture.)

Now the mention of microprocessors might cause visions of complex programming languages and equipment, and you might feel it it not for you.  But a company in the UK has developed a solution for educational purposes in schools.  They load a programme on to a quite powerful standard chip as firmware, and provide for free download of a very user friendly programme editor.  The chip then requires a simple network of a few resistors on the circuit and a special cord which plugs into a USB port on your computer, and you load your programme with the chip still in place in your circuit.  No relationship to the company, but I have found it really great, and even used it to start my young grandson on electronics projects.  Look up Picaxe on your usual search engine.  It is being overtaken by Arduino, but I find it easier to understand and well worth looking at for a tentative toe in the water.  I am using an 08M2 which is an 8 pin chip.  You can see it in the second attachment of my first post, which shows the completed controller board.  The connections and plugs include the programming jack, but I saved some space by using flying leads for some connections.  I am sure this would be frowned on by many, but it will serve for a proof of concept.  Delta Tango has mentioned that he might try something with Arduino, a different system, but I am sure equally suitable.  There are pluses and minuses to both.  Others with the necessary knowledge might go for using the manufacturers base chip, and program in machine language or their preferred higher level language.

Finally, the output actuator can be a simple radio control servo.  The microprocessor can output the appropriate signal to control servo position.  The servos are quite cheap these days, and are used by hobbyists in robotics as well as radio control.  They are available with more than adequate output torque to control a throttle valve in the steam line.  I do have to make a throttle valve for the servo to operate, another item I have not previously tried.

So there we have the background to this build.  It is not all electronics, in the next few posts I will outline the design and making of the mechanical parts which are vital to the governor function.  I hope you find it interesting. 

Next time, some swarf as I make that wheel, shown finished below, the governor valve, and while I am at it, I really need a stop valve on the boiler, so I will make it as well, and only modify the piping once.

Thank you to everyone looking in and especially to those who have commented.

MJM460
Title: Re: A digital governor for model engines
Post by: CHP on May 03, 2020, 02:04:02 PM
nice project you have their. I personally don't think you need a microcontroller
to do that. I think that using two optocoupler (are what ever) as in put to a comparator circuit.
Any change in gain would lower the voltage to your coil and disable it till the output
match the input. The potentiometer that control your gain could also be used to control
engine RPM. 
My 2 cents lolll
Title: Re: A digital governor for model engines
Post by: Rustkolector on May 03, 2020, 04:09:40 PM
Some time ago I had a speed control problem with an engine I built. I finally solved the problem, but it prompted me to look into a small digital governor. I never followed through on a working governor, but I found some small governors used on gas powered RC helicopters. These governors sensed rotor speed and throttled the engine accordingly. They were needed during quick flight maneuvers which puts heavy loads on the rotor and engine. They used standard RC actuators for throttle. Typically, they were used on string trimmer size engines. As I remember, the Futaba GV-1 governor was one system that I was looking at and I was pretty sure it would work. They have many programmable features along with RC control. These little governors might be a good starting point as they are very small and use off the shelf components.
Jeff 
Title: Re: A digital governor for model engines
Post by: jadge on May 03, 2020, 04:12:30 PM
My 4" scale traction engine has a Pickering governor. As "designed" it would never work. So I've been investigating the maths behind governors and re-designing mine with the intention of making it work. Here are a few comments and notes. While they specifically relate to a Pickering governor many of the ideas are similar for other types of centrifugal governor.

Governors in the first half of the 19th century were hit and miss. Some designs didn't work and others had poor speed control. There was no mathematical basis for the design of governors so it was basically trial and error, and learning from what worked. The first proper analysis of governors was by Maxwell in an 1868 paper presented to the Royal Society. He showed that simple governors could be described by a 2nd order differential equation, the solution of which is complex conjugate poles. The poles exist on the s-plane where the x-axis is real and the y-axis imaginary. The two poles must either be co-incident and on the real axis, or complex conjugates, ie, x+jy and x-jy. We can state a number of important constraints on the positions of the poles. For stability they must be in the left hand half of the plane, ie, x is negative. The nearer to the y axis the poles are will determine how sensitive the governor is, ie, how much the measuring device needs to move for full movement of the control valve. How far apart the poles are on the y axis will control the frequency response of the governor. The response of the governor must be slower than that of the engine, or the governor will oscillate, or hunt. In switchmode power supplies a good rule of thumb is that the control loop should at least 10 times slower that the switching frequency. I expect something of the same would apply here.

As an aside I'm not sure how one would introduce zeros into the response of a mechanical governor. Some sort of mechanical resonator may be?

I suspect that controlling the position of the poles by purely mechanical means is not straightforward. I also suspect that not much of what was discussed at the Royal Society made it into the drawing offices of engine manufacturers; at least not without a considerable time lag. However it can be shown that for stability the controlling force must, at some point, be greater than the centrifugal force. In other words as the balls move outwards the force that counteracts this, springs in the case of the Pickering governor, must create a force that increases more quickly than the centrifugal force. Otherwise the balls will keep moving outwards until they hit a stop.

The theoretical ideal for a governor is isosyncronism. I think this means that the poles are on the y axis and hence that the gain is infinite. Practically this means that the control valve will go to one extreme or the other as soon as there is small change in speed. An analogy is the output of an opamp with no feedback loop. Practically the concept is not of much use.

The OP is correct to remember the force of the governor, ie, the force produced to move the control valve. The force times the distance the control valve moves is the power of the governor. The forces generated are nowhere near enough to move a control valve against steam pressure. So, for traction engines at least, the control valve needs to be balanced. That way the force produced by the governor only needs to overcome any friction in the system irrespective of steam pressure.

Governors that are mechanically connected to the control valve have some fundamental limitations. First, and most important, is that they connot control speed exactly, they can only control within a small range. The practical result is that an increase in load causes a small, but finite, drop in speed which stays constant until the load changes. More complex governors control the valve gear, specifically the cut off, to provide much better speed control.

The problem with scale centrifugal governors is that the maths works against one. The basic equation for the force on the balls is:

force = mass x radius x angular velocity squared

In 4" scale (one third) it looks like this:

mass - 1/27

radius - 1/3

angular velocity - same for the same speed

That's a total reduction of 81 times. There's not much one can do about the radius so that leaves mass and angular velocity to play with. Angular velocity is the simplest. Model engines tend to run faster than full size and one can also tweak pulley sizes. If we assume the model engine runs at 2 times fullsize and we tweak the pulleys to get the governor running 20% faster we have an increase in angular velocity of 2.4, or 5.76 when squared. Mass is simple, increase the mass of the balls. I've done this in two ways. One increase the diameter of the balls by 20% over scale which gives an increase in mass of 1.728. Two use a heavy material; I went for tungsten alloy which is about 2.3 times heavier than iron. Multiplying it all up I reckon the force on my balls will be around 1/20 of fullsize. That should be manageable. But there's one other problem associated with direct connection from the governor to control valve. The acutating rod needs to pass through a gland than can withstand full steam pressure. Packing a gland will cause friction, the effect of which is to create a deadband in the response, and as a consequence possibly hunting. I plan on using a PTFE gland.

This is progress so far with my governor. The prototype ball is made from tungsten alloy, not nice to drill and tap, but a darn sight better than pure tungsten which is very brittle:

(https://listerengine.com/coppermine/albums/userpics/10022/normal_Governor_1.JPG)

My design of balanced valve is in the front, prototyped in aluminium. The body was all manual machining while the valve was a mix of manual and CNC.

One other small point is that the worm drive on the Pickering governor is not intended for use as a speed adjuster. It will work over a small range. But large adjustments will cause the forces to open and close the valve to be unequal. Which will play havoc with the stability of the governor. It is interesting to note that most of the later patents by the Pickering company relate to speed control methods, all of which are intended to move the set point of the operating rod while not affecting the operation of the governor.

I'm not clear if the intention of the OP is to simply reproduce the action of a centrifugal governor with its faults in electronics or whether the idea is to replace the governor with an electronic control system. If the later then I assume that a simple PID control loop would be fine.

Andrew
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on May 03, 2020, 10:07:20 PM
Nothing intelligent to say here except 'wow!'.

The breadth of your knowledge - from thermodynamics, through mechanical engineering to electronics - is formidable.

Will keep following along, and admit to looking forward to the metalwork to follow, especially if pics are part of the package.   :)

gary
Title: Re: A digital governor for model engines
Post by: Don1966 on May 03, 2020, 11:19:39 PM
Glad to see your keeping the language simple for people to follow along without to much confusion. One suggestion on feedback you may want as many pulses per RPM as you can get from your Circuit for stability reasons without going over the chips limitations. I know your doing trail runs here just a suggestion. Still following your progress.



Regards Don
Title: Re: A digital governor for model engines
Post by: MJM460 on May 04, 2020, 04:59:58 AM
Thank you all for joining in with such encouraging and constructive comments.  I want to acknowledge each one, as well as further the conversation around this project so here goes-

Hi CHP, Opto couplers and comparators could certainly be used to achieve a similar result, and would have some of the advantages of analogue systems over digital systems.  A half way solution between discrete components that have to be modified to make significant changes, and a microprocessor solution where most issues are implemented by programming. 

In the early days of microprocessors, when machine language and special devices to load up programs were all formidable barriers to hobbyists who wanted to live a life as well, I would have gone that way - integrated circuits to reduce the component count, but avoiding the complexities of the next step.  For me anyway, the number of mistakes made is exponentially proportional to component count, while reliability is the inverse!  I am all in favour of reducing the component count.

A little foray into machine language dissuaded me from exploring microprocessors when the early ones became available, a long time ago now.  But with Arduino, for which there seems to be libraries available for just about everything, and Picaxe, which allows in circuit programming in a simple version of the “Basic” language, I believe the situation is reversed.  The speed of modern processors is even adequate to largely offset the limitations of sequential calculations in comparison with the analogue mode of opamps and so on.  So that is the background to my selection of a microprocessor solution.  As always, engineering problems have multiple possible solutions, each with plusses and minuses, and often equally good.

Hi Rustkolector, I must admit to not thinking of governors for RC helicopters.  Of course they must have them, in addition to the gyro controls and so on that make them even possible to fly.  But I was also looking for something I could develop myself, rather than an off the shelf commercial solution.  After all, my engines run perfectly well without a governor of any kind.  But for higher speed engines or more critical applications, that would be a great way to go.

Hi jadge, your response totally blew me away.  I can remember enough of those terms from the dim distant past to basically keep with you, but I certainly could not have done your analysis, despite what my lecturers might think they taught me.  It’s good to have a challenge for the more experienced forum members as well as introducing more theory to those who have not met these things before.

I had not thought beyond the scale limitations and friction which you have described so well, but you have reminded me that amplification is different from power, and even with similar range of force and movement, the actual valve characteristic, in addition to needing force balance, also affects amplification by the form of its opening characteristics.  You have made it make sense.

That isosyncronous mode you mention is employed in the electronic speed control used in many RC applications, where the power is switched on and off so rapidly as to be indistinguishable, and the motor speed ultimately controlled by the ratio of on time to off time.  At the other end of the speed scale, electric ovens which use on/off  control for temperature, using a switching frequency that makes temperature variation imperceptible.  But inertia considerations  might get in the way of implementing this in a purely mechanical systems, not to mention the limits in range of a mechanical systems that you mention, before we even consider resonance of the inherent spring- mass systems in the design.

I don’t know much about switching power supplies, but again, now you point it out, they must have negative feedback to control the output voltage through varying loads.  And negative feedback is employed to ensure the stability of audio amplifiers, and we all know what happens when a PA system goes unstable due to positive feedback.

To make clear my original intent, it is not so much to emulate the mechanical governor with all its faults, but to see if it is possible to develop, at a practical level for model engines, a simple version of the modern digital governors used in industry, which could overcome many of those deficiencies.  Yes, a PID algorithm is what is required, though the the D will not be required.  The D makes systems wild, especially if there is a large scale industrial plant at the other end.  Had I chosen to work with Arduino, I believe there are libraries for a PID algorithm, though most users could leave out the D.

For those not familiar with PID, P is Proportional, like our simple flyweight governors.  A correction is applied which is proportional to the size of the error it always leaves a residual error.  I is Integral, which takes into account how long an error has been present and increases the feedback accordingly to reduce that residual error that is always left by a simple proportional system.  The wild one is D for derivative, which takes into account how fast the error is changing, necessary for very fast responding systems.  This allows the controller to start reducing the correction as the measured quantity approaches the set point, thus limiting overshoot. 

The three terms come from the mathematical processes used in the algorithm to implement them.  Tuning the system involves adjusting the strength of each effect for best response and stability, and is highly individual to the particular system being controlled.

Hi Gary, it is always important to remember the old saying about “Jack of all trades being master of none”.  Definitely applies in my case.  But I was fortunate in the range of opportunities presented to me in the course of my career.

Hi Don, I am trying very hard to make the more theoretical concepts accessible to all, and I appreciate your recognising and acknowledging that.  It is encouraging to have your support.

I am totally with you on the tension between the requirements of stability and the chip limitations.  I decided that I needed to start somewhere and see how it goes, if indeed there is a solution.  Then see if I can fine tune it from there.

Thank you again to everyone looking in.  This is turning into a very interesting discussion.

MJM460


Title: Re: A digital governor for model engines
Post by: MJM460 on May 04, 2020, 01:30:40 PM
The first mechanical part to design was the toothed wheel.  It is necessary to know just what it will be like so that the appropriate maths can be included in the program.

 The processor basic language provides two options which can be used to determine speed from a stream of pulses.  One option, the COUNT command, counts the number of pulses in a short time interval and from the result, the engine speed is easily calculated.   Pulses only have to be a few microseconds long to be counted, so probably thirty six slots could be made in a reasonable size wheel.  The little processor I am using can count 25000 pulses per second, so the limitation is really my ability to machine the number of slots in a reasonable diameter wheel, and still have them wide enough to properly interrupt the light beam.

To give an idea of what 25000 pulses per second means in practical terms, it can actually count how many times a simple mechanical light switch makes and breaks the circuit before properly switching on.  Experimenting with this I seem to remember that I have seen at least 7 on a simple toggle switch with an over centre spring!  It blew my mind in both that they could be counted, and also just how many it was.

Updating each revolution is probably adequate, though for a faster revving engine it may be limited by the processor speed.  If the number of pulses is too low, it is easily fixed by adding slots or holes around the wheel, say 8 or 16 or even more.   Two hundred pulses from a reasonable size wheel would really test my machining ability, but would be necessary to measure speed within one percent within one revolution. 

The processor language also has a command which measure the length of a single pulse, so allows much more frequent updates for more precise control of a machine.  The little microprocessors measure time in microseconds, and count in 10 microsecond units, from one to a maximum of 6500 units each measurement cycle.  This is a really good method for a high speed machine, but  also quite accurate up to 0.65 seconds pulse length, and again, more slots in the wheel extend the useful range to very slow speed machines.  So if I make 4 pulses per rev, that should work for down to 50 rpm, and eight or more pulses per rev would easily extend this down to about 12 rpm.  At least it would work for speed measurement, but the time taken would severely compromise a control loop stability at that pulse length.  Four pulses per revolution will have four gaps, thus potentially allowing enough time for calculations between pulses.  I decided to make the  pulses and gaps equal, so each pulse is 1/8 of a revolution for use in the rpm calculation.

Any pulse longer than 200 microseconds, or 0.2 milliseconds should give that 1% accuracy.  It might be necessary to do some trial and error for very high speed engines. However, for my slow speed steam engines, if the processor can complete the calculation loop in the dark period between consecutive pulses, it means I can take four pulses within easy revolution and average them for a time per pulse, very necessary for a reciprocating engine for which the speed fluctuates within each revolution. 

The same microprocessor has the necessary calculation capability, though it is limited to 8 bit integer maths with no negative values allowed, so requires a few mathematical tricks to prevent unexpected results.  And at around $4 per microchip, even if separate chips were required for different parts of the controller, it is not looking like an expensive project.

It is important to know what proportion of the revolution is taken by each pulse, as that is critical to knowing what speed the engine is going.  I carefully laid out four equal blades on a piece of brass sheet, drilled a hole at the centre to fit the locating peg on my rotary table, and centred the table under the quill using dial gauges to get it as near as I could.  A task that is not hard in principle, but it will take a lot more practice for me to get quick and really accurate.

Of course, having more shop time available these days I spent a bit more time on getting it right, and in the process discovered why I have always had so much difficulty.   I did not have a really suitable combination of holders for the dial gauge, so there was the inevitable interruption to “make the tool to set up to do the job”.  But in the end, it was centred to my satisfaction, and my equipment for centring the rotary table is a bit more complete for next time.  I off set the table by half the tool diameter, and cut one side of the slots each at 90 degrees as near as I could get it with the vernier scale marks of the rotary table.  Then I offset the tool to half the diameter the other side to cut the other side of the slots.   I don’t have digital readout on the mill table, (only for the quill) so I set up a long travel dial gauge (30 mm) to help with these movements.  I was finally able to set the tool to cut at the required diameter and go around the edge to release the wheel from the sheet.  You can see that I left four small bridges to ensure the wheel did not grab as it came loose.

As a little aside comment, as if we need more of those, this was my first “solar powered” cutting.  We recently installed solar panels on the roof, and first draw on the generated power goes to what you are using in the home.  Of course, it is arguable whether it is really solar powered.  On a state grid, if I use the power, it does not feed into the grid, so other people’s usage that might have been supplied by my roof top will be supplied eventually by a power station somewhere.  But it feels good to have made a tiny contribution.

While I was at it, I made a lever to operate the governor valve, and two hubs so they could all be silver soldered at one go.

That was enough for another day.  Thank you to everyone following along

MJM460
Title: Re: A digital governor for model engines
Post by: jadge on May 05, 2020, 12:52:23 PM
It's interesting to note that while negative feedback has been in use for centuries the use of the word 'feedback' only became popular in the 1920s. And it referred to positive feedback. Primarily for regenerative radio receivers where positive feedback was used in the detector to increase sensitivity while keeping just below the point where oscillations would occur. A formal description of negative feedback was created by Black in 1927/8. This introduced the (then) odd idea that deliberately decreasing the gain of an amplifier could result in better stability and much wider bandwidth. The concept was then refined by Nyquist and Bode. Of  course Nyquist is of sampling theory fame, and that's a subject that separates the men from the boys on most hobbyist forums.  ;D

I'd agree that the D part of the controller is not needed. We're not really looking for speed of response and D terms can all too easily lead to instability in the control loop.

I'm not sure how isosynchronism relates to motor control in the RC world; I'll have to think about that. I guess it depends upon the type of motor. For brushed DC motors the speed is essentially controlled by the applied voltage. A PWM waveform is a simple way of varying the average voltage without having to use an inefficient analogue supply. Brushless DC motors are different. The speed is determined by the frequency of applied waveforms of multiple phases. Unlike an induction motor the brushless DC motor is synchronous, so the speed, in theory, is not load dependent. The use of PWM to adjust voltage is similar to a simple DC-DC buck converter which outputs a voltage lower than the input voltage. In the good old, bad old, days DC-DC converters used a simple voltage feedback loop to determine output voltage. Way back in the 1980s I designed a couple of discrete buck converters using opamps and discrete transistors. With the advent of mobile 'phones and handheld devices there has been an explosion of ICs that do DC-DC conversion. And in the last few years they've evolved to actually do what it says on the tin, which wasn't always the case in the past. Modern converters use more than one control loop. There is usually a cycle by cycle current control loop, and outside that a slower loop that controls the output voltage. Outside that there may even be a third loop that controls the switching in bursts at very low output currents.

Are you using the PICAxe processor shown in the picture? If so it's the wrong processor! Limiting yourself to simple integer arithmetic is making life many orders of magnitude more complicated than it need be. Professionally I've been using processors from ST with an ARM Cortex M4 core for many years. They come with onboard hardware floating point and all the peripherals you'll need such as timer counters, ADCs, DACs and comm ports. They're cheap, a couple of dollars, and the dev kits are cheap as well. More importantly they also have a comprehensive, and fast, intertupt structure. That's really how the control system should be implemented. There'll be an internal 'tick', say every 10ms and on each tick the processor reads input data, does the calculations and outputs the results. Note that the peripherals can run autonomously, so the processor isn't twiddling its thumbs while waiting for a result from the timer. Once set up the timer just runs on it's own. Last year I designed a small board around one of these processors for an NDIR (*) sensor. I think the tick was running at 10ms and on each interval the processor calculates two single point FFTs (!) and a two variable Kalman filter (&). A good basis for real time control is to take as much data in as possible during any given time. You can always filter and sort the data later, but you can't create data. It's not a good idea to rely on one data point per cycle. To that end I'd use as many pulses per rev as possible. May be a cheap 256 pulse encoder?

I've used a lot of PIC processors in the past, but not now after unreliable operation and poor programming software and hardware. When PIC processors originally came out they were a revalation, all you needed on a single, small, chip. But they've now been overtaken by other processor families. However, I still use Microchip for analogue ICs, they've got a good, and cheap, range that can be useful in niche areas.

Hmmm, looks like the bulls are sitting so I'd better go and have lunch and then get out into the garden.

Andrew

(*) NDIR = non-dispersive infrared, used to detect CO2

(!) FFT = fast fourier transform, is an algorithm to calculate the Discrete Fourier Transform with a reduced number of multiply-accumulates. The FFT is an algorithm not a theorum in its own right - a fact which lead to a heated exchange on another forum, and caused me to stop posting about signal processing on said forum

(&) Kalman filter - is essentially a low pass filter but can also calculate estimators based on previous data values to enable the output to settle faster than a simple lowpass filter
Title: Re: A digital governor for model engines
Post by: MJM460 on May 05, 2020, 02:05:51 PM
Hi jadge, thank you for commenting.  You have added a lot of information which shows just how far things can go once you add microprocessors to the tool box.  It makes my attempt look very much a hobby effort.

I certainly agree that you would not use Picaxe for commercial applications requiring high reliability and that other more powerful microprocessors are available that have much more user friendly and powerful maths capability, but Picaxe as I understand it, was introduced for educational purposes to introduce young kids to electronics.  As such it is very accessible easy to use and plenty of excellent support.  It suited me with my limited experience in that area, and I was interested in the challenge of achieving a working digital governor appropriate to outer hobby.   Also I already have a useful knowledge of the basic programming language they use.  I have never learned any of the more advanced programming languages.  Fortran was the go to when I was studying, and it was not included in my course.  Punched cards sent to a bureau were the method of employing computers when I was studying.  I had been working for over thirty years before I had a computer on my desk.  In fact nearly ten before I had a calculator.  I suspect I am not the only one.

So please keep challenging me, but perhaps try to keep the language simple, as I am only a mechanical engineer.

By the way, I visualise the ESC for brushed motors as voltage on/off like your isynchronous description, with inductance and capacitance smoothing and averaging the current the motor sees, in the same way that inertia smoothes an impulsive input to a mechanical system.  Very different to brushless which I see as more like ac motors.  But again, interested in your thoughts.

MJM460



Title: Re: A digital governor for model engines
Post by: MJM460 on May 05, 2020, 02:11:17 PM
Continuing on the governor components -

If you have not played around much with electronics, you might wonder how that simple looking wheel can provide an electrical input to a microprocessor.

Basically the idea is to set up a light beam and a light detector, and install it so the blades of the wheel interrupt the light beam.  This method of detecting the shaft speed has the advantage that it does not impose any load on the wheel, which makes it suitable for application on the very lowest power engines.

The attached sketch shows the light source and light beam detector in schematic form.  The LED is  typical of those used everywhere, the voltage drop across it when current flows is roughly independent of the current and about 1.2 volts, so the resistor is required to limit the current.  The data sheet from the manufacturer implies normal operation of the diode at 20 mA, but I went a bit conservative and decided on 10 mA.  This determined the value of the 390 ohm series resistor.

The second attachment shows the little plastic package mounted on the engine platform with the wheel nearby.  The three wires go through the board to the back of the device.  The green plug on the end of the wires will plug onto the circuit board which holds the microprocessor chip.  I showed this earlier, but included it again so you don’t have to read back.

The transistor operates as a very high speed semiconductor switch.  Instead of the more common base current, instead the base area is light sensitive, so the transistor switches to the conducting mode when there is light on base and effectively switches off when the light is interrupted.  The switching time is about 20 microsecond, which is about 2 of the smallest counting unit of the processor pulse detecting command.  Depending on whether there is a similar time for the switch on and switch off, this might not have a big effect.  Or it might slightly affect the calibration of the speed indication.  I will have to watch that when I have something running.

When the light is blocked, the transistor current is about 100 nA, about 0.1 mA.  This means effectively zero voltage drop across that 10 k resistor, to the voltage at the processor input terminal is about 5 V.  This is interpreted as high.  When the light shines on the photo transistor base area. The transistor conducts with about 0.4 Volts, again, like the LED, the device does not follow ohms law.  This means the 10k resistor sees about 4.6 volts across it, and hence the current is about 0.5 mA.  And of course the processor input terminal sees that 0.4 volts, which it interprets as low.

The processor command allows me to select whether to start timing of a voltage rise, when the light comes on, or on the falling voltage, thus measuring the dark period.  I chose the light period.  So timing starts on the rising voltage and end when the light is again blocked.

I hope that all makes sense to those not familiar with this stuff.

I feel the next thing to do is to make the other mechanical component of the governor, the governor   valve. 

Thank you all for watching,

MJM460


Title: Re: A digital governor for model engines
Post by: Brian Rupnow on May 05, 2020, 02:23:08 PM
On a regular old hit and miss engine, when it was in "miss" cycle the governor mechanism held the exhaust valve open. That way the engine could build no compression until the engine and governor slowed down until the exhaust valve would close again and the engine would "hit".  The key word in all that is that the engine would "coast because there was no compression". what you are proposing only shuts off the ignition. It does not hold  valve open so the engine can rotate freely with no compression. To accomplish what you want to do, the exhaust valve must be held open after your electronics engage the governor.
Title: Re: A digital governor for model engines
Post by: Admiral_dk on May 05, 2020, 09:12:46 PM
Brian there's more than one way to skin that proverbial cat too and I think that MJM had a throttle in mind - but if you insist on doing it with the ignition -> you retard the timing so the fuel still burns but reduce the power produced to the point of only overcoming the friction.

MJM - a very simple pulse generator that do not care about light, fuel, heat etc. is a reluctor. It is basically a coil wound around a normal core that is permanently magnetized and a gear wheel. This how almost all motorcycles and most cars get the Crank position and RPM. On my DL650 it's done with a 24 tooth gear wheel on the crank, where two neighbor teeth are "missing" -> this gives 22 pulses and a pause, 22 pulses and a pause -> a very easy readable signal for the MCU. The pause is the position info and the pulses are the RPM info. Increase the teeth number on the wheel and you increase the accuracy ...

It will admittedly require an OpAmp or another simple analog circuit between the coil and the MCU, to ensure digital signal levels / protection of the MCU as the signal voltage increases with RPM.

Best wishes

Per

ps    Airplanes require Tripple redundancy on the Fly-by-Wire Flight Control systems -> All 3 systems MUST be done with different MCU/CPU's (brand & models etc.) to ensure that they will not all fail from the same reasons and each of them control their own actuators that are mecanically combined - as far as I remember.
Title: Re: A digital governor for model engines
Post by: MJM460 on May 06, 2020, 12:50:57 AM
Hi Brian, glad to have you looking in.  I must admit that I am concentrating specifically on making a working governor for my little steam engines where the small mass of flyweights make overcoming friction inherent in sealing the stem of the throttle valve very difficult on such a small scale.  I have had a few thoughts on its application to hit and miss engines, where it seems that most people manage to get the mechanical type working quite well, though with a bit of patient fiddling.  Perhaps I just don’t know how many people are not so successful.  A small hit and miss engine might also have the issue with the small dimensions of the weights, but I suspect the nature of that valve “blocking” mechanism is intermittent in nature, and there are moments where the components are unloaded, so friction is reduced and the governor force is sufficient. 

However, If I wanted to apply my governor to a hit and miss engine, I would not use it to cut off the ignition for the reasons you mention, but use a servo on the output to move the trip mechanism, so the effect on the engine is the same as the mechanical governor.  This might get a more consistent operation than a purely mechanical system.  The processor program would need to be modified to have a dead band, to allow the speed variation inherent in coasting.  But that is maths and keystrokes, and would not require hardware changes to implement once the basic electronic parts are assembled.  Could be a whole new area for development.

Hi Admiral, you are quite right, there are many different ways of picking up a suitable speed signal.  I chose one that was simple and easy to implement with my skills (or lack thereof).  And similarly, the light beam might be suitable for ignition timing for transistorised ignition on an IC engine, instead of a Hall effect sensor which requires a magnet attached somewhere on the moving parts.  As you say, I am concentrating on governing my steam engine via the throttle valve.  And I was conscious of wanting to avoid any load on the engine so it could be used, at least for a tacho, on the very lowest power engines such as Stirling engines operating on a coffee cup or tea candle.

The device you describe sounds like the basis for modern shaft position measuring systems on turbo machinery.  Gives a sinusoidal output, which needs amplification and possibly wave shaping to give a digital input, where the states should ideally be off or on, with the “halfway state” most undesirable.  However, easily done as you say with a few extra components.

Glad to know they use triple redundancy on aircraft controls, I sort of expected as much, but I have not had a great deal of contact with the technical aspects of aviation.  Only the usual air miles and a few simple models.

MJM460

Title: Re: A digital governor for model engines
Post by: Brian Rupnow on May 06, 2020, 01:42:23 AM
This does bring up a point---If you can electronically program a sensor to pick up the  rpm you want, then have  a servo mechanically disable the exhaust valve, then you don't have to interrupt the ignition. On conventional hit and miss engines the ignition is never interrupted.
Title: Re: A digital governor for model engines
Post by: crueby on May 06, 2020, 01:45:30 AM
If you disable the exhaust valve, doesn't that cause back pressure during the stroke? Sorry, I've never looked that closely at how hit/'miss engines work. Or is the valve held constantly open open rather than closed?  :headscratch:
Title: Re: A digital governor for model engines
Post by: Dave Otto on May 06, 2020, 02:48:03 AM
This does bring up a point---If you can electronically program a sensor to pick up the  rpm you want, then have  a servo mechanically disable the exhaust valve, then you don't have to interrupt the ignition. On conventional hit and miss engines the ignition is never interrupted.

This is not entirely true, lots of hit and miss engines incorporated a device (spark saver) usually on the exhaust valve linkage that opened the circuit to the ignition when it was coasting with the exhaust valve held open. Fairbanks Morse model N comes to mind, but there are many others.

Some engines actually missed under compression while the governor only shut the fuel off, Otto engines come to mind here. The fuel is shut completely off and not metered like a carburetor would do.

Another system also comes to mind where only the ignition is cut off by the governor and the engine continues to miss under compression and draw fuel, Maytag washing machine engines are at least one manufacturer that used this system.

Dave
Title: Re: A digital governor for model engines
Post by: MJM460 on May 06, 2020, 01:28:56 PM
Thanks Dave.  That is an interesting survey of the many different systems that have been tried over the years.  I guess some are to avoid patents, while others are genuine attempts at improvements, and I assume some work better than others in any given application.

Continuing with Governor valve and stop valve -

While I am getting time in the shop, I decided to get on with the governor valve to control the steam.  It will be needed before I can do any meaningful testing.  I have also found in in the course of my boiler testing that I really need a stop valve.  In concept, both functions could be incorporated in one valve.  However, the stop valve need to be one that can provide positive closure, easily achieved with a screw down type, but that is not so convenient for servo operation.  On the other hand, the governor valve does not really have to shut pressure tight, but should give a suitable opening characteristic, should operate without too much friction, which the servo has to overcome.  It should also be carefully designed so the pressure forces are balanced, again to minimise the load on the servo. 

Of course there are very powerful servos available, especially if I spend a bit more money, but this is proof of concept, and I will,try with a little servo that I have, and only go for a bigger one if really necessary. 

I decided the simple solution is to use separate valves.  This is also in line with industrial practice where it is normal to have the isolation valve and governor valve as separate items.

Finally, I have to redo the steam piping from the boiler to the engine to include the two valves.

I have previously always made a screwed nut and tail connection for my steam lines.  But as you can imagine, considering the industry I worked in, I wanted to try flanged connections.  I started some sketches for the stop valve, but of course, the boiler already has a connection for a nut and tail connection.  I vacillated for  a while, but after measuring carefully the dimensions between the boiler and engine connections, I decided to compromise and make a screwed connection to mount the stop valve on the boiler, but use a flanged outlet on the valve, to take the governor valve.  Not a really elegant solution, but I wanted to not overhang the edges of the baseboard, and did not want condensate traps in the piping if they could be avoided.  It took me quite a while to reach a solution that met all the constraints, before I could start to make the stop valve.

I took a lot of inspiration from the stop valve on one of Willy’s builds, thank you Willy.  I particularly liked the screw down, globe form of his valve with the outside screw and yoke, with a rising stem, the favoured design in the petroleum industry.  The particular feature of this design is, as the name implies, the outside screw, which means the screw thread is out side the body, so not subject to corrosion from what ever product is in the piping.  This means the nut, which causes the stem to rise, needs to be supported outside the valve body, also clear of corrosive fluids.  The industrial valves also have a non rising hand wheel, which means a non-rotating stem.  I decided that was a step too far, so outside screw and yoke, with a rising hand wheel it is.  I also chose a screwed in gland with a few strands of Teflon impregnated packing for the stem seal.  So many parts for just one valve, yet there were thousands in a reasonable size hydrocarbon processing plant.

 The trickiest parts are probably the small screw threads and the slender stem threaded M3, with M2.5 thread on the end for the nut which secures the hand wheel.  The flanged outlet is on the side of the body silver soldered in.  The inlet connection has a tail screwed into the end of the body.

It is basically a simple turning job with a little milling.  I have taken lots of photos and I hope they will show some of my setups and methods.  I am still a beginner in this area so suggestions of better ways for next time are always welcome.

The first photo shows the main parts ready for some holes to be drilled and tapped, and silver soldering the outlet. This will make it clear where I am going.  I left the body as a full cylinder to make it easier to hold for the remaining operations and trimmed it down a bit later.

Then some progress shots of the individual parts.  The yoke and columns, business end of the stem, threading the stem M3, tapping the threads in the bonnet for the columns, making the handwheel, and the completed valve.

Next time, the governor valve.

Thank you to all for looking in.

MJM460



Title: Re: A digital governor for model engines
Post by: Brian Rupnow on May 06, 2020, 03:12:30 PM
Crueby---the exhaust valve was "disabled" and held open. That way the crankshaft could revolve as many times as it wanted and not come up on compression. And since the valve was held open during the miss cycles, there was no vacuum created to draw fuel into the carburetor.---So--during all of the "miss" cycles when that engine was coasting, it didn't use any fuel either.
Title: Re: A digital governor for model engines
Post by: crueby on May 06, 2020, 03:44:41 PM
Crueby---the exhaust valve was "disabled" and held open. That way the crankshaft could revolve as many times as it wanted and not come up on compression. And since the valve was held open during the miss cycles, there was no vacuum created to draw fuel into the carburetor.---So--during all of the "miss" cycles when that engine was coasting, it didn't use any fuel either.
Makes sense, thanks!
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on May 06, 2020, 10:32:19 PM
Valve looking good, and some nice machining pics.

 :ThumbsUp:
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 07, 2020, 03:23:47 AM
Hi MJM , the stop valve I used was a copy from full-size practice and it gives a more realistic look !! I hadn't actually thought about the corrosion aspect .?!! Also when I was helping with the Beeleigh engine I was playing with the disconnected governor and was really surprised when I gave it a push round ... it just seemed to take on a life of its own and the balls just seemed to take off and rise and whiz round  on their own  and didn't seem to have any resistance anywhere ..quite strange  but  quite interesting ?!!! I also felt quite privileged to be able to investigate and explore all the aspects of this 1830's  prototype !!

Willy
Title: Re: A digital governor for model engines
Post by: MJM460 on May 07, 2020, 11:49:08 AM
Thanks Gary, it’s good to have you following along.  I’m glad you like the pictures.  I tried to include some steps that might interest others, but not too many of simple operations.  Overall this part of the process is not demanding on precision or techniques we see in other threads and I don’t want to bore people, (just the brass block.)

Hi Willy, your experiments with that governor illustrate one of the most fundamental laws of physics, conservation of angular momentum.  I hope you took a video, or preferably several, that can be edited into a visual display beside the engine.

We have all been taught about the skater, twirling on the point of one skate, tall and straight with her arms over her head, then bending down as she spins, extending her arms out to the side and the other leg out in front, slowing down as she goes down which seems right, but then, without any visible extra push, speeding up as she stands up again.

I don’t think I could simple do the down and up motion, especially on one leg, let alone balancing on one toe and spinning like that.  It meant very little to me at the time, the texts books all came from abroad, but we had never have ice or snow, and even house hold refrigerators in those days were limited in the number of ice blocks they could make.  At least the ice man had stopped coming to deliver a block of ice for our ice box, which was our only cold food storage before we got our first fridge.  My total knowledge of skating involved a little Dutch girl and her wooden skates. 

I can almost hear Brian laughing at this stage, enjoy it Brian, now I have enjoyed living in your country, I understand that it is appropriate to laugh.

That governor is an even better example, though which of us even new the word back then, or had ever seen one, let alone had the opportunity to play as you have done.  Play is such a good learning technique. 

OK, so why is it so important?

Conservation of linear momentum, and conservation of angular momentum, which could also be described as spin, are two of the two most fundamental laws of physics.  They hold when even conservation of energy falls down.  The linear one is the basis of the mathematics behind Newton’s law about bodies continuing in a state of uniform motion in a straight line unless acted upon by an external force.

The angular momentum law is very similar mathematically, and explains the spinning top, gyroscope and most importantly that poor skater, condemned forever to keep on spinning, to illustrate this law to generations of young children.  And it explains your observations on that uncoupled governor.

So what is going on?  You did not elaborate on what you meant by “coming to a life of its own”.  So let’s see if I can tell you what it did.

That governor with its heavy metal balls has a moment of inertia, just like the flywheel, but unlike the flywheel it’s geometry is not fixed.  When you give it a push to start it spinning, the balls are free to move in response to the centrifugal forces.  So they fly outwards, and due to the levers and connection points, they rise.  But that outward movement changes the geometry, and geometry is fundamental to the magnitude of that moment of inertia.  Remember, the moment of inertia is the sum of the contribution of each little bit of the mass of the system multiplied by the square of the distance from the axis of rotation. (Mathematically I = m x r^2)

So when the balls start to fly out, r increases thus increasing r^2 even more and greatly increasing the moment of inertia (I). 

Now similar to that body moving in a straight line, the angular momentum version is that a body which is spinning continues to spin unless acted on by an external torque.

I hope that you are still with me, ‘cos here’s the rub.  If we allocate the symbol w to the rate of spin in radians per second, then the angular momentum equals I x w^2 or w squared.  The two equations together mean that angular momentum is proportional to w^4, so very sensitive to the distance of those balls from the axis.. Conventionally the symbol used for rotational speed is the Greek lower case version of omega, but I find that difficult to insert on an iPad, so please forgive me for using the vaguely similar looking w.  Read it as omega anyway.

Then we have angular momentum (L) equals I x w.

Putting the two together gives us L = m x r^2 x w for a mass m at radius r.

(Thank you to jadge for pointing out the error in the original text of this post, it is much appreciated.)

Easy, I hope, for fixed geometry like the flywheel.  A larger diameter or more mass in the rim each have a similar effect.  But what happens when the geometry of the spinning body changes.  Well, with that obviously well made governor the bearings are very low friction, and it is disconnected from the engine, so let’s ignore that very small friction torque, along with air resistance, which will eventually slow it all down. 

You give it a push to start it spinning so the balls fly out, then no further push, so no external torque from that source. So when the balls fly out, I increases, Angular momentum is conserved, so if r increases, w, the rate of angular rotation, has to reduce.  The whole thing slows down, centrifugal forces reduce, and the balls start moving down.  And guess what, as they move down, I reduces so it all speeds up again. 

The balls on their levers form another rotational system, though it’s range of spin is obviously limited.  I would guess the balls for a variety of reasons, don’t quickly find a steady spot, so they move up and down a bit, and the speed increases and decreases with the movement. 

I don’t know how much that last bit happens, friction in the pins might quickly damp it out, but I am guessing that you were surprised at how long the governor kept spinning after your initial push, and after initially rising, the balls only gradually drop down as friction inevitably applies that external retarding torque.

Does that about describe it?  I would love to see the video if you get an opportunity.  Physics lessons in every playground!

Thanks for following along.

MJM460

Oh, and I also now know that it actually easier to balance while spinning than it would be if not spinning.  But there is no escaping the strength it needs to do such a deep squat and then stand up again, all on one leg!  I am in awe of that.


Title: Re: A digital governor for model engines
Post by: steam guy willy on May 08, 2020, 03:43:56 AM
Hi MJM..Well I didn't realise there was all this going on !! and of course there's always the maths to support the principals I'm afraid that the engine is now all back together so I can't play with it anymore !! I was quite surprised that the governor behaved the way it did and this is why I mentioned it ...also the Ice skater analogy was interesting ..and I suppose a Flypress is also similar which is why you can do what it does with the minimum of input ? ie just pull the lever... so with a flypress you can do a lot of work with the minimum of energy input.?? try pushing out a washer with just your thumb !!! I suppose there is also similar maths associated with this ?  Thanks for all this and as usual you have gone into so much detail . The energy it takes me to just ask a simple question is multiplied enormously by your succinct reply !!!   :) :)

willy
Title: Re: A digital governor for model engines
Post by: Zephyrin on May 08, 2020, 11:47:35 AM
Great thread to follow, quite interesting topic.
nice to see your built.
may I add a link to a video of a working regulator I build for a large steam engine a few  years ago, although the speed of the engine is regulated by the steam supply, their action is perceptible, from 255 to 350 rpm, and funny to play with ! 


https://www.youtube.com/watch?v=EEKs0Qr4OZY
Title: Re: A digital governor for model engines
Post by: MJM460 on May 08, 2020, 12:17:37 PM
Hi Willy, I am not sure what you mean by a fly press in this context.  Essentially a fundamental law of thermodynamics says that you can’t get more work out than you put in.

Certainly you can amplify force with levers or hydraulic pressure, usually involving more force over less distance or vice versa. 

But in the context of angular momentum, the energy you put into that governor by giving it a push is stored as angular momentum in the spin of the governors.  That momentum gradually gets reduced to zero over quite a long time.  It takes a long time to change the angular momentum because the the friction torque is very small.  Let’s say 50 seconds for easy maths.

But what if you stop the fly balls very quickly, say by swinging a large brick in the path of one of the balls?  The brick will be pushed in the direction the balls are travelling, and conservation of momentum means the sum of the momentum of the brick plus the balls will be the same before and after the collision.  Assume the brick crumbles a bit, absorbing the impact of the collision.  But think about the force of the collision.

The balls will stop very quickly. The momentum of the balls changes to about zero in a very short time.  To make the maths easy let’s assume about 0.05 seconds, or 1/1000 th of the time that friction took to stop the pendulum.  The maths says that the torque equals the rate of change of angular momentum, so the torque would be 1000 times the size of the friction force.  But the change of momentum is about the same.

So you can stop the governor or a flywheel or what ever over a long time with a small torque, or over a short time with a large torque.  That torque can be very high indeed, and cause quite an impact with the brick.  I believe there are some tools that operate on this principle, but others will be able to describe them better than I can, as I have not had the opportunity to try them.

I wonder if that is what you mean?

Hi Zephyrin, that is a great model.  Thank you for posting it.  Videos of a working governor are always interesting to see and particularly relevant in a thread like this one.

You will have a good idea of what force is available after playing with the lever like that.  Quite a challenge to make a steam valve that operates with such a small force.  It looks like you have made a pretty good effort.

MJM460

Title: Re: A digital governor for model engines
Post by: MJM460 on May 08, 2020, 12:31:15 PM
The governor valve

The point of the governor is to control the speed of a steam engine, and that requires a steam throttle valve to be operated by the servo which provides the output from the electronics. 

The governor valve has some specific design requirements.  First it should involve minimum friction to operate.  The most difficult aspect of this is the seal or packing where the stem exits the body.  I designed the valve body with an adjustable gland and space tor two or three turns of some Teflon impregnated pump packing I had in my miscellaneous materials drawer.  I hope that I can find a point where it is tight enough to seal, but not tight enough to cause too much friction.  Next is the more general friction where the necessary moving parts slide or rotate in the fixed valve body.  The big plus of a separate governor valve is that it does not really need to shut off tight, or even totally stop the engine, the stop valve will do that.  So long as it reduces the speed of the unloaded engine to the slowest required speed, and can vary the opening from there to fully open in the range of the servo, the fit is not too critical.

The governor valves made by Willy and J.L were butterfly valves, which operate in less than a quarter turn, by turning a thin disk so that it varies between fully blocking the flow path and minimum flow resistance when it is side on to the flow.  I decided to go with that style of valve, but my steam passage is only 3.5 mm diameter, and I do not fancy my chances of making a shaft and disk and riveting the two together in that space.  Hat’s off to both of them for achieving that feat.

Then I realised that the shaft did not have to be limited to being small enough to not blocking the flow.  Why not make it 5 mm diameter, and machine a slot in the right place to form a disk, which does not have to be round, by the form of the solid bit between the slots.  The 5 mm was selected because I have a suitable rod of silver steel, and a 5 mm reamer.  That seemed practical, so I set the shaft horizontal and machined one side, then rotated the rod a little and took another light cut, leaving the solid bit thick at the centre, but feathering out towards the outside diameter of the rod.  Then rotated the rod 180 degrees, and did the same on the other.  It is easier to picture than describe, so I have included a picture which I hope shows it clearly. 

With the disk sorted, I needed to complete the shaft design, which needs to take into account the pressure forces on the shaft, which are tending to force it out of the valve body.  Now I only have a hand reamer for that 5 mm hole, so I needed to go right through the body.  That required a plug each end.  One way of achieving pressure balance is to leave both ends protruding and make a gland for each end.  Then there is atmospheric pressure on each end of the shaft, and no net axial force, but two gland packings to cause friction and/ or leakage. 

I decided on a blind plug on one end, and to turn down the shaft at the other end to 3 mm diameter.  The smaller end will have atmospheric pressure against one end which is lower than the steam pressure on the centre 3 mm diameter at the other, but the out of balance force is less than half of what is on the other.  It’s less complex, one gland plus a blank plug instead of two, so seemed like a good compromise for the axial forces and friction.  Reducing the diameter to 3 mm through the gland also means the 5 mm part of the shaft is constrained in the body, so cannot be accidentally blown out by steam pressure, with the attendant undesirable consequences.

Another issue with the governor design is that the steam forces on the moving parts should be minimal, so they do not require undue extra force from the serve to move the stem in response to the control signal.  The butterfly valve is essentially balanced in this regard and the steam flow does not tend to turn the stem one way or the other throughout its range.

The final, even perhaps the most important requirement, is the flow characteristic of the valve throughout its range.  That is, how does the flow resistance vary with the movement of the servo.    The butterfly valve is highly non-linear, the first few degrees of opening have a much greater effect on the flow resistance than the last few degrees.  Also I have a rotary servo giving about 170 degrees of rotation, while the butterfly disk requires less than 90 degrees resulting in further non-linearity. 

A plug In that respect, a plug valve is better than a butterfly valve, as the shape of the plug can be varied to give any desired characteristic.  However, it has a strong axial force due to full upstream pressure in one side of the plug, and the lower downstream pressure on the other.  The ideal solution is the “double beat” design of valve which effectively involves two plugs placed so the axial unbalanced forces cancel out.  However I feel at this stage, that would be beyond me to make(another vital design consideration).  I decided to persist with the butterfly valve.  I will do some testing of the transfer function, and see if I can perhaps make some mathematical correction if indeed it is required in practice.  At the end of the day, theory always needs testing. 

I sketched up all the essential elements of the design and drew a simple rectangular body outline which fitted with some brass bar I had on my stock shelf.  A square bar is easy to hold for all the internal machining operations, and I could do some fancy machining of the outline later, or not, as the mood takes me.

I marked one end to be the top and scribed the centre lines at that end and along one side, and the centre of the cross hole for the steam path.  I make a practice of planning the operations so that I do all the necessary concentric cuts with one setting.  It is beyond me to remove it and set it up again absolutely on the same centre.  So I cut off the required length of bar, and because the sequence does not really require turning, I set it up on the rotary table and machined the side of the bar including the raised gasket face around the steam passage.  It probably would have been better to just face the whole side flat and go for a flat face flange, but hey, I worked in the petroleum industry, and this was not a cast flange!

Then I set up square in the vice, for the top end.  I milled the end flat and square, and drilled the centre bore 4.9 mm in preparation for the reamer. I had decided on a bolted gland using the shaft bore as the packing outside diameter, So I followed the drill through with the reamer to true up the hole and give a nice sliding fit for the shaft.  With that all done, I could turn the block around, centre as well as I could on the 5 mm bore, face and tap the bottom end for the blind plug.  Five mm is the tapping size for a standard M6 x 1 thread, so it was a matter of depth stops, otherwise known as nuts, screwed onto the tap. You can see this set up in the photo.

That is all the critical parts of the valve complete.  The bottom plug and the top “bonnet and gland are simple turning and threading operations, along with drilling the bolt holes and a bit of shaping for the flange of the gland.  Similarly the hub for the operating lever is simple turning, cross drilling and tapping for the set screw, so doesn’t need further description here.  All that remains is the obligatory selection of pictures, showing some of my set ups and techniques.  The last one shows it bolted to the stop valve.

To me the interesting part of this build is the conceptual design process required to ensure everything functions as required.  Nothing at all difficult about the machining, once the design is decided.  This is very different from some of the amazing work being done by other members of this forum, especially that governor Zephyrin has just posted.

I would still like to remove some of the excess metal from the block forming the valve body, purely for cosmetic purposes.  But I decided to see if it all works first.  The functional chunky block shape is starting to grow on me, so it might not happen.

Thank you all for looking in,

MJM460

Title: Re: A digital governor for model engines
Post by: jadge on May 08, 2020, 02:03:12 PM
If we allocate the symbol w to the rate of spin in radians per second, then the angular momentum equals I x w^2 or w squared.  The two equations together mean that angular momentum is proportional to w^4, so very sensitive to the distance of those balls from the axis.

I agree that moment of inertia is mass times radius squared:

I=mr2

But I thought angular momentum was moment of inertia times angular velocity:

L=Iw

Substituting for I gives:

L=mwr2

For the life of me I don't see how to get a w4 term?

Andrew
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 09, 2020, 02:00:54 AM
Hi MJM , just wondering about different valve " innards" ? are there different configurations that interrupt the steam flow ?? would a butterfly valve interrupt the flow rather than a modern ball valve ?? and is there turbulence with different types of valves and does it have a detrimental effect on the governor action/function ?

willy
Title: Re: A digital governor for model engines
Post by: MJM460 on May 09, 2020, 02:38:11 AM
Hi Andrew, You are quite right.  I am so glad that you came in so quickly on that one.  I normally check each formula before posting, but I did slip up badly there.

Later today, I will go back and add the correction so that it is not inadvertently picked up by anyone who does not see your post.

Thanks again,

MJM460

Willy, I will also come back later on your questions.

Edit:  The correction has now been posted, and carefully checked this time.  In the process, I also found a commonly used symbol for angular momentum, L, which I just could not recall at the time.  That should have been the clue to check my maths!

 I even managed to pick up a new skill in achieving the strikeout.  I just would prefer not to need it too often, but I do want errors picked up and corrected.

MJM460
Title: Re: A digital governor for model engines
Post by: MJM460 on May 09, 2020, 10:46:21 AM
Hi Willy, the valve characteristic is as fundamental to the governor operation as any of the other moving parts.

I had not thought much about it until Jadge’s fascinating post about his investigation of the stability of his Pickering governor.  He gave me the terminology I needed to understand a bit more clearly what I am attempting.

The key to it is that the valve characteristic can give extra amplification to the governor motion, which can compensate for the limited lever movement.

Think about that stop valve of yours.  The end that plugs the passage through is about a 90 degree cone.  It needs a certain amount of lift to be effectively open.

If the bottom of that plug was flat, it would be full open on a very small lift.  On the other hand, if it was extended to be a finely tapered needle, it would have to lift a long way.

The governor valve has to have a smooth progression between open and closed, and achieve the whole range within the range of movement of the actuator, whether a servo like I will use, or the lever operated by the collar which lifts as the flyweights rise on you machines.  With sufficiently accurate manufacturing that shape of the needle can even be modified by being given a curved form instead of a straight taper.  The form of that curve can modify the flow characteristic as the valve opens.

Ideally we need to know the transfer function of not just the valve, but the whole system from the controller output to the change in power output of the engine.  Now that Jadge has pointed out the importance, I will do a little test program, once the electronics are complete and working, to both test the electronics and prove that I can drive a servo, alter a set point using the potentiometer.  Clearly it is possible, based on the available commands for the processor, but I have to prove my maths on something simple before I add in the feedback loop needed for control.  Of course this means I will need a display, so I know what signal I am giving to the servo and what engine rpm results.  Then I can draw a graph of the characteristics.   Ideally I would repeat this with a fully loaded engine, but operation at a controlled speed will be an adequate demonstration of the governor feasibility, until I make a suitable load.  Big advantage of programmable electronics is that it’s a program change, no wiring changes needed, to change from the transfer function test to the governor program.

I hope that makes sense.

Your second question about friction for the steam flow.  Extra flow resistance is not a problem in any throttle valve application.  In fact, the whole idea is to vary the flow to control engine speed, which is achieved by varying the friction through the valve.  The energy is not lost, it is an adiabatic process, (remember that term from the thermodynamics thread?). It is retained as heat, though the amount of energy that can be converted to useful work is reduced due to the lower pressure.  But again, that is ok as the engine produces less power anyway at the lower speed, so less work to be done.  For efficiency sake, throttling is not desirable, but there are sometimes other reasons for generating steam at higher pressure then reducing it to control engine speed.

A butterfly valve restricts the flow when the disk is turned so it nearly blocks the pipe, a ball valve would also do so, but would be beyond me to make.  I did consider drilling a hole in the shaft instead of machining something like the disk, which would do the same thing as a ball valve and it would not be too difficult to make another stem with a cross hole to experiment.

MJM460

Title: Re: A digital governor for model engines
Post by: derekwarner on May 09, 2020, 11:23:33 AM
Hullo Willy.....

Ball valves, be they HP or LP, are designed to be a means of fluid isolation or direction [and again be they L port, I port or T port]...either open. directed or closed.....this is true for any fluid

Incorrect installation as a form of metering device is fraught with long term danger.....wire drawing of the Teflon/POM seats.......inability to maintain a fixed setting and the final loss of absolute sealing...or leakage  :facepalm:

Derek
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 10, 2020, 02:41:37 AM
Hi Derek and MJM..thanks for the ball valve info. and MJM is the speed of the governor critical and does it have an optimum speed where it functions best.. the reason I ask is because on the 1830's Beeleigh engine the pulley on the crankshaft has 4 diameters and the governor has 3. this will give you quite a few variations for optimum speed ??  also is the operation a linear or logarithmic system .? I suppose with this early engine they may not have had the benefit of the maths which is why they had these multiple pulleys.? unless of course they were a standard casting ,universally available. Also will you be incorporating a Snifting valve in the set up ?

Willy
Title: Re: A digital governor for model engines
Post by: MJM460 on May 10, 2020, 11:43:59 AM
Hi Willy, those are very interesting and relevant questions to any governor thread.  I like your talent for observing little details that no one else notices, and questioning their purpose.

I suspect there is an optimum speed for any governor, or at least a relatively narrow range of speeds where it is close enough.  When the engine is stationary or very low speed, the ball support rods are vertical and the balls very close to the vertical shaft.  The collar which transfers the lift of the balls to the lever which operates the valve is at the lower end of its travel.  This gives plenty of leverage to lift the lever, but because the radius at which the balls are rotating is very small, there is minimal force to take advantage of this leverage.

When the governor is rotating very fast, they fly out to the limit of what the linkage will allow.  It cannot respond to further increase in speed because the linkage is bound up.  The collar is at the upper end of its range, but the link connecting the balls to the collar is relatively flat, so has minimal ability to lift the collar anyway.

Mathematically, I suggest that it would be described as sinusoidal, though depending on which part of the linkage you look at the operation, all of sin, cos and tan will be required.  So I would think not logarithmic, but remember tan heads to infinity as it nears 90 degrees.

While they did not have computers or calculators as we have them today, I believe they did have the maths.  When I was in high school, we had to learn to do all the log and trig functions using a book of tables which included 4 significant figures.  Later I learned that surveyors used 7 figure tables for more accuracy, but when I went to university and first few years of work we used slide rules which are practically only good to three figures.  “Slide rule error” was a term that explained or hid a multitude of sins.  I bought my first calculator as I started the twelfth year of my working life.  But all of the necessary maths can be solved geometrically by the construction of triangles.  I am sure that if they did not yet have good reliable tables in a book, they would have used geometric constructions on the drawing board.  You have seen how many valve diagrams are solved in that manner by a variety of standard methods.

Now, if I understand your governor correctly, it has a weight on the collar which must be lifted by action of the balls lifting instead of the often used spring.  So the vertical force is constant.  The varying leverage on the collar as the balls fly outwards matches the weight it must lift at only one speed, that point where further lift reduces the lift to just balancing the mass, so the speed is quite critical.  If the governor slows, the forces reduce, until the new leverage again balances the mass, and so the governor controls the speed over a narrow load range as required.  Now that is my impression based on looking at the geometry and the physics.  It will be interesting to see how it compares with your friends at the museum experience of operating the engine before the rebuild.  And I hope that I have the maths right this time.

I have tried to illustrate the triangles of forces in the attached sketch.  The vertical force V must equal the weight for a stable position.  The lower rod tension T is always the same at pin A and the corresponding pinB.  The horizontal force H always equals the centrifugal force and is the same at pinB as at pin A, and dependent on the governor speed.   I hope it makes sense.  If the speed is too low for balance, the weight falls, the lever opens the steam valve, the engine goes faster, thus increasing the governor speed and the centrifugal force.  Only one solution where all the forces balance.  Similarly if the speed is to high, the weight rises, the lever closes the steam valve a little and the engine and governor go slower.  To change the engine speed, change the weight, or shift the belt on the pulleys so the same governor speed is achieved at a different engine speed.

It is not very convenient to add to the mass of the weight which is inside the path of the balls and linkage, you would have to be very quick!  And geometry limits what there would be room for anyway.  But a different pulley ratio gives a different governor speed therefore a different engine speed to find that delicate balance point.  I wonder if they found in practice that an easier way might be to add a weight, or even a spring at some point on the lever.

Anyway, 4 diameters and three diameters gives twelve different belt positions, though some might be unusable due to the extreme belt angle, and some combinations might result in the same speed, so possibly not 12 different speeds.  Certainly a means of very coarse adjustment of the governed speed.

My understanding of a sniffing valve is that it is only required on vehicles, and perhaps cranes and winches, where there is a possibility of over-running the engine due to gravity acting when travelling down hill, so not needed on my stationary engines.  But in any case, not associated with governor action, no not a focus at the moment.  My mill engine has a slide valve and condensate seems to be well enough drained by valve lift, so it does not have separate condensate drains either.

I think that just about covers your questions.  Progress on my governor might have to wait for another day, as with the family unable to visit for the traditional Mother’s Day visit, I am on kitchen duty.  So having a little feast while sheltering in place.  The day seems to have just flown by.

Thanks to all for looking in.

MJM460

Aarrrgh! The photo is upside down.  I hope this one is better.

Both upside down.  Should have used the camera, but I definitely rotated the iPad 180 degrees between the photos, so I give up.
Title: Re: A digital governor for model engines
Post by: MJM460 on May 10, 2020, 12:03:38 PM
I don’t know, this time the same two phots, but one appears oriented each way. 

Next time I will resort to plan A, and use the camera that only takes photos.  No smart AI there, it just takes quite good photos, and the top of the camera is easily identified.

MJM460

Title: Re: A digital governor for model engines
Post by: steam guy willy on May 10, 2020, 01:34:11 PM
Hi MJM , I have reconfigured the Photo for you with my Apple laptop...thanks for the info... I am quite observant and always see what is outside the box !!!!

Willy
Title: Re: A digital governor for model engines
Post by: MJM460 on May 10, 2020, 10:46:22 PM
Thanks Willy, I see I got one each way in the end, and my spelling error hits me in the eye when I open the drawing.

However, the main thing is does it make sense to you?  And does it help answer Your questions?

MJM460
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 11, 2020, 03:11:28 AM
Hi MJM. Yes ,thanks , there is a lot more to this than is immediately apparent !!...I have just got my Model engineer magazine and there is a new series about governors and the Author suggests that G's were in use before Watt came along being used in windmills and other machinery. he also mentions that most engines have a G. but one engine pumping against a head of water did not need a G to prevent it running away !! this is the Waddon  Pumping station that is now ensconced at Kew Gardens .

Willy
Title: Re: A digital governor for model engines
Post by: MJM460 on May 11, 2020, 01:32:42 PM
Hi Willy, many driven machine have a load curve which increases with speed, and exceeds what the engine can produce beyond its acceptable maximum speed.  Centrifugal pumps can be in this category.  And in principal the speed of these systems self limiting.  If full speed is normally required governing may not be required.  The primary governor task is to control the system at a set, and preferably adjustable speed to allow for different requirements.  Electrical generators (ac) need a governor to control the frequency especially through load changes.  Other systems might be adequately controlled with manual adjustments.

Early governors had belt drives, and if the belt breaks, the governor does not help anyway.  The steam valve needs to shut in that case, but the stationary governor will be trying to open it. So you might need overspeed protection in addition to a governor.

I don’t know anything about the particular engine and pump mentioned in that article, so I can’t comment.  But it is all about specific System load characteristics, and machinery design details.

It sounds like an interesting series of articles,

MJM460

Title: Re: A digital governor for model engines
Post by: Admiral_dk on May 11, 2020, 10:00:47 PM
Sometimes you also need to include an engine protection in case the load accidently is disconnected - anything with a gearbox comes to mind ....
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on May 11, 2020, 11:43:29 PM
This thread really is developing into a multi-teacher masterclass on governors.

Another reminder of how inventive and just plain clever they were back in the day when they were developing these things. And now you are modelling it electronically!

I hope you enjoyed the Mother's Day feast!

gary
Title: Re: A digital governor for model engines
Post by: MJM460 on May 12, 2020, 04:58:13 AM
Miscellaneous bits and pieces -

With the governor valve and the stop valve essentially complete, there were the inevitable miscellaneous tasks required in order to rebuild the steam line.

First, before the steam line was taken apart to fit the valves, I carefully measured the slide valve lift in the valve chest.  It was about 1.7 mm.  I am sure this way too much, and probably why every time I came back after a longer break, I had to take off the valve cover, and press the valve back onto the face, with a bit of oil to keep it there, before the engine would start.  Frustrating when the boiler is up to steam and the engine will not start. 

I found that I had a spare valve nut from when I built the engine, and when I measured it carefully, the critical dimension was different in the right direction so I tried it.  Lift was reduced to around 0.5 mm possibly still a bit high, but seemed worth a try.  It appears to have solved the problem and the engine now starts reliably.  I now wonder if I accidentally assembled it with the wrong valve nut back when I first made the engine.

Then I needed a flange to fit against the governor valve.  I made a little bolt like jig to hold the flange blank against the governor body block while I spotted through and drilled the bolt holes.

Then I found the position of the boiler and engine on the baseboard did not allow the two right angle bends I needed to connect the two.  Previously, without the valve, the piping did hang over the edge of the board a little, but the stop valve made a much more compact change of direction.  Rather than change the whole layout, I made a special fitting with long tails to achieve a 90 degree change of direction and connect to the lubricator at the other end of the pipe.  This meant only one tube bend required, so avoided the challenge of getting two the right distance apart.  I have included a picture of my tube bender in action, made from a design presented in Model Engineer some years ago.  I silver soldered the flange and the custom elbow to the tube and fitted it all in place.

I made a punch and die from silver steel to cut some paper gaskets.  I still need some thicker material, as paper seems a bit inadequate, but gives an acceptable seal to let me get the governor project complete for testing on air as a stop gap until I can leave the house to get more suitable material.

Some insulation wrapping and the pipe is now complete.

Finally, all my previous running on air has been using a car tyre inflation gun connecting to a fitting on the engine.  It needed a spare hand to hold the trigger and a second to just keep it proper lined up to not leak, so not easy to use and did not leave a hand free to read the digital tacho as well.  This governor is likely to require a lot of short tests to get it complete, especially when tuning the control loop, so I needed something better.  I had a 50 mm pressure gauge with a reasonable scale range, which had a 1/8 inch BSP thread, as did the connector I had for the air hose.  By some miracle, or perhaps it was misadventure, I found in a cheap set of alloy metric taps and dies at the back of the cupboard, a 1/8 BSP tap , and even a die, never been used.  So I made up an adaptor block to accept the air hose fitting, the gauge and an 8 mm threaded connection so I could continue in my preferred thread system.  I made a couple of barbed fittings plus bolted hose clamps, and found a length of PVC tubing in the come-in-handy box which was clearly stamped “50 psig” about every 300 mm of its length.  A barbed fitting now screws into the boiler fill plug for an easy reliable air supply connection. 

With it all together, I could now sketch up a support for the servo, that would allow me to connect it to the governor valve operating arm with standard rc shop linkage fittings.  A bit of brown stuff for a rigid support, I don’t want the servo to move instead of the governor valve arm.

With it all together, I could test the system apart from the servo, by operating the governor valve lever by hand.  I was very pleased to find that it could actually stop the engine, and then control it to full speed with about 70 degrees of rotation of the governor valve stem.  Not enough to characterise the valve as I talked about in an earlier post, but a promising milestone.

Quite a lot of work in that lot, but all necessary, and straight forward, so I hope the pictures fill in any extra bits of the story.

Next time, some electronics.

Thanks for looking in and following along.

MJM460
Title: Re: A digital governor for model engines
Post by: MJM460 on May 12, 2020, 08:56:54 AM
Hi Admiral, I am totally with you on the need for over speed protection, especially on high speed machinery. Though of course, high speed is relative to the designers intended maximum speed and even a slow speed flywheel has a limit.

The industry I worked in is very conservative on that issue as I have previously mentioned.  We even assume a coupling might break, and go to much less likely possibilities from there, but the result of a high speed turbine wheel deciding it has had enough social isolation in its little apartment, and breaking out, is not a pretty sight, so the effort is well justified by the risk.

Usually independent overspeed devices in addition to the governor are required.  The traditional device was a bolt in the shaft with the head off centre so it experiences centrifugal force as the shaft results.  A compression spring holds it in place until the speed exceeds the set speed, when the centrifugal force compresses the spring so the bolt head protrudes.  It hits a trip lever which releases a shutoff valve which sits latched open against a very powerful spring.  The valve is slammed shut in a small fraction of a second.  But those bolts are notoriously difficult to calibrate.  And the steam valve really does slam shut if you are near it, even when you are expecting it while doing the test.

Hi Gary thanks for your interest.  I am also delighted to have more people chiming in, as there are definitely others on this forum that know more than I do.  There is always more to learn and I find it very rewarding.

The Mother’s Day feast went very well, thank you and it was nice to have gone to that little extra effort.  Of course, with the lock down, no adult children to do the work, so I was the cook.  Fortunately I have a good instructor there too, who was prepared to provide advice, while I followed instructions.  We are both of the mind to eat to live, rather than live to eat.

MJM460
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on May 12, 2020, 11:11:44 PM
Glad you had a nice day. If the pandemic has taught us nothing else it's that we have to - and can - adapt to circumstances.  :cheers:

Looks like good progress with the first steps of integrating the governor into the plant.

I really like the look of that boiler and engine with their functional aesthetic.

Title: Re: A digital governor for model engines
Post by: MJM460 on May 13, 2020, 07:31:14 AM
It is now time to put together some electronics.  There is no set circuit for this that I know of, it is a matter of working out how to make a suitable electronic signal for each point of contact of the chip with the outside world.  It is quite fascinating working out how to do this.  To me, use of a microprocessor is all about interfacing with the real world, and while a screen and keyboard are the most common input and output devices, even more interesting is connecting devices that actually do something.  A little bias showing through there, but a program that has no inputs and no outputs (as I have actually seen in a real book on the subject) has no interest to me whatsoever.

If you don’t have some knowledge of electronic circuits, the complete circuit for this project might look a bit intimidating, but it is actually just the sum total of a number of quite simple independent circuits that each connect to just one pin of the chip.  It only has 8 pins, and two of those are for the plus and minus of the power supply.  So how hard can it really be?

If you are well experienced in electronics, where I am only a hobbyist, you might want to skip the rest of this post, but I want to try and show that it is simple enough for anyone interested in giving it a try.

The basic input to the program comes from the speed pick up, for which I have already shown the circuit.  The few components control the current to the light source then produce a high (near supply voltage or a low (near 0 volts) depending on whether or not the light path is blocked.  The only requirements are that it switches fast enough to make positive start and end points for the pulse, and that the high and low are sufficiently different for the processor.  That is all taken care of by the manufacturer of the device.

The processor uses the signal as input to its internal workings which are accessed by a simple command line in the program, which for this chip is well defined in the free support documentation.  Behind the scenes, the Picaxe manufacturer has loaded a much more complicated program to operate at the chip at machine level, so I don’t need to understand that detail.

The interface circuit for the speed input I has three connections to the rest of the circuit, +5 V, 0 V and the signal to the pin of the processor.  That’s all.  The hardest part for me was to decide if I needed to be able to unplug the device for convenience, and if so, what type of plug and socket.  This is mostly dependent on whether I want to mount the electronics in a separate box, with only the minimum mounted on the engine base, or just hide the electronics under the base board.  I chose the latter.

We need a second input to tell the program the speed we want to run the engine.

This one is the simplest if all.  A simple standard potentiometer, with one end connected to the +5V, the other to the 0 V and the slider connected to the selected input pin.  This acts as a voltage divider to give a voltage varying from 0 to +5 V as input to the processor.  The chip contains an internal analogue to digital converter to provide a number from 0 to 1023 to the program, again accessed by a simple input command.

Finally we need to give the program an output device so it can move the throttle valve.  I have already mentioned that I am using a standard radio control servo to move the throttle valve, so I have to include the necessary connection to a servo.

It turns out that RC servos are highly standardised in both the wiring required and the signal required to accurately control the servo movement.  The main difference between brands is the actual plug used to connect to the receiver.  And we don’t need the radio receiver.  The servo  needs a pulse input with the length of the pulse proportional to the required servo position.  So the wiring simple needs once again the +5 V, 0V and a signal wire.  The Picaxe manual suggests the signal wire should include a series resistor as protection against some potential fault conditions, so I have included that, and also a small capacitor across the power supply terminals to eliminate some of the electrical spikes that result from that type of operation. 

The complexity is that the servo needs that pulse repeated every few mS whether the required position has changed or not.  If the pulse is missed, the servo doesn’t know what to do, so does nothing, and may or may not stay stationary depending on the actual mechanical load on the servo at the time.  This complexity is all handled by the internals of the chip, and this time accessed by two simple commands.  The first one tells the chip that the selected pin is controlling a servo and to start the regular pulse train at an initial position, and is only required once in the program.  The  second command is used to change the required position, and tell the servo to use its internal circuitry to move the servo to the new position.  The requirement for that frequent repeat of the pulses does impose a significant processing burden on a simple chip, which turns out to have only one timer to control all the things we want it to do.  We need to understand that limitation in this case, but we don’t really need to know the basic internal workings.

The bottom line is power supply plus one signal wire, with two simple protection components in the circuit.  Jadge could explain better than I how those bits work and how they are selected.

I know I said finally, and practically that is all there is too it, but there are three further extra, though only one is a really necessary addition.  The necessary one is the circuit used to transfer the program, into the chip.  Again it only requires three wires, but not the + 5 V this time.  The process involves two way communication so has a send signal, a receive signal and the 0 volt of the processor and the and the computer have to be connected.  Obviously the computer has its own power supply well sorted.  The circuit only involves two resistors and a 1/8 jack socket.  Those resistors have to be on the board with the chip as otherwise the chip might think it is receiving a new download and replace your intended program, any time it is powered up if there are stray electric fields around you, and there always are.

It would be very nice to add a display that could tell us the actual speed of the engine, and preferably also the speed set point or target, as these are both easily calculated within the chip.  Not necessary for a simple governor, but nice, and a display also gives more options to display information useful for trouble shooting if required.

Also, two separate power supplies are required, as the servo can create spikes on the power supply rails that are not compatible with the requirements of the processor power supply.  This is easily achieved by having two battery packs, but I get sick of always finding my devices have flat batteries, so I made up a little board that has two independent power outputs, with separate regulators and smoothing capacitors, only connected by using the same 9 V power source.  Again we are well served these days by integrated circuit components with a very advanced voltage regulator being available, looking much like a bigger transistor, only three terminals.  We don’t have to assemble anything at all complex.

Adding a display necessarily goes outside my initial concept of a single simple chip, and requires a deal of complexity.  However, the system includes an easily assembled kit that deals with the complexity, and also only needs that three wire connection, again +5V and 0 V to power the display, and one signal wire.  It is all one way communication with the display.  In effect it is only one extra component, though it is by far the most expensive bit of the project so far.  Simple commands in the program are all that is required to tell the on board chips of the display what to do.

The one consolation to this is that once all is up and working, and we have marked suitable calibration around the potentiometer knob, it can be unplugged and used for another project if required.  At this stage, I am happy to make provision to connect the display, as I think it will enhance the final result when I lash out and buy one.

I hope that explains it all well enough to be interesting, and even to encourage someone to give it a go.  Another reason for explaining in this detail, is to show a few useful interfaces as examples, to enable thought about what other devices could be connected in this way.  Once the interface is designed and made up, the program can use the inputs to control the outputs in any way you can think of, with only a bit of logic and maths.  More maths can enable quite a complex algorithm.

So now I can attach a picture of the circuit diagram to complete this post.  I hope that it looks a bit less intimidating now.

Thanks for following along,

MJM460
Title: Re: A digital governor for model engines
Post by: MJM460 on May 13, 2020, 07:58:20 AM
Hi Gary, I had to post first, as today is the first day we are allowed to visit family, two of or children live near by and we have been invited for dinner.  If I run out of time before we leave the post might not happen.  The other local family next time.  But Darwin is still not allowed.

You are right about adapting.  Having been forced to try ordering groceries on line, a process we had been avoiding, a lot of people may continue for this and other purchases.  Retail will likely look different when the immediate battle is over. 

The really difficult one is the travel industry, which when you add up its contribution to transport, education, recreational travel, and the necessary food services, really employs such a large number of people.  And it is hard to see those jobs quickly bouncing back, or where other jobs will come from to replace them.  With so many of those people unemployed, they will not have cash to go back to normal retail spending, so retail will look different there as well.  Our leaders might think they have been working hard so far, and ours have done well, but the really hard work is still ahead of them, and they can’t go on thinking it will bounce back and all be fine in a few months.

My heart really goes out to those people dependent on their regular income, whose jobs evaporated overnight, especially the young with families to support.  It will be a long road back to something acceptable as normal, but it will be different to what we previously knew.

And thanks for the nice comments about my steam plant. Your interest is always welcome.

MJM460


Title: Re: A digital governor for model engines
Post by: jadge on May 13, 2020, 08:47:50 PM
Softies don't want I/O functions, the outside world is bad enough as it is. The original version of Algol didn't have any input or output commands.  :facepalm:

With regards to the opto switch lowering the transistor pullup resistor can speed up the output. A value of 10k is quite high. Two points to note; does the processor input have a Schmitt trigger and is there a rise time constraint on the input pin? Some processors need fast rise times on input pins, otherwise the internal circuit can have problems when the input is neither low or high. A Schmitt trigger creates a well defined pulse from one with slow rise times and may result in more accurate timing in the processor.

Governors on steam engines are not generally required to control over a range of speeds, but just do their best to control at one speed. So I not sure the voltage input pot needs to run from 0 to 5V, Which presumably is intended to represent zero speed to full speed? It would be worth checking the characteristics of the processor analogue input. Many ADC inputs on processors use a flying capacitor as a simple sample and hold, but need to be driven from a low impedance source, ie, an opamp.

I stand by my previous comment that the processor is not the best choice. A different processor will have more than one counter/timer which simplifies the software. Most timers can be set to continuously output a pulse, the width of which is determined by the value in a register. The register only needs updating if the pulse widrh needs changing, reducing the load on the processor. At most the processor needs to write one value per cycle.

I'm sure that two separate power supplies are not needed. Careful layout and decoupling should suffice. Of course two supplies is belt and braces and will work.

I found the circuit diagram confusing. It's a very common mistake, particularly by mechies, to make the component symbols look like the physical component.  :) What is really needed is a symbol that represents the function of the component, and probably more important the connectivity. In due course I might try and post part of one of my schematics to illustrate how a schematic should look.

Andrew
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on May 13, 2020, 11:13:56 PM
today is the first day we are allowed to visit family, two of or children live near by and we have been invited for dinner.
>>>
My heart really goes out to those people dependent on their regular income, whose jobs evaporated overnight, especially the young with families to support.  It will be a long road back to something acceptable as normal, but it will be different to what we previously knew.
>>>
And thanks for the nice comments about my steam plant. Your interest is always welcome.

Hope you had a great day with your family.
>
Absolutely, and sadly it's the people who have the least that will lose the most. The big corporations can weather the storm and will probably end up hoovering up the debris.
>
You're welcome. The electronics is like an alien language to me, but I do look forward to seeing the engine and governor system working!
Title: Re: A digital governor for model engines
Post by: Don1966 on May 13, 2020, 11:22:16 PM
Nice explanation MJM and I am sure most can understand what you are doing. Thank you for taking the time to explain so others not so tech savvy can understand. Not all can read a electronic schematic and it is standard to put inputs on the left and outputs on the right of the drawing. Drafting it to look like components helps others to visualize what your doing better. I would offer both schematics one with electronic symbols for the technical people as jadge pointed out. My recondition on the speed pot is to put a trimmer pot in series with it where you can limit the output to the level need for best control of your speed.

Regards Don
Title: Re: A digital governor for model engines
Post by: derekwarner on May 14, 2020, 12:18:54 AM
Agreed Don......with my mechanically trained mind...... :facepalm:

I can...'basically' understand the components and function  :happyreader: although I needed to rotate it to save standing on my elbow

Derek

PS...you need to physically open the attached .jpeg image to get the rotated view
Title: Re: A digital governor for model engines
Post by: MJM460 on May 14, 2020, 10:18:11 AM
Hi Andrew, does that mean I can finally bask on the glory of not being called a softie now?  More seriously though, while I don’t underrate the importance of the computer screen telling me the solution to the maths I have programmed in,  However when any sort of immediate action based on the answer is required, I would rather the computer had an output that could achieve the required result directly than require my continuous attention.

Thanks for the information about increasing the response speed of that optical switch.  I guess the resistor is selected with consideration of a students battery powered experiment than a really demanding timing application.  The chip does not have an internal Schmidt trigger, but rather a decent hysteresis between on and off voltages, so it is not demanding in terms of any ambiguity in between if the rise ofr fall time is adequate.  I will pat myself on the back for already having thought of a Schmidt trigger, and purchased a chip with six on board along with the parts I purchased before the lockdown for the project.  I did set up a little test where I put a card in the gap, and measured the output voltage with my multimeter.  All to slow for testing speed but it did prove that even with the background ambient light at the time, I got a good clear high and low voltage.  I decided to try keeping the component count low, a sure way  for me to reduce the number of mistakes, and try the circuit without to see if it worked.  My progress is a little ahead of my posting but in the near future I will describe my test rig which is built on Meccano in good Willy style.  And it gives good speed readings up to and beyond any rpm I want my engines to run at.  And checks reasonably with the digital tacho to over 2000 rpm.  However, I can add the Smidt trigger if necessary.  Another early thought was that I could send the pulses to two of the Schmidt trigger inputs and send one of the outputs to a second board if necessary to get some time consuming functions off the board.  So all an option for refinement.

The potentiometer slider is only a voltage input to the processor, and what happens to it is dependent on the maths of the program.  It gives 1024 steps which I am using with a simple y = ax +b linear algorithm and depending on a and b can call for any speed ratio I choose.  It does not have to be 0 to max rpm.  I doubt that the system could actually use 1024 steps in the set point if I chose say 900 - 1200 rpm for example, and certainly not to hold a frequency for an ac power supply.  I have written the program for 400 to 2000 rpm as a starting point which seems to suit my engine and air compressor.  Will be interested to see what it does on steam.

Your description of the ADC type sounds right on as far as I understand it, and it does tend to show a little variation if I keep reading it without touching the pot, so I will have to see if that has a bad effect on the system.  But it is only the set point, and I don’t have to adjust it or even update it very often.  As you say, these engines normally run at a relatively constant speed, but they also vary significantly in speed within each revolution, so challenging.

I agree that it might not the the ideal chip that you would use in a commercial application requiring high reliability.  But it is a system designed to introduce the subject to students in British schools, so it has not only to be appropriately simple, but also affordable to have in the class room.  And that necessarily involves compromises that are not appropriate in other applications.  I believe the special programming cord was about $27 in my local distributor here in Australia, and with the software download free from the Picaxe site, it is a very low cost approach, so I can have a go.

Two power supplies is the Picaxe recommendation remembering they recommend battery packs and are aimed at junior school students.  Yes, belt and braces, but also very simple.

I am sorry that you find my circuit diagram confusing.  It is mostly based on following the examples in the Picaxe documentation, but I have included the plug connections that I have used for off board components to help me keep the correct connections.  Sometimes I have used flying leads but the box for the missing plug still helps me group the connections to keep polarities right. 

I have seen fully compliant ISO standard circuit diagrams, and frankly for a beginner, I find them very difficult to read. .  The more diagrammatic approach is probably more accessible to young students that expecting them to wade through ISO standards before they can actually make something that works.  And the simple approach definitely helps me too.  But I can see that the using correct standards would be better for the higher level purposes that are your bread and butter.

However, it is really great to have you looking in, to show me what to aspire to.  If you would like to show us all what my circuit should have looked like, I would be delighted.  Then we can move on to the improvements you suggest to improve the whole operation.

That has taken me quite a few words to address the many interesting issues you have raised, and I much appreciate your taking the time to write them down.  I am finding it really informative.

But I will continue in a separate reply to acknowledge the other welcome and helpful replies, in the hope that two shorter posts might be easier for others than an excessively long one.

MJM460

Title: Re: A digital governor for model engines
Post by: MJM460 on May 14, 2020, 10:27:26 AM
Hi Gary, it is good to have you following along.  It is quite a challenge to explain things in a way that suits everyone, but I hope there is plenty for you to find interesting as well as well as those with more experience in electronics.

Hi Don, thanks for your interest.  I did give consideration to either a trimmer or a fixed resistor on either side of the potentiometer, but as mentioned above, it only provides a voltage input to the chip which returns a number between 0 and 1023.  The maths determines the end points of the speed range.  And in reality, a standard radio control servo is not a high precision device, and can only give 150 steps over its complete range of travel and even the 8 bit alternative return values, 0 to 255 would be sufficient to provide the full range of possible positions, and I could revert to that if programming space becomes a limitation.  They are definitely not suitable for high precision applications such as CD read heads, printer heads or even a CNC machine.  But they are adequate for me to learn the principles.  Once I see the limitations, I can decide what improvements I could try.

Hi Derek, good to have yet another “mechie” on board.  My Pilates instructor tells me that standing on one elbow is good exercise for us.  I tried that picture every which way, and am not sure how the one with correct orientation was produced in the end.

Hi Willy, the simple microprocessor that I am using could certainly handle control of that boiler though I would emphasise a few cautions, especially in light of Andrews comments on reliability of the base chip, and he will no doubt have really worthwhile suggestions on the program once I get to that.  I would certainly use opto isolator chips to separate the Picaxe circuits from the circuit that controls the AC.  And then I would use that circuit to control a relay which switched the AC, and because the AC is lethal if not properly implemented, I still would only do it if I had access to a properly qualified electrical specialist to check my work if not actually construct the high voltage part.  I would look for a pressure transducer.  I am talking in the background to another forum member who uses them and hope I can eventually source something I am prepared to pay for.  Alternatively, I would go for the necessary amplifier chip to handle the thermocouple voltage as input and control on temperature.  A third alternative would be an RTD, for which I think a suitable interface chip might also be available.  One of these would complete the control loop for your boiler.  In fact the electric heating system involves big thermal delays that, providing they are allowed for, are not very demanding for control, and a simple on/off control would do the job without needing a servo.

I suspect Andrew would approve of your hard wired circuits for reliability.  Another approach to achieving reliability with microprocessor control of your system would be to have three controllers, each with their own opto isolator, and the three isolators in series, wired so the circuit is only on if all three provide the on signal.  This is referred to as triple redundant, and the problem tends to become the frequency of failure of one of the controllers.  So they should actually be wired in a series-parallel arrangement so that any two of the three switch on, and any single failure lights a warning light.  The processors are cheap enough, three would not be out of range for most of us.  But I am also interested in Andrews alternative solutions, and whether the necessary skills and hardware would be accessible for me.

Wow! A very encouraging wide range of responses today, but combined with other things that have filled my day they mean I will have to wait until tomorrow to describe the construction of the electronic circuits.

So thank you everyone looking in even silently, and thank you especially to all who have taken the time to reply.

MJM460
Title: Re: A digital governor for model engines
Post by: MJM460 on May 15, 2020, 03:36:27 AM
Now to soldering the components onto a printed circuit board. 

No one wants to see a build log consisting of “first I soldered the resistor....”. So I will try and avoid that, but the process did become quite a saga.  I would not describe my soldering as expert by any means, but I have been jogging along with it since early high school on and off though mostly off.  In hind sight a soldering course would have been a good idea, but such niceties tend to be not affordable when bringing up three kids and paying a mortgage, so I blundered along.

My first few joints for a socket for the chip and the next few components went well, but then they started to deteriorate in appearance.  Took on a distinctly “blobby” look, like a child’s first attempts.  Then followed days of frustration as I tried to find the cause.  My soldering iron was a relatively recent purchase by my standards with an adjustable temperature control, but the tip looked a bit in need of attention, so I purchased a couple of new ones, by mail order, so more waiting.  The solder was over thirty years old, purchased for number 2 son but still in my tool box, surely solder can’t go off, but perhaps the resin flux?  And so on.  Eventually it turned out that the soldering iron had failed!  No in the expected way that one day it worked, the next cold,  it it heated up ok even melted some solder to tin the tip, but as soon as it was applied to the joint, conduction cooled it so the temperature was not maintained.  Again, not suddenly, but a little worse each day until I was heating the joint for so long that I was concerned about damaging components, which may in fact have been the cause of the next issue.  I removed the tip and made sure it was all clean and the element properly installed and all tight.  I even went to the shop to buy new solder, and perhaps some extra flux, I had to try something, and was fortunate to be served by a guy who said even old flux solder should not be a problem and gave me a soldering lesson in their workshop.  You don’t get that with mail order.  I tried it at home, but concluded that something was wrong still and used the excuse to buy a new soldering station with an LED temperature display.  It worked like magic, and the board was soon complete.

A close visual examination and checking, then a few basic tests for continuity with the multimeter, all the usual stuff, and held my breath for power on.  All looked fine while I started checking voltages before inserting the chip, then the dreaded smoke!  Not a little wisp, I suspect everyone manages to let it out some time, but I have done it very rarely before now.  And it was spectacular.  More like a weld arc than a blackened component, and some parts were clearly totally destroyed before I could disconnect the power as you can see.  I am still not totally sure of the real cause, but several factors may have combined to cause the result.

I had constructed the circuit on a little project board that is part of the system.  It has the printed circuit to take the chip, and basic programming components, and a matrix of holes with a pattern of connections, on the standard grid spacing for mounting components.  I do wonder how students cope with the mounting holes provided, 1.6 mm diameter and very close to some of the tracks.  And the trap for me, is that it is very tempting to use as many of the holes as the size of components allows.  My first trial circuit was ambitions and had the power supply regulators and capacitors and all on that tiny board.  Probably ok for an expert, but that’s not me.  My soldering issues may mean that some of the components had been overheated, and damaged, perhaps not enough space around the regulator chips for cooling, or perhaps most likely, the little tantalum capacitors which are polarity sensitive, with very tiny markings, and in the cramped layout I may have got one the wrong way around.  Tantalum was  not totally necessary, but I think they are better quality than some of the alternative, so I went for quality rather than saving a few cents on each of 4 components.  Polyester next time, I think.

Well in the dismay, I forgot to take photos apart from the one taken later.  I unsoldered the whole board, and discarded all the components that even had a remote chance of damage, even resistors, though they still measured as the correct value.  I cleaned up the board, simplified things by leaving off the regulators and other power supply parts, and resorted to two battery packs to reduce the opportunities for making more errors.

I considered a new board, but the end with the chip mounted seemed ok so I decided to have a go with the original board first.

I was very relieved to find that it all went as it should have the first time, survived close examination and even temperature checking with the infra red instrument for half an a hour or so while I also had a coffee. 

It passed all my inspection tests, both visual and with the meter, so I inserted the chip, and thought about how to work through a test process.  After all, this is a “proof of concept” project, and apart from finding suitable commands for the program in the manual, and following the suggested interface circuitry, I did not really have any way of knowing if it would all work until it was tried.

The great thing about a microprocessor is that it is very easy to reprogram different functions so long as they only involve the same interface devices.  So I devised some test procedures.  I will report on those next time.

Thanks to everyone following along.  Encouragement is all the more important when things are going wrong.

MJM460

Title: Re: A digital governor for model engines
Post by: gunna on May 15, 2020, 09:48:46 AM
Hi MJM,
That second pic has all the hallmarks of a tantalum in reverse polarity. The regulator chip may still be ok, it just seems to have the innards of the tantalum all over it. However, having said that, I can't see from your first pic that there is a tantalum anywhere near the back of the regulator so maybe the tantalum did take out the regulator.
I don't know what power supply you were using but if it has adjustable current limiting you should try to set it as low as possible when testing. Your whole circuit at this stage is unlikely to need more than about 50mA and probably much less so a supply of a couple of amps or more can be a recipe for disaster.
Regardless of all that, I am finding the whole project fascinating as it also combines my main interests.
Ian.
Title: Re: A digital governor for model engines
Post by: MJM460 on May 15, 2020, 11:19:31 AM
Hi Gunna,

Good to hear from another Melbourne Model Engine Maker.  Thanks for the comment about the tantalum capacitor.  You are right, I cant see where the fourth on is in that photo, possibly that shadow by the electrolytic or it may have fitted easier the other side of the regulator.  It has taken me a while to recover from that point, and I can’t really remember now which side it was.  But the eyes need a magnifier, the fingers need tweezers for that component density, and while I remember trying to check the polarity, it’s not easy to see in there, and I could have missed one, or just not been able to see.  Obviously that should have been a signal to try some other way.  But I must have been just plain tinny up till now, as I can’t remember doing it so spectacularly before, so have no history to know what it would look like.  I did try and adjust the components a little after assembly to make sure that nothing was touching, but it was not enough.  Probably good that it failed while I was watching and not some later time.

I suspect that some of the components might have escaped more than superficial damage, but I decided on caution, as I did not want a faulty component to do it all again.

The power pack is a 9 V, 0.5 amp plug pack, the only 9 volt one I have, and I was looking for enough margin for what the servo might use, and I wanted to have enough voltage margin for the regulators without the voltage drop and associated power loss of a 12 V one.  It has no manufacturer name but the complete model number might yield clues, MWD41-0900500AS.   No memory of what it came with.  But the idea was separate regulators, that diode to help stop spikes from the servo reaching the processor, with one plug pack supply.  I believe the diode still leaves voltage margin for the regulator to be happy, but no idea whether it would really achieve my intent.  Possibly even right idea but wrong component selection?

I think that your current estimate is pretty close for the processor side of the circuit.  With 11 components associated with that power supply, you can see how it opened up the board when I took it off.  Another little lesson to file away. 

Thanks for your interest in the project.  For me it combines a little of my career knowledge, with my hobby activity, but while it is  simple in concept, some of these practical aspects are definitely stretching me.

MJM460

Title: Re: A digital governor for model engines
Post by: jadge on May 15, 2020, 11:54:34 AM
I will pat myself on the back for already having thought of a Schmidt trigger, and purchased a chip with six on board along with the parts I purchased before the lockdown for the project.


I'll bet it was a 74HC14 or variant of same.  :)

How much variation is there on the ADC? Plus or minus 1 bit is normal, and unavoidable. Any more and it'll be due to external noise or deficiencies within the ADC. A 10-bit ADC shouldn't really have a problem with non-linearity, but some high resolution ADCs are quite poor on accuracy, even if they're designed to be monotonic, ie, no missing codes.

My schematics are not ISO compliant, and in all the decades I've worked in electronics I've never come across a company that used the ISO standards. It's one of those things that sounds great, but in practice most companies have their own inhouse standards. I've decided not to post a schematic. All of them are commercial, and while some are old, and it's very unlikely the client would ever know, it would be embarrassing if they did. It's not really worth delving into my 'rules' for creating schematics as I use a schematic and PCB layout package, albeit a fairly cheap one. But it does all I need up to 8 layer PCBs.

I am happy to acknowledge 'steam guy willy' introducing me to the concept of an electric boiler at one of the Forncett Steam Museum Model Engineers days. I had plans to build one to help test the injector I am designing for my traction engines. It's on hold at the moment, due to other projects, and some doubt as to whether my silver soldering is good enough for a boiler running at 170psi. I have seen the relevant schematic, although I'm puzzled by it. The article says that it switches off at operating pressure and if the ambient temperature is too high. But for the life of me I can't see where those parameters are measured and fed back into the control loop? The schematic looks like it runs open loop?

I'm not going to comment on the soldering saga.  :-X  Except for two points. One, the old cored resin flux will be fine. It can take me decades to work through a reel at home. Two, there are two important parameters for soldering, temperature and heat. I run my 80W soldering irons at 360°C. I routinely solder components down to 0402 (1mm by 0.5mm). With plenty of heat behind the bit one should be able to make a sound joint within 5 seconds or so.

Andrew
Title: Re: A digital governor for model engines
Post by: Roger B on May 15, 2020, 12:51:16 PM
A long time ago in Maschinen im Modellbau there was an electric boiler using the parts from an expesso machine. This had a relatively low capacity but was enough for demonstration purposes. I will see if I still have the issue.
Title: Re: A digital governor for model engines
Post by: Admiral_dk on May 15, 2020, 07:29:36 PM
A note about using a Pot as input to control a MCU. I read in a German magazine back in the eighties that you should not use it for more than 7 bit accuracy. I have found this to be true - not because you don't get a better resolution from the ADC (Analog to Digital Converter) - but simply, without a bloody big knob on it, the user can never get the same value again. Just put a display on the MCU an having it writing the value it gets from the ADC and try to hit the value you desire is difficult with 7 bits (0-127) - 8 or more bits are impossible (with a one turn pot) ...!

Some of the FirmWare I write for our music equipment, I even start by AND (-ing) the Pot values down to 6 bits (0-63) in order to get the Feel right the user experiences .... Oh and that should be the 6 most important bits - this can be done in various ways depending on value format (Fixed / Floating Point) etc.

What I'm trying to tell you - do not expect to get a high resolution, as in I got 10 Bits -> 0-1023 steps in RPM and put a tacho on the engine and expect to tune it to a specific RPM over a big range.

I think the proposal about a total failure of a Tantal Capacitor is correct as they can die in a big flash without too much power behind the destruction, if you get the polarity wrong. I witnessed that first hand in my first job after studying for a degree in electronics, where we got a shipment on 100uF 6V3 Tantal Capacitors where the manufacturer had got the polarity markings wrong  :zap:   :Mad:   :cussing:  - Quite a show and shock when a big number off them go off more or less 30 seconds after applying power to a big central Harddisk controller for multiple computers .... to say that no-one was amused would be an understatement.
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 16, 2020, 02:45:15 AM
Hi MJM. some Tantalising info here  :lolb: :lolb: :ROFL:..

Willy
Title: Re: A digital governor for model engines
Post by: MJM460 on May 16, 2020, 11:01:09 AM
Hi Andrew, I usually avoid those TTL components and go for the CMOS version instead.  Probably a preference based on an early experience, and more due to ignorance of the need for enough capacitors on the power supplies, but to me the CMOS versions seem a bit less fussy for me to use.  The workshop elves have obviously decided they need it more than I do, and I have misplaced it to check the actual chip, but using these things for my own circuits, I download the data sheet so I can understand what happens inside the plastic case.  And the CD40106B CMOS Version data sheet is safely tucked into my folder of documents for this project.  My supplier has both.

The ADC seems to bounce around perhaps +/- 2 or 3, and it is interesting to see your comments on that.  Obviously not a precision system, but very accessible for a beginner or student to learn the principles.  In this application, I don’t really need precision, it won’t be hard to be better that adjusting the spring pre-load on a mechanical governor.  Running blind, it gives me a knob to adjust the set point, and with a display, an RPM reading to tell me what the program is aiming for.   But I do appreciate knowing the difference between what I am using and a precision device.

The circuits I refer to are from a French company, and may also be as much an internal company standard rather than strictly ISO, as you use, but while I can recognise that they are to a strict schematic standard, as a hobbyist, I do find them very hard to read in places.  My sketches are based on the simple examples in beginner documentation, modified to include details that I need to help me connect things the right way around.  Hence the hen scratching around the edge, some of which also confuses me when looked at a week later.   I could try two separate drawings as Don suggests, but then I would have to draw it twice, and custom printed circuits are a whole extra level.  So I try and lay out the diagram so I can get away with generic universal boards.  It always disappoints me that I have not found one that truly matches the common plug in type breadboard, so my layouts can never quite be transferred to the soldered variety.  And while it is practical these days to access the software provided by manufacturers to design for them to make the board at quite reasonable prices, it is still a step too far for me for the amount I do.

I feel familiar with Willy’s electric boiler as it featured prominently in my Thermodynamics thread, though I have never seen it.  It is a great idea and clearly works well, but I also find gaps in the circuits that I can’t quite follow.  But Willy is better qualified than me to deal with mains voltage, I just stick to designing the boiler as I understand that aspect better, and I have a very experienced mentor to help with the silver soldering quality.

Least said about my soldering saga the better, but the new iron I purchased is 80 Watts, and the old one was definitely faulty.  It did reach the temperature fine, but something that changed over about two weeks clearly limited the heat flow.  I might go back for a finer tip for the new one though.  Thanks for the temperature suggestion, that information was less easy to find, and very close to what I am using.  I have been habitually counting slowly to 5 with the iron contacting both parts I want to join, touching the solder to the joint then removing the iron, ever since I had to find a way to teach my grandson how long to heat the joint.  It works well for me too.  Good to know the solder should be right, I can keep using that.

I am envious of your ability to solder those surface mount components, I remember reading about them when they first came out (here anyway) but they were beyond my eyesight then, and it has not got better.  Through hole components, well spaced out for me.

Hi Roger, it is amazing what people get up to using otherwise scrapped appliances.  I thought those code machines were usually stainless steel, though obviously a pressure vessel grade.  I don’t know how many of of us could weld that to our system, though perhaps silver solder would do it with the right flux, I really don’t know.  Now if we could contact Pavel.....  I am sure he could do it.   Have you followed some of his amazing welded boiler builds?

Hi Admiral.  The evidence for those capacitors is mounting.  I knew they were polarity sensitive, and prone to spectacular failures, but this was the first time I have seen it.  To see a large number go at once in a manufacturing situation, yes, people would not be amused.  We’re they really only 6.3 V?  Or have I got the code wrong?  It does not seem like much margin, but you probably had much more information on what you were dealing with than I have in my environment..  The catalogue says mine were 63 V, which should be way more than needed for any rippled from the 7805.   Or is voltage margin not necessarily good?  But the polarity was almost certainly the issue anyway.

The extra information about precision of ADC devices is also much appreciated thank you.  It is really interesting to me.  As a hobbyist just dabbling with low end components, I have the feeling that better is available, but I don’t find it easy to find out what the real thing is capable of.  But the cheap components have a real place as an accessible learning platform.  Fortunately, as I have mentioned, the application is not really demanding for precision.  I will be happy if in the end, I can get the boiler up to pressure, then run the engine at relatively constant speed for thermodynamic tests, and eventually even a brake test, all with reasonable stability.  In the end, it’s not driving an AC power supply with strict frequency requirements, slide rule accuracy is more than adequate, even a 6 inch slide rule with two significant figures at best.  Probably way better than a miniature pressure gauge.  Although, come to think of it, I should get hold of a better one that has been checked, and see how good or bad the little ones really are.

Hi Willy, you could say it is tantastic.  (That got the spell checker, I had to be really insistent).

Thanks to everyone for looking in

MJM460
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 16, 2020, 01:25:36 PM
Hi Jadge , on my boiler there is a separate pressure switch that switches the mains off directly. It is the Large blue item that is connected directly to the boiler... This Cct was designed and made by an electronics friend of mine And he also etched the PCB as well.  Hi MJM  a long time ago when I was electronicalising things with PCB's and FeCL3...Ferric  chloride   my brother that was a ERA in the Navy told me they used FeCl3 as a boiler water additive to keep them from furring up ?? if my memory is correct ??

Willy
Title: Re: A digital governor for model engines
Post by: MJM460 on May 17, 2020, 01:29:11 AM
Initial test procedures.

You can probably see some of my history in plant commissioning coming out in this section.  Old habits die hard, even if they are not totally necessary in this situation.

I started with a simple program to take the ADC result from the potentiometer input, apply simple maths to make it correspond to the valid range of the servo, 75 to 225, and use that as the servo input to see if the servo properly responds to changes in the potentiometer.  I was very pleased to find that it all worked well.  So time to take it all out to the shed, connect up the compressor to the modified boiler fill plug, and play with altering the governor valve position and see how the engine responds.  I found the the governor valve was indeed able to stop the engine and then vary the speed up to the maximum I have seen in previous running, and was limited then by the compressor pressure setting.  Two thousand rpm seems enough for me, but vibration was starting to increase a bit as the engine balancing has not been very scientific. 

You can all understand how pleased I was that the problems seemed to be behind me, and I could progress.   At this stage, I did not have a display, and was still hand holding the tachometer, so could not gather good data to correlate servo input to engine speed, but overall a successful test.

Next was to test the speed input.  I had no display that I could take to the engine, but the system includes a facility to send date via the programming cable back to the computer where it is displayed on a serial terminal on the screen.  However, the compressor for engine operation was not compatible with my computer location and vice versa.

So I followed Willy’s example, and dug out my box of Meccano which I kept for my grandchildren.  Unfortunately in the days of portable screens they are not as interested as I had hoped.  Things have gone so far that Apple cannot even recognise Meccano as a word.  Perhaps I am spelling it wrongly, but not even getting sensible suggestions.  Such is AI!   I assembled a few gears on shafts to increase the speed from what I was prepared to turn the crank handle to something more like engine speed.  I had a spare optical interrupter component, so again in good Willy style, I used a bit of Perspex to mount that onto the Meccano frame.  I retrieved the wheel from the engine, which easily fits on a Meccano shaft as I have always had it in mind to make up some models to drive with my engines one day, and connected it all up, so have made at least a short section of the engine shaft standard Meccano diameter.  These days I should have gone for Lego.

This experiment was quite instructive in another way, it very clearly illustrated some important aspects of stability of rotating shafts.  I had geared up to a speed beyond what is normally done with Meccano, though I am sure many kids have done it over the years, and the considerable slack in the bearing areas where the shaft rides in the fixed frame allows the shaft to whirl, and the resultant shaft motion and the effect on the gears not only makes a horrific noise, but also increases the drag to the point where it severely limits any further speed increase.   A little sewing machine oil, or three-in-one, did not make much difference, so I put on my dynamics hat, and rustled around in the box of parts, and found a few of those components which have a brass bush fitted to a short strip.    The stability of a rotating shaft is highly influenced by the damping provided by the bearings, and the generous clearance in the punched holes of the strips, and the minimal thickness of the strip makes for minimal bearing length and area, so not enough damping.  The Meccano bush is a much closer fit than the standard holes in the strips, so by bolting these in place so the high speed shaft ran in the bush, and adjusting the bolts so it was nicely aligned before final tightening, I much improved the dynamic configuration, and could easily turn the shaft to a much higher speed.  The total speed increase was 27:1 in three stages.  I thought I might have to work on the middle shaft as well but it turned out to be unnecessary.  I added a couple of heavy rubber tyred wheels to even out the speed a bit by flywheel effect, applied a little oil to all the bearing surfaces and it all worked like a charm.  I should have spent a few more minutes to find two matching ones at least!  If you have ever tried pushing the limits of load bearing or even longer term operation of Meccano models, you will know that those thin strip members can wear a groove in a shaft quite quickly.  I have an abundance of grooved shafts, mostly from my brothers efforts as I recall, as he was more gung-ho than I was and made some amazing model cranes to lift heavier objects than Meccano was designed for between the levels of our two story home.  The oil seems to have been sufficient so far, but vitally important.

Turning the handle with everything connected gave speed readings of up to around 2000 rpm.  At this stage, I needed the digital tacho to check how accurate that was, I did not have enough hands to hold the Meccano frame, turn the handle and hold the digital tacho as well.   So calibration checks had to wait until it was mounted on the engine.  A quick engine test showed that the engine was also running at about 2000 rpm at maximum speed, but now I had no display.  Not in any way an accurate calibration method, but seemed promising enough to continue.  The pressure to add a display to the project was mounting.  But at least everything seemed to be working, and while I am hoping to measure four consecutive pulses, and average them to eliminate the variation within each revolution of a reciprocating engine, the test rig gives four pulses which are as equal as my machining of the light interrupter wheel, so the pulse counting is at least working well enough to “pass the pub test”.  Proving that I am getting four consecutive pulses to properly sample the average engine speed within each revolution will have to come later.  More precise calibration checking will also have to wait.

Hmmm!  Potentiometer input seems ok, servo operation seems ok, pulse counting seems to give reasonable results for speed.  Nothing for it now but to complete the control loop, and see if it all works together to control the engine speed.  So a few program changes and a new day tomorrow.

Thanks for following along,

MJM460
Title: Re: A digital governor for model engines
Post by: MJM460 on May 17, 2020, 02:27:12 AM
Hi Willy,

I have some awareness of boiler water treatment, as almost all the plants I worked on had steam systems operating at reasonable pressures, considering that they were not Power Utility size plants.  (The notable exceptions were the off shore oil platforms, which tended to not involve steam.)

I am not a specialist in chemistry, though I know the equipment involved in getting the chemicals into the system.  Those plants are all constructed from steel, so involve different chemistry than that appropriate for our copper boilers.  Part of the process for steel equipment is to remove oxygen to reduce corrosion, but there is quite a bit of much more complex chemistry involved as well.

I would have confidence that the navy does thoroughly know the chemistry and the appropriate processes for their boilers and other more unusual requirements of their application.

The ferric chloride they are using is also used in etching copper on electronic circuit boards as you know.  So I am not convinced that it would be a good idea in our application.  At least not without some careful investigation into the appropriate concentration to use and the possible need for other chemicals to moderate or even modify the reactions involved. 

To my understanding, using distilled water if your available water supply is not too good, and some good blowdown practices are probably enough for most of us.

Water also normally contained dissolved air, so even bringing it to the boil in a kettle before using it to fill the boiler would help reduce its contribution to any problem.  Air is easily removed to a low level by heat, though heating alone is not enough for a high pressure system.  It would even have the advantage of reducing steam up time for kitchen table operation if you fill the boiler with the hot water.

All the issues get much worse at higher pressure, and for our typical operation, I suspect that a clean drinking water supply is adequate, especially with pouring it through one of those ion exchange resins commonly available for domestic clothes pressing steam irons if it contains a lot of calcium salts.  Brown lake water does not comply with my definition of clean if you are running a boat. 

Calcium salts are not very soluble in water and precipitate out at quite low concentrations.  These are the ones mostly responsible for the hardness in what we generally describe as hard water.  I believe that it is these calcium salts that are the ones responsible for most of the deposits in our boilers.  They are very common at saturation concentrations in water supplies which originate in ground water, so arrive at our taps after being thoroughly saturated in calcium salts by being slowly percolated through limestone rock before it reaches the surface.

Beyond that, you need need a water treatment specialist.  Surely someone from that field somewhere is interested in model engines and could be cajoled into giving a talk at a club somewhere.  But they probably only sell the chemicals in minimum quantities that would supply the entire world wide modelling community for ever with one order!  Like tool suppliers, their business model is more set up around industrial applications.

But it is good to always keep a careful eye on any scale buildup in your boiler, as scale restricts heat transfer, so tends to increase temperature of the heater side components and cause trouble.  In your case it could lead to early failure of those electric elements or tube failure in fired boilers.  I seem to recall that Ron Ginger was trying to remove some scale from a boiler at one stage but I don’t recall seeing whether he was successful.  Once formed I understand that it is notoriously difficult to remove.

MJM460

Title: Re: A digital governor for model engines
Post by: Roger B on May 17, 2020, 08:11:35 AM
This is part of the article on the expresso boiler. It looks to be a diecast one like in my old expresso machine with the big screw on cover. Heating control was via a modified version of one of the dimmers that fits in a lamp flex. It also refers to a previous article in 1998 about an expresso boiler which I don't have.

The engine also has a governor incorporated in the flywheel which controls the valve timing.

I like the Meccano test rig  :ThumbsUp:  :ThumbsUp:
Title: Re: A digital governor for model engines
Post by: jadge on May 17, 2020, 08:50:26 AM
.....on my boiler there is a separate pressure switch that switches the mains off directly. It is the Large blue item that is connected directly to the boiler...

Thanks for the explanation. That would be why I couldn't see it on the schematic!

Andrew
Title: Re: A digital governor for model engines
Post by: Jasonb on May 17, 2020, 09:05:50 AM
There is a lot of copy right infringement in this thread, maybe the Mods could do something about it.
Title: Re: A digital governor for model engines
Post by: Jasonb on May 17, 2020, 09:09:04 AM
Boiler treatment is available in 0.5lts for copper boilers so you don't have to get a whole drum
Title: Re: A digital governor for model engines
Post by: MJM460 on May 17, 2020, 02:12:28 PM
Hi Willy and Roger, I believe Jason is right.  If I understand the guidelines it is probably ok to include one picture or a short quote for study or review purposes, but probably not much more.

Perhaps you could each delete your attachments and just include a reference to the magazine and issue date.  The moderators here do a pretty good job, so we could help by editing our own articles so they don’t have to intervene.

Both very interesting articles however, and good advertisements for the respective magazines.  So thank you for referring the rest of us to them.

MJM460
Title: Re: A digital governor for model engines
Post by: Jo on May 17, 2020, 02:42:17 PM
There is a lot of copy right infringement in this thread, maybe the Mods could do something about it.

Jason I think you will find that the author of the article in Engineering in Miniature is someone named Robert Bailey, on the forum he goes by the name Steam Guy Willy.  I believe Willy will know his rights on his own article, not all publishers require the originator to hand over all copyright rights to them

Copyright laws are not draconian they also allow for the use of copyrighted material for discussions/education so long as you do not publish the item in its entirety and you must identify the owner of the copyright with the material and where the material comes from. Roger has stated he has only published part of the article, the copyright owner in this case is clearly show as Dieter Zwingel and he has also identified the source of the publication. I personally think this thread could be considered to be educational as I for one have not seen a digital governor for a model engine and Roger has been good enough to provide an example of another one. Not that I have a clue of what it says  :headscratch:

Edit: If Dieter or the German magazine have any objections we will of course take it those pages down

Jo
Title: Re: A digital governor for model engines
Post by: Jasonb on May 17, 2020, 04:25:31 PM
I see the pages from Model Engineer have since been removed. MTM hold the rights to the work as laid out in their publications, so an author doe snot have the right to post direct from the mag but could post their own original work as submitted.

In the same way I can publish anything from my original beginners series but not  how it was laid out or edited in the mag. That is what the agreement I have signed says and that is a standard agreement that MTM use.. It is not as though its an old article from years ago, only a few weeks old.

I have no problem with the digital governor but that is not Watt what was posted
Title: Re: A digital governor for model engines
Post by: Jo on May 17, 2020, 05:07:11 PM
I saw no pages from Model Engineer when I reviewed this thread. The only person who has posted any pages recently from their magazines was here: https://www.modelenginemaker.com/index.php/topic,9693.msg219716.html#msg219716


For clarity:

In the UK Copyright Law is defined in the Copyright, Designs and Patents Act 1988 it is not dissimilar to copyright law across the world in that it includes a number of exception clauses which can broadly be characterised as Fair Dealing and exceptions this includes:

Under the 1988 Act, it was originally the case that any research use was fair dealing. However, in 2003, the 1988 Act was amended to exclude commercial research from the definition of fair dealing because of the restrictions provided for by the Information Society Directive (2001). Fair dealing for research should be accompanied by acknowledgement, if this is possible.

This is not a commercial site.


The contractual agreement between a publisher and the author that allows a publisher to publish their work is separate from Copyright law. To avoid confusion in 2014 the UK copyright Law was updated as a result of the Hargreaves review to insure that certain research and public interest exceptions cannot be overridden by contractual terms and conditions. That is to say that irrespective of terms and conditions in contracts that may not allow certain activities, UK copyright law allows people to perform certain acts under copyright law.


Jo
Title: Re: A digital governor for model engines
Post by: Jasonb on May 17, 2020, 05:17:45 PM
I suppose that depends on when you reviewed the thread, several hours have passed since your earlier post and me raising the point. Cover images are easily available off the net from digital news stands etc but the content is not.

Posting 4 whole pages of an article about watt governors is not particularly relevent to this thread about digital ones and was not posted by the author.
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 17, 2020, 11:43:36 PM
Hi All, yes the Electrically heated Boiler was my article and I was told I retained the copywrite to be able to use it my self...this was a verbal acknowledgement from Martin Evans the editor at the time. Mitch Barnes is a good friend of mine and I have emailed him to ask about his arrangement with ME magazine concerning his/the copywrite agreement . Thanks for bringing some clarity to this and the legal requirements will be observed in the future .

Willy

Title: Re: A digital governor for model engines
Post by: Don1966 on May 18, 2020, 12:47:31 AM
A simple and cheap boiler controller has 10 amp output with dual input 120-240vac. For those wanting electronic control boilers. Simply put the pressure switch in line with input power. Just plug your boiler into the receptacle and place your probe into the boiler... it can be found on amazon.


Regards Don
Title: Re: A digital governor for model engines
Post by: MJM460 on May 18, 2020, 10:10:50 AM
Thanks Jason for those comments.  We are an international forum, so it is important that we consider the interests of all publishers, both those we see as our own and international ones. 

On the issue of water treatment, those half litre containers sound like a good option when you consider the cost of material and all the work that goes into a locomotive type and other multi tube boilers, particularly for those in areas where scale build up is a known common problem.

Thanks also Jo, it is good to have a little more clarity on the situation, and you have provided a useful summary.  I think there is similar information in the general boards on this site, but would it be appropriate to add that information to one of those sticky threads when all the dust has settled?  It is likely to be lost, buried deep in here.

Hi Willy, good to know that you have it well thought out.  I was aware that you were the author of that article on your electric boiler.

On the governors, it is a very interesting historical summary.  I think the author has put a lot of effort into making it complete.  I don’t think it is primarily a technical article, but it will interest many readers, and may prompt some to buy that copy or even subscribe.  More information is needed about the engine and pump performance to comment on the statement about whether a governor was needed.  It may well have come from one of the original historical sources, and with all the patent shenanigans those days, probably continuing, they were well practiced in slurring vital details to hinder copying.

Hi Roger, like Jo, I can’t read any of the words, but I would like to comment on two of the pictures, hopefully within the spirit of fair study.  The die cast boiler would worry me as castings are generally not allowed in pressure vessels.  However, they are used in coffee machines and pressure cookers etc. and can obviously be designed with suitable thickness margins to reduce the stresses that might cause failure.  Of course in the coffee machines I have seen, the boiler is deep in an outer casing which might help contain the escaping steam in case of a failure. I don’t know much about the ductility of those die cast materials, and that is the main issue.  Another point of potential failure is the connection to the engine steam piping, but perhaps proprietary fittings are used.

I was also taken by the engine drawing and it’s governor.  A little hard to make out but it looks a little like the governor adjusts the valve timing rather than a throttle valve.  Perhaps I am misunderstanding it.

Hi Don, that looks like exactly the right device to control the electric elements from Radio Parts that Willy uses.  It would save those of us without the requisite experience to avoid most of the issues around home made circuits for mains power, especially 240 V.  And cheap enough to make the alternative not worth the trouble.  Because it is near enough to saturated steam in a boiler, temperature measurement can be used as the control input, using steam tables to determine the appropriate setting.  And for those with the skills, a pressure switch as well would provide redundancy for reliability.  The information even mentions its use for bar-b-que and boilers.  A great option for kitchen table engine running.  Thank you for looking it out.

MJM460



Title: Re: A digital governor for model engines
Post by: Admiral_dk on May 18, 2020, 12:07:11 PM
Quote
The die cast boiler would worry me as castings are generally not allowed in pressure vessels.  However, they are used in coffee machines and pressure cookers etc. and can obviously be designed with suitable thickness margins to reduce the stresses that might cause failure.

While I never have seen a pressure cooker - ALL coffee makers I have seen has NOT been pressure vessels, as they are open in both ends - one end to the water "tank" (it self open), and the other end to the "tap" over the filter.
They all fail if they scale too much - but as this increases the temperature quite a bit, this simply melts the build in thermo fuse for the power => no more heat => end of story (I do now that the fuse can be replaced).
Title: Re: A digital governor for model engines
Post by: Jo on May 18, 2020, 12:34:01 PM
Thanks also Jo, it is good to have a little more clarity on the situation, and you have provided a useful summary.  I think there is similar information in the general boards on this site, but would it be appropriate to add that information to one of those sticky threads when all the dust has settled?  It is likely to be lost, buried deep in here.

Members when they sign up to the forum agree to a number of different rules: like not posting porn, spam etc, and one of these rules is that they will comply with their own copyright laws. The problem is that each country has a slightly different Copyright Law and I can only refer to the UK Law and of course Laws change, like the excellent Hargreaves review which ensure that personal contracts such as used by publishers cannot override the research and public interest exceptions.

The correct way to deal with an issue is if anyone sees a post that they think breaks the Forum rules or a member is not acting in a manner we expect on this forum to another member then use the report function on that post  :ThumbsUp:  That way the moderators won't have to waste time looking for something that may or may not exist :headscratch:

Jo
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on May 18, 2020, 12:43:30 PM
Good to see that the project is progressing well, and I enjoyed your provisional Meccano drive system/gearbox.

Apple devices not being able to recognise the word 'Meccano' is a good example of Artificial Stupidity.

 ;)
Title: Re: A digital governor for model engines
Post by: MJM460 on May 18, 2020, 01:09:31 PM
Thanks Jo and Gary.  Now I had better try and post this progress report, its nearly bed time in this part of the world.  Got to be getting closer now.

With the basics of the system all assembled and now proven on my test rig, I had only a little more to do before I could try out whether it would control the engine. 

To avoid the potential problems of flat batteries, I rebuilt the power supply part of my initial circuit, but mounted it on a separate board this time, with the components spaced out a little.   I used a section cut off a piece of veroboard as the design was easily adapted to using those continuous strips.  I allowed space for some mounting screws that would be easy to handle then mounted it on the underside of the wooden platform I had constructed around the engine to support all these components, and wired it to the governor board, as shown in the photo.

The circuit is nothing special, just followed the recommendation in the manuals.  In consideration of the recommendations on power supply for the servo, I made up two power supplies each with a separate regulator and smoothing capacitors, but polyester types this time.  I think I like the appearance of the rectangular form of these devices better than the little tear drop of the tantalum ones, but this is probably not the best selection criteria.

As I was powering both sides of the power supply board from one plug pack, I fed the power directly to the servo side, but inserted a diode in the line to the processor side, and added a larger capacitor between the diode and the appropriate regulator.  Whether this will be enough, I don’t know, but it seemed to be the worth a try in principle.  It may depend on the characteristics of that diode and the nature of the spikes from the servo, so even if the right idea, it might not include the right components.  I will attach my circuit diagram in case anyone would like to comment on how it could be improved.  Some of the capacitors have a higher voltage rating than others which combined with the different values, explains the different physical sizes.  Beginners error again, I bent the wires on the diode the wrong way so when it is mounted on the board I can not read the component identification, I am reasonably sure it is a 1N4004.  Funny thing that did not occur to me before now, I have probably put that diode in the wrong side, so that it will dutifully protect the servo from spikes produced by the processor.

Time to take it all to the shed, and connect up for a run.  I think I have already mentioned using standard linkage parts for a model shop to connect the servo to the governor valve.  But perhaps not so obvious is that even this linkage introduces a further non-linearity between the control unit and the steam supply so also affects the signal before it finally affects the engine speed.  This is just about geometry.  I could have spent some time drawing it up and exploring different geometries, but it did not seem worthwhile as I did not really know what would be best anyway.  The non-linearity might be helpful, or might not, and I was getting eager to try it all out.  So I set it up to “look right”, connected it all up, set the wheel on the shaft so it would interrupt the light beam as the engine rotated, set the potentiometer somewhere near centre as an initial set point and and switched on the compressor.

Now my program was set to send the servo to the designated minimum position then ramp up once rotation was detected.  Anticlimax, that set point was too low.  I increased the compressor set pressure, and gave the flywheel a flick and away it went.  That’s a good sign.  I adjusted the set point and it seemed to speed up to the new point.  But the servo was awfully jittery, moving seemingly randomly, or possibly just over reacting to the speed error.  Furthermore when I slowed the engine by applying some pressure to the rim with a finger, the servo did not seem to be attempting to open up the throttle as it should.  Some program adjustments required, possibly just a typo in the programming of the algorithm, as that was the only part not already tested and found ok.  Definitely not there yet!

Thus started a seemingly endless sequence of taking it all in to the computer, carefully checking the program for errors, reprogramming the chip and back for another try.  Just as well I had decided to try it on air first, switching on the compressor is a lot quicker than raising steam each time.

I won’t bore you with all the detail of how many times I went through the process to try and track down those two problems.  Let’s just say the documentation says you can reprogram the chip at least 100,000 times, and it felt like I was pushing the limit.  Worse, I was getting nowhere.  So much easier in the work environment where I only had to specify carefully what I wanted and the professionals who really know what they are doing, make it all to work properly.  I even concluded that I needed a display so I could see what the controller was doing, which led to an additional significant part of the project, but it really only confirmed what I was seeing, some sort of random glitch that I could not understand.

I finally decided I really had eliminated all the errors, and had the best algorithm I could manage, and went to the excellent support forum for help.  Probably should have done this earlier, but I wanted to give it my best shot first.

It turned out to be a fundamental deficiency in the chip, as jadge has already hinted at.  It was explained on the forum as like a small company with a very efficient secretary.  She has the skills and ability to do everything she is asked, but can only do one thing at a time, definitely a “she”,  a “he” would not have been so efficient.  While her colleagues space out their requests, she can get everything done, but if everyone makes their requests at the same time, or even just too close together, some tasks have to wait.  I thought it an excellent analogy for what could have led to a complex story.

There are three parts of my governor that require that efficient secretary to get the timing just right.  First the pulse input that measures the length of the pulse that allows calculation of the current speed.  That occurs four times every revolution, or there abouts, and it measures in 10 microsecond increments.  Second, there is the servo output which requires a precisely timed pulse every 20 mS, even if nothing changes, and finally, I compounded the problem by trying to display everything possible in my trouble shooting efforts.  The poor lady was probably overloaded just with sending out telexes.  Better than letters in the mail, but still time consuming.  But credit where credit is due, that little chip was handling it all until I actually connected that servo, and could see the effect of what it was receiving.

So many steps in a development process.   And that without exploring the chip higher speed options, which I have not yet tried.  I can see reasons why the chip speed may not have helped anyway, as it is the time required for the events to happen, not the chip processing speed, that seems to be the root cause of the problem.

This is getting long enough for one day.  Tomorrow, I will describe the next step in the project.  We are surely getting there soon.

Thanks for following along,

MJM460

Title: Re: A digital governor for model engines
Post by: Don1966 on May 18, 2020, 06:52:04 PM
Just one thing to add. It is good practice to put the 100nf capacitor as close to the voltage regulator legs as possible to reduce any chance of Parasitic oscillations in the circuit. All in all good circuit.

Regards Don
Title: Re: A digital governor for model engines
Post by: jadge on May 18, 2020, 08:00:25 PM
Funny thing that did not occur to me before now, I have probably put that diode in the wrong side, so that it will dutifully protect the servo from spikes produced by the processor.

Indeed they are in the wrong place. I'm not sure what the 'spikes' are that come from the servo? Do you mean current surges during operation? I'm a bit rusty on RC servos, it's 40 odd years since I stopped playing with RC aeroplanes and started flying the real thing. Any current surges should be taken care of by the regulator, although extra input capacitance won't do any harm. Spikes on the output are unlikely to appear at the input though.

The diode and large capacitor are essentially keep the elephants away components. No doubt you'll say there are no elephants, which just goes to prove that the components are doing their job.  ;D

This is quite a trip down memory lane. Didn't know you could still buy 78xx regulators. Even in their heyday the 6V version was pretty rare, as was the 8V version.

Andrew
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 18, 2020, 10:43:30 PM
Hi All... Further to the posts about the Mitch Barnes  governor article ,,I have received this reply from him...  Also when I try to buy a copy of ME from the newsagents ...it is always tucked away on the bottom shelf at the back  ...where no one can see it !!   I will reply with his answer when I receive it ...good to see the progress on this...Hi MJM. 50 years ago when I used Veroboard  I always used the pins that came with it  ?  Do they still make these items or is it old stock ?? Unfortunately here in Norwich. Maplins have closed down so there is no place to buy these components ,sadly ..

Willy.     
Hello Willy,

I'm going to forward this to Martin R Evans (Muddle Engineer's editor) for his advice. I may be speaking out of turn but I would have thought he would be pleased to get people looking at the magazine.

Incidentally, thanks for asking - I take it as something of a compliment!  Part two will be in 2 issues time I expect.

Well done with the porter governor, something rarely modelled!  But what is the engine you are building? A four column beam?

My regards to Clare and the cat(s),

Upwards,

Mitch
Title: Re: A digital governor for model engines
Post by: john mills on May 19, 2020, 05:02:01 AM
Admiral  Dk
 the  espresso  type machine  with 2 boilers has 1.5 bar steam for steaming milk and for extracting the coffee  and hot water 10 bar these pressures can be adjusted to fine tune your coffee.
   John
Title: Re: A digital governor for model engines
Post by: Bluechip on May 19, 2020, 10:38:07 AM
Hi MJM. 50 years ago when I used Veroboard  I always used the pins that came with it  ?  Do they still make these items or is it old stock ?? Unfortunately here in Norwich. Maplins have closed down so there is no place to buy these components ,sadly ..

Still available at some cost to the personal treasury .....  :(

( Although if you happily paid Maplin's prices for components, you can't be short of a bob or two   ;D  ).

https://cpc.farnell.com/search?st=vero%20pins

Got some of the wire wrap pins about 3 years ago. They seem to have shot up in price since then.  :headscratch:  :old:

Dave

EDIT This lot seem cheaper  :)

https://www.rapidonline.com/Catalogue/Product?Id=34-0620

Title: Re: A digital governor for model engines
Post by: Admiral_dk on May 19, 2020, 12:12:20 PM
Quote
the  espresso  type machine  with 2 boilers has 1.5 bar steam for steaming milk and for extracting the coffee  and hot water 10 bar these pressures can be adjusted to fine tune your coffee.

OK - my bad - as a none coffee drinker, I do not think of Espresso as coffee - so that one I missed completely ....  :-[
Title: Re: A digital governor for model engines
Post by: MJM460 on May 19, 2020, 01:06:05 PM
Hi Admiral, Mum had a pressure cooker years ago when I was quite young.  They are still in vogue here, at least periodically.  The idea is that the food cooks quicker at the higher boiling temperature of water under pressure, and it quite significantly reduces cooking time.  They are basically an aluminium saucepan with an elliptical lid that fits in when then seals with an o-ring to seal on the inside of the rim on the pot when the handles are lined up.  No idea what pressure they operate it, we use the microwave more these days so our pressure cooker is buried at the back of the cupboard.  They have a dead weight pressure safety valve, which lifts, spins, whistles all in a spectacular cloud of steam if it gets too hot as I remember it.  Just saw your latest post, in this country, espresso, or cappuccino, or one of many variations, is probably the most popular coffee beverage.

Hi Don, thanks for looking at my circuit, it’s too easy to keep making the same mistakes if there is no knowledgeable review, but not so easy to get for a hobbyist.  I always wondered about how critical those capacitor positions might be.  It seems I got three out of the four quite close, but the fourth one is the far side of the 100 microfarad one.  But what you suggest makes sense to me, so I will pay more attention to where I put them next time.

Hi Jadge, after last minute cold feet as I typed last night, I later remembered why I put the components that way.  The suggestion is that the servo starting current causes the supply voltage to drop enough to make the processor restart, hence the advice for separate power supplies.  My idea was that the big capacitor might bring the processor through with the diode to prevent the capacitor supplying the servo.  I also put a few easily identified actions in the program before the main loop starts.  This means I can easily see if the processor restarts.  You are quite right, there are no elephants, but whether it is my diode and capacitor, or the minimal torque demanded of the servo that is saving the day, I don’t really know.  I have heard of similar devices keeping lions away, but I didn’t know they worked for elephants as well!  I suspect the issue might apply more to robotics projects which can apply much higher loads on the servo.  That will certainly increase starting currents.

I have to confess that my 7806 was destroyed as described earlier, so the circuit now actually contains two 7805, but both are available from my local supplier.  When I am allowed out again, I will replace it if I see any sign of distress, but the governor valve is moving very easily so not much load on the servo.  At this stage, I have just put quite big heat sinks on the two regulators since the photo was taken.  I have previously tried monitoring radio control receiver battery voltage through a discharge cycle (obviously not enough to do in an apartment by myself when the other side of the world from home on a work trip) and the supply was not far from 5 volts for much of the time.  I suspect the regulator acts like a much lower internal resistance battery providing the source can keep up.  Would that be a reasonable comparison?  I am interested to hear more about wave form and potential for spikes from the regulator.  My knowledge is limited to following the advice to include those two capacitors each side of the regulator for smoothing purposes, but no information on just what they are smoothing.  My guess is a range of frequencies from the pulse nature of the switch mode power supply, and the big and little one are effective for different frequencies per the impedance calculation.

Hi Willy, good to know that you are following up with Mitch and the editor on that article.  Mitch might be able to tell you more detail about just why that pump engine did not need a governor, or where the statement came from.  It was certainly an interesting article.  We still have two major local electronics suppliers, though we have also lost two or three in my time.  Both have veroboard.  There are also circuit board pins that I use as binding posts when I remember for attaching flying leads, but they are not really like wire wrap posts.

Hi John, thanks for looking in.  Does one of the boilers operate at the higher pressure, or is that the pump discharge?

Hi Bluechip, good to welcome you as well.  We don’t have Maplins here.  I know the local stores are much dearer than internet suppliers, but the convenience of going to pick up what I want, and looking before I buy, and not to overlook quite good advice most times is worth paying for.  And local people do need a job.  I have bought a few things not stocked by my local shops on the internet, but for the quantities I buy, the cost to buy locally is not that much, and postage is never cheap here.  Nothing I want ever seems to have free postage.

Really good to have so much constructive discussion, thank you all.  Now I had better get on and post today’s progress.

MJM460





Title: Re: A digital governor for model engines
Post by: MJM460 on May 19, 2020, 01:40:52 PM
Now, at last having an excellent explanation of the issue I was dealing with, I can understand why I was getting nowhere.

The suggested solution was a second chip whose entire job was to receive the required time data from the processor, and send that stream of precisely timed pulses to the servo with no interruptions.  As the chip is only about $3, and I had some spares it looked like a good solution, so another little board was constructed.  First on a breadboard where it worked well, then constructed on a printed circuit with  breadboard like layout.  There are only three resistors and two capacitors in addition to the chip, and the rest is wiring connections for the servo power supply, processor power supply and data input and the programming jack.  The completed board is shown in the first photo.

There turned out to be a bit more to it, as of course that chip still had to deal with receiving data from the main board, and that turned out to be not quite as straightforward as the instructions seemed to imply.  Others on the Picaxe forum have had similar issues, but I seem to be pushing it all a little further than most who post on that forum.  Eventually it was all sorted.  I put the bladed wheel back on the test rig.  Again, I should have made two wheels and had one on the test rig so not to have to keep taking it back and forth.  Similarly, two servos would have been a good idea, but the others I have are all deep inside models.

At last I had the very encouraging result that the servo moved smoothly in response to whether I was turning the handle too fast or too slow, but there was a missing communication link that it could not actually control my handle turning to keep the speed steady.  So back to the engine, and try again.  This time, I am pleased to report that the servo jitter is gone, and it all works predictably, so I really am up to that controller tuning stage I thought I was up to much earlier.

In case some readers are not familiar with control systems, I had better explain what “tuning” means.  The same controller will work for a variety of systems with appropriate interface devices, but each different system responds in a different manner.  Some react quickly to a small change in the input, governor valve position in this case, while some are very sluggish and need a big change to make any correction.  In addition, some have big time lags, that mean the system does not do anything immediately in response to a change in the valve position, and only react much later (in terms of the processor time scale anyway).  The controller has to be tuned to tailor its response to the measured deviation from set point.  If the controller applies too large a correction, the system will swing wildly and can go totally unstable, if too small, other factors affect the deviation before the correction has had time to be effective.  The basic parameter is called the proportional band, which is a factor that determines the size of the valve position change in response to a given measured speed deviation.  It is not the only possible parameter, but is in fact the only one implemented by the normal flyball type of governor. 

With that mechanical governor, the proportional band is determined by the dimensions of the valve linkage, and changes mean back to the milling machine if slots have not been included in the design to facilitate adjustment.  With an electronic governor, the proportional band is a simple number in the program which is multiplied by the error to determine the change in output.  This is the P in the PID description of a controller.  At this stage, my governor would be described as P only, or perhaps P+, as I have not yet included the I, and this application really does not need the D.  However, those factors are both relatively easy to program in an electronic processor with adequate timer facilities and preferably with easier maths capability than this simple processor uses.  Much more difficult on a mechanical one.

The big drawback with the simple proportional governor, is that it cannot totally eliminate the speed deviation, and the error increases as the engine load increases.  If the spring that is used to adjust the set point is accessible, it would be necessary to adjust the spring pre-tension for every change in load.  That is where my P+ (not a very technical term) comes in.  My controller maths actually “adjusts the equivalent of that base spring position” after applying a correction, so the error is at least smaller next time around the loop.  I am hoping that this will reduce that inevitable error to be small enough to not matter for my purposes.  However, it is possible that it will cause erratic operation instead.  Time will tell as tuning proceeds.

 The downside of my design is that that proportional band can at the moment, only be adjusted at the computer and reloading the program on the chip, which is not very convenient.  In addition, the calculation cycle time is effectively determined by the speed of the engine, as slower speed means longer pulses which take more time to occur, and this affects the optimum tuning.  So the best tune parameter does vary with engine speed.  The good news is that at the end of sorting out that communication process for the servo driver board, I ended up with a spare input pin on the main board.  Remember, there are only 6 plus the power supply in total, so one extra is a big deal.  I am hatching a plan to add a potentiometer, and use the ADC function (there are two available) to give me a proportional band adjustment.  More to come on that one.

It’s a bit of an anticlimax really, after a couple of trials of different proportional band values, the governor now works quite well.  It controls close enough to the set point, and responds to set point changes, it responds to load changes there are no erratic servo movements, which would not look good.  It could be described as a bit slow to get to a new set point, but it does so quite smoothly, and a mill engine driven by steam would not really be expected to demonstrate wild or erratic load changes.  Even the flywheel does a lot to dampen response, so it looks good.  But a video of a servo moving slowly does not seem a very exciting prospect, so I am limited to a photo of the engine running, with the display showing the set point and current speed.  It does move a little through a small range,  but appears to the eye to spend more time within 10 to 20 rpm of the set point, but every photo I took, perhaps due to my reaction time, seemed to catch the point of greater departure.

You will note that the rpm is only shown to the nearest 10 rpm.  That is partly about the maths limitations, and even more about my concerns that the processor might not be fast enough if I put in too much maths.  Turned out to be not an issue, but I suspect that to look at such an engine more closely than the nearest 10 rpm is not appropriate anyway.

In the way of tuning, I applied some limitations to the maximum servo movement each loop of the program, and reduced the allowed move for smaller errors.  This added some damping to the response, and made for a slower response to an initial big gap between the set speed and the measured speed, but the effect of slowly approaching the set point, then controlling very smoothly was quite pleasing.  With a few adjustments to the proportional band factor, the performance is quite satisfactory.

I have achieved my aim of demonstrating that with low cost components that are available to hobbyists, a working digital governor can be constructed with performance adequate for most of our purposes.  I see it’s likely application as installation under an engine baseboard, with only a shaft visible to “assist” a flyball governor move the throttle valve for adequate control, but that won’t appeal to all.  Above all it demonstrates the principles of the modern digital governor, which is rapidly becoming possibly the first really significant change to governor working principles since the first flyball governors on those early Dutch windmills.

Probably not adequate for Lohring’s amazing engine experiments, I would want jadge to design that one, but for most of us, just fine.  I want to run it with steam and have a bit of a play after all the sitting at the computer and playing with soldering irons.  I want to explore the effect of varying the tuning parameter and other program tweaks.  I would like to experiment with whether I can prove I have four consecutive pulses and then explore the speed variation within each revolution, probably with a new wheel that has unequal blade gaps and some more complex program modifications.  So you can expect further updates every now and then when Inhave something to report.  It has taken huge self discipline to stick to this one project through to the end but other ideas are now calling louder.  I don’t think I would have got through it if it was not for the present lockdown limiting other activities.  And there is even a set of castings somewhere that are in much need of fondling.

Thanks to all for following along, and again especially to those who have contributed by commenting.

MJM460.

Title: Re: A digital governor for model engines
Post by: jadge on May 19, 2020, 04:45:26 PM
My guess is a range of frequencies from the pulse nature of the switch mode power supply, and the big and little one are effective for different frequencies per the impedance calculation.

The 7805 is an old school linear regulator with a NPN pass transistor. It is not a switching supply. It's a simple feedback loop with the difference between the input and output voltages dropped across the pass transistor. In simplified terms it is an emitter follower. A disadvantage of a NPN pass transistor is that the input voltage needs to be sufficiently more than the output voltage to allow for the base-emitter drop of the pass transistor. Times two for the 7805 as the pass transistor is actually a Darlington transistor, ie, two in cascade. Newer linear supplies use PNP, or P-MOSFET, pass transistors to get lower dropout voltages, at the expense of poorer loop stability. The output capacitor provides stability (it puts a zero in the response) as well as filtering high frequency noise and improving the power supply rejection ratio (PSRR). In other words it helps reduce any noise on the input passing to the output. The input capacitor provides short term current in the event of a sudden load change while the main supply catches up, as well as some noise filtering.

In a fit of nostalgia I've just re-read the 7805 datasheet. The lower value 100n capacitors are not mandatory. But they do help reduce noise and PSRR, so they're usually fitted. Close means within an inch or so, although closer is better. It is essential to have enough bulk capacitance, especially on the output. The 7805 can go unstable if the output capacitance is too low.

I'd be surprised if the servo current pulses were more than a few hundred milliamps. The regulator and an adequate power supply should have no problem with that. If necessary add a few hundred, or a thousand, microfarads at the regulator input.  A 'scope probe on the supply would be informative.

Andrew
Title: Re: A digital governor for model engines
Post by: Admiral_dk on May 19, 2020, 09:24:14 PM
I would have thought that the little 8 pin PIC had more than one possible ADC input and if I'm right you could apply 2-3 Pots - one for P, one for I and the one you already have for RPM.
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 19, 2020, 11:14:58 PM
Hi All....I have had a reply from Mitch Barns about using the info on his article and here it is .....

Hello Willy,

A response fro Muddle Engineer's editor on your request is reproduced below; I think it would be AOK to mention the article in the current issue of the magazine and as he says, the odd quote is OK but not reproducing the whole thing, so there you go.

Glad to see the Bressingham engine is coming on nicely. I wonder if that twin flitch wrought iron plate beam was a replacement? Towards the last quarter of the 19th century such constructional methods were starting to replace cast ones though.  The large Wood Bros engine of 1888 at Markfield has a box girder type beam all riveted together and there are numerous other examples.

Look after yourself and regards to Claire (sp?) and cats etc.

Cheers,

Mitch


Also the response from the ME editor was a definite  No No  with reproducing the printed content of the magazine  although mentioning it is possible... So I will abide by the rules now


Hi Dave , Yes Maplin was quite expensive but when you require just  one 33k resister ...orange orange orange. you possibly saved on postage.

Hi Andrew. do they still make  OC71's. and OC72's   any more.  or is that really old school ?? or as I prefer to say Old's cool ?? also the first Cct I ever made was a flip-flop multivibrator for a metronome.  this was in 1960 and the transistors were 7 shillings and sixpence..!! 37 pence in todays money and still the same price ...6 weeks pocket money !!!

Hi MJM ,  more progress with the project although I am not so familiar with modern chips and things !!Also the comment about the speed control of the handle...on old wind up gramophones and music boxes they actually used a propellor type device to keep the motor running at a constant speed !!? a sort of governor  I suppose ?!!

Willy
Title: Re: A digital governor for model engines
Post by: john mills on May 20, 2020, 12:31:39 AM
with the expresso coffee machine the 2 boilers be cause the temperature needs to be different for extracting the coffee  and frothing the milk or hot water for making tea or other coffee when just hot water is required.so machines use a heat exchanger with one boiler to get the different temperatures. 
Title: Re: A digital governor for model engines
Post by: Don1966 on May 20, 2020, 04:10:47 AM
Glad to see you have it working at least to your satisfaction MJ. The addition of the diode I didn’t quit get how you went about putting it in the circuit. You could put it across the Voltage output in reverse to act as a swamping diode and also put one in reverse across the regulator Input and output terminals to protect the regulator from reverse spikes. The adding of more capacitance in the Input circuit Of the regulator would work to remove the ripple and adding more time constant for current surges from your servo. The 7806 is a 1 amp Linear Voltage regulator with the proper heat sink. Your servo is not going to pull that much but could have inrush current to cause problems in the circuit if it is not proplerly filtered. Just my two cents. All in all I commend you for your efforts and for taking the time to explain your process to other members so they understand what you were doing. Much Appreciated and thanks you!


Regards Don
Title: Re: A digital governor for model engines
Post by: Jasonb on May 20, 2020, 07:35:01 AM
Thanks for the update Willy, confirms what I said and also the same as both editors comments to me when made aware of the thread.

The 4 whole pages from Model Engineer without permission are considered well in excess of "fair use"  and as Jo points out the terms when registering state not to post copyright material unless you have permission. A single picture, paragraph, part of a drawing or similar would tend to be considered "fair use"

Did not mean to have a go at anyone but there may be new members who see a post with 10 pages from magazines, don't know 3 were posted by the author and then get the impression it is OK to post this sort of material.
Title: Re: A digital governor for model engines
Post by: Jo on May 20, 2020, 07:52:04 AM
I do not agree with your interpretation of Copyright Jason, each case must be considered in context.

In the future if any one has any concerns about a post could they please use the "Report to Moderators"  feature, rather than taking it upon themselves to police our forum. Thank you.

Jo
Title: Re: A digital governor for model engines
Post by: MJM460 on May 20, 2020, 12:04:09 PM
Hi Jadge, thanks for that explanation of how the 7805 works, it’s very helpful.  I have seen the circuit of the 7805, but it was beyond me.  A bit intimidating and hard for someone at my level to work out where to start, but at least I have seen it.  Thanks also for the explanation of the output capacitors.  Between you and Don, I am learning a lot out of this thread.  I would love an oscilloscope, but hard to justify for the number of times I actually need it.  I need a neighbour with one!

Hi Admiral, the Picaxe version of the 8 pin PIC chip has only two accessible ADC blocks.  I don’t know about the base chip.  There are definitely compromises in providing the simple interface for beginners.  I use one ADC for the speed set point input as you have noted, and have now learned how to free up a pin to give me access to use it for proportional band.  The issue for the I is the way I understand it requires a timer, and I am already short of those as I have described.  I am thinking I might be able to implement it using a count of program loops as a proxy for time, even though the loop time is variable with engine speed due to the time taken to measure the input pulses.  Still pondering the need for I while I carefully observe the governor behaviour now that at last I have it working.  If I do add the I function, I agree it will need some tuning.

For those unfamiliar with the terminology, I is for Integral, in the calculus sense.  It takes into account the time over which an error has existed, and uses that to boost the correction.  It reduces/eliminates the error inherent in a proportional only system.

Hi Don, I inserted the diode in conjunction with that extra 2000 mF capacitor to maintain power to the processor through any voltage drop in the supply.  My thinking is that if the servo draws a brief current transient each time the motor starts, that capacitor might carry the processor through.  Whereas I understand that beginners  who don’t have an adequate power supply have trouble with random processor restarting due to this issue.  The diode then is intended to prevent the servo drawing on the energy stored in the capacitor.  Of course that idea is based on an ideal diode and an adequately large capacitor.  The performance of the real components I have selected may vary.

As I take in more of what you and jadge are saying, I think that once I include the recommended capacitors associated with the regulators, I am still trying to deal with ripple from those motor transients rather than pulses due to more switching transients from whatever source.  Obviously a servo starts moving often rather than running continuously, though motor commutator sparking also has to be dealt with by capacitors on electric motor driven models, and I assume also internally in servos.  With my governor valve imposing such a small load, it may not be a big issue in this case.

Thank you so much for your support.  You will appreciate that this is not a complex build by the standards of this forum.  The challenge is to devise a concept to make a working governor, similar to the digital electronic governors that are replacing the flyball type on today’s industrial machines.

It’s been pretty heavy going at times to get to the present status, so today I decided to take a break play”.  But I will write about that in a separate post.

Thank you all for such interesting and helpful comments.

MJM460
Title: Re: A digital governor for model engines
Post by: MJM460 on May 20, 2020, 01:57:08 PM
As I mentioned in the previous post, I decided to take a break today and have a play, just to enjoy the achievement after quite a long haul.

When I started this project, Craig was encouraging us to live dangerously and post in real time as we go, warts and all.  I decided I was not that brave, but more significantly, I thought my project might get strung out by life events, and take so long that people would forget what it was about between posts.  And sure enough, I have taken a 17,000 km road trip, had a death in the family, been on a summer beach holiday, and now all this since I started the first steps.  One bright side of the current crisis, is that lockdown has enabled me to spend enough time to get the project complete to the stage of working.  So I am now up to date with my posts, this and any future posts will be in real time.

I hope I have however, been honest about some of the challenges, many of which are just inexperience.  I have been severely pushing my knowledge of electronics, which has always been only at the hobby “dabbler” stage for me.  Overcoming these challenges is what keeps us all interested, even though it is very frustrating at times.

I have mentioned a while back about the need for testing the “transfer function”, or the relationship between engine speed and the required servo position.  Again I am trying to use the correct technical term, but I am not sure whether I should use the engine speed as measured by the governor, or the set point speed. 

I also wanted to explore the calibration of the engine speed as measured by the governor, compared with the speed read on the hand held digital tachometer.

Now making a log sheet and carefully taking readings might sound a bit heavy to describe as play, but there is a limit to how long I would be fascinated by watching the engine run at different steady speeds while adjusting the set point occasionally.  A bit like a video of the servo hardly moving with breaks to the display for excitement.

For the transfer function, I recorded the set point speed, the Displayed speed and the servo position as calculated by the controller.  I had an extra column for the digital tacho reading, and I did a series at each of two different compressor settings to see the effect of air supply pressure.  I don’t have anything to use as a load, so I could not do a further test with the engine under load.  Possibly another Meccano project.  Suggestions anyone?

A table of figures can be hard to digest without the additional challenge of reading my writing, so I put readings into a spreadsheet, and used the computer to draw the two relevant graphs shown in the attachment.

As with any test run, especially with manual recording, there is a degree of scatter in the results.  Readings are rarely absolutely steady so taking a reading involves a degree of picking an average of what you can see on the gauge.  The air pressure gauge was the most active, oscillating rapidly over a small range, which actually makes it easier to pick about the centre.  With a constant compressor setting, effectively a blowoff valve pressure setting, the pressure measured at the engine end of the hose decreased a little as the engine speed, so air consumption, increased.  I have not tried to make a graph of that, though I still have the readings if I decide to explore it further.  The variation seemed reasonably in line with what I would expect, and not very great.

The blue series of points was taken at an air pressure reading of nominally 220 kPa(g), say 30 psig.  The red series was at about 100 kPa(g).  Not very easy to set a precise value between the gauge vibration and the coarse adjustment knob on the compressor, but I left the setting constant for each series rather than try to chase a particular reading.  You can see the difference in range of speeds obtained, and also the difference in servo position required for any speed.  All looks pretty reasonable to me.

The trend lines calculated for the transfer function should allow me to improve the maths in the program, a light bit of evening entertainment some time.  But it was clear that my linear assumption was quite good.  I tried exploring whether a polynomial function would give a better fit, but I had to go to six decimal places to get a constant different from zero for the x^2 term, and then it was still 0.1, so linear is more than adequate.  I was really expecting it to depart from linear much more dramatically.  The graph does show that I could extend the low end of the operating range by lowering the minimum governor position to about 120 instead of the current 135.  I will check if the servo linkage will allow this without binding.  I think the engine has loosened up a bit with more running as it would previously not run below 135 position.

You can see that the lower pressure required the servo to open the valve more to achieve a given speed.  An increase in engine load would be expected to move the curve in the same direction, but how much would depend on the load.  Another whole range of possibilities for experiment.

The calibration curve is possibly of even more interest.  This checks the accuracy of my pulse measuring and bladed wheel approach to speed measurement, so of interest for any speed measurement application.  The trend line for this suggests that the calculation is giving a reading about 4% high.  I suspect that is a combination of any inaccuracy in my machining of the blades, and the difference between the exact switching points of both the on and off of the input to the processor and the assumed timing exactly with the edge of the blades.  I will have to give that some thought.  More puzzling is that there seems in addition to be a constant error of about 20 rpm across all speeds.  Another puzzle to ponder during the approaching winter evenings.  No road trip to interrupt this year, unfortunately.  This curve is obviously not affected by the air pressure, so all the points are valid from 400, which was the minimum engine speed with the servo at minimum position, to the maximum achieved with the higher pressure, displayed as 1840 rpm, and reading 1800 on the hand held tacho, are valid for one curve.

With more time to observe today, I notice that the settling to a new speed is reasonably quick despite my earlier feeling that it was a bit slow, and it seemed to settle quickly with reasonable overshoot, and perhaps two or three well damped oscillations before it settled.  Pretty good for a proof of concept. 

Overall a successful day.

Thank you all for following,

MJM460

 
Title: Re: A digital governor for model engines
Post by: zeeprogrammer on May 20, 2020, 10:37:16 PM
Overcoming these challenges is what keeps us all interested, even though it is very frustrating at times.

Indeed. I'm an engineer because I love solving puzzles. That was my job.
My problem is that once I see a solution, I'm pretty much done. It's why I'm a starter and not a finisher.
Once I see the solution, I'm looking for the next puzzle.

Ah the 7805. I've used those many many times. Back in the day.

Anyway, not to hijack the thread. Just letting you know I've been following.
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on May 21, 2020, 01:18:48 AM
Hi Admiral, Mum had a pressure cooker years ago when I was quite young.  They are still in vogue here, at least periodically.  The idea is that the food cooks quicker at the higher boiling temperature of water under pressure, and it quite significantly reduces cooking time.  They are basically an aluminium saucepan with an elliptical lid that fits in when then seals with an o-ring to seal on the inside of the rim on the pot when the handles are lined up.  No idea what pressure they operate it,

MJM460

I seem to recall that you can expect about 15 psi from a household pressure cooker. Some people use them as boilers to run small oscillators and the like. Just with it sitting on the cooker hob, and steam oil/water emulsion spluttering all over the kitchen worktop...  ::)
Title: Re: A digital governor for model engines
Post by: Zephyrin on May 21, 2020, 07:45:29 AM
Hi MJM, Nice achievement with your regulator, very pleasant to follow.
I supose that the speed and reactivity of the set up depends on the the size of the flywheel and the load of the engine, of inertia at large...even if the electronic reacts at a quarter of a turn.

We use here the the pressure cooker in the kitchen very often, mainly for vegetable soup, I did not test the pressure but 15 psi seems a good estimate.
I'm not allowed to steam my engines with it, even if I know that it would be a piece of cake for this boiler.
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on May 21, 2020, 09:30:08 AM
Great for soup (seals in the flavour), and they make short work of brown rice too.

It's ok to run engines on them, but probably not at the same time as you are cooking food in them.   :)
Title: Re: A digital governor for model engines
Post by: MJM460 on May 21, 2020, 01:02:22 PM
Hi Willy, I do believe I have overlooked your comment on the gramophone.  My earliest recollections do include wind up ones but I don’t remember hand cranked designs.

The propellor would not be a governor, but the torque to drive a propellor varies with the square of the speed, and the power with the cube.  So as you crank the handle faster, when you reach a certain speed the torque and power required is increasing quite rapidly with speed of rotation.  Consequentially, it becomes relatively easy to maintain a steady torque on the handle in that region, and thus approximately constant speed.  But propellors make noise when they are going faster.  I don’t know how they dealt with that, perhaps it helped to cover the scratchy sound quality.  And of course the sound quality, if that is the right word, would also help up you get a feel for how hard to turn.   I imagine that an experienced operator would be able to coax better sound out of the recordings.   I don’t know if they would have had a centrifugal brake mechanism and perhaps a flywheel as well to help maintain an even speed, probably more important than the actual speed in those days.  But it would be interesting to see inside one to see how thy actually did it.

Hi Zee, not hijacking the thread at all, I am glad to welcome you on board.  I am totally with you on that point of when you can see a solution.  It took quite a bit of self discipline to follow this through to being complete on the model steam plant.  Probably helped along a bit by discovering in my Thermodynamics thread that I really needed that stop valve, and the project grew to why not an electronic governor as well.  I am glad that I persisted, as most of the issues arose after I was sure that I could see the solution, both the practical issues of soldering and a rare for me “letting the smoke out”.  And when I finally completed the assembly, I was having trouble with random glitches of the servo.  Tracking that down revealed much more than reading the manual with the syntax of all the commands, and even following all the recommended circuit diagrams.  All my simple tests conducted one or two at a time passed with ease,.  Only when I asked everything to happen at once did I finally discover and eventually solve all the problems and my initial concern with processor speed turned out to be not an issue.  With all that solved, my testing is still revealing better solutions than some I chose.  For example, I followed through to a working controller using pulse times in the logic, and only converted to rpm for display purposes.  I thought that would reduce the processing overhead to keep the job within the chip capability.  But now I see that had I gone to rpm as soon as I had the pulses measured, the system is totally linear, and the maths so much easier, so less processing!  Dividing by the time length of a pulse is quite inconvenient with the integer maths limitations, as well as being non-linear.  I can now see a second generation design coming on with the calculations for the control algorithm, all based on rpm, as not just an improvement, but a better solution.

Hi Gary, so running the engine on the pressure cooker sprays oil all over the stove?  That sounds like the voice of experience.  Mum would be pleased.  Didn’t you get the message about having a separator on the engine exhaust?  But running the engine while cooking food would not be advised.  Boiling in that situation often foams and carries over due to compounds in the food, and those same compounds would really gunk up the engine.

Hi Zephyrin, thank you for those comments.  Now I am past the worst of the problems I am really  enjoying the project.  You are quite correct in that the flywheel and the moment of inertia of all the rotating parts all slow the engine response, so the system has to be slowed down to let the engine react to the governor valve movement.  In fact, I ended up doing this by limiting the maximum servo movement at each loop of the program, so several loops were required to reach the desired speed.  This very effectively damped the response which was initially a bit inclined to oscillation.

With a turbo machine, the speed is quite uniform, so measuring the speed several times each revolution can help, but with a reciprocating machine like the engine I am using, the rotational speed varies significantly within each revolution.  On a full size machine, limiting speed variation to 7% seems a common criteria for flywheel sizing, and it requires quite a large flywheel.   To get a useable speed measurement, you need several points in one revolution, and average them, or perhaps limit to one measurement of the whole revolution.  I have a wheel with dimensionally equal blades and gaps made on the rotary table, and take four measurements of time for the gap to pass, and average the times.  Each measurement is for 1/8 revolution.  I want eventually to try and explore whether I can prove that I am taking four consecutive measurements within one revolution, and also get an idea of how much variation I have.  (Need to be careful of that “can see a solution” syndrome.)

I must try and dig out our pressure cooker, as we make quite a bit of soup these days.  It makes it easy to keep up our recommended number of serves of vegetables despite some dietary issues.  There I go, off on another topic again!  By the way, roughly how long for pumpkin, and similar vegetables?

Thank you all for following along,

MJM460
Title: Re: A digital governor for model engines
Post by: jadge on May 21, 2020, 09:46:13 PM
Hi Andrew. do they still make  OC71's. and OC72's   any more.  or is that really old school ??

The answer is no, and the original Mullard is long gone. I've still got some OC71s somewhere, albeit the later ones with an opaque filler. For the non electronics guys the OC71 was a germanium transistor sealed in a small glass envelope. The original sealant was transparent and some smart engineer found that you could scrape off the black paint on the outside and the transistor then acted as a photo-transistor. Once Mullard twigged this they changed the sealant to opaque. Of course they still sold the devices with transparent sealant, but called them photo-transistors and charged a lot more. It wasn't that long ago that germanium power transistors were still available, the lower forward voltage outweighing the disadvantages, primarily high reverse leakage currents. Although germanium transistors seem to be completely obsolete now some specialist manufacturers still make germanium diodes, mainly for signal detectors where the low forward voltage is a big advantage.

Two other semiconductors from my early days in electronics, the BC108 small signal transistor and 2N3055 power transistor are still available from professional suppliers. Amazing really, they've be going for more than 60 years.

I visited the Mullard semiconductor factory in Hazel Grove (SE of Manchester) back in the 1970s. The people I was with were assessing the company to see if they were fit to supply to the Ministry of Defence. So we got treated rather well! Including a rather nice lunch in the directors dining room complete with beer and waitress service.

Andrew
Title: Re: A digital governor for model engines
Post by: Kim on May 21, 2020, 10:35:38 PM
Two other semiconductors from my early days in electronics, the BC108 small signal transistor and 2N3055 power transistor are still available from professional suppliers. Amazing really, they've be going for more than 60 years.

I remember using the 2N2222 a lot in various projects I did in my younger days.  This was a little plastic package where as the 2N3055 was more of a power transistor in a TO-3 case if I remember right.  I used those too.  Those were the good 'ol days! :)

Kim
Title: Re: A digital governor for model engines
Post by: jadge on May 21, 2020, 11:08:05 PM
........where as the 2N3055 was more of a power transistor in a TO-3 case if I remember right.

Correct, along with the specially shaped mica insulation pads and little plastic top hats to insulate the fixing screws from the heatsink. It was a right faff to assemble and even worse if one had to use heatsink compound. The results could be spectacular if the insulation assembly was faulty.  :-[

Andrew
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on May 21, 2020, 11:40:46 PM

Hi Gary, so running the engine on the pressure cooker sprays oil all over the stove?  That sounds like the voice of experience.  Mum would be pleased.  Didn’t you get the message about having a separator on the engine exhaust?  But running the engine while cooking food would not be advised.  Boiling in that situation often foams and carries over due to compounds in the food, and those same compounds would really gunk up the engine.

MJM460

MJM -

TBH I have never tried running an engine on a pressure cooker, though I wouldn't rule out trying it just for fun and curiosity.

When I was about 12, though - long, long ago - I went through an obsessive chemistry phase and I recall one Saturday setting up a Leibig condenser (rubber jointed - my pocket money wouldn't strecth to saving for an all-glass one) and distilling chloroform on one side of our small kitchen while my mother baked apple tarts at the other side. Strange but true.  :Mad:

Fast forwarding back to the present, however, I don't think my good woman - tolerant as she is - would be quite so indulgent were I to steam up in the kitchen using our pressure cooker, even if it was not being put to simultaneous culinary use. She does, however, tell me (in answer to your earlier question) that it very much depends what you are cooking, but I gather that it probably takes between 25% and 50% of the time it would take in an open pot. And often tastes better.

Funny, though. We started on about pressure cookers here in fun, but now I am seriously thinking that it would be quite pleasing to have one sitting on top of a charcoal BBQ in the back yard driving a small oscillator at 15 psi. Another crazy project, perhaps...

Apologies.  I digress...

 :)
Title: Re: A digital governor for model engines
Post by: awake on May 22, 2020, 01:23:09 AM
This may already have been answered above, and I missed it - apologies if so.

Urgent questions: How long should one run the pressure cooker in order to ensure that the engine is done? With these "Insta-Pot" style that have all the buttons, can I just throw all the parts in, press the button, and it will come out finished automatically?
Title: Re: A digital governor for model engines
Post by: Muzzer on May 22, 2020, 11:15:16 AM
Interesting historical stuff here! I have here the Mullard Reference Manual of Transistor Circuits (2nd edition 1961) that contains everything you could possibly want to know about germanium transistors - and much you probably wouldn't besides. There is even a chapter on the OCP71 phototransistor Andrew mentioned. I recall years ago scraping paint off an OC70 (or 71 or 72? they were selected on hfe) but they didn't work quite as well as the real thing. I'd post an extract here for interest but I expect it would only end up be removed ;-)

Later, germanium transistors were prefixed with an A (eg AC18) and silicon with a B (BC108 etc), with the second letter denoting the application (C = signal, F = RF etc) under the Pro-Electron naming convention. The 1N, 2N etc categorisation was a Mercan (Jedec) system that we had to learn and live with over here. https://www.electronics-notes.com/articles/electronic_components/transistor/transistor-codes-numbering.php (https://www.electronics-notes.com/articles/electronic_components/transistor/transistor-codes-numbering.php)
Title: Re: A digital governor for model engines
Post by: MJM460 on May 22, 2020, 01:48:17 PM
Hi Jadge, I guess that means the TS1, which was the first transistor I ever bought, is now well and truly ancient history.  And it cost a whole weeks pocket money!

Hi Kim, welcome to the growing sub-bunch of electronics enthusiasts here on the forum.  Just as well we need things like governors and ignition systems to allow us to combine our interests.  I am definitely the amateur among most of you, and it has been a great help to me on this project to find so much expertise.

Hi Gary, so long as it was food grade chloroform.  Good to hear that your mother kept an eye on your chemistry experiments.  Putting the pressure cooker on the BBQ to make steam for your boiler gets us almost back to where we started this little side track.  The aluminium pots obviously hold pressure at that level, and even with a flat bottom (unswayed) and nearly flat top, both definitely frowned upon by boiler inspectors.  I know our boiler codes are quite conservative, but copper boilers have the advantage that they tend to fail in a more predictable manner.  I am not sure about the aluminium pot, I have seen melted saucepans, but the pressure adds a new dimension to the hazard.  It would not be good to increase the pressure by adding weight to the safety valve, and definitely necessary to make sure that your method of getting steam to the engine did not disable the safety valve.  Other than that a fun idea.

Hi Awake, you didn’t miss it, but you have raised yet another issue on which there is no previous data (that I know of, anyway.) Those issues seem quite topical these days.  So perhaps you could start to build the data set.  Please let us all know how it goes.  Don’t know how you would design a double blind randomised trial for it though.

Hi Muzzer, good to hear from you.  It really has been an interesting review of the history and the progress that has brought us from those very early transistors that were first released to the market to the point where even I can build an electronic governor to control an engine, and complete the loop by joining it to a steam engine.  The integrated circuit in my little 8 pin chips probably includes the equivalent of hundreds of those early transistors. 

Well not much to report today on my governor.  My wife fell off her bike Friday, and after a few days thinking it was getting better, it took a turn for the worse.  Not a high speed crash fortunately and the ground where she landed was grassed, but she also landed on the end of the handle bar.  So I have been busy doing all the household chores, as well as organising a visit to the doctor.  Doctor says nothing obviously broken and thinks the extra aches and pains are part of healing, but ordered a scan for Tuesday to explore it further if it is not better by then.  All very time consuming, and even funny if it was not so painful.  But it has given me time to take a breath and think through where I am up to.  Also for some excellent lessons in electronics, from which I am sure that I am not the only one who has learned something new.  And time also for this great recap of the history.  I did intend to run the engine on steam, but that is still to come.

Thank you all again for looking in,

MJM460


Title: Re: A digital governor for model engines
Post by: steam guy willy on May 22, 2020, 02:18:02 PM
 Hi All...interesting stuff on transistors.  NPN  PNP. matched pairs >>>> also I think I was told that they made them in the hundreds then swept them up off the floor >>>then when they tested them they put the relevant number on them ?? citation please!!  So what is the modern equivalent of an OC71 ??  also I need an EF92 for an old Sky king radio ...Using a pressure cooker for an oscillating engine would be helpful at parties for cocktails...Shaken  or Stirred. sir?.....  Now back to governors.....!!


Willy
Title: Re: A digital governor for model engines
Post by: Bluechip on May 22, 2020, 02:50:53 PM

  also I need an EF92 for an old Sky king radio ...

Willy

Good Lord .. last time I bought a valve was about 2003-4,   an EF86 for a Mullard 2-valve pre-amp a mate acquired. Quite why I don't know and I suspect neither did he.   :facepalm:  Maybe his central heating had packed up ??

Got the valve from Watford Valves and lo .. it appears they're still in business  :o

https://watfordvalves.com/product_detail.asp?id=4706

Dave
Title: Re: A digital governor for model engines
Post by: Roger B on May 22, 2020, 07:53:21 PM
Long long ago I made an oscillating cylinder engine from an old car brake cylinder with no more than a bench drill and luck. This was powered by my mothers pressure cooker and drove a bike dynamo. With 2kW input from the cooker it could just about light a small torch (flashlight) bulb  ::)

In response to the other part of the thread I believe that it was noted in a Monty Python sketch that you had to cook a piston engine, you couldn't eat it raw (I'll get my coat  :toilet_claw: )
Title: Re: A digital governor for model engines
Post by: Admiral_dk on May 22, 2020, 09:01:21 PM
Just to inform those interested - Valves / Tubes are still in production !!!! - unlike Germanium Transistors.

The reason is that the vast majority of guitar amps use Tubes .... for the simple reason that it is much simpler to make a great sounding amp with tubes than with other technologies. The HiFi nerds are also using tubes although this is almost more religion and faith, than common sense ....
The backside is environmentally unfriendly power consumption and sensitivity to transport. There are other applications that never stopped using tubes too - but I expect this to fade out with new technology.

As to germanium transistors and diodes (I noticed somebody saying the are still in production - BUT they can't be found) are long dead is that newer tech works a lot better and has much better reliability.

Silicium is really starting to be yesterday's tech now in Power Conversion - AC/DC, DC/DC and DC/AC as Silicon Carbide (SiC) and Gallium Nitride (GaN) can cope with much higher Power, Voltage and Ampere, with much higher efficiency and reliability.
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 23, 2020, 02:10:12 AM
Final word  from me about Valves/tubes. Don't forget the KT88's.................

Willy
Title: Re: A digital governor for model engines
Post by: MJM460 on May 23, 2020, 02:02:17 PM
Hi Willy, I could give you a 6BM8 or two and and an ECL82.  But no EF92 unfortunately.  A long uninteresting story behind how they came to be sitting in my cupboard.  One of then has a note on it saying “used but OK”, dated in ‘87. 

I started out only aware of a few transistor ignition projects on the forum, mostly without much detail of how the designs were developed.  Not exhaustive research and I could have missed some, but I have been surprised and delighted to find so many forum members with such advanced expertise in electronics.  Perhaps there will be more governor projects now.  Especially as these little chips and the many similar ones do make the circuitry relatively easy.

I wonder who will be the first to apply one to an IC engine, with the servo not only adjusting the air and fuel flow, but also adjusting the timing accordingly.  Perhaps two servos so the timing can be separately characterised.  Or a small hit and miss which idles over a bigger range between hits.

Thank you for all the very interesting replies.  I think Roger deserves the prize for the most creative answer to the ultimate question, as to why are both pressure cookers and engines feature in this thread.

Today I achieved another two steps.  They were big ones or small, depending on your point of view.  First I revised the program to allow the servo to go further closed than before to extend the available speed range down to about 300 rpm.  In the process, I found that my equation for the relationship between the pot position and the set point speed was also limiting the range, it was not just my imposed low limit.  I had initially found the engine did not like running very slowly, so set a limit where it kept running, but it has definitely freed up quite a bit with the last few days longer runs.  I suppose not surprising, its well over a year since the last series of boiler tests, with no running since then.  Five minute runs to find the program was still not working never quite loosened it up.  I tested this on air to see that my changes had not included a new error.  But it did hunt a bit at the slow end of the range, so I need to put in that second potentiometer to allow a bit of proportional band adjustment, or perhaps a mathematical solution.

Then I fired up the boiler and ran it on steam.  It was icing in the cake to see the engine ramp itself up as the cylinder warmed and condensate cleared, until the governor came in smoothly to control the speed nicely steady.  Not too bad in the way of steam leaks, my flanges were tight, the governor valve worked just like it had on air.  No gland leaks on the glands of the governor valve or the stop valve.  The bonnet of the stop valve is only sealed by metal to metal seating.  It leaked a little, so a gasket is in order.  I will try a paper one.  The bigger leaks were from the engine piston rod and valve rod glands, so it seems like a little fiddling with repacking those is in order.  But it ran up to nearly 2000 rpm, I think that’s not bad for the simple methylated spirits burner.  Plenty of water left at the end of the run, and without detailed measurements, I think quite a lot more than on the previous running.  I will need to do a more careful test, but it appears be quite clear that restricting the speed by the governor does reduce steam consumption as you would expect.  It is tempting to make a larger fuel tank, but then, if I ran the engine faster, I could run out of water, so a gauge would be required.

On the electronics side, I need to apply some coating to the circuit boards for long term corrosion protection.  I am also planning to put them in a sealed container.  In the open, under the engine platform is a bit too close to any steam leakage to be really suitable.  I had a simple plan when the circuit started out as one small board which contained the controller and its power supply.  But now with the power supply on a separate board, and a separate servo driver board, a bigger enclosure is required.  Also, it would be better to move the potentiometer and really all the electrical parts out to a separate enclosure.  Only the speed pickup and servo have to be near the engine.

Then on the program, I will try a second generation, revising the maths with the benefit of the learning so far.  My initial decisions are working, but some functionality could be simplified.

I guess that is the nature of a development project, the scope for just another improvement seems endless.  It might be slow progress from here as another project is calling louder each day.

MJM460
Title: Re: A digital governor for model engines
Post by: jadge on May 24, 2020, 10:17:13 AM
As to germanium transistors and diodes (I noticed somebody saying the are still in production - BUT they can't be found) are long dead is that newer tech works a lot better and has much better reliability.

Silicium is really starting to be yesterday's tech now in Power Conversion - AC/DC, DC/DC and DC/AC as Silicon Carbide (SiC) and Gallium Nitride (GaN) can cope with much higher Power, Voltage and Ampere, with much higher efficiency and reliability.

Germanium diodes are made by American Microsemiconductor:

https://www.americanmicrosemi.com/tutorial/germanium-diodes/ (https://www.americanmicrosemi.com/tutorial/germanium-diodes/)

I can't see silicon disappearing any time soon. I've used silicon carbide devices for a high temperature (>200°C) inverter, but the devices are expensive if you don't need the high temperature capability. Gallium nitride is good for power RF devices as it has a very high electron mobility, but it is also a high bandgap material so the forward voltage across a junction is high - can't see that being an advantage in general power devices.  :)  Ultimately engineering is all about money and silicon devices are relatively cheap.

Andrew
Title: Re: A digital governor for model engines
Post by: jadge on May 24, 2020, 10:37:02 AM

Just as well we need things like governors and ignition systems to allow us to combine our interests.
I had a play with ignition systems a while back for my hit 'n' miss engine. The intention was to make a system that only needed a 10:1 turns ratio in the coil. I got about 8kV on the secondary, from a 12V primary supply, before I overheated the transistor and then moved onto something else. I suspect that a 20:1 turns ratio would be better. I used an avalanche MOSFET with a fast turn off to generate a spike on the primary which should be reflected onto the secondary.

Most discrete MOSFETs have a diode from source to drain which is a consequence of the manufacturing process. In some devices the diode is characterised and can be used instead of external diodes in H-bridges for instance. In an avalanche MOSFET the breakdown voltage of the diode is specified. When a MOSFET with an inductive load turns off naturally the source voltage rises. Eventually this will over-voltage the source and blow the device. But in an avalanche MOSFET the diode breaks down first, protecting the transistor. In my system the breakdown voltage was nominally 800V. I was getting turn off times less than 100ns, which is a bit slower than I'd like. With some tweaking of the turn off driver I should be able to get below 50ns.

Andrew
Title: Re: A digital governor for model engines
Post by: MJM460 on May 24, 2020, 01:39:08 PM
Hi Jadge, at my stage, I can often do a simple analysis of a circuit, at least enough to have a basic understanding of how it works.  But it is the the difference between having a feel for how it works, and the detailed considerations of the component selection, that is a whole new level.  It is most interesting to learn about the design process for your ignition system, and the differences between different though similar looking components.  I do hope that you are still developing that one and will eventually start a thread to help us all appreciate it.

I know that the voltage generated in the coil is dependent on the rate of change of current, so switching  time is obviously important.  But how did you decide on your target of 100 nS?

MJM460

Title: Re: A digital governor for model engines
Post by: jadge on May 24, 2020, 02:39:45 PM
I know that the voltage generated in the coil is dependent on the rate of change of current, so switching  time is obviously important.  But how did you decide on your target of 100 nS?

Correct, Faraday's law of induction states that:

v = -L(di/dt)

In words the voltage equals minus the inductance times the rate of change of current. I wanted a fall time of a few tens of nanoseconds. Simple 74 series logic switches in a few nanoseconds but switching a MOSFET is a bit trickier. While the gate input resistance of a MOSFET is high it is also capacitive. The important parameter on datasheets is total gate charge. This is number of coulombs that need to be supplied to the gate to turn the device on, and which have to be removed to turn the device off. Coulombs are current times time. For the MOSFET I used the total gate charge is 52nC, worst case. If I want to switch in 10ns then I need to remove 5.2A for 10ns. That is quite demanding. And the switching times are close to what my oscilloscope can measure. If we aim for 50ns then the current requirement drops to 1.04A which is easier to achieve.

Andrew
Title: Re: A digital governor for model engines
Post by: Admiral_dk on May 24, 2020, 10:10:35 PM
Quote
Germanium diodes are made by American Microsemiconductor:

https://www.americanmicrosemi.com/tutorial/germanium-diodes/

OK - thank you Andrew on setting me straight on this one - but also strange as a big part of the music industry sobs over that they can't get any Germanium Diodes .... + Googling do not bring them up -> people pays a small fortune for NOS Russian Ge Diodes as they apparently are the last available in the World ....

Quote
I can't see silicon disappearing any time soon. I've used silicon carbide devices for a high temperature (>200°C) inverter, but the devices are expensive if you don't need the high temperature capability. Gallium nitride is good for power RF devices as it has a very high electron mobility, but it is also a high bandgap material so the forward voltage across a junction is high - can't see that being an advantage in general power devices.  :)  Ultimately engineering is all about money and silicon devices are relatively cheap.

I have started to see both kinds in consumer products - but I will agree that silicon will not disappear anytime soon in IC's and many other components - I just added the comment as an indicator about time and progress always moves forward.

Sorry about straying outside this thread MJM.
Title: Re: A digital governor for model engines
Post by: MJM460 on May 25, 2020, 01:31:16 PM
Hi Jadge, that is some current to manage.  Not what I would usually expect in the base/gate circuit of an electronic application, and I can imagine the difficulty of handling it. 

Just looking at the equation for Faradays law again, I noticed the analogy with the mechanical system in Newton’s law, where to change that state of uniform motion, you need an external force.  Mathematically this becomes Force equal time rate of change of momentum.  As momentum equals mass times velocity, and for practical purposes mass does not change.  The direction of the force is opposite the direction of the velocity, so

   F = - m (dv/dt) 

A very similar equation, complete with the - sign.  So we have a component of an analogue computer.  It reminds me we had an introduction to those over 50 years ago when digital computing thought 16 k was a huge memory, but mostly forgotten now.

I have used both the induction and the momentum applications before, just never noticed the similarity.

Hi Admiral, no need to apologise.  The historical points coming out are quite interesting, and just reinforce the understanding of the wide range of interests we all share.  Quite a few hiding their lights under bushels.  Perhaps we need a chatterbox thread about electronics, or another, but more advanced governor project by one of our experts.

My posts will be a bit further apart now as the governor seems to be complete and working.  I will do some of the little tidy up jobs I have mentioned, as fill in jobs over the coming winter evenings.  But they won’t be very exciting to describe.  If something fundamental changes, I will certainly describe it, otherwise just a final report when they are done. 

Now that the best weather of our year is over, we will be allowed overnight trips from next week, so have some catching up to do.

MJM460


Title: Re: A digital governor for model engines
Post by: steam guy willy on May 26, 2020, 01:44:16 PM
I do not agree with your interpretation of Copyright Jason, each case must be considered in context.

In the future if any one has any concerns about a post could they please use the "Report to Moderators"  feature, rather than taking it upon themselves to police our forum. Thank you.

Jo


Hi Jo, nothing do with copywrite and just wondered if you recognise the castings for this ancient table engine that someone gave me a photo of ...it was in a derelict house that someone visited just before it was being demolished ...no further details however ....Thanks

willy
Title: Re: A digital governor for model engines
Post by: Jasonb on May 26, 2020, 02:41:10 PM
looks a bit like a Tayport, how do the sizes compare?

http://www.brunell.com/product.asp?cookiecheck=yes&P_ID=126&numLanguageID=1
Title: Re: A digital governor for model engines
Post by: steam guy willy on May 26, 2020, 10:24:42 PM
Hi Jason ,  I only have this photo unfortunately and it has been made with castings. This is the uncropped photo however...To give a better idea of size ?

Willy








Title: Re: A digital governor for model engines
Post by: gary.a.ayres on June 01, 2020, 10:27:49 PM

My posts will be a bit further apart now as the governor seems to be complete and working.  I will do some of the little tidy up jobs I have mentioned, as fill in jobs over the coming winter evenings.  But they won’t be very exciting to describe.  If something fundamental changes, I will certainly describe it, otherwise just a final report when they are done. 

Now that the best weather of our year is over, we will be allowed overnight trips from next week, so have some catching up to do.

MJM460

Congratulations, MJM, on your success with the governor! It didn't take you long.

A video of it in operation would be good when the time is right for you...

But meanwhile, please enjoy your overnight trips and catching up.

 :cheers:

gary
Title: Re: A digital governor for model engines
Post by: MJM460 on June 02, 2020, 12:15:13 PM
Thank Gary.  When I first decided to try the project, I hoped that it would not take long.  But I did wonder if it could really be done by such a simple system.  So I started, but delayed actually posting until I really had the end in sight. 

It was just as well, as some of the delays along the way would have led people to lose interest before the project ended. It was about 15 months in all if I remember correctly.

Sure enough as you will have seen, there were problems with the one chip solution, but the very helpful Picaxe support forum guided me through to a successful conclusion.  The next generation will have the two chips on the same board to eliminate some of those ugly flying leads.

It is very pleasing to see it work, but a video will be a whole new challenge.  I should be able to do the video, but I guess I will have to try.  The video software I previously used stopped working, as they did not update to windows 10, and my attempt at buying new only proved the inadequacies of my computer.  So I will have to try the Apple version.  There seems to be two options on the iPad, but will have to check how I go on an Apple computer, as that might be easier.  Any suggestions as to what is easiest for editing a few clips together?

Then I will at last have to learn how to post it.  I will try, but don’t hold your breath.

MJM460


Title: Re: A digital governor for model engines
Post by: gary.a.ayres on June 04, 2020, 12:51:32 AM
Ah - ok.

No doubt it makes for a much more interesting thread than the likes of mine, which details every misconception and rookie error. Well, most of them, anyway...  ;)

I would imagine your Apple computer would be the way to go for video editing, a laptop or a desktop system probably being easier than an iPad. I'm not a good source on such matters, though - I use Linux (Ubuntu) and the free video editor 'Pitivi' on my laptop.

As for posting videos - well I'm not sure but I suspect some form of external hosting is required' just as it is for photos. Hopefully someone will correct me if I'm wrong. I just put mine on youtube and then embed them using the youtube button in this editor. Of course, if you don't have a youtube channel you may not want one... and you can switch your video settings to private in youtube but then I *guess* they would then become invisible in the forum here too. Sorry - not making assumptions about what you would want to do - just exploring the matter within my own rather narrow limits.

Meanwhile, no held breath here (i.e. no pressure from me) for a video. Enjoy your catching up!

gary



Title: Re: A digital governor for model engines
Post by: crueby on June 04, 2020, 01:58:05 AM
On youtube there is a setting between private and public, something like unlisted, that lets only those with the link see it. So, it would show uere on the forum but not to anyone just browsing.
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on June 04, 2020, 09:25:11 AM
Ah ok - useful to know. Thanks Chris.
Title: Re: A digital governor for model engines
Post by: MJM460 on June 04, 2020, 01:26:10 PM
Thanks, Gary and Chris.  I have had a look at the clips and iMovie aps on my I pad and it seems clear that iMovie is the one to actually edit clips together.  The Clips Ap might be useful to tidy up a single clip before incorporating it, but iMovie seems to have editing facilities of its own, and also quite good help information.

So first I will have a go at making a short movie, then see if I can post it.

Good to know about those privacy settings thanks, Chris.

MJM460


Title: Re: A digital governor for model engines
Post by: gary.a.ayres on June 04, 2020, 09:26:30 PM
Yes - the setting flagged up by Chris sounds like a real boon generally as it will allow for posting unedited bits and pieces on the forum to illustrate points/work in progress without these having to be displayed to the world on youtube.

Now that I know about this I can see that quite a few forum members probably do it this way.

Enjoy your movie-making - in your own good time!

 :ThumbsUp:
Title: Re: A digital governor for model engines
Post by: MJM460 on July 10, 2020, 10:20:40 AM
Hi Gary, enough procrastination, I have assembled a video and now time to bite the bullet and post.

Not that I haven’t been busy.  We had quite a lot to do when the lockdown was partly lifted, and just as well we got on with it, as now we are back under lockdown. 

I was also able to get a small oscilloscope working to look at some wave forms.  Not a fully professional item, but a small pic chip based unit that uses the computer for much of the functionality.  It is teaching me heaps.  I need to do some more analysis to try and extract some meaning from it all.  But I certainly have plenty of data.  Thanks to an understanding wife, tolerating my running the compressor in the house so I could drive the engine when it was tethered to the computer.

So here is my attempt at presenting the project with a video.  Not ready for the showcase yet, but gives an overview of what a proof of concept looks like.

I am quite pleased with the result so will now install it in an enclosure in a bit more permanent manner.  Fortunately I was able to pick up a few necessary parts in the last few hours before lockdown started.For mental health purposes of course!  With six weeks in front of us now, those of us with hobbies are indeed fortunate.

So keep your distance, and now wear a mask when you cannot stay away from others, and enjoy this little video.

[youtube1] https://www.youtube.com/watch?v=qniJPISyDF4[/youtube1]


Thanks for looking in

MJM460
Title: Re: A digital governor for model engines
Post by: deltatango on July 11, 2020, 01:38:12 PM
Hi MJM,
Have you tried loading the engine to see how well the governor responds?
David
Title: Re: A digital governor for model engines
Post by: derekwarner on July 11, 2020, 02:50:49 PM
Goodness MJM......

That's pretty impressive  :Director:  :cheers:........maybe takes the visual mistique of a steam governor away, but sure will be accurate ...

Will be interested in understanding a little more about the butterfly valve used  :headscratch: in the air path.....would it react in the same manner with steam?

Derek
Title: Re: A digital governor for model engines
Post by: steam guy willy on July 12, 2020, 12:40:48 AM
Hi MJM , thats looking really good and quite impressive ... will you be adding more feedback info to refill the boiler and stoker controls and perhaps a dynamo to power the Cct's  and such like  ??

willy
Title: Re: A digital governor for model engines
Post by: MJM460 on July 12, 2020, 12:00:29 PM
Hi Delta Tango, I only have a crude variable load, rubbing a finger on the rim of the flywheel, but the governor responds quite well, if a bit slowly.  It would not quickly ramp up to full power as would be required for Brian’s edger when the board hits the blade.  But then it’s probably not a powerful enough engine for that load.

Part of the slow response is due to the small burner on my boiler, and my small compressor when on air.   And some is due to tuning.  I am currently rebuilding the governor on a single board in a separate enclosure, and I will include a second potentiometer so the proportional band can be adjusted more easily.  One of the limitations of the chip is that the cycle program is quite dependent on the engine speed, so the tuning is very different at low speed from optimum at high speed. 

Then I had better work on a more appropriate load.

Hi Derek, thank you for the compliment.  Without doubt, for mystique, a steam engine needs a scale governor.  We have some members on the forum with the skill to make the real thing fully operating, but I am not one of them. 

Part of the reason for building this governor was the knowledge that only recently (in historical terms) the fly ball governors are being replaced by digital devices, and I noticed that the microprocessors that I have a play with occasionally seemed to have all the functions necessary to make one, though it turned out to be a bit more complex than a single chip.

For a project needing a better governor than can easily be achieved with true scale, I can see extending a control valve operating rod down through the base board to conceal a helper servo below, but that won’t appeal to everyone.  In the mean time it will maintain a constant engine speed for my engine testing experiments, and it has been quite instructive to develop and build.

As with any butterfly valve, it does not have a very linear characteristic, and the first bit of opening has the biggest effect, while the last bit, when the disk is close to parallel to the pipe flow, has very little.  Some of that can be compensated for by the geometry of the link to the servo.   It it works just as well when I fire up the boiler and run on steam.  No reason to expect it to be any different between steam and air, at least not enough different to be able to tell without quite precise measurements.

Butterfly valves at this small scale are not easy to get to shut off tight, so I made a separate stop valve, but when the piping was complete so I could run, simply operating the butterfly valve by hand, it actually shuts off well enough to stop the engine, and controls from stop to maximum with about 60 degrees of rotation of the shaft.  This makes it very suitable for servo operation. 

I use about 90 degrees of servo operation and the lever lengths to operate the valve through 60 degrees.

Hi Willy, I am glad you like it.  You are quite right to bring up the point of boiler controls.  The throttle valve controls engine speed, but to control the steam plant, if the engine load is reduced, it needs less steam, so the energy input must be reduced.  And less water will be required, so the boiler feed flow will also have to be adjusted.

However, these things do not have to be linked to the governor, and separate controllers are quite satisfactory.  A boiler water level controller will detect the level rising and react accordingly.  Similarly the boiler pressure will rise, and the pressure controller can control this by reducing the fuel flow.  The instruments are quite independent, but they are linked by the behaviour of the steam plant.  The thermal mass in the boiler and the volume in the steam space slow down all the processes so there is plenty of time for separate controls to operate.   Mind you, if the plant reacted much more quickly than the typical fired steam plant, cascading the controls might help, or even be necessary to speed up the response.

Thanks to all for looking in,

MJM460

Title: Re: A digital governor for model engines
Post by: gary.a.ayres on July 12, 2020, 10:48:21 PM
Great video, MJM - it really illustrates how the setup works for the electronically challlenged such as myself.

The system is so precise and responsive. Very tight.

I really like the look of your steam plant too - the boiler and the engine both have that great look that arises from their functionality.

Congratulations on a great project.

 :cheers:

gary
Title: Re: A digital governor for model engines
Post by: Zephyrin on July 13, 2020, 08:19:25 AM
Very nice video MJM, full success with the governor congratulations ! butterfly valve are not the easiest type to make.
your steam plan looks great too.
Title: Re: A digital governor for model engines
Post by: MJM460 on July 13, 2020, 12:22:35 PM
Hi Zephyrin, thank you for the compliment, I am glad you enjoyed the video.  It has indeed been quite satisfying to find out what could be done in this field.  Not enough for an industrial machine, but certainly illustrates the principle.

A scale butterfly valve with a disk attached to the operating shaft, as has been achieved in several of the builds on this forum, is not easy when the steam passage is only 3.5 diameter.  Certainly a task requiring a high degree of skill.  And a real assembly problem.  I avoided the problem by drilling and reaming for a 5 mm diameter shaft through the valve body, and machined a small section in the way of the steam passage to make the “disk”.  I left the leading and trailing edge of the machined portion about 1 mm wide, and this section of the surface of the 5 mm rod, when turned to be against the reamed hole, was enough of a seal to stop the engine.  It is also easier to make a gland on a 5 mm shaft than a much smaller one.  It would not pass a pressure test as a stop valve, but it is quite satisfactory as a governor valve.  The body is just a square block at this stage, it really requires a bit more work on the outside profile to make it a bit less chunky, but it has proved the concept.  More work to make the outside cosmetic form than to make the working internals.

MJM460

Title: Re: A digital governor for model engines
Post by: steam guy willy on July 14, 2020, 08:28:02 PM
Hi MJM , just thought that if you had a Venturi arrangement as per an injector would that give you more pressure in the steam chest/cylinders ?? or would you get wire drawing ?? Just an idea !!
Title: Re: A digital governor for model engines
Post by: MJM460 on July 15, 2020, 08:20:52 AM
Hi Willy,

I am not quite sure how you are thinking of arranging the Venturi and where you foresee the wire drawing.

In principle, I feel that the best way to get more pressure in the cylinder is to fire the boiler a bit harder so it operates at a higher pressure, then make sure you eliminate unintended losses by having sufficient pipe diameter between the boiler and engine, good steam passages within the cylinder, and a valve and port configuration that operates to open quickly. 

Then some fine tuning of the lead so the valve opens at the optimum time.

Finally, make sure you have good clear exhaust passages, valve opening and timing to minimise the exhaust pressure, as there is no point boosting in inlet pressure if it is working against an elevated pressure on the exhaust side of the piston.  It is difference in pressure between the steam side and exhaust side of the piston that does the work.

I hope that covers what you mean,

MJM460
Title: Re: A digital governor for model engines
Post by: steam guy willy on July 23, 2020, 01:55:39 AM
Hi MJM..I was thinking that as an injector can force water into the boiler using the steam pressure from the boiler could the same physics be used to increase the pressure that is available  else where ?? and I dint think I quite understand wire drawing ?!.

Also thinking about governors...will a scale governor have exactly the same effect as the full size component ? thinking about the relative weights as  with my 18th scale engine that weighs about 1 kilogram ..the full size engine is rather more than 18 KG's ! The Governors on most models are always made to scale, however the engines are rarely put to work ?? This question came about by somebody talking about scale models ...So the idea of a Digital governor seems to be a really good and practical idea !!
Sorry this reply is a bit late..
Willy

Title: Re: A digital governor for model engines
Post by: MJM460 on July 23, 2020, 02:05:23 PM
Hi Willy, your model scale at 1/18 means that the mass of the full size engine is 18 x 18 x 18 = 5832 times the mass of the model assuming it is exact scale in every detail, and the model is made from the same material as the full size.  Consequently the governor flyweights are (1/18)^3 or 1/5832 of the mass of the weights on the full size engine.  The centrifugal force on the weights is
m x r x w^2
where r is the radius of the centre of gravity of the centre of mass of the weights from the rotating shaft, and w is the angular velocity of the shaft in radians per second.

The force lifting the collar at the lower end of the arms is roughly equal to the magnitude of the centrifugal force when the arms are at about 45 degrees.  So the force available to move the governor valve has to be further reduced by the scale factor again for that reduction in radius.  Hence the force available to move the governor valve is 1/5830 x 1/18 = 1/104976, say 1/100,000.  Then the governor has to be able to exert that force through the required distance to operate the valve.  (I hope that I have the maths right this time!)

You can see that the maths is against you when it comes to designing a governor valve which has the steam pressure forces exactly balanced, and with sufficiently low friction in the stem seal for the governor to be able to operate it.  And that is without considering how the system has to be set up to get the required speed with the springs or weights that are used to balance the system at the required speed.

I don’t know if this is indeed possible, but I am sure that I don’t have the necessary skill, and I believe that many of the scale governors do not actually operate the governor valve to control the engine at a constant speed.  I am always interested to see news of models where the governors do work as intended.

Many builders of hit and miss engines do seem able to get them working despite the scale factors, but they do operate in an on-off manner, and have advantages in the mechanism used.  But that is the background to my experimenting with a digital version.

With a steam engine, it is not so much a matter of whether the engines are loaded or not, as the idea is to get a constant speed, however, what is important is the amount of governor valve movement that is required to cover the range from minimum load to full load.  Certainly the digital approach overcomes the scale difficulties, though it introduces a requirement for a power supply, but that is a whole other discussion.  Certainly my simple approach seems to be working well, so works as a proof of concept using readily available education level components.  And it can certainly be implemented in more sophisticated ways by those with the necessary expertise.

For models with a vertical shaft, I think it would be practical to extend the governor shaft down through the base board in an unobtrusive manner.  Then the speed pickup could be appropriately concealed under the baseboard, together with the governor valve when the engine is intended only to be operated on air.

Whether it is needed on a steam engine depends on the nature of the load and what effect is desired.  While digital governors are used on modern engines, but application to a slow speed steam engine is probably not representative of any full size practice.

No worries about the timing, just ask your questions when they arise, they are always worth thinking about.  We are back in lockdown and I had just ordered a new computer so have been busy setting that up, as well as rearranging our lives to avoid the need to leave home.  Everything takes more time and thought.  Also rebuilding the governor in a proper case for better protection.

It’s 23:00 here, so way past bed time, so wire drawing tomorrow, unless others would like to join the discussion.

MJM460
Title: Re: A digital governor for model engines
Post by: steam guy willy on July 24, 2020, 02:24:42 AM
Hi MJM... thanks so much for the explanation .. I have been thinking about this for years  but the reply of ...You cannot scale nature    has seamed to be the stock answer !!   There seams to have been quite a lot of research on full size governors to make them more efficient  and many do not seem to have in built adjustment facilities , apart from different sized pulleys... so thamks again and it is  02.30  here in Blighty so am off to bed  !!

Willy
Title: Re: A digital governor for model engines
Post by: MJM460 on July 24, 2020, 12:22:41 PM
Hi Willy, I am another who is not content with off hand statements such as not being able to scale nature, I put it down to obfuscation.  The obvious return is, “Why not?”

In reality, there are limits, but there are also many aspects which can be scaled.  In fields such as fluid mechanics, there are areas for which the requirements for similarity cannot be achieved.  For example the air resistance when an object moves through air requires a viscosity condition which is difficult, if not impossible to achieve with real fluids.  Dimensional analysis reveals groups of properties which are dimensionless, which allows us to predict behaviour of a scaled object from model studies.  Groups of properties such as Reynolds number used in aerodynamics and Froude number used in naval architecture are well known.  To study an aeroplane wing using a model, the model test conditions are selected and the Reynolds number for the model test calculated.  Then the results apply to a full size wing at the same Reynolds number.  Similarly, for a ship model, the Froude number is calculated.  The wave making will be similar in the full size ship operating at the same Froude number.  Unfortunately a different speed is necessary to sturdy the surface friction resistance, so wave making and skin friction have to be studied at different speeds through the water.  However if you look up Froude number, you will find there are several different definitions, used in different fields.  But we are getting away from governors.  Perhaps these questions would be better in the thermodynamics thread.

Wire drawing is a little closer to the topic in that we might see it in a governor valve when the boiler pressure is high but the governor valve is nearly closed for low load running.  Again l have seen different definitions, and I am not sure if there is one “real” definition, or if it is just a term used colloquially in different situations.  I came across the term early in my career, in reference to the very commonly used gate valves used in the thousands in any hydrocarbon processing plant.  They are intended to be either open or closed but if the operator cracks the valve open just a little bit, to throttle the flow, the fluid flows through the small gap at high velocity, and particularly if the fluid is wet, such as steam that has been stationary in the closed pipe, the condensate droplets actually cut grooves into the valve seating, even when it is special hard alloy.  Others may have different definitions, it will be interesting to see if others reply.

You were also asking about using a Venturi like those used in injectors, in other applications.

Certainly I have used steam injectors to take air out of a steam condenser operating at deep vacuum, to increase the pressure above atmospheric pressure so it can be vented to atmosphere.  Any model or full size engine with a condenser needs an air pump, you have seen many of those.  The problem in a large installation is that when the pressure is very low, while the air volume is low, it is mixed with a large volume of water vapour.  An injector can handle those large volumes, but the pressure increase is not as spectacular as the locomotive steam injector.  It is not unusual to require two stages to get to atmospheric pressure.  I am sure there are other applications, but I don’t have much knowledge of them.  Energy is used in the process, and in such processes there are always losses.  Energy wise, pumping a liquid to higher pressure is more efficiently done with a pump than an injector.

I am up to the initial checking of the revised governor build, and if all goes well, I should have it working again in a day or two.  It is on one board in a protective case.  I will have some photos when it is ready.

I hope those explanations helped a little to clear some of the blur.

MJM460

Title: Re: A digital governor for model engines
Post by: Zephyrin on July 24, 2020, 07:00:56 PM
We cannot scale nature, but like a lot of modellers, i'm working hard it this direction !
It is not probably a true scale governor, as my engine is not a real model, but it is clearly a functional one.
By pushing manually on the steam valve lever controlled by the governor, hence removing its regulating action, the speed raises from 250 rpm to 360 rpm, far too fast for this engine, as the unbalance leads to unpleasant jolts.
this action on the control lever requires a surprising force on the finger tip...it is funny to do !
the bronze balls have a dia of 16 mm on a 33 mm rod; the speed of the governor is x 1.7 that of the crankshaft.
the movement of the governor allows 90° of rotation of a rotary valve similar to the carb of a RC glow engine. there are some water drops under the valve as the gland of the valve is only lightly screwed for ease of movement...there is room for improvement.

the way to set the speed is obviously limited, the valve being almost fully close all the time...as the steam pressure is above 1.0 bar.

https://www.youtube.com/watch?v=EEKs0Qr4OZY

Title: Re: A digital governor for model engines
Post by: MJM460 on July 25, 2020, 01:01:45 AM
Hi Zephyrin,

That is outstanding.  A real pleasure to see a small governor working well.  Truly excellent workmanship, and I imagine quite a bit of skilful fiddling with spring rates and so on to make it work so well.

That quarter turn governor valve sounds exactly like the one I call a butterfly valve, though no doubt different in construction from what I have done, and obviously a good way to get a low friction valve operation, even if the stem seal leaks a little.

Thanks so much for posting that video.

MJM460
Title: Re: A digital governor for model engines
Post by: steam guy willy on July 26, 2020, 02:57:31 AM
Hi Zephyrin , good to see the governor working and a nice model too... the governor seems to bee revolving really fast and that maybe why it operates so well...most beam engines are quite slow moving in comparison !?
 Thanks also MJM for the comments about actual practice as well as theory ...

Willy
Title: Re: A digital governor for model engines
Post by: Zephyrin on July 26, 2020, 11:14:27 AM
Yes, most beam engines are slow runner, but often gears were put to increase the speed of the governor...
this little thing always attracts a lot of discussion in steam meetings, but alas I don't see the date of the next one coming, alas...damn times!

in my engine, the governor is simply a speed limiting device, very useful, but not a real governor regulating speed on a broad range as the digital governor does...I learned that, thanks to MJM and his exciting thread.
Title: Re: A digital governor for model engines
Post by: MJM460 on July 26, 2020, 12:57:32 PM
Hi Willy, when the governor is scaled down in dimensions it is perhaps best described as a miniature governor.  It generates the force and movement to operate the valve as determined by the same laws of physics as the full size model, rather than a “scale force”. 

With your 1/18 scale model, the force available is very small compared with the full size machine.

Zephyrin’s model shows what can be achieved with a governor of model size.  I don’t know how that compares with the governor proportions and operating speed on your model.  Note that he says it is surprising how much force it took with his finger to change the speed.  It is possible that the full size governor has way more force available than needed.  To get an idea of what your model could do, it might be worth calculating the forces based on your dimensions.  You could use the lever dimensions to see what movement is available at the valve, but it is probably better to continue the build as you are doing, and see what the governor will do. 

I expect that weight on the governor spindle of your model, being subject to the same scale factors, might need some help with an adjustable spring somewhere on the lever system.  But well worth seeing what you can do.  Use the theory to help you understand what is going on in practice and decide what to do from there.   It will all depend on the mass of the weights length of the arms and speed of the governor spindle.

For my tiny models, only 12 mm bore, a scale governor would have very small weights, and I can’t see my being able to make it work.  But if your weights will be 16 mm or so diameter, Zephyrin has shown what can be done.

Hi Zephyrin, those limitations you mention with your model are very much the limitations of any governor of that type.  First it is a simple proportional controller which gives “constant speed”.  It is set up for the speed at a load, and when the load changes, the engine speed changes and the governor will adjust the valve to restore the set speed.  However, it will not quite get there, there will always be an error proportional to the load change.  The springs must be adjusted to restore the original set speed.  Alternatively, the springs can be adjusted, with the load constant and the engine speed will alter giving a new set speed. 

Modern flyweight governors use the governor to adjust a hydraulic valve which controls a hydraulic system to operate the valve, so overcoming some of the limitations of the simple mechanical arrangement.  I suppose it would be possible to design a steam cylinder with the valve operated by the governor to do something similar, though Jadge made some interesting comments on stability, very early in this thread, which could become a problem, if you get the tuning wrong.  But what you have achieved with the simple mechanical governor is outstanding in my view.

The electronic governor certainly provides opportunities with the wider speed range and so on, just as adding computer control adds to machining capability, and even sewing machines which can now sew forwards, backwards and even sideways, to make alphabets and even pictures.  To me, the interesting thing about my project is in seeing how much can be achieved with a very minimal, readily accessible microprocessor.  But it is very simple to implement, and does not require the skill you have put into that traditional design.  The possibilities with a better microprocessor with decent maths handling are indeed endless.

The progress is a bit slow at the moment, between changing to a new computer, and rebuilding the governor in a more suitable case, I have made too many changes at once, with the usual undesirable result.  Still hoping to have it all running again in a day or two.  There is not a lot to go wrong, but it’s difficult to see which bit is not behaving, as the first step in problem solving.

MJM460
Title: Re: A digital governor for model engines
Post by: steam guy willy on July 28, 2020, 02:19:07 AM
Hi MJM, Thanks for the info ,the governor on the Bressingham engine is a PORTER type...this has quite small balls and a very large weight centrally... I suppose this is acting like a spring, but with a constant action throughout the travel.... a few pics.. will the action of the governor behave differently with steam /air and what % difference will there be ?? the engine is still far off all the finishing touches !!

Willy
Title: Re: A digital governor for model engines
Post by: MJM460 on July 28, 2020, 11:51:42 AM
Hi Willy,

I am not familiar with the different variations of governor design and what makes the Porter type different, unless it is that weight.  A constant force resisting the lifting of the collar instead of the more often seen spring, which provides a force which varies with the compression of the spring.  It would take some heavy maths to determine the precise effect of that weight on the governor performance, perhaps a similar effect as some pre-load on the spring to get the governor action in the right range for the desired speed.

Those balls certainly look small on such a large engine, but a governor only needs enough force to operate the valve , and once the forces are adequate, a bigger engine does not necessarily need the governor weights to be bigger.  But when you then scale them down to model size, they may not be enough to provide the force necessary to operate the model size valve.  The difference between a big governor, and a small one, the forces determined by the physics, are not necessarily  enough for the small one.  On your model, the yokes on the upper ends of the lower arms, will contribute a significant proportion of the effective flyweight mass.

Your model has reached the stage where you can spin the governor shaft with your fingers and get an idea of what force you get.  Make an adapter for the shaft and a Meccano rig to keep it spinning if you want to explore it further.  It will be interesting to see if it behaves in a similar manner to when you spun the full size one.

With the valve, the maths gets pretty heavy to calculate the difference between air and steam, and I have never really conquered flow through an orifice with different gases, but if you remember, earlier in this thread I described trying out the governor on steam, and while the valve position at a given speed may have been a little different from the same speed on air, I did not particularly notice it, there is definitely more difference with a change in pressure.  I don’t believe you would have to modify the valve for one motive fluid or the other.  Similarly, I have described before an experience running a modern small turbine on air as a commissioning test.  The turbine worked quite satisfactorily, as did the governor and governor valve.  As it was driving the oil pump for a large compressor, it was definitely fully loaded for the test. 

The model governor really looks the part beside the full size one, it’s going well.

MJM460

Title: Re: A digital governor for model engines
Post by: MJM460 on September 22, 2020, 12:57:24 PM
Well, we have drifted around a bit while I have been rebuilding my digital governor.

To recap a little, I had the governor working to my satisfaction, but it needed work in two areas to make it reliable for the longer term.  And there was an idea in the back of my mind to try and add the equivalent of the Integral action of the classic PID control.  (No need for the derivative function as has already been mentioned.)

I started out thinking that I could complete the project on a single small standard project circuit board which is available as part of the Picaxe system.  I hoped to just put it in a plastic enclosure under the engine platform for protection from oil and moisture.

The board turned out to be more compact than I could manage at my skill level, and I let the smoke out of some components.  The simple solution was a second board, a small piece of Veroboard to hold the power supply components.  Then, the limits of the processor came apparent, and to deal with timing conflicts in a chip which has only one timer, I needed to add a second chip, on yet another board in order to control the servo which moves the governor valve.  And of course all the flying leads necessary to connect the three boards and other components.  And I wanted to add a potentiometer to allow tuning of the proportional band during operation. 

There was no longer any possibility of fitting the project into a protective box that would fit under the engine platform.  I decided to rebuild it on a larger board, and put it in an enclosure which would also accomodate the display, along with the potentiometers for speed set point and proportional band.

And that is about where I was up to when I last updated my progress.

The reason for the long silence has is best explained as a series of misadventures, compounded by trying to make too many changes at one go.  Some of the maths was very clumsy, so I rewrote that part of the program.  We went back into lockdown, so I couldn’t easily just buy some components I needed.  I made a change to a resistor value that I thought was inconsequential, and promptly forgot that I had even done it.  At least I managed to buy a suitable enclosure in the last few hours before the lockdown.

The circuit was soon rebuilt on a single board, carefully checked over then powered up and the program loaded onto the chip.  It looked like it worked, but had had some serious glitches. The speed readings were all over the place, and in general, nothing like the project I had previously had operating.

Thus began a frustrating couple of weeks of testing, re-soldering, replacing components, checking and rechecking the program, but nothing worked.  I suspect if there were any soldering problems, they were fixed in the first day or to.  I found a couple of program errors I had introduced during the program rewriting.  I imagine it was like trying to coax a reluctant engine into running.  Nothing seemed to be obviously wrong, nothing I did made any difference.

Then something reminded me of that resistor value I had changed.  It  was the load resistor in the collector of the photo transistor.  And I started checking more carefully the output signal from that photo interrupter device.  It was working, but not giving the clear low signal the processor needed as it had previously done. 

Eventually it transpired that the current limiting resistor in the LED part of the photo interrupter was also originally not close to the optimum value.   And the original two resistors were in the right proportions to work as required, despite not being optimum, but when I changed one, .........

As soon as I changed the second resistor, it all worked.  So simple if I had looked in the right place in the first place.  The perils of being an amateur.  An error that someone more knowledgeable in electronics would not have made.

So, I have now been able to add that potentiometer for the proportional band tuning, and even included a little routine that functions much as the usual integral function.  And I even have  a second board, with the correct resistors installed for a future project.

In operation, if the proportional band is too high, the governor hunts a bit, as is expected in this condition.  Reduce the proportional band a little and it quickly stabilises.

However, once it gets to the point where the correction required is less than one unit of the governor movement, about 1% of the range, it was either too fast or too slow, and oscillated each side of the set point, rather than the more classical constant small error.  The range was small, but I wanted to do a little better.  The processor is limited integer maths, so is a little clunky.  The final governor movement is determined by a division by 256, and with integer maths the remainder is just lost.  I devised a routine to accumulate this error, and every few cycles of the program, add one to the governor movement.  This seemed to do the trick, and the speed is now held within a few rpm, which I consider quite satisfactory for a reciprocating engine.  The integral factor in a PID controller is based on integrating the error over time, and adding a bit to the output on a time basis.  My processor did not have an extra timer function available, but my routine accumulates the error from each cycle of the program, so a similar function, though the time is not constant, as the time for the program loop to execute is determined largely by the engine speed, and the timeout takes to read the incoming pulses from the pickup.

Not much action for a movie to show the completed project, but a couple of still shots.  The displayed speed is real, the electronic flash has totally stopped the engine motion in the second photo.

I still need a knob for the second potentiometer, and an extra plug to tidy up the wiring between the Governor and the engine platform.  That will happen when this lockdown is lifted enough to allow a visit to the shop.  I may even be able to find a smaller enclosure that will still accommodate everything.  But for now I am calling it complete.  It is a very suitable substitute for a traditional flyweight governor for a small model, and provides a good adjustable constant speed for engine load testing, steam consumption and so on.  It’s been a good learning exercise, and quite enjoyable.  But it’s time I started a project requiring a bit more swarf.

I am quite happy to provide circuits and program details if anyone would like to build a similar project.  It should also be quite possible to achieve the same result on Arduino or whatever other processor you are familiar with.

Thanks for all the interest and to everyone just looking in.

MJM460
Title: Re: A digital governor for model engines
Post by: gary.a.ayres on September 22, 2020, 01:00:57 PM
Aha - I wondered what you had been up to!

That looks very smart indeed...

gary
Title: Re: A digital governor for model engines
Post by: MJM460 on September 22, 2020, 01:19:21 PM
Thanks Gary, it’s really nice to call it done with a successful outcome.  It was quite rewarding despite the frustration at the last step, but if it was too easy, it would not be so worth doing, would it?

However, I am looking forward to moving on to a more conventional engine project. 

MJM460

Title: Re: A digital governor for model engines
Post by: gary.a.ayres on September 22, 2020, 01:23:00 PM
I look forward to it.

 :ThumbsUp:
Title: Re: A digital governor for model engines
Post by: Admiral_dk on September 22, 2020, 09:27:07 PM
Well done MJM  :ThumbsUp:

Even us Pros do get it wrong from time to time .... and that is almost always the case when one starts to assume instead of measuring or worse using a bad Scope Probe and believing the (wrong) measurement result => doing the wrong deduction. This usually happens with a known good probe that suddenly fails in a non-obvious way  :rant:  :hammerbash:

The other comment is about the MCU you have chosen, as it is part of a very big family - why not chose another one with the required amount off Timers ?
That said - it's not uncommon that one has to do with the one in stock - so you found a way to overcome the limitations  :ThumbsUp:
Title: Re: A digital governor for model engines
Post by: MJM460 on September 23, 2020, 02:50:15 AM
Thanks Admiral.  I am pleased that I persisted and got there, and found a definite problem, so I have confidence that it is a real solution.  Much more satisfactory than trying something that finally works but not being sure why.

The limitation on my choice of processor comes down to my ability to program it.  It is a very accessible system, intended for students and beginners.  There are bigger chips in the system, which offer more i/o but apparently more timers.  Certainly there is an application note for a PID implementation on the base PIC chips, but I can barely understand how it works, let alone how to adapt it to the Picaxe system, and I don’t have the ability or equipment to program it on a raw chip.  Basic language with a three pin plug in circuit is about my limit in the programming area.

I think that the timer availability might have been part of the reason it was recommended by another forum member to use a different processor very early in the project.  I saw the possibility in the simple processor, and was interested to see if I could make it work, and while more i/o would have been useful, it was not necessary in the end.

However, I also learned something about that little photo interrupter component and got plenty of soldering practice, along with a new iron after my old one died early in the project.  So it’s all good.

Thanks for your encouragement.

MJM460
Title: Re: A digital governor for model engines
Post by: Zephyrin on September 23, 2020, 10:24:08 AM
Quote
so I have confidence that it is a real solution.  Much more satisfactory than trying something that finally works but not being sure why.

You must be happy with such a nice result, congratulations!
Title: Re: A digital governor for model engines
Post by: MJM460 on September 23, 2020, 11:44:28 AM
Thanks Zephyrin.  It has been quite interesting.

Now that I can hold the speed constant, I will have to push making a suitable load device up the list, so I can do some engine tests.

So many projects, yet even in lockdown, so little time.

MJM460

SimplePortal 2.3.5 © 2008-2012, SimplePortal