Another Engine Control and Regulator project - DC Alternator

Started by thomasonw, October 29, 2012, 01:10:35 PM

Previous topic - Next topic

Ronmar

Quote from: BruceM on January 11, 2013, 09:24:54 AM

You'll definitely want steady seas.  Good luck, and let us know how it goes.  Victory to the bold!

You havn't really worked on electronics untillyou have tried to repair a circuit board trace and replace burnt components while your ship is breaking ice:)
Ron
"It ain't broke till I Can't make parts for it"

thomasonw

Quote from: Ronmar on January 11, 2013, 05:28:08 PM

You haven't really worked on electronics untill you have tried to repair a circuit board trace and replace burnt components while your ship is breaking ice:)

Well, no ice breaking, and managed to work between the rocking.  Tonight I finished assembling the two boards and even powered them up!


17.6mA draw, and 4.99v from the 5V switcher.   And two LED light up!


As expected, the SMD parts were a PITA.  But in the end it looks OK.   I am planning on revising the design, and one thing I am looking to do as add the ability to use a MSOP to DIP addaper board, like:



In that way one can pre-solder the INA-220's, verify their function, and then solder the entire unit onto the main board.  Of course will leave the native INA-220 pads so someone can mount them direct if they wish...

And here are some more photos for your enjoyment.






               (This was one of the close-up photos I used to check out the INA-220 soldering...)


A few more at: http://smartdcgenerator.blogspot.com/2013/01/ready-for-software-loading.html

Next step will be to install the Arduino boot-loader and then start testing out sub-systems. 


-al-




BruceM

Nice work on the SMDs, William. They look great. I think I'd be better suited to the adapter board approach.

I hope the INA-220's check out without a hitch.  They sure are a nice solution.

Thanks so much for letting us follow your progress!



Ronmar

Check R-10 in that closeup pic.  It looks like the one end needs to be re-flowed as it might not have bonded to the trace on the top of the circuit board(I don't see any solder:()...  Sorry, the QA gene kicked in:)  When you get a bulged solder union on the side you applied the solder on, that usually indicates too little heat(or a little too much solder).  When the component lead dosn't get hot enough, the solder resists wicking down into the hole and out onto the trace/pad on the component side of the board.  That is what looks like happended to the left end of R-10.  When you get a bulge on the component side, that usually indicates too much solder applied, it flows down the lead, out onto the trace on the component side and continues to build/bulge pulled by gravity.  Ideally, each side of the board has just enough solder to form a fillet that extends to the outside edge of the pad around the lead, and about the same distance up the lead...

Soldering is definitely one of those skills that needs practice.  Best advice I got and that I continue to pass along is to get some breadboard and cuttoff the ends of resistor leads(still enough left on the resistor to install) Or use whole resistors to practice with.  I still do it occasionally, especially before starting a project or tricky repair.  Radioshack used to sell these little 2" X 2" breadboard squares full of circular pads that were great for practice...  I solder two or three pads then QA with a magnifying glass, then solder 2-3 more. This really helps to get your heat application and solder application timing/rythm fine tuned... 

Solder issues can cause the weirdest problems, especially when you throw vibration/shock temperature change into the mix...
Ron
"It ain't broke till I Can't make parts for it"

thomasonw

Quote from: Ronmar on January 13, 2013, 12:03:39 AM

Check R-10 in that closeup pic.  It looks like the one end needs to be re-flowed as it might not have bonded to the trace on the top of the circuit board(I don't see any solder:()...  Sorry, the QA gene kicked in:) 


QA Guys, I remember them from my PM and EE days.  They were the guys that had all the COOL equipment, thermal cameras, microscopes, saws to cut apart solder and crimp joints to look at under their microscope. . . .   I also remember learning a LOT from those folks.  Ronmar,  yea - that one needed to be re-fluxed and re-flowed.  I had gone back and touched up a few solder joints like that after I took the photo..  (Really, I had!).   But your points are 100% on, and not just solder joints.  I think any connection introduces points of failure - and that was one of the reasons I selected to place the Amtel CPU down on the the controller board as opposed to making an Arduino 'shield' - less connectors...

And speaking of that Amtel CPU - today I was able to burn in the boot-loader, connect up a USB cable and download some Arduino sketches  (Sketches is Arduino speak for program).   AND I was able to verify the two INA-220s are working!   Yea!


              (Burning in the Arduino boot-loader using the Uno as a master)

Next step will be to start working through the program with real hardware, as opposed to the mocking up I had been doing using the Arduino Uno.  Lots of debugging I am sure. 

And now that I have verified the INA-220's are alive I can solder in the two bypass caps C6 and C8  (plus, check again the solder joints ;) )

And btw: For anyone else looking to burn in an Arduino boot-loader - there seems to be a problem using the built in Burn utility.  Esp if using a Uno board for the master.  I found another burner called OptiLoader that worked great:  https://github.com/WestfW/OptiLoader

Google optiLoader for lots of examples of how to use it (including some youtubes), and I put instruction on the blog for how to burn the controller board.  Click on the Assembly button at the top of the blog page.  And if folks wish to bypass all this, Amtel-328 CPUs are available with the bootloader already burned in.

-al-


thomasonw

#50
Introducing the Worlds Smallest Diesel Generator!  Delivering upwards of 2Ks of 'simulated' power, with easy Software Only update to a 4KW unit!!



And best of all, it is available for well under $20 !!!     ;)


Over the past couple of days I have been using an Arduino UNO to simulate how the real Kubota DC Generator and Battery would respond while debugging the Smart Generator and Engine Controller.   Been focusing on control and regulation of Amps, Volts, Watts and EGT as well as testing fault conditions and automatic Starting / Stopping.  (Wish I could get the UNO to say 'Grrrrrrr' when it senses the starter is being asked for.  So far, I only light up a small LED. . .).  Have not done anything with throttle / speed control yet.

So far am encouraged.  Here is a graph showing the results of a Simulated run.  The Top line is the power delivered to the 'battery' as measured by Watts.:



Lots of measurements are shown (VBat, Amps, EGT, etc.), sorry for not cleaning  it up.  The one to focus on is the top line - that is the Watts being 'delivered'.  In this early run I noted several spikes.  Need to work to see if those are in the Controller firmware, or perhaps an artifact of the UNO Simulator.



And for reference, look at the results of this run:



This time the controller was configured to preform along the lines of a typical 'external 3-stage regulator'.  (Ones that monitors only voltage - not Volts and Amps as this controller does).  Notice the red triangle at the top left, the Unused Capacity?   It is an outcome of Amp control / limit being left to the self limiting nature of an alternator and only pulling back as battery voltage rises.   Given that a system needs to be sized to where peak alternator watts align with the peak capability of the driving engine -  we end up with unused excess engine capacity before the peak load point is reached.   In the 1st graph Amps are driven higher during the initial charging period - fully matching watts delivered to the capability of the driving engine.  As battery voltage raises the Amps are reduced - maintaining  a constant load to the engine.
 
More to do,  will be looking into those Spikes next and refining the Field PWM algorithm as it takes into account Battery Volts, Amps, Watts load to the engine, and  EGT (which seems to be a fair proxy for relative engine loading - and may lead to 'self optimizing' management of engine loading).  Then debugging the speed control - matching  speed to load (slowing down the engine as the battery charges and watts delivered are reduced).  And who knows, maybe even connecting this to the REAL Kubota / DC Generator!

And maybe it is OK to solder in C6 and C8, seeing as the INA-220's are working well!

Fun, Fun, Fun!

-al-









Lloyd

Thomas,

I think I must need a little more info. Like a key to the graphed data.

It's all fun and games to test the board...but I also want to see a real engine driving a real alternator, into a real discharged bat bank. For this board test how did you model the engine, the alternator, and the bat bank.

Thanks for your work. I will be curious to see how your systems work in comparison to mine using the Balmar regulator with DBW speed control to match amps to engine load. I have the parts now just need to find sometime to finish the install.

Lloyd


Quote from: thomasonw on January 18, 2013, 07:56:30 PM
Introducing the Worlds Smallest Diesel Generator!  Delivering upwards of 2Ks of 'simulated' power, with easy Software Only update to a 4KW unit!!



And best of all, it is available for well under $20 !!!     ;)


Over the past couple of days I have been using an Arduino UNO to simulate how the real Kubota DC Generator and Battery would respond while debugging the Smart Generator and Engine Controller.   Been focusing on control and regulation of Amps, Volts, Watts and EGT as well as testing fault conditions and automatic Starting / Stopping.  (Wish I could get the UNO to say 'Grrrrrrr' when it senses the starter is being asked for.  So far, I only light up a small LED. . .).  Have not done anything with throttle / speed control yet.

So far am encouraged.  Here is a graph showing the results of a Simulated run.  The Top line is the power delivered to the 'battery' as measured by Watts.:



Lots of measurements are shown (VBat, Amps, EGT, etc.), sorry for not cleaning  it up.  The one to focus on is the top line - that is the Watts being 'delivered'.  In this early run I noted several spikes.  Need to work to see if those are in the Controller firmware, or perhaps an artifact of the UNO Simulator.



And for reference, look at the results of this run:



This time the controller was configured to preform along the lines of a typical 'external 3-stage regulator'.  (Ones that monitors only voltage - not Volts and Amps as this controller does).  Notice the red triangle at the top left, the Unused Capacity?   It is an outcome of Amp control / limit being left to the self limiting nature of an alternator and only pulling back as battery voltage rises.   Given that a system needs to be sized to where peak alternator watts align with the peak capability of the driving engine -  we end up with unused excess engine capacity before the peak load point is reached.   In the 1st graph Amps are driven higher during the initial charging period - fully matching watts delivered to the capability of the driving engine.  As battery voltage raises the Amps are reduced - maintaining  a constant load to the engine.
 
More to do,  will be looking into those Spikes next and refining the Field PWM algorithm as it takes into account Battery Volts, Amps, Watts load to the engine, and  EGT (which seems to be a fair proxy for relative engine loading - and may lead to 'self optimizing' management of engine loading).  Then debugging the speed control - matching  speed to load (slowing down the engine as the battery charges and watts delivered are reduced).  And who knows, maybe even connecting this to the REAL Kubota / DC Generator!

And maybe it is OK to solder in C6 and C8, seeing as the INA-220's are working well!

Fun, Fun, Fun!

-al-









JUST REMEMBER..it doesn't matter what came first, as long as you got chickens & eggs.
Semantics is for sitting around the fire drinking stumpblaster, as long as noone is belligerent.
The Devil is in the details, ignore the details, and you create the Devil's playground.

thomasonw

#52
Quote from: Lloyd on January 19, 2013, 12:03:13 AM
Thomas,

I think I must need a little more info. Like a key to the graphed data.

It's all fun and games to test the board...but I also want to see a real engine driving a real alternator, into a real discharged bat bank. For this board test how did you model the engine, the alternator, and the bat bank.

Thanks for your work. I will be curious to see how your systems work in comparison to mine using the Balmar regulator with DBW speed control to match amps to engine load. I have the parts now just need to find sometime to finish the install.

Lloyd


That will come, just need to be patient.  All journeys start with the 1st steps!  Once I am happy with how the regulator / controller performs on the test jig will install it on our existing DC generator / house battery.  But before I take that step I am going to wring out as many issues as I can 'on the bench'. 

And yes, will be interesting to see how this works compared to the assembled off-the self solution.  One thing I will say:  In searching before I  had only located one other alternator regulator which monitored both Volts and Amps for adjusting the field - and it was only available as part of their very expensive DC generator solution.  Perhaps there are some out there, but I was unable to locate one!

-al-



BruceM

First class work on the software development and simulation effort, William.  There's no point in abusing an engine and alternator until you're satisfied with your software operation, controlling algorithms and logic.  It's an important step, one that I guess only other programmers can truly appreciate.

Congratulations on your rapid progress!





veggie


+1 for BruceM's comment.
Very impressive simulation !
This gives you ability to test the bulk of the system logic in a comfortable controlled environment, then tweak the remaining details on the live system later.

Looking forward to your report on the initial "live" trials.
... and of course a YouTube video showing the start-up sequence and operation  ;)

cheers,
veggie

thomasonw

Quote from: veggie on January 19, 2013, 07:47:43 PM

+1 for BruceM's comment.
Very impressive simulation !
This gives you ability to test the bulk of the system logic in a comfortable controlled environment, then tweak the remaining details on the live system later.

Looking forward to your report on the initial "live" trials.
... and of course a YouTube video showing the start-up sequence and operation  ;)

cheers,
veggie

Ha!  Been thinking of a You-tube of the micro generator!  (always new fin things to try).  Today I debugged the auto throttle matching.  Think our camera will  take videos.

The effort is going well, I might be ready to do a real-run soon, but to be honest had been hoping for the weather to warm up a bit 1st  ::)

-al-

RJ

Very interesting project, how hard would it be to modify this to control an alternator with a 24v field that is controlled on the negative side?

Randy

thomasonw

Quote from: RJ on January 20, 2013, 05:02:05 AM
Very interesting project, how hard would it be to modify this to control an alternator with a 24v field that is controlled on the negative side?

Randy

To operate on 24v would be a small change - the main inductor in the switching power supply should be changed, and the I2C regulators would need to be watched for heat - though so little current is used in them I suspect there would be little issue.   Then of course the resister divider ratios and crow-bar would need to be adjusted.

This would allow for full operation on 24v - controller, remote, powering 24v devices (starters, field, throttle control motor, etc..)

Directly driving LOW side would be more difficult - though mounting some FETs on an external heat sink could be used to convert the high-side drive to a low-side drive.  (Interesting there was a lot of early talk about High side vs. Low side drive early on... :(  )


Have also looked at using this controller with a 48v system, and that brings in different issues.  Many of the logic devices have Vmax limits around 40v.  However, if one is able to power the controller from a 12/24v source and drive 12/24v devices (throttle controller, etc) and a 12/24v Field this will work well.  And one could also look to add an external Field FET pack to drive a 48v field if needed.

Have been working with some one looking to do a 48v alternator that uses 12v for the 'system' (starter, throttle, etc.) as well as a 12v Field.    If you are interested in 24v verion  I can look into that in more details.  Let me know.  And into the idea of an external FET pack, to get the LOW side drive . . . .  Thinking perhaps an opto-isolated connection would allow for a 'universal' high or low side driver...

-al-

BruceM

Perhaps it's easier to just make a version of the board for low side drive?

One feature to add for a public version might be some sort of over battery voltage crowbar on the PWM signal. That way if there was a sudden large load drop, and the battery is modest in size you wouldn't get a brief overvoltage before the software gets around to adjusting the PWM signal.  It would also be a good safety backup in case of processor or software glitch.  (I was thinking of someone else's software mods, of course, not yours, William!  :) )

Another thought would be to consider elimination of the buck converter for 5V supply.  The board use of power is so low that a linear regulator might end up saving power, especially if a low noise LDO regulator was used.  (I've found this to be true on my battery bank controller.) Secondary benefit would be less noise problems on current and voltage conversions.  I know for your own use you have other 5V things planned but for public use the linear approach is smaller, cheaper, bullet proof.

Congrats on your outstanding work!
Bruce

thomasonw

Quote from: BruceM on January 20, 2013, 10:36:21 AM
Perhaps it's easier to just make a version of the board for low side drive?

One feature to add for a public version might be some sort of over battery voltage crowbar on the PWM signal. That way if there was a sudden large load drop, and the battery is modest in size you wouldn't get a brief overvoltage before the software gets around to adjusting the PWM signal.  It would also be a good safety backup in case of processor or software glitch.  (I was thinking of someone else's software mods, of course, not yours, William!  :) )

Another thought would be to consider elimination of the buck converter for 5V supply.  The board use of power is so low that a linear regulator might end up saving power, especially if a low noise LDO regulator was used.  (I've found this to be true on my battery bank controller.) Secondary benefit would be less noise problems on current and voltage conversions.  I know for your own use you have other 5V things planned but for public use the linear approach is smaller, cheaper, bullet proof.

Congrats on your outstanding work!
Bruce

Bruce,

Thanks for the ideas.  I do have the crow-bar on there, but it currently takes down the whole controller - perhaps just taking out the Field drive would be a better approach.  And yes, the Switch reg looks fun, but given the low amps draw I see you point.  And am thinking there should be a way to make a 'universal' high / low driver design - with jumpers to select. 

Anyone else have ideas for changes /  improvements?

-al-