A Forum run by Enthusiasts of MidNite Solar

Charge Controllers and Clippers => The "KID" charge controller => Topic started by: esol on March 04, 2016, 04:10:31 PM

Title: PC Mode
Post by: esol on March 04, 2016, 04:10:31 PM
Hello Everybody,

Does anybody have more details about what "PC Mode" is?  What it does? what it can be used for? I found this option in the menu on the Kid display under the menu Multiple Units? > Communicate Mode. I am trying to get the data from the kid through the master port using an rj11 to rs232 adapter.
Title: Re: PC Mode
Post by: jamesmc on April 01, 2016, 04:03:10 PM
I was wondering the same thing myself.

I have been working on trying to read the data as well (firmware v1811), unsuccessfully at this point, but others here have been able to get some joy.

The brochure for the KID claims: "RS232 openly published protocols", but as far as I can find so far, the only information is from a thread post by Mario in this forum (which seems more like a hint at a work in progress).
Title: Re: PC Mode
Post by: dgd on April 01, 2016, 04:53:45 PM
Yes, it definitely is a work in progress
I have had some limited success in reading data from the serial master port into an arduino BUT it is really intermittent as there are  multiple read fails. I suspect some timing problems, it seems repeated reads at 56k over the rs232 port are defeating the Kid's ability to respond and perhaps the serial port buffer is getting in a mess (just guessing!).
I have spent many hours playing with this BUT have mostly given up and await the next release of Kid firmware from Mario, hopefully with some more details on data available via serial port with some examples either flowcharts or code.

dgd
Title: Re: PC Mode
Post by: esol on April 05, 2016, 03:03:00 PM
I have been able to read in data from an arduino nano using an rj11 female to rs232 adapter that I attached to a breadboard using the rx/tx cables.  Turns out that if you set the kid to sync mode instead of PC mode, it will start reading in data. 
Title: Re: PC Mode
Post by: Robin on April 08, 2016, 12:09:02 PM
I will get Mario involved. We need guys on the forum to create the comms for the KID.
Title: Re: PC Mode
Post by: dgd on May 27, 2016, 04:55:22 PM
Haven't heard much from Mario this year, any updates yet on  the KID firmware with data comms improvements?
The last update was a long time ago. :-\

dgd
Title: Re: PC Mode
Post by: Mario on July 20, 2016, 02:40:56 PM
I have added code that supports PC Comm.
Check out firmware 1820 tread.

Mario
Title: Re: PC Mode
Post by: lysningen on July 26, 2016, 08:12:58 AM
which side should I go to in order to connect to Kies PC. learn about how to connect the kid to PC
what should I use to connect the kid to PC
Title: Re: PC Mode
Post by: jamesmc on August 26, 2016, 05:30:38 PM
Just to confirm pin out for serial connection to KID using master jack:

DB9                  RJ11 ( Master jack in Kid CC)
5_GND     <--------> 5_GND
2_RXD-IN  <--------> 3_TX-OUT
3_TXD-OUT <--------> 4_RX-IN


This is correct?
Title: Re: PC Mode
Post by: jamesmc on September 08, 2016, 07:54:01 PM
Quote from: jamesmc on August 26, 2016, 05:30:38 PM
Just to confirm pin out for serial connection to KID using master jack:

DB9                  RJ11 ( Master jack in Kid CC)
5_GND     <--------> 5_GND
2_RXD-IN  <--------> 3_TX-OUT
3_TXD-OUT <--------> 4_RX-IN


This is correct?
I finally have a new KID on the bench vs an old beta.

I think the correct pinout should be:
DB9                  RJ11 ( Master jack in Kid CC)
5_GND    <--------> 5_GND
3_TX-OUT <--------> 3_TX-OUT
2_RXD-IN <--------> 4_RX-IN


Now receiving some reasonable looking data while in PC mode.

It looks like this:

131,119,,,,-53<,1.9>>.6>>.131,120,,,,-530,1,10<.4<>.
131,128,,,,-530,1,10<,48>.
131,128,,,,-530,1,1<<.4<<.
131,119,,,,-53<,1,9<>.68>.131,128,,,,-530,1,1<<.48<.
131,119,,,,-538,1,18<.4<<,
131,128.,,,-538,1,1<<.4<>.
131,120,,,,-530,1,1<>.6<>.
131,128,,,,-530,1,18<.4<>,
131,128,,,,-530,1,1<<.4<<.
131,128-,,,-538,1,1<>,48<,
131,120,,,,-530,1,1<<.48>,
131,128,,,,-530,1,18<.48<.
131,128,,,,-530,1,1<<.4<<.131,119,,,,-530,1,1<>.4<<.
131,128,,,,-530,1,1<<,4<<,131,119,,,,-530,1,1<8.4<<.
131,128,,,,-530,1,18<.48<.
131,119,,,,-538,1,1>>.6<>.
131,120,,,,-530,1,18<,4<>.
131,128,,,,-530,1,1<<.4<<.
131,128,,,,-530,1,18<,48>,
131,119,,,,-538.1.1><,6<<,131,128.,,,-538,1,1<<.4<<.


Does this look correct?
Title: Re: PC Mode
Post by: jamesmc on September 09, 2016, 03:57:55 PM
OK I finally connected the KID to a REAL serial port and not to a USB2Serial adapter (Prolific chipset). and am now receiving correct data.

Warning:  your mileage may vary using a prolific chipset USB2Serial adapter. 

Here is what the data stream looks like with included timestamp (records arrive approx every 500 milliseconds):

R 14:56:27.24  131,119,,,,-530,1,100,400,
R 14:56:27.74  131,119,,,,-530,1,100,400,
R 14:56:28.23  131,120,,,,-530,1,100,400,
R 14:56:28.73  131,119,,,,-530,1,100,400,
R 14:56:29.23  131,120,,,,-530,1,100,400,
R 14:56:29.72  131,120,,,,-530,1,100,400,
R 14:56:30.22  131,120,,,,-530,1,100,400,
R 14:56:30.71  131,120,,,,-530,1,100,400,
R 14:56:31.21  131,120,,,,-530,1,100,400,
R 14:56:31.70  131,120,,,,-530,1,100,400,
R 14:56:32.20  131,119,,,,-530,1,100,400,
R 14:56:32.70  131,120,,,,-530,1,100,400,
R 14:56:33.19  131,120,,,,-530,1,100,400,
R 14:56:33.69  131,120,,,,-530,1,100,400,
R 14:56:34.18  131,120,,,,-530,1,100,400,
Title: Re: PC Mode
Post by: Westbranch on September 09, 2016, 07:25:15 PM
was it the one mentioned in post #9?    http://kb1uas.com/mnsforum/index.php?topic=2794.0
Title: Re: PC Mode
Post by: headgeek on September 10, 2016, 10:49:38 AM
Quote from: jamesmc on September 09, 2016, 03:57:55 PM
OK I finally connected the KID to a REAL serial port and not to a USB2Serial adapter (Prolific chipset). and am now receiving correct data.

Warning:  your mileage may vary using a prolific chipset USB2Serial adapter. 

Here is what the data stream looks like with included timestamp (records arrive approx every 500 milliseconds):

R 14:56:27.24  131,119,,,,-530,1,100,400,
R 14:56:27.74  131,119,,,,-530,1,100,400,
R 14:56:28.23  131,120,,,,-530,1,100,400,
R 14:56:28.73  131,119,,,,-530,1,100,400,
R 14:56:29.23  131,120,,,,-530,1,100,400,
R 14:56:29.72  131,120,,,,-530,1,100,400,
R 14:56:30.22  131,120,,,,-530,1,100,400,
R 14:56:30.71  131,120,,,,-530,1,100,400,
R 14:56:31.21  131,120,,,,-530,1,100,400,
R 14:56:31.70  131,120,,,,-530,1,100,400,
R 14:56:32.20  131,119,,,,-530,1,100,400,
R 14:56:32.70  131,120,,,,-530,1,100,400,
R 14:56:33.19  131,120,,,,-530,1,100,400,
R 14:56:33.69  131,120,,,,-530,1,100,400,
R 14:56:34.18  131,120,,,,-530,1,100,400,


So - voltage to battery and voltage from panel are the second and third columns I think. Would 131 and 120 be milliamps in/out? And any guesses as to what -530,1,100,400 refers to? It should be easy to use awk and sqlite the data I just need to know what the columns are.
Title: Re: PC Mode
Post by: jamesmc on September 12, 2016, 06:05:47 PM
Quote from: Westbranch on September 09, 2016, 07:25:15 PM
was it the one mentioned in post #9?    http://kb1uas.com/mnsforum/index.php?topic=2794.0

It may have been, but its one that I use for all sorts of other serial devices without incident.  I should also add that my Dell XFR has a built in prolific chipset based serial port that didnt work either.  I would be surprised if it was a counterfeit one.  Anyways, I have heard that not all USB2Serial cables are created equal, and now I have learned it first hand.  Mind you I did not dig too deeply into whether different OS drivers would have made a difference. 
Title: Re: PC Mode
Post by: jamesmc on September 12, 2016, 06:10:38 PM
Quote from: headgeek on September 10, 2016, 10:49:38 AM
Quote from: jamesmc on September 09, 2016, 03:57:55 PM
OK I finally connected the KID to a REAL serial port and not to a USB2Serial adapter (Prolific chipset). and am now receiving correct data.

Warning:  your mileage may vary using a prolific chipset USB2Serial adapter. 

Here is what the data stream looks like with included timestamp (records arrive approx every 500 milliseconds):

R 14:56:27.24  131,119,,,,-530,1,100,400,
R 14:56:27.74  131,119,,,,-530,1,100,400,
R 14:56:28.23  131,120,,,,-530,1,100,400,
R 14:56:28.73  131,119,,,,-530,1,100,400,
R 14:56:29.23  131,120,,,,-530,1,100,400,
R 14:56:29.72  131,120,,,,-530,1,100,400,
R 14:56:30.22  131,120,,,,-530,1,100,400,
R 14:56:30.71  131,120,,,,-530,1,100,400,
R 14:56:31.21  131,120,,,,-530,1,100,400,
R 14:56:31.70  131,120,,,,-530,1,100,400,
R 14:56:32.20  131,119,,,,-530,1,100,400,
R 14:56:32.70  131,120,,,,-530,1,100,400,
R 14:56:33.19  131,120,,,,-530,1,100,400,
R 14:56:33.69  131,120,,,,-530,1,100,400,
R 14:56:34.18  131,120,,,,-530,1,100,400,


So - voltage to battery and voltage from panel are the second and third columns I think. Would 131 and 120 be milliamps in/out? And any guesses as to what -530,1,100,400 refers to? It should be easy to use awk and sqlite the data I just need to know what the columns are.

The data columns are outlined in Mario's post about firmware 1820 beta (http://kb1uas.com/mnsforum/index.php?topic=3341.0):
Quote
List of what it sends in order:
   * Displayed battery voltage
   * Displayed PV Voltage
   * Displayed output watts
   * KWH
   * Amp Hours
   * Battery Temperature
   * WBJR Current
   * Battery SOC
   * WBJR Amp Hr Remaining

In the capture data I posted, the timestamp was added by me.  131 = 13.1V battery voltage, 120 = 12.0 displayed PV voltage, etc
Title: Re: PC Mode
Post by: headgeek on September 27, 2016, 10:23:34 AM
Thanks for the pointer. :)