Larry Bradley writes: > I've been building PIC-based "gadgets" for my 31' sailboat for a couple of > years now: bilge pump controller, refrigerator controller, > all-singing-and-dancing battery monitor/amp-hour meter, and this winter my > project is a sophisticated alternator regulator. I have a commercial one > that works just fine, but that's no fun! I want to build my own. This is actually one of my upcoming uC projects as well. I've spent some time living on sailboats and the lack of any disgnostic output on most commercial units makes debugging charging/battery problems nearly impossible. I'm planning to purchase a used school bus next spring and convert it into an RV for off-grid use (school busses go off-road much better than RVs!) and my plan is to homebrew the whole power generation system. My testbed is a 3.5 HP lawnmower engine (free) and an 80A alternator ($20 from the local junkyard) I'll be welding together a mounting frame this coming weekend. Phase one is to run the motor using the mechanical governor, and controlling field current on the alternator to provide proper charge current for a bank of deep-cycle batteries. Phase two will be to replace the mechanical governor with a stepper motor so the engine can throttled back and running the field current at maximum levels. Phase three will be to develop an intelligent system that tracks usage, so that if I happen to be using power tools (perhaps via invertor) the system will keep the RPMs up and provide regulation via field current, and then reduce engine speed when power demands flatten out. Once I get this setup working, I'm going to scale it up to a small water-cooled diesel and a much larger generator head. The engine coolant will be used provide hot water, and use uC control to divert engine coolant between the hot water tank and an air-cooled radiator. There will also be a refrigeration compressor on the same shaft to keep the icebox cold -- using water/ice as the storage bank. The goal is to run the engine briefly once each day to keep the system topped up. At some point I'll add solar as well, of course building a maximum power point tracker (intelligent DC-DC convertor) into the same charge controller. > My area of concern is the "regulator" part - there are some areas I've no > experience with, and would appreciate some advice. > > I will use PWM to drive the alternator field. The question here is what > sort of pulse rate should I be using? The field presumably looks like a > large inductor (I've not a clue as to what the inductance might be) and a > series resistance (which I can measure). Should I use a real low PWM rate? > High? Not a clue as to what I should use. I'm pretty much in the same boat (if you'll pardon the pun) on this one and this project is certainly going force me to catch up on my EE skills. I found a datasheet for the CS3341/CS3351/CS387 chips which are aparently used inside automobile regulators and it provides a good basis for what your(our) regulator ought to be doing at a minimum. If I am interpreting this datasheet correctly, it seems to recomend a 140 Hz pulse frequency. This seems counter to what I have read otherwise in regards to PWM control, where the selected frequency should be "just above the range of human hearing" i.e. 20 Khz or better. >From the little I know about the EE/Physics involved here, lower pulse rates are more efficient (lower pulse frequencies mean less overall back-EMF, right?) and you only need a pulse frequency high enough to maintain smooth output -- which could be easily enough viewed on a scope. > Second area of concern - I've built analog regulators before with no > problems (benchtop supplies, etc), and in fact I built an analog regulator > for a boat alternator as well. But in the case of a digital control loop > for a system such as an alternator, is a PIC (e.g. an 18F series unit) > going to be fast enough? I've no idea what sort of response time I need. > Given that the battery is more or less a huge capacitor, and that changes > in the source side (the alternator driven by the engine) are very slow, I > expect that there is plenty of time for a PIC-based PID loop to handle > things. Anyone got any experience in this area? My *guess* here is that even a slow PIC will be fast enough, and since power consumption of the uC is not a concern, running a modern PIC at full speed should be plenty fast enough. You might also be able to code an algorithm that immediately provides full field current when an increase in load is sensed, and then back off to avoid an over-voltage situation. This would really be much more of an issue when running as a pure generator *without* a storage battery. I figure I can work most of this out by trial and error on my little test bed setup. But the one piece of information I do need some help with is the selection of the high-power driver for the alternator. I simply have no idea what to select, or even whether I should go with a bipolar or mosfet driver, or perhaps even an IGBT as it looks that potential candidates could be had for under three bucks US. I'm also unsure as to whether I need to go low-side or high-side drive, or even if it makes a difference. Could someone provide a summary of the high points involved here, or perhaps even better direct me to an apropriate web page? For those otherwise interested, Home Power #42 (Aug/Sep 1994) provides a good overview as well as an analog regulator circuit using an LM723 and the venerable NE555. I found and printed a PDF from the web, but I don't have the URL handy. The particular circuit suggests a MJE 2955 (bipolar, PNP) driver and low-side drive. I had planned on doing a *little* more research myself before posting, but now seems a good time to get my query out since Larry and I are working on such similar projects. -p. _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist