Friday, March 16, 2018

A few more Regulators are available!

In late breaking news, there are 5x more assembled Gen 3 regulators available!   $80 each, and I have some more temperature probes at $1 each...

Email if interested.  These will be the last of the Generation 3 regulators as I transition to the  3B layout.







Sunday, March 11, 2018

All spoken for...

All the Generation 3 regulators are spoken for, and I am now out of stock until the revised PCB Layout Generation 3B ones come in.

It has been amaizing the interest in this project over the past year, and few months, and I look forward to continued development and support going forward.  Thank you to all to date.


I am at this moment proofing out the 1st article of the relayed out 3B regulator, and expect to be placing a bulk order perhaps as soon as late next week.  Then give 4-6 weeks for them to be assembled, a week or to for testing/flashing/confirmation coating and I should be able to start sending them out the end of April / 1st part of May.   Until then take note of the special pre-order pricing of $100, folks are already starting to stick their name on these regulators - and I will work to get then out as soon as I can!


Thursday, March 8, 2018

An App!

When the VSR Alternator Regulator was 1st created it was envisioned that much of the users interaction -- configuring, monitoring, diag -- would be handled via an application running on your phone / tablet / PC.  The resulting ASCII status and command strings were intended to provide platform independent communications to that app -- more so, that ASCII communications was never intended for humans to futz with. 

But the app never got developed, and it was kind of lucky that the ASCII strings were human readable.  This background may help explain why they are not all that user friendly.


Skipping forward, Rick Bell has been working on an Applications and posted his works at Back Stage Sailing.  Here is a link to the application in its Beta form:

https://backstagesailing.com/downloads/category/osenergy-configuration-tool-beta-versions/

And a users forum:   https://backstagesailing.com/user_forum/

 I am so happy to see an app being worked on, as it opens up so many possibilities to simplify advanced installations, from single users to professional installers.   Few folks will master the ASCII command set, but with a good app they will not need to!

Have a look, download the Beta and give Rick some feedback.  And keep your eye out, there is more to come in this area of communications over the coming year...



Monday, March 5, 2018

A look at SeedStudio USB-CAN Analyzer API

Securing a CAN adapter is somewhat a challenge.  There are several available, commercial as well as open source - with their costs starting at $50 and quickly raising higher.  So it was with great interest that these little guys started showing up on Ebay:

USB-CAN Analyzer Dongle  (Note V7.00)

Costing around $25, they looked to be a promising little device to use, and for some reason they have somewhat wide availability.  Including SeedStudio who offers them for a reasonable price:   https://www.seeedstudio.com/USB-CAN-Analyzer-p-2888.html     I was able to purchase one through Mouser for the same price.  (SeedStudio branded).  And of note:  the one I have matches the photo, including the V7.00 revision.

However, the documentation is very lacking, and what is there is flat wrong.  It does come with a Windows program that one can use to look at CAN messages, as well as send out some packets - but if you want to intercept the USB port and use it for your own programs, well . . . .

So I did a little snooping.  Using a COMM monitoring program I have been able to decipher the ASCII commands to and from the little USB dongle for several of the key functions covering basic config, sending and receiving of packets.   Perhaps some official (and correct) documentation will come available, until then I hope this guide can help some folks.

BASICS:

The USB dongle connects to the USB port via a QinHeng CH340 USB2 serial to USB adapter.  Once your OS has loaded the needed driver a virtual COM port is created.




CONFIGURING

The Configure command is a 20 character string with the following format:

Byte
Use
Value
Notes
1
START TOKEN
0xAA
Fixed value
2
COMMAND
0x55
 Configure
3
?
0x12

4
SPEED
0x01 =  1Mbps   
0x02 = 800Kbps
0x03 = 500Kbps
0x04 = 400Kbps
0x05 = 250Kbps
0x06 = 200Kbps
0x07 = 125Kbps
0x08 = 100Kbps
0x09 =  50Kbps
0x0A =  20Kbps
0x0B =  10Kbps
0x0C =   5Kbps

5
FRAME TYPE
0x01 = Std
0x02 = Extended

6
FILTER
MSB
Example:  0x12345678   --> 0x78
7

    0x56
8

    0x34
9
LSB
    0x12
10
MASK
LSB
Example:   0xFCBA987   --> 0x87
11

    0xA9
12

    0xCB
13
MSB
    0xFE
14
MODE
0x00 = Normal
0x01 = Loopback
0x02 = Silent
0x03 = Loopback + Silent

15
?
0x00 or 0x01
At one time I noted this being 0x01, not sure why…
16
0x00

17
0x00

18
0x00

19
0x00

20
CHECKSUM
Calculated = 8-bit sum of Bytes 2..18



 Example, 250Kbps, Extended Frame, no filtering / no mask, Standard mode. (aka, what the regulator uses):  AA 55 12 05 02 00 00 00 00 00 00 00 00 00 01 00 00 00 00 1A     


SENDING  DATA PACKETS:

The format for sending a packet is variable length with no terminator.   It again begins with the 0xAA value, and follows these tables:

Sending STD frame:


Byte
Use
Value
Notes
1
START TOKEN
0xAA
Fixed value
2
COMMAND
Bits 6..7 = 11
Transfer Packet
STD/EXT
Bit 5     = 0
Standard message
?
Bit 4     = 0

LENGTH
Bit 0..3
Number of data bytes being sent


Example: Sending 6 bytes:  0xC6
3
ID
LSB
Example:  ID = 0xBA98  --> 0x98
4
MSB
    0xBA
5
DATA
Data byte 1
Data packet.  Transmit only the number of characters you want to send.
(Matching LENGTH above)

6
Data byte 2
7
Data byte 3
8
Data byte 4
9
Data byte 5
10
Data byte 6
11
Data byte 7
12
Data byte 8




Sending EXT frame:


Byte
Use
Value
Notes
1
START TOKEN
0xAA
Fixed value
2
COMMAND
Bits 6..7 = 11
Transfer Packet
STD/EXT
Bit 5     = 1
Extended message
?
Bit 4     = 0

LENGTH
Bit 0..3
Number of data bytes being sent


Example: Sending 6 bytes:  0xE6
3
ID
LSB
Example:  ID = 0xFEDCBA98  à--> 0x98
4

    0xBA
5

    0xDC
6
MSB
    0xFE
7
DATA
Data byte 1
Data packet.  Transmit only the number of characters you want to send.
(Matching LENGTH above)

8
Data byte 2
9
Data byte 3
10
Data byte 4
11
Data byte 5
12
Data byte 6
13
Data byte 7
14
Data byte 8




RECEIVING DATA PACKETS:

 Receiving is the same as Sending but includes a 0x55 prefix.  Note also, I am inferring the STD packets as I only captured EXTENDED frames.  Again, packets are variable length with no terminator.



Byte
Use
Value
Notes
0
?
0x55
Prefix value?  Help to re-sync??
1
START TOKEN
0xAA

2
COMMAND
Bits 6..7 = 11
Transfer Packet
STD/EXT
Bit 5     = 0
Standard message
?
Bit 4     = 0

LENGTH
Bit 0..3
Number of data bytes being sent


Example: Sending 6 bytes:  0xC6
3
ID
LSB
Example:  ID = 0xBA98  --> 0x98
4
MSB
    0xBA
5
DATA
Data byte 1
Data packet.  Transmit only the number of characters you want to send.
(Matching LENGTH above)

6
Data byte 2
7
Data byte 3
8
Data byte 4
9
Data byte 5
10
Data byte 6
11
Data byte 7
12
Data byte 8





Byte
Use
Value
Notes
0
?
0x55
Prefix value?  Help to re-sync??
1
START TOKEN
0xAA

2
COMMAND
Bits 6..7 = 11
Transfer Packet
STD/EXT
Bit 5     = 1
Extended message
?
Bit 4     = 0

LENGTH
Bit 0..3
Number of data bytes to receive


Example: Receiving 8 bytes:  0xE8
3
ID
LSB
Example:  ID = 0x 19F21280  --> 0x80
4

    0x12
5

    0xF2
6
MSB
    0x19
7
DATA
Data byte 1
Data packet
(Matching LENGTH above)

8
Data byte 2
9
Data byte 3
10
Data byte 4
11
Data byte 5
12
Data byte 6
13
Data byte 7
14
Data byte 8



I hope folks find this of some interest and help.  If you have any addition input, please add to the comments below.  I have this detail in a .wrd file and can send it to anyone who is interested to review / edit and/or correct.