Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Making an engine governor

 
Post new topic   Reply to topic    Forum Index -> ZBasic Language
Author Message
FFMan



Joined: 09 Jan 2010
Posts: 415

Posted: 07 February 2017, 14:50 PM    Post subject: Making an engine governor Reply with quote

I'm making a small honda strimmer engine into a compact generator for topping up batteries in the field. It uses a motorbike stator, flywheel and rectifier/regulator.

This small engine has no governer so I know that as the battery charges up, the load decreases, the revs will rise and as i want to leave this unattended that could be bad news.

It feels as though i could make a governor by using a servo to drive operate the throttle and a simple rpm pickup to establish speed. I could also add a timed shutdown or a shutdown when the throttle has reduced to a preset limit.

Is driving servos from zbasic easy, i couldn't find any examples after a quick look through the app notes.
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2982
Location: Portland, OR

Posted: 07 February 2017, 15:59 PM    Post subject: Re: Making an engine governor Reply with quote

FFMan wrote:
It feels as though i could make a governor by using a servo to drive operate the throttle and a simple rpm pickup to establish speed.
It is quite feasible. Many years ago I did the same for a 12KW diesel genset using a magnetic pickup mounted near the flywheel for the RPM input and a linear actuator to control the throttle. My implementation was so long ago (pre-ZBasic) that I used a Basic Stamp II having no floating point and extremely limited RAM. Because the RAM was so limited I needed an external RAM chip to store the historical information to implement the PID control loop algorithm. There is some information, including photos, at the page below.

http://kinzers.com/don/GenSet

There is a good article on PID control on wikipedia and a lot more information is available elsewhere. Tuning the algorithm will be a trial and error proposition due to the reaction time of the various elements of your particular system (throttle positioning, throttle response, generator output curve, etc.).
Back to top
FFMan



Joined: 09 Jan 2010
Posts: 415

Posted: 07 February 2017, 16:17 PM    Post subject: Reply with quote

thanks Don.

Nice project of yours, different scale to mine but principal is similar. I was going to use a magnetic pickup also, perhaps even using the existing stator magnets which are 3 pieces.

I am familiar with PID as i got part way through building a cruise control which is a very similar proposition.

Are you able to point me in the direction of any servo control example code ?
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2982
Location: Portland, OR

Posted: 07 February 2017, 16:38 PM    Post subject: Reply with quote

FFMan wrote:
Are you able to point me in the direction of any servo control example code ?
I don't have any particular examples. Much depends on the stepper/servo that you choose and whether you choose to use a control chip (as I did - Hurst 220001, now discontinued) or produce the phased drive signals directly. You should be able to find good information about the drive requirements for the motor that you choose. I suspect that you can find some Arduino code for stepper control.
Back to top
FFMan



Joined: 09 Jan 2010
Posts: 415

Posted: 07 February 2017, 16:56 PM    Post subject: Reply with quote

ok - i rather thought servo driving was a regular zbasic thing and i would be able to drive it using some pulseout commands.

If not this looks usable http://www.ebay.co.uk/itm/282345296797?_trksid=p2055119.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

and with the clutch disengaged gives manual control
Back to top
rosariote



Joined: 22 Jul 2007
Posts: 39

Posted: 09 February 2017, 18:02 PM    Post subject: Reply with quote

Hi,
Since it is a trimmer engine you may use this 2-phase 4-wire Stepper Motor DC 5v 12v linear Actuator Telescopic Position Rod . Do a search in ebay using the above description. By using the stepper you may adjust the speed more accurate,
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Language Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2017 Elba Corp. All rights reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group