Another Engine Control and Regulator project - DC Alternator

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

Previous topic - Next topic

stuie

another thought on the high side control, is that most regs are powered from D+ when the alternator is running and have a warning light that excites the regulator/field when the D+ is low.
Stu

thomasonw

All,

Thank you again to everyone who provided comments and input to this design.  This evening I posted an update to the hardware design(v 0.1.3) as a result of feedback.  Major changes include adding the FET Driver and correcting the design fault around the I2C extension power supply.  And though it does not show, I have been spending a LOT of time in the PCB layout, cros checking the GBR files and correcting errors in the PCB payout, as well cleaning things up.  I have learned that GBR reviews is one of the MOST critical steps!

And after letting it sit for a few days I have decided to be a Lemming and stick with the High Side field control.  I am so bothered as to how almost universally every example of alternator control devices I can find drive the High Side.  There MUST be a reason, and though a low-side driver does make more sense from a FET driver standpoint, I can not shake the obvious direction the industry has taken - even I have have no clue why. (Failure mode / shorted control wire seems to have some glimmer of insight into it..  But still not satisfactory definitive for my taste.)  

Oh Well - High Side it is and Life goes on!

Going to let this sit for a bit longer as I posted the project to another website this evening.  After a week will look to get the PCBs and parts ordered.  Want them to be at our mail-drop for our trip in December.

Then the REAL fun begins!

Thank you all again, and I will post updates as I have them.

-al-

thomasonw

BTW:  Note sure if I ever did post the link to the generator its self: http://mvvikingstar.blogspot.com/search/label/Kubota%20DC%20Generator

It has been running well in our boat for a three years now, though due to the installation of a couple of solar panels was mercifully quiet this summer!  (We did not need to use the Kubot all summer -  not until we got into the end of September and could not keep up with laundry power demands)

-al-

BruceM

I'm sure that with the progress in P-ch mosfet efficiency, you'll do just just fine with high side drive.  It does make for slightly easier troubleshooting.  Looking forward to your next report!


thomasonw

Thanks Bruce.

Ordered PCB yesterday, and parts are on their way as well.  As we live a 'mobile life' all are being sent to our Mail Drop in Oregon.  We will look to pick them up when we go there for the Christmas holidays.  So, not much more hardware till the new year!

But perhaps I will start outlining the firmware.   

Will update the blog, and this list when appropriate.

Thank everyone again for the reviews.

-al-

thomasonw

FYI,

I am starting to play with the Firmware for this project.  The other day I did a simple trial run of the serial protocols, to get an idea of how much time each takes.  I 'mocked up' three tests, ran each 100 times and caculated the time for each set of 100 passes through the loop.  The three serial protocols tested were:

I2C:                                 Send text "Hello World" to a remote LCD/keyboard, and check to see if any key has been pressed.
Serial (TTL level RS-232): Send text "Hello World", and check to see if any key has been pressed.
OneWire:                          Ask one temperature sensor for its current reading.


Here are the results I got:
I2C:            3.4ms / printing - KB Check
Serial:        22ms   / printing - KB Check
OneWire:  124ms   / request**


** A quick comment about the OneWire - At this time I do not actually have any physical device to test, so the above times really represented the time-out of the read request.  But that is also important to know!

The one-wire is slow, as I expected it to me.  My intention is to place all the one-wire temperate sensors into a queue and one at a time after N loops through the main-loop.  In this way I might be sampling each temperate sender every 20 seconds or so, but that should be OK the dT/dT should be low - unless there is a fire!

And speaking of timing-out, I have picked up some concern over the default I2C library in the Arduino environment.  Of all places in a hobbyist Drone group!  Seems there are some conditions where the I2C lib can fault and hang the system.   Even through I am planning on implementing the Watch Dog timer, this is not a desirable situation.  Fortunately someone has developed an improved I2C library that I am investigating using.  More here: http://dsscircuits.com/articles/arduino-i2c-master-library.html

And to see more abotu the simple test I did, look here: http://smartdcgenerator.blogspot.com/2012/11/doing-some-timing-tests.html


thomasonw

Just a quick update,

Last night I posted the 1st cut of the Arduino software.  Because I do not have the PCBs back yet (I am sure they are at the mail Drop, and we will pick them up in late December), testing is very limited.   http://smartdcgenerator.blogspot.com/2012/11/posted-1st-cut-arduino-alternator.html


While waiting for our trip to Portland for the holidays, will perhaps work on connecting the Cruise Control module to the Kubota throttle and see what problems I come up with there...


BruceM

You're making great progress, William, congrats!
If you could please save your source in a text file or pdf format, more of us would be able to take a look.
I'm not able to open your posted file.
Thanks!
Bruce

thomasonw

Bruce, Thanks.

You should be able to open the ZIP file and read the source using Wordpad, or Notepad.  It is plane text.   I did change the .PDF file from .pde to .txt, perhaps that will help.  Do let me  know if you still are having issues, I tied it on a separate computer to see if perhaps the Google Drive log-in was causing problems, but looks OK to me.

-al-

BruceM


Ronmar

I finally got around to trying to look at your arduino code but I keep getting a google docs error when I try and use the links at the top of the page...  How big are the text files that you had to zip them?  I do most all my internet stuff on an Ipad via wifi from my couch.  First time i tried to look yesterday, that zip file stopped me cold on the Ipad.  Then today when I dusted off the desktop, I get errors...
Ron
"It ain't broke till I Can't make parts for it"

thomasonw

Ronmar,

Sorry you have been having issues.  Good point about NEEDing zip, it is after all only 65K or so.

I just posted an updated 0.0.2 version, not in a Zip, and as a .txt file...

(Boy, seems more work getting this stuff posted so folks can read it -  then the project its self  ;) )

Changes in the 0.0.2 version include:

  • Flushed out LCD displays for Kubota and Alternator screens
  • Applied the Arduino "F" macro to move some of the strings from RAM to PROGMEM
  • Corrected errors throughout.  Still debugging as I can.

I placed more 'DEBUG' code in, mostly to allow for simulation.  You can see a lot of this in the Kubota_start() function.

Overall, I feel there is still work to do around readability.  Not too happy with how things laid out, and perhaps inconsistency in function level (e.g. which global variables are changed by the function vs. the calling function..).  After I get away from it for a while, might look a the overall structure some.  Will see.

Thanks again for all who are interested in this, and following!
-al-

thomasonw

Still working on the source while I await getting my hands on hardware.

Tonight I posted revision 0.0.4 of the source code, still pre-production (and pre-hardware), but have been making changes to add functions  improved reliability, and correcting errors I find while 'simulating' the software by running in Debug mode on an Arduino.

This version primary adds throttle control to the logic.  I smoothly take the throttle up while starting, and once the charger enters Float Mode, it will back down on the throttle to accommodation the lower load being placed on the Kubota.  I also corrected the RPM calculation function, and added in some configuration parameters to make it easy to adapt to different alternators and pulley ratios.  Version 0.0.3 included a oneWire presence test during startup, and restructuring of the main-loop from in line code to supportive function calls.  Hopefully this will help some with readability.

Next week we travel to Portland for the holidays, and the PCBs and parts are waiting for us at our mail-drop.  Upon returning in January, will begin assembling the hardware and then can make some real progress!

And a side note:  I use wordpad in winXP  to edit the source file.  If you open the file, using the same will  preserve formatting and spacing.


thomasonw

The Parts are here!

Here are a couple of photos of the Pile of Parts and one of the PCBs. 





Time to warm up the Soldering Iron!  But sadly, that will need to wait till next week as in addition to bringing back these parts, we stuffed our poor rental car with other goodies and some of those projects on Viking Star will take priority (ala, installing a new main inverter for the one that failed last month).

And will also say, I really miss our old house at times like this.  With is 4' x 8' "work shop table" and lots and lots of room to spread out all those little bags.   But oh well, 'living on a boat' has its +++ and ----  ;D

Next week I expect to start assemble, will also need to build up some courage towards hand-soldering those INA-220s (there are the two really-small rectangles below C6 and C8 about mid place on the left side of the PCB...  Awk, was about the only part I could not source in Through Hole!)

-al-

BruceM

Great looking PCB William!  Wow, you got them silk screened too.  If you don't mind, who did your board and what price?
I've been using expresspcb.com and have been very happy with their work, but am always on the lookout for a better bargain.