Puppeteer

Author Topic: Listeroid Governor Control  (Read 18691 times)

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #30 on: August 14, 2016, 09:22:36 AM »
Hi again folks,

it took me a while to make all the modifications but I have improved the response of the governor assistance by using current (load) detection. I've embedded a link to the video. You'll notice the response at 10 amps / 2400w is pretty good, however the 20 amp / 4800 w test is pretty much at the limits for this engine (650 RPM) speed and the logs show I need to adjust the offset calculation slightly.  Anyway with a slight adjustment at higher amps I'll be close, maybe about as close as I can get without moving to a hall effect sensor on the fly wheel....

The logs show the frequency response for 10 amps is pretty clean:

Amps: 0 Hertz: 5006 Servo: 940 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 0 Hertz: 5017 Servo: 940 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 0 Hertz: 5013 Servo: 940 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 0 Hertz: 5015 Servo: 940 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 10 Hertz: 4916 Servo: 940 Step: 0 Idle: 940  --  Load Change... Servo to pos: 840
Amps: 10 Hertz: 4758 Servo: 840 Step: -100 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 4751 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 4850 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 4945 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 4986 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 5003 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 5004 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 5013 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 5007 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 5006 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 4997 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 5007 Servo: 840 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 10 Hertz: 5002 Servo: 840 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 10 Hertz: 5006 Servo: 840 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 10 Hertz: 4996 Servo: 840 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 10 Hertz: 5008 Servo: 840 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 10 Hertz: 5007 Servo: 840 Step: 0 Idle: 940  -- Mains at 50Hz


Not so accurate servo positioning for 20 amps:

Amps: 10 Hertz: 4997 Servo: 839 Step: -1 Idle: 940  -- Mains at 50Hz
Amps: 10 Hertz: 4992 Servo: 839 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 20 Hertz: 4894 Servo: 839 Step: 0 Idle: 940  --  Load Change... Servo to pos: 740
Amps: 20 Hertz: 4755 Servo: 740 Step: -99 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 4736 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 4751 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 4775 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 4801 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 4820 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 21 Hertz: 4833 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 4869 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 4900 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 4921 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 4959 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 5002 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 21 Hertz: 5031 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 5059 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 5097 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 5112 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 5122 Servo: 740 Step: 0 Idle: 940  --  Waiting for speed to stabilise
Amps: 20 Hertz: 5130 Servo: 740 Step: 0 Idle: 940 New Offset: 5  --  Adjusting Generator Speed
Amps: 20 Hertz: 5123 Servo: 745 Step: 5 Idle: 940 New Offset: 4  --  Adjusting Generator Speed
Amps: 20 Hertz: 5125 Servo: 749 Step: 4 Idle: 940 New Offset: 4  --  Adjusting Generator Speed
Amps: 20 Hertz: 5119 Servo: 753 Step: 4 Idle: 940 New Offset: 4  --  Adjusting Generator Speed
Amps: 20 Hertz: 5126 Servo: 757 Step: 4 Idle: 940 New Offset: 4  --  Adjusting Generator Speed
Amps: 20 Hertz: 5108 Servo: 761 Step: 4 Idle: 940 New Offset: 4  --  Adjusting Generator Speed
Amps: 20 Hertz: 5087 Servo: 765 Step: 4 Idle: 940 New Offset: 3  --  Adjusting Generator Speed
Amps: 20 Hertz: 5052 Servo: 768 Step: 3 Idle: 940 New Offset: 2  --  Adjusting Generator Speed
Amps: 20 Hertz: 5043 Servo: 770 Step: 2 Idle: 940 New Offset: 2  --  Adjusting Generator Speed
Amps: 20 Hertz: 5032 Servo: 772 Step: 2 Idle: 940 New Offset: 1  --  Adjusting Generator Speed
Amps: 20 Hertz: 5020 Servo: 773 Step: 1 Idle: 940  -- Mains at 50Hz
Amps: 20 Hertz: 5016 Servo: 773 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 20 Hertz: 5017 Servo: 773 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 21 Hertz: 5008 Servo: 773 Step: 0 Idle: 940  -- Mains at 50Hz
Amps: 20 Hertz: 5001 Servo: 773 Step: 0 Idle: 940  -- Mains at 50Hz

Here's the video...
https://www.youtube.com/watch?v=ljwmsc6MLuQ

 
Lister CS 12/2 & JKSON 10/1 Listeroid

BruceM

  • Hero Member
  • *****
  • Posts: 3054
    • View Profile
Re: Listeroid Governor Control
« Reply #31 on: August 14, 2016, 03:30:54 PM »
Lovely work, Samo, the step load for 10A is perfection- no overshoot, fast correction. 


Sergio Almeida

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Listeroid Governor Control
« Reply #32 on: May 28, 2017, 05:32:46 PM »
Samo,

This site below is not working!

Software for the record: www.mrx.com.au/pickup/Guvna/Guvna_Fine_Control.txt  (updated)
Control Box:                  www.mrx.com.au/pickup/Guvna/ControlBox.jpg

Have other way to access the project?

cheers,

Sérgio

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #33 on: May 30, 2017, 12:36:14 PM »
Hey thanks Sergio,

I shut down that site and didn't give that post a thought... ooops! I'll repost it to somewhere a little more permanent.

Also the parts for my next generation governor are in so just started working on that. Should be much easier to build/copy.

cheers,

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

Sergio Almeida

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Listeroid Governor Control
« Reply #34 on: June 04, 2017, 02:03:34 PM »
Samo,

Hi, I have a generator 10KVA in micro hydroeletric. My micro hydroelectric have a butterfly valve to control de RPM / frequency. I do a manual ajust according the load.
I would like to use a servo and arduino to control de valve end the turbine speed. I was hoping to use the frequency out to maintain the proper rpm.
I want do a frequency control using your principle to control diesel engine.

You can send to me a arduino code to help-me start me project?

Thank you

Sergio

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #35 on: June 05, 2017, 12:25:28 PM »
Hi Sergio,

Here's my latest code... (attached)

I'm working on a new modular governor and this forms part of that code. In my setup I'm using an arduino Leonardo and also use a 16 x 2 LCD shield for real time display output.

The hertz sensing input is now a ZMPT101B AC Voltage Transformer - http://www.ebay.com.au/itm/252501453706?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

I connect this voltage transformer to pin 13 and the Freqmeasure library code is working very nicely & very accurately with it. The Freqmeasure library provides the Hertz / Frequency count. I am also using the Emon Library to measure current via a Current Transformer.  There are simple examples at the download site for the FreqMeasure Library...

Feel free to fire any questions at me...

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

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #36 on: June 05, 2017, 12:38:47 PM »
Some pics...
« Last Edit: June 05, 2017, 12:42:05 PM by Samo »
Lister CS 12/2 & JKSON 10/1 Listeroid

BruceM

  • Hero Member
  • *****
  • Posts: 3054
    • View Profile
Re: Listeroid Governor Control
« Reply #37 on: June 05, 2017, 04:43:24 PM »
I committed sacrilege in the eyes of many about 12 years ago by using a Picaxe for remote start/control/monitoring of my 6/1 Listeroid genset/air compressor.  I did make "manual reversion", or totally normal manual operation with electronics turned off part of my design.  To me that is the best of both worlds; failure resistant manual operation but full auto for normal operations.

The Arduino development environment is marginal on quality in my book, but the cheap hardware and zero cost makes it worthwhile. While I think the Picaxe and Basic language is more suitable to rank beginners (a beter and very low cost successor to basic stamps), you can't fight the marketplace and Arduino has won that.  I found a couple of alarming C/Arduino compiler issues-  such as 16 bit  16 bit unsigned integer multiply giving a 16 bit result in a 32 bit integer variable, and the not well documented "feature" of requiring a global variable set by an interrupt routine to declared the non-standard "volatile" else with no warning a local variable will be created.  The compiler messages are not adequate , and are rather farcical.   C language (which is all Arduino really is) is really inappropriate for beginners as it does no array index checking plus pointers allow wholesale corruption of program and data. The upside to this cruelty to novices is that you CAN have full access and control of all the chips features, ISRs, etc. once you "grow up", IF you are able to survive the 10,000 mistakes needed to learn to program. A lot of patience and perseverance will be required. 


Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #38 on: June 05, 2017, 10:06:24 PM »

Were you talking about those sensors on another forum a few weeks back?

I just got home from a week away and sitting on my desk is a packet of those very sensors I ordered after reading  about them in a post on another site.
 
Seems I recall wanting them to measure AC voltage which I then found out they wouldn't do but measuring frequency could be handy anyway.


Hi Glort, yes it was another topic on this forum. I mentioned I'd be trying these as modules and I've had mine for a week or so now. The good news is that they do indeed measure voltage, and frequency. Maybe I should start another topic in Generators or something and post some code snippets... when I finish this and write it up I think.

Not everyone's cup of tea combining the old and new, but the original governor just doesn't work for accurate power generation,  and I think this works pretty well, it has been reliable for me so far. Time will tell on that front...

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

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #39 on: June 05, 2017, 10:22:17 PM »
I agree it's not perfect Bruce, but it sure is easy with so many libraries and so many modules... no malloc or pointers... feels like cheating at times. ;)
Lister CS 12/2 & JKSON 10/1 Listeroid

BruceM

  • Hero Member
  • *****
  • Posts: 3054
    • View Profile
Re: Listeroid Governor Control
« Reply #40 on: June 06, 2017, 12:56:04 AM »
My current electronics project is so real-time sensitive (a low frequency, 7 step sine inverter design) that I only used library routines for transferring data from program memory space in the "background" less critical portion.  That library was primative but did work. For timers and such I just banged the hardware myself. I was able to use the A/D library routine also, since that was also in the non-critical-timing section which did RMS voltage sampling and calculation.

I still use the Uno clone board ($10) to verify my new code, and am about to verify a new modification on my Picoscope logic analyzer right now. The Uno 0.1 inch headers make hooking the logic analyzer to the board so much easier than clip leads on signals on my PCB, so I confirm in detail on the Uno, then load my bare processor and just confirm it's kicking before risking my high voltage (120VDC) H-bridges.  Since I'm wearing both hats, the H-bridge hardware doesn't protect itself from FET-explosive dead shorts and the software guy has to be very, very cautious!

If I do another AVR based project I think I'll pop for their $90 ICE (in circuit emulator) unit to make tracing the GNU compiler bugs (and mine) easier and less time consuming. 

I found that a couple of the cheap Arduino programmers using the 6 pin header have pretty high data verfication error rates even in the Uno board. Sometimes it takes 3 tries. That tends to make me nervous. I'm used to PICKit3 which was always rock solid in everything I used it in. Oh well, you can't fight the marketplace.

Nice to have someone on the forum who knows what anything I just wrote means.  You're appreciated, John/Samo.



 




Sergio Almeida

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Listeroid Governor Control
« Reply #41 on: June 06, 2017, 03:58:21 AM »
Hi Sergio,

Here's my latest code... (attached)

I'm working on a new modular governor and this forms part of that code. In my setup I'm using an arduino Leonardo and also use a 16 x 2 LCD shield for real time display output.

The hertz sensing input is now a ZMPT101B AC Voltage Transformer - http://www.ebay.com.au/itm/252501453706?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

I connect this voltage transformer to pin 13 and the Freqmeasure library code is working very nicely & very accurately with it. The Freqmeasure library provides the Hertz / Frequency count. I am also using the Emon Library to measure current via a Current Transformer.  There are simple examples at the download site for the FreqMeasure Library...

Feel free to fire any questions at me...

cheers,
Samo

Thanks Samo, by your help!

cheers

Sérgio

Samo

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Re: Listeroid Governor Control
« Reply #42 on: June 06, 2017, 08:49:29 AM »
Hi Glort,

They do AC / I'm using them for frequency as the output is a sine wave.
This should do it... I haven't tested it so it might have an error, but will be close.
Uses the EmonLib library... just went to github and of course there's some examples there also....

This is the ZMPT101B AC Voltage Transformer you should have....

http://www.ebay.com.au/itm/252501453706?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT


Connect the "out" pin of the ZMPT101B to pin A1, connect the 5v to Arduino 5v pin and Ground to Arduino ground pin....

you'll need the library from:
https://github.com/openenergymonitor/EmonLib

cheers,
Samo



#include <EmonLib.h>
#include <Serial.h>

EnergyMonitor Imon;      // create an energy monitor object to sample volts and current

float Volts=0.0;
float Current=0.0;


void setup()
{

  Serial.begin(9600);                       //connect to the serial port

  //Imon.current(0,381);           //Setup the current monitor on pin A0 - requires separate current transformer circuit... 

  Imon.voltage(1,118,1.7);     //Setup the voltage monitor on pin A1 - ZMPT101B "out" pin to A1.
                                            //Get 5v and Ground from Arduino board....
 
}

void loop ()
{

  Imon.calcVI(100, 2000);  //half wavelengths , timeout
 
  Current = Imon.Irms;
  Volts = round(Imon.Vrms*10);

  Serial.print("Volts: ");
  Serial.print(Volts);
  Serial.print(" Current: ");
  Serial.println(Current);

  delay(1000);

}

« Last Edit: June 06, 2017, 09:06:52 AM by Samo »
Lister CS 12/2 & JKSON 10/1 Listeroid