Wednesday, March 16, 2016

Meet the newest member!

OK,  There has been some work underfoot.   Over the past months I have been revising the Arduino Alternator Regulator design,and here is the 1st prototype just as it was preparing for its 1st trial run:

Revised design - ready for its 1st run


Still using the same proven core code this regulator features one major enhancement:  It includes a CAN port for communications to the outside world.  How can this be used?  I am looking at three protocols to enable:
  • J1939 based NMEA-2000:   Report out status
  • CiA / CANopen:  Accept CAN based charger enable/disable commands
  • J1939 based RV-C: Protocol to communicate remote battery voltage, temp, etc (reducing wiring) and enable a coordinated 'systems' approach to DC charging sources.

View of CAN ports, the two RJ45 connectors for CAT-5
Stuffing options allow traditional headers to be used instead.
Each of these have a slightly different benefit.  NMEA-2000, popular with some boaters, will allow you to display your alternators status in enhanced monitors.

With the increasing deployment of Li-based batteries (especially LiFeP04 and related) there is a need for the BMS to communicate to the alternator to enable or disable it.  Today this is handled (very well, btw) using the FEATURE-IN port and a wire.  Some more advanced BMS devices though are able to send a class of commands to accomplish this same goal.   Using CAN will reduce wiring, simplify installation, and increase reliability.

My final phase will be to enable a CAN based BMS which not only informs the alternator to turn on and off, but also is able to do the same with any charging source.  And be able to coordinate all charging sources for priority (let the Solar panels top off the batteries), as well as assure that all sources are working to the same goal (battery voltage, amps, charge phase, etc..).  In addition we can send the real time battery measurements over the same CAN cable - no need to run separate wires to the battery for each device.  For this I am considering RV-C, as well as keeping an eye on other J1393 based CAN protocols.  Never fear, fall-back modes and safety steps will be included in case there is a communications failure.  No more 'fried batteries' if that remote voltage sensing wires gets cut somehow (I have seen this more then once with traditional regulators by the way).

Bottom view

Other differences include on-board USB adapter for programming as well as advanced configuration. The design also utilizes SMT components.  It is my hope to make some or all of this available in some way professionally assembled, and if anyone is interested in assisting with this aspect - please contact me





The CPU selected for this project is the Atmel ATmega64M1.  It has several nice features, most notable a built in CAN controller.  In addition to the hardware there has been much work done on the foundation software which will be needed, including:

  •  Basic support for the newest Arduino IDE for the  ATmega64M1 CPU.
                      https://github.com/thomasonw/ATmegaxxM1-C1                     
 

  • CAN driver lib modeled after existing Due lib to enable the built in CAN controller in the ATmega64M1
                      https://github.com/thomasonw/avr_can    


  • Working with Timo Lappalainen to extend his NMEA-2000 lib for support using the above.
                    https://github.com/ttlappalainen/NMEA2000 




  • ‘Link’ file to bring NMEA-2000 to AVR_CAN 
                  https://github.com/thomasonw/NMEA2000_avr      



There is more work to do - including some overall systems configuration HUI that could perhaps simplify the installation and setup.  Again, if anyone is interested - please drop me an Email!