Puppeteer

Author Topic: Listeroid Governor Control  (Read 18755 times)

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Listeroid Governor Control
« on: July 16, 2016, 02:08:11 PM »
Hi Folks,

My first post on the forum... so far I've just been a consumer of information, and It's a fantastic resource, thanks for all the help in getting my JKSON Listeroid 10/1 up and running, to fix the head gasket water leak and a multitude of other things.

So time I provided some information back I think. Here's the project I've been working on to improve the Governor accuracy and response. I'm still writing it up at the moment but as a prelude to the write up here's one of the first video's I took. It's not pure Listeroid but it works pretty well! 

I've used a small Arduino computer to read the Generator frequency in order to control a servo that provides fine control to the EXISTING governor. I suppose the parts cost me around $60 Australian dollars and a week of my after work time to put it all together.

https://youtu.be/WMQiR2huzX8

Here's an overview of what's happening in the video.

Engine runs, Generator outputs 240v @ around 50hz
A small circuit sniffs the AC frequency, buffers and converts it to square wave @ 5v
The tiny Arduino computer counts the frequency of the AC and adjusts the servo to keep a constant 50hz
The adjustment occurs around 3 times per second
The Servo augments the mechanical governor, it replaces the speed adjustment nut and the mechanical governor will continue to operate if the servo fails.

Here's some of the log file from the software that provides the control, it shows the Servo adjustment that occurs when the AC Frequency changes - I turned on a off the 2.4 KW heater I used as a test load:

AC Frequency: 5012  --  Target Frequency achieved
AC Frequency: 5010  --  Target Frequency achieved
AC Frequency: 5012  --  Target Frequency achieved
AC Frequency: 5007  --  Target Frequency achieved
AC Frequency: 5039  --  decreasing Generator speed by: 2
AC Frequency: 5341  --  decreasing Generator speed by: 18
AC Frequency: 5212  --  decreasing Generator speed by: 11
AC Frequency: 5240  --  decreasing Generator speed by: 13
AC Frequency: 5206  --  decreasing Generator speed by: 11
AC Frequency: 5140  --  decreasing Generator speed by: 8
AC Frequency: 5089  --  decreasing Generator speed by: 5
AC Frequency: 5050  --  decreasing Generator speed by: 3
AC Frequency: 5042  --  decreasing Generator speed by: 3
AC Frequency: 5036  --  decreasing Generator speed by: 2
AC Frequency: 5039  --  decreasing Generator speed by: 2
AC Frequency: 5045  --  decreasing Generator speed by: 3
AC Frequency: 5040  --  decreasing Generator speed by: 3
AC Frequency: 5033  --  decreasing Generator speed by: 2
AC Frequency: 5020  --  decreasing Generator speed by: 2
AC Frequency: 5003  --  Target Frequency achieved
AC Frequency: 4991  --  Target Frequency achieved
AC Frequency: 4983  -- increasing Generator speed by: 1
AC Frequency: 4985  --  Target Frequency achieved
AC Frequency: 4992  --  Target Frequency achieved
AC Frequency: 4995  --  Target Frequency achieved
AC Frequency: 5008  --  Target Frequency achieved
AC Frequency: 4995  --  Target Frequency achieved
AC Frequency: 4875  -- increasing Generator speed by: 7
AC Frequency: 4739  -- increasing Generator speed by: 14
AC Frequency: 0  --  No Mains Frequency Input Detected!
AC Frequency: 4677  -- increasing Generator speed by: 17
AC Frequency: 4728  -- increasing Generator speed by: 14
AC Frequency: 4790  -- increasing Generator speed by: 11
AC Frequency: 4862  -- increasing Generator speed by: 7
AC Frequency: 4915  -- increasing Generator speed by: 5
AC Frequency: 4938  -- increasing Generator speed by: 4
AC Frequency: 4950  -- increasing Generator speed by: 3
AC Frequency: 4951  -- increasing Generator speed by: 3
AC Frequency: 4958  -- increasing Generator speed by: 3
AC Frequency: 4963  -- increasing Generator speed by: 2
AC Frequency: 4974  -- increasing Generator speed by: 2
AC Frequency: 4997  --  Target Frequency achieved
AC Frequency: 5010  --  Target Frequency achieved
AC Frequency: 5014  --  Target Frequency achieved
AC Frequency: 5016  --  decreasing Generator speed by: 1
AC Frequency: 5008  --  Target Frequency achieved
AC Frequency: 5005  --  Target Frequency achieved
AC Frequency: 5009  --  Target Frequency achieved
AC Frequency: 5005  --  Target Frequency achieved



 
Lister CS 12/2 & JKSON 10/1 Listeroid

BruceM

  • Hero Member
  • *****
  • Posts: 3054
    • View Profile
Re: Listeroid Governor Control
« Reply #1 on: July 16, 2016, 03:50:19 PM »
A very nice project, and an exceptional first contribution!  Bravo, Samo.  I had thought about this for some time and you have done it nicely with a minimum of simple, off the shelf hardware and electronics.  The slow, smooth correction is well done, with no hint of oscillation or over-correction.  So it would appear that you are no slouch on real time control software. 

I have a couple of hair-brained suggestions for enhancements:  (that you've probably already considered).

1. Failure-proofing: A mechancial arrangement that limited the authority of the servo, so that failure of any kind would result, at worst, in a modest shift in frequency.  This could also have the side benefit of reducing load on the servo output shaft, gears, bearing.  Overspeed authority in case of failure would be the biggest priority since Rajkot flywheels and overspeed are a dicey situation.  Perhaps by just shifting the existing arrangement so that speed increase is somewhat limited by the max servo rotation would suffice???  I realize you may have already incorporated this and are way ahead of me.

2. Transient performance upgrade:  by sensing AC current draw, throttle correction for big changes in load could be applied immediately, BEFORE the frequency sags or overshoots, thus reducing both maximum error and load transient response time. This does increases the real time complexity of the software considerably, but I'd be happy to contribute if need be.  When you decrease your frame time, you'll have to allow for the normal compresssion/power stroke speed variation so as to avoid an undamped oscillation.  Your current frame rate was well chosen for a slow smooth correction, but for this I'd want a bit faster and with acceleration dampening.  I realize this is probably lipstick on the pig, but it's hard to resist sometimes. :)

Best Wishes,
Bruce

 
 

Hugh Conway

  • Hero Member
  • *****
  • Posts: 530
    • View Profile
Re: Listeroid Governor Control
« Reply #2 on: July 16, 2016, 05:35:07 PM »
Nice work Samo!
Here on the island, I do not have the capability (either in knowledge or equipment) to do something like that. It is possible to get these listeroids to operate within a fairly tight frequency range, even without electronics.  For those not so inclined to go with the electronics, the simple mechanical modifications and replacement governor spring that Horsepoor discovered a few years ago will do the trick for most with a very low expenditure of time and especially, $. I have been using this method for about 800 hours now, and the machine will still perform within the same parameters. No other mods or adjustments have been necessary.  I have not tried it with my Dursley startomatic engine, but in that case, the extra flywheel inertia might be a bit much for the spring method to cope with. It would be interesting to see if your servo set-up would improve things.
Check this thread for the spring method:   http://listerengine.com/smf/index.php?topic=6976.0

Cheers,
Hugh
JKSON6/1  (Utterpower PMG ) Off-grid
Lister 6/1 Start-O-Matic engine......running with PMG
1963 BMW R-27 project

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #3 on: July 16, 2016, 10:33:05 PM »
thanks Bruce,

Yes... I have thought about failure proofing (whether it's a good solution is another thing entirely!) and in this version the servo is in the middle of a "spring" sandwich... A sort of push-me-pull-you arrangement, so if the servo fails it doesn't move and the engine is governed by the mechanical unit only. I will post some more details on this today when I upload the design and the software. On the faster response... I currently sum and average 15 AC waveforms, that takes around 300ms, then adjust the frequency using a ratio of the difference between the actual frequency and the target. It's fully adjustable in the software so I will try some more aggressive settings and see if I can improve the response and keep the smooth transition, without hunting.

cheers,

John
Lister CS 12/2 & JKSON 10/1 Listeroid

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #4 on: July 16, 2016, 10:35:50 PM »
Thanks Hugh,

I have tried just about every spring from the local hardware, but not the actual spring listed in that post. Having a spring that does a good job of governing is still important to this design, so I'll bite the bullet and see if I can still order them from ebay. Thanks for the link!

cheers,

Samo
Lister CS 12/2 & JKSON 10/1 Listeroid

Tom

  • Hero Member
  • *****
  • Posts: 1746
  • Green power is good.
    • View Profile
Re: Listeroid Governor Control
« Reply #5 on: July 16, 2016, 11:12:41 PM »
Welcome Samo, I do a bit of Arduino programming to. Can't wait to see your code. Which Arduino are you using?
Tom
2004 Ashwamegh 6/1 #217 - ST5 just over 3k hours.

BruceM

  • Hero Member
  • *****
  • Posts: 3054
    • View Profile
Re: Listeroid Governor Control
« Reply #6 on: July 17, 2016, 04:16:59 AM »
Sweet, John. (Samo) From the smooth, no overshoot performance I suspected you were highly skilled, and now I'm sure of it.  Looking forward to learning from your mechanics and code. 

Best Wishes,
Bruce

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #7 on: July 17, 2016, 09:49:51 AM »
Thanks Tom, Bruce

Today I tried to decrease the reaction time, however there's interplay between the mechanical governor and the servo, and I finished where I started... smooth is best! Anything else results in chasing. I'm sure I could do better if I replaced the governor, however that's not the aim here - I want it to augment the mechanical governor as a "fine tune" mechanism.

I intend to order the springs Hugh put me onto, to improve the mechanical governor response, so that the servo will provide the icing on top  ;D

Here's the files I promised:

The overview:                 http://www.mrx.com.au/pickup/Guvna/Guvna-OV1.jpg
The circuit:                     http://www.mrx.com.au/pickup/Guvna/Guvna-Circuit.jpg
The software:                 http://www.mrx.com.au/pickup/Guvna/Guvna_Fine_Control.txt

Happy to take questions/corrections!

cheers,

John
« Last Edit: July 17, 2016, 12:37:23 PM by Samo »
Lister CS 12/2 & JKSON 10/1 Listeroid

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #8 on: July 17, 2016, 10:06:24 AM »
Welcome Samo, I do a bit of Arduino programming to. Can't wait to see your code. Which Arduino are you using?

Hi Tom,

Using the "leonardo" + the servo shield

John
Lister CS 12/2 & JKSON 10/1 Listeroid

Dieselsmoker

  • If your genset fails, remeber Ps 119:105 - Your word is a lamp for my feet, a light on my path.
  • Full Member
  • ***
  • Posts: 142
  • Self-Certified Professional Engine Lover
    • View Profile
    • Get your spares back!
Re: Listeroid Governor Control
« Reply #9 on: July 17, 2016, 04:55:50 PM »
Hi Samo.
Great project! I`ve also done some hobby Arduino (nano) programming in the past - I think I`ll need to start learning again from scratch if I dare to power up the circuits now......... maybe I just will  ;)

Keep us posted on the details and progress, and by the way, thanks for sharing the sketches and code!

Regards,
DS
1963 Lister 6/1 genset - Restored
1942 Fairbanks-Morse ZC-208 - Restored
1945 Ruston & Hornsby PB 3HP - To be restored
1954 John Deere 40-S - Current project

BruceM

  • Hero Member
  • *****
  • Posts: 3054
    • View Profile
Re: Listeroid Governor Control
« Reply #10 on: July 17, 2016, 04:59:47 PM »
The leftmost spring is a great idea to reduce the total force on the servo.  I can see that as long as your total mechanical range of servo authority is limited to a safe max rpm, there is no concern for servo or electronic failure.   Very nice drawings and clear concise code!


 



Dieselsmoker

  • If your genset fails, remeber Ps 119:105 - Your word is a lamp for my feet, a light on my path.
  • Full Member
  • ***
  • Posts: 142
  • Self-Certified Professional Engine Lover
    • View Profile
    • Get your spares back!
Re: Listeroid Governor Control
« Reply #11 on: July 17, 2016, 05:45:39 PM »
Couldn`t resist digging the electronics crate out.  ;D
(I have way too many hobbies!  :D )

It`s been a while, but I`ve made lots of purchces from Hobbyking in the past for electronic and r/c aeroplane parts.
Here is a link to the arduino boards and accessories if its of use to anyone:
http://www.hobbyking.com/hobbyking/store/__706__689__Robotics_DIY-Arduino.html

One more thing. I found on Google Playstore (for Android phones and tablets), coding software. I am currently toying with "ArduinoDroid" and it seems to be working. Will report back later. Using a mobile device, one can literally stand next to the engine, modify code, and upload onto the controller on the fly via USB OTG.
« Last Edit: July 17, 2016, 08:00:27 PM by Dieselsmoker »
1963 Lister 6/1 genset - Restored
1942 Fairbanks-Morse ZC-208 - Restored
1945 Ruston & Hornsby PB 3HP - To be restored
1954 John Deere 40-S - Current project

Dieselsmoker

  • If your genset fails, remeber Ps 119:105 - Your word is a lamp for my feet, a light on my path.
  • Full Member
  • ***
  • Posts: 142
  • Self-Certified Professional Engine Lover
    • View Profile
    • Get your spares back!
Re: Listeroid Governor Control
« Reply #12 on: July 17, 2016, 07:47:31 PM »
Hi Samo.
I tried to compile the program for the Arduino, but I picked up a compile error. As expected I`m a little rusty to fault find (Not that I was ever a real boffin!). What I however have picked up, is that it looks like there are libraries reffered to in the code: i.e. "FreqMeasure.h" and "Servo.h" that is missing in action. Am I correct?
1963 Lister 6/1 genset - Restored
1942 Fairbanks-Morse ZC-208 - Restored
1945 Ruston & Hornsby PB 3HP - To be restored
1954 John Deere 40-S - Current project

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #13 on: July 17, 2016, 09:42:31 PM »
Hi DS,

Is there really such a thing as too many hobbies?

Yes you're right about the include files, Servo.h is included in the Arduino development environment I use, but both are available from the links below.
You'll need to import the libraries into your development environment - I probably should have mentioned that....

I use the environment from Arduino.cc - https://www.arduino.cc/en/Main/Software

Here are a couple of links to the FreqMeasure and Servo Libs:
https://www.pjrc.com/teensy/td_libs_FreqMeasure.html
http://playground.arduino.cc/ComponentLib/Servo

Thanks for the link too, very comprehensive site, they have many Arduino boards and shields there that would be suitable for projects like this.
« Last Edit: July 17, 2016, 09:51:29 PM by Samo »
Lister CS 12/2 & JKSON 10/1 Listeroid

EdDee

  • Hero Member
  • *****
  • Posts: 773
    • View Profile
Re: Listeroid Governor Control
« Reply #14 on: July 17, 2016, 09:59:20 PM »
Hi Samo,

Nicely done.... Very nice in fact!

I took a brief look through your coding and only have one small suggestion for safety. When you have a non read of frequency, sample it a few times in succession... if no frequency is read consecutively for a few goes, shutdown power to the servo.... my logic is as follows... if you do blow a coil through overload or such like, the servo would be assisting the governor to the max at time of failure.. no mains frequency read after the failure, would hold the governor open and you would experience a runaway, mech failure would result... maybe you have the code in place, but I am a bit rusty at bit bashing, so I might have missed it...

Another minor suggestion would be to "end pull" the spring rather than sandwich the servo between them,  the does of course mean that the existing governor return force/spring tension is enough to pull the servo to the rest position when power is lost to the servo. This, I reckon, would give better governor response in a failed state, as the delay in freewheeling the servo would not be a factor.... in a failed state, however, you would be required to set the mechanical governing slightly under target frequency ....

Nice work with god results... keep it up!

Cheers
Ed
12/1 750RPM/9HP Roid 5kVA- WMO Disposal/Electricity & Hot Water Gen
12/1 650RPM/8HP Roid 4.5kVa - Demon Dino
Chinese Yanmar - Silent Runner with AutoStart
Classic Komatsu 1963 Dozer/Fergusson 35 Gold Belly ...
Bikes,Cars,Gunsmithing & Paintball...Oh yes, a 5Ha open air Workshop to play in!