Alternator voltage regulator. - Page 1
Forum section: electronics / projects

author: Codebird
author_rank: Regular Contributor
timestamp: January 23, 2017, 07:46:33 am
content: 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.

author: BradC
author_rank: Super Contributor
timestamp: January 23, 2017, 08:51:49 am
content: 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.

author: Codebird
author_rank: Regular Contributor
timestamp: January 23, 2017, 11:23:02 am
content: Code should be downloadable now. It was hosted on my home server, and the drive failed overnight. Again. I must replace that.

author: Emo
author_rank: Regular Contributor
timestamp: January 23, 2017, 12:25:04 pm
content: 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

author: Codebird
author_rank: Regular Contributor
timestamp: January 23, 2017, 01:40:09 pm
content: 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.

author: David Hess
author_rank: Super Contributor
timestamp: January 23, 2017, 05:12:48 pm
content: 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.

author: NiHaoMike
author_rank: Super Contributor
timestamp: January 24, 2017, 02:44:36 am
content: 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.

author: mikerj
author_rank: Super Contributor
timestamp: January 24, 2017, 09:11:24 am
content: 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.

author: Codebird
author_rank: Regular Contributor
timestamp: January 24, 2017, 10:11:25 am
content: 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.

author: xavier60
author_rank: Super Contributor
timestamp: January 24, 2017, 11:56:25 am
content: Quote from: mikerj on January 24, 2017, 09:11:24 amI 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

author: Seekonk
author_rank: Super Contributor
timestamp: January 24, 2017, 01:34:25 pm
content: 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.

author: Codebird
author_rank: Regular Contributor
timestamp: January 24, 2017, 02:17:17 pm
content: QuoteThus 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.QuoteWhy eliminate the diode?

author: Seekonk
author_rank: Super Contributor
timestamp: January 24, 2017, 02:58:32 pm
content: "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.

author: Codebird
author_rank: Regular Contributor
timestamp: January 24, 2017, 04:22:07 pm
content: 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.

author: Seekonk
author_rank: Super Contributor
timestamp: January 24, 2017, 06:26:07 pm
content: 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.

author: David Hess
author_rank: Super Contributor
timestamp: January 24, 2017, 10:08:59 pm
content: Quote from: Codebird on January 24, 2017, 04:22:07 pmI 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.

author: Codebird
author_rank: Regular Contributor
timestamp: January 25, 2017, 07:36:23 am
content: QuoteOh, 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.QuoteI 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.QuotePrepare 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.

author: David Hess
author_rank: Super Contributor
timestamp: January 25, 2017, 01:40:28 pm
content: Quote from: Codebird on January 25, 2017, 07:36:23 amI 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.

author: Codebird
author_rank: Regular Contributor
timestamp: January 31, 2017, 12:00:16 am
content: 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.