Morningstar Modbus interface.

mike_smike_s Registered Users Posts: 123 ✭✭

Here's a schematic for a simple adapter from EIA-232 to Morningstar's half-duplex TTL level Modbus (via their 6P6C/6P4C, aka "RJ12") jack. It doesn't have the opto-isolation of the official one. It works with MSView . Requires "good" EIA-232 voltage levels, likely more than the TTL levels put out by some cheap USB-serial adapters (not fully explored - it works with a "good" adapter). The "official" one requires the same.

I'm also working on an ESP-8266 wireless module interface to the same. I've got the hardware and 99% of the Modbus comms working (I can read all the registers/coils), along with a JSON interface for reading stuff. If there's anyone who's AJAX savvy (I've got jquery available) who would like to add to it, PM me. The goal is to have access to Morningstar (maybe more) stuff available via a web(ajax) interface, json and maybe even a Modbus TCP to RTU gateway all running on a low cost, open source, WiFi module.

(Oh, and Morningstar's documentation is full of errors, as can be seen from some of the values above, if you can read them)


  • jonrjonr Solar Expert Posts: 1,384 ✭✭✭✭

    Nice. Also consider the ESP32.

    Perhaps this is helpful:

    I am available for custom hardware/firmware development

  • mike_smike_s Registered Users Posts: 123 ✭✭

    I don't see any advantage to the ESP32 in this application. Support isn't as mature, the available modules aren't as standardized and are more expensive. I'm developing on a NodeMCU right now, but it will end up on a $4 Wemos D1 mini Pro (clone), which has 16 MB of flash - I haven't seen an ESP32 module (with usb, etc) with more than 4 MB.

    Thanks for the link, but I've got all the read/write Modbus RTU stuff covered, except for the ability to do a Read Device Identification command, which none of the Arduino libraries I've found support. But, that would only be to automatically recognize the attached controller, which can be done manually quite easily.

  • mike_smike_s Registered Users Posts: 123 ✭✭
    edited March 2019 #4

    The more I get into it, the more I realize that although Morningstar's stuff may work OK, underneath the code must be fragile. Apart from trying to work with Modbus on the controllers, just running MSView should make that obvious.

    Significant parts of the documentation are just plain wrong, there are large (and completely unnecessary) inconsistencies between models, and they seem reluctant to address issues in a timely manner (probably in real fear of breaking something else, because their code is a house of cards). Every model maps stuff differently, and there isn't much consistency or overlaying design/logic/architecture.

    On a good note, the hardware seems to be well done, AFAICT. I wish their software was, too.


  • stmoloudstmoloud Registered Users Posts: 111 ✭✭
    edited March 2019 #5

    Good project here. I'm working on an LED reader for instance a readout which shows if G is blinking or fast blink or slow blink. Should be easy enough

    760W panel array, 4 x 6v 220 ah Crown batteries, Tristar TS-45 PWM controller,  no name 600 PSW inverter. 
  • mike_smike_s Registered Users Posts: 123 ✭✭
    edited March 2019 #6


    I now have Modbus TCP working through the device, so Morningstar's MSView can connect through it (wirelessly) instead of needing one of their serial/USB interfaces (other than firmware updates, which haven't been tested). In addition to that, from a web browser (including a phone), you can monitor charging status and set basically the same parameters as you can from MSView (current limitation is that MS doesn't fully/correctly document everything). There's also a RESTful/JSON interface with access to all the exposed Modbus registers/coils. I've been developing with a Prostar PWM (gen3), but also have definitions for the PS-MPPT, and with a bit more work expect it would also support the SunSavers and TriStars which support their 6P6C ("RJ12") Modbus interface.

  • BB.BB. Super Moderators, Administrators Posts: 31,334 admin

    That is really neat Mike!

    One question, the MorningStar 300 Watt 12 VDC inverter... I believe it is connectable to ModBus, but do you know what functions may be readable/controllable through the bus?


    Near San Francisco California: 3.5kWatt Grid Tied Solar power system+small backup genset
  • mike_smike_s Registered Users Posts: 123 ✭✭
    edited March 2019 #8

    So, when I worked for Apple, I learned that there was one of four answers to any question: "Yes", "No", "That's an important future direction", and "That's a significant third-party opportunity."

    It's one of the last two. An inverter obviously is quite different than a solar controller in regard to the variables to monitor/controlled. But I expect the hardware and basic Modbus infrastructure would work - it's just the UI would be very different. Perhaps MS will give me a SureSine to make it happen, but I'd really like to see a 2 KW one - 300 W isn't much 😀.

    The project will ultimately be open sourced, but I may sell stuff for non-"makers" who are willing to accept a turn-key solution without any promises.

    For a direct answer to your question, to see what you can do on a SureSine - But don't trust it to be more than 90% accurate or complete, based on my experience.

  • mike_smike_s Registered Users Posts: 123 ✭✭
    edited November 2019 #9

    OK, so it's ready (or close) to Prime Time. I used it over the summer, and it's working well for me. Should work with PS-MPPT and PS-Gen3 controllers. A bit of work is needed to add others, but the framework is in place. Finally got around to organizing and creating some minimal docs, so I put the project out on github.

Sign In or Register to comment.