Author Topic: Alternator voltage regulator.  (Read 4789 times)

0 Members and 1 Guest are viewing this topic.

Offline CodebirdTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: gb
Alternator voltage regulator.
« on: January 23, 2017, 07:46:33 am »
I got bored, so I made a power bicycle. I pedal, it charges a battery for thirty seconds, then I collapse from exhaustion. I'm out of shape.

The inbuilt voltage regulator wasn't right for this application, so I built my own from scratch. I'd like some feedback on the design before I publish it on my website for the world to ignore. It's almost written up now, this is a close to final version.
https://birds-are-nice.me/ipfs/QmRzzZzdJsJD712naLMDUsYfwJ2ThphJvBuhLU4PTRzpp5/

My biggest surprise is that it not only works, but works pretty well. I really didn't expect it to be quite so easy. Nice stable output voltage, right on regulator target. Efficient. Simple. Almost too easy, though getting the feedback loop to be stable was  a bit of a challenge.
 

Offline BradC

  • Super Contributor
  • ***
  • Posts: 2109
  • Country: au
Re: Alternator voltage regulator.
« Reply #1 on: January 23, 2017, 08:51:49 am »
Very nice work.
Still trying to download the source to look at, but I like the principle. Something that has been on my very long todo list for a number of years.
 

Offline CodebirdTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: gb
Re: Alternator voltage regulator.
« Reply #2 on: January 23, 2017, 11:23:02 am »
Code should be downloadable now. It was hosted on my home server, and the drive failed overnight. Again. I must replace that.
 

Offline Emo

  • Regular Contributor
  • *
  • Posts: 132
  • Country: nl
Re: Alternator voltage regulator.
« Reply #3 on: January 23, 2017, 12:25:04 pm »
Hi Codebird,

This design might work in stable environmental situations. However the lead-acid battery has a severe voltage-temperature dependancy. In cold weather the voltage needs to be substantially higher than in hot weather. This is why also the lamp connection is in the original design. In cold weather the voltage would be to high for the headlamps. So when the headlamps are switched on in cold weather, the charging voltage drops to a lower value
 

Offline CodebirdTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: gb
Re: Alternator voltage regulator.
« Reply #4 on: January 23, 2017, 01:40:09 pm »
Temperature regulation is an issue. I hadn't thought of that because this isn't designed just to charge lead-acids, the aim is to be a very flexible design for whatever application you might need. I shall have to add something about that, and make sure the right pins are free for a one-wire interface.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17167
  • Country: us
  • DavidH
Re: Alternator voltage regulator.
« Reply #5 on: January 23, 2017, 05:12:48 pm »
I have done the same thing using first a 78S40 and then later an SG3524 pulse width modulator to control the field current but the designs were completely analog.  The 78S40 limited the output power to about 80% because it is a constant off-time switching regulator so the second time I used the SG3524.  With the second design, I used an external error amplifier built around an LT1007 and precision reference which in retrospect was not necessary but the load regulation from like 0 to 30 amps was better than 10 microvolts which was an interesting result.
 

Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9232
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Alternator voltage regulator.
« Reply #6 on: January 24, 2017, 02:44:36 am »
For a stationary bicycle, you'll have to implement MPPT to get the most power output. IIRC, that is around 60-100 RPM at the pedals for most people, although the best point varies.

It is also worth noting that a permanent magnet alternator is much better for a stationary bicycle. A suggested source is a ECM motor out of some old HVAC equipment.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3327
  • Country: gb
Re: Alternator voltage regulator.
« Reply #7 on: January 24, 2017, 09:11:24 am »
You might want to add some over-voltage protection in the event that the load becomes disconnected whilst the alternator is running.  This is called "load dump" in automotive parlance, and can result in some surprisingly high voltage transients. The transient response of your arduino based regulator is likely somewhat slower than the original analog one that came with the alternator which will make things worse.
 
The following users thanked this post: newbrain

Offline CodebirdTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: gb
Re: Alternator voltage regulator.
« Reply #8 on: January 24, 2017, 10:11:25 am »
MPPT on a bicycle generator is a bad idea, I think. The problem is that maximum power is not maximum sustainable power: It just results in rapid depletion of my own power-producing capacity. My heart can only shift blood so fast.

I plan on charging up a battery on Monday while taking a load of measurements, with an aim to improve response time as much as is practical. Better regulation, better transient handling.

I considered the analog(ish) way, Hess's solution, but decided to go with a microcontroller for the flexibility it offers. The low-power-standby mode, for one. That's a nice thing to have. I did experiment a lot with over-complicated feedback algorithms that just didn't work well, before eventually finding the best way was to essentially emulate an error amplifier. I still need to fiddle with the 'gain' on it to find what works best.

I am using a bicycle, but this isn't exclusively a bicycle design. You can hook it up any motive power source you want. I've a friend who is considering connecting an alternator up to a tiny hydroelectric station. They have a creek, and think an old-style wooden water wheel would make a nice ornamental feature, but it should also be good for a hundred watts or so.
« Last Edit: January 24, 2017, 10:45:57 am by Codebird »
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2977
  • Country: au
Re: Alternator voltage regulator.
« Reply #9 on: January 24, 2017, 11:56:25 am »
You might want to add some over-voltage protection in the event that the load becomes disconnected whilst the alternator is running.  This is called "load dump" in automotive parlance, and can result in some surprisingly high voltage transients. The transient response of your arduino based regulator is likely somewhat slower than the original analog one that came with the alternator which will make things worse.
I found out the hard way that high voltage during a load dump can cause the Field MOSFET to conduct avalanche current, keeping the alternator excited and then causing the MOSFET to become permanently shorted. A high voltage MOSFET needs to be used if the alternator is to be used at high power levels and there is a risk of load dump.
http://www.onsemi.com/pub_link/Collateral/CS3361-D.PDF 
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1962
  • Country: us
Re: Alternator voltage regulator.
« Reply #10 on: January 24, 2017, 01:34:25 pm »
If open to trying new ideas, I would interesting to eliminate the diode and look at frequency of the alternator to start raising field current.  That would work better with wind generators.
 

Offline CodebirdTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: gb
Re: Alternator voltage regulator.
« Reply #11 on: January 24, 2017, 02:17:17 pm »
Quote
I found out the hard way that high voltage during a load dump can cause the Field MOSFET to conduct avalanche current, keeping the alternator excited and then causing the MOSFET to become permanently shorted.

Thus burning out the alternator and the load, and possibly damaging the mechanical driver too. Hmm. Good thinking. I shall consider measures to stop that happening.

Quote
If open to trying new ideas, I would interesting to eliminate the diode and look at frequency of the alternator to start raising field current.

Why eliminate the diode?
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1962
  • Country: us
Re: Alternator voltage regulator.
« Reply #12 on: January 24, 2017, 02:58:32 pm »
"Why eliminate the diode?"

I came from a work environment where I would agonize over adding an extra 1/3 cent resistor.  If this is universal use, adding a big diode and heatsink should be avoided. In a wind application, putting any load on the mill should be avoided until it is up to speed.  The field is a load that prevents faster speed recovery.  I use these NANO boards for meaningless jobs like this.  I always feel a little guilty if I don't add some elegance to them.
 

Offline CodebirdTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: gb
Re: Alternator voltage regulator.
« Reply #13 on: January 24, 2017, 04:22:07 pm »
The field coils are an inductor under PWM - every time they turn off, there is going to be a nasty back-EMF. That diode gives it somewhere safe to go, otherwise it would likely damage the MOSFET. It's a required component. I also realised that if you run the PWM at a high enough frequency you can recapture the energy in the field coil and slow the rate of decay, which allows for a lower PWM duty cycle and thus power savings. It's a useful diode. It's also pretty small - at worst you are looking at maybe 5A, which is nothing for a schottky. No heatsink needed.

I have some suspicion that this approach is EMI-hell though. Don't count on seeing a nice 'fcc approved' sticker on this design.

I'm working on reducing the power consumption further.
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1962
  • Country: us
Re: Alternator voltage regulator.
« Reply #14 on: January 24, 2017, 06:26:07 pm »
I'm talking diode from alternator to battery which you manage not to show. At least I think that is what you are trying to say in the text. I speed read and tend to insert my ideas into others.  I'm not sure I like your design anymore.  It's a moot issue since it is much much less effort to come up with your own design than copy a design someone. I'm sure it suits your intended use, just not mine.  If I get the time I'll look at your code to see what you are really doing.  I suggest you edit your drawing and text to make it less confusing.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17167
  • Country: us
  • DavidH
Re: Alternator voltage regulator.
« Reply #15 on: January 24, 2017, 10:08:59 pm »
The field coils are an inductor under PWM - every time they turn off, there is going to be a nasty back-EMF. That diode gives it somewhere safe to go, otherwise it would likely damage the MOSFET. It's a required component. I also realised that if you run the PWM at a high enough frequency you can recapture the energy in the field coil and slow the rate of decay, which allows for a lower PWM duty cycle and thus power savings. It's a useful diode. It's also pretty small - at worst you are looking at maybe 5A, which is nothing for a schottky. No heatsink needed.

I have some suspicion that this approach is EMI-hell though. Don't count on seeing a nice 'fcc approved' sticker on this design.

I'm working on reducing the power consumption further.

I did not care about it when I designed mine but filtering so the field is driven by DC, a buck configuration is probably the best option, is definitely preferred.  High frequency drive also increases loses do to eddy currents and hysteresis in the alternator's lamentations which are not designed for high frequency drive.  I was not sure if it was going to be a problem or but it was not.

One trick you can use to help with RF is to make the field winding connection with a twisted pair (or coax) to minimize the loop area and provide a direct ground return.
« Last Edit: January 24, 2017, 10:10:31 pm by David Hess »
 

Offline CodebirdTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: gb
Re: Alternator voltage regulator.
« Reply #16 on: January 25, 2017, 07:36:23 am »
Quote
I'm talking diode from alternator to battery which you manage not to show.

Oh, that diode. That's optional, but it does serve a purpose for me: I used a light bulb for testing. That diode lets me give the alternator initial starting power from a tiny 7V power supply.

Quote
I did not care about it when I designed mine but filtering so the field is driven by DC, a buck configuration is probably the best option, is definitely preferred.

I considered it, but it's a matter of component count. I don't want to complicate things more than I have to. Plus the field winding in my alternator has such a high inductance that it doesn't need a very high frequency - which is also good because it means I can run the MOSFET straight off of the arduino, no need for a driver. I can measure field winding current and power supply current, and even at under a kilohertz there is substantially more in the winding/diode loop that it's drawing from the supply. That's a lot of inductance.

Quote
If I get the time I'll look at your code to see what you are really doing.

Prepare to be horrified. It's still at a very crude level. I intend to work on that Monday, as I can't operate my bicycle-generator unless the house is empty due to the noise it makes. Right now it'll only hold a stable output voltage for a simple passive resistor load.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17167
  • Country: us
  • DavidH
Re: Alternator voltage regulator.
« Reply #17 on: January 25, 2017, 01:40:28 pm »
Quote
I did not care about it when I designed mine but filtering so the field is driven by DC, a buck configuration is probably the best option, is definitely preferred.

I considered it, but it's a matter of component count. I don't want to complicate things more than I have to. Plus the field winding in my alternator has such a high inductance that it doesn't need a very high frequency - which is also good because it means I can run the MOSFET straight off of the arduino, no need for a driver. I can measure field winding current and power supply current, and even at under a kilohertz there is substantially more in the winding/diode loop that it's drawing from the supply. That's a lot of inductance.

I was also thinking about a low parts count but I used a high frequency to keep the switching frequency out of my car's radio.

When I did the design, I used my impedance bridge to measure the inductance of the field winding so I could get the frequency compensation network approximately correct before live testing.
 

Offline CodebirdTopic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: gb
Re: Alternator voltage regulator.
« Reply #18 on: January 31, 2017, 12:00:16 am »
There. Revised!

https://ipfs.io/ipfs/QmXcjUDf55ndSaXsqBpm3E4H4WXgtosZ9wkm9U4mSCJjVm/

* Improved feedback algorithm - now good for +-0.1V output on my test-bicycle.
* Halfway-decent code comments.
* Better description of the bootstrap modes.
* Improved power-saving features.
* Warning note about MOSFET selection and the potential for runaway failure mode.
* Note about the lack of temperature compensation.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf