Page 2 of 8
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 2:50 pm
by Gregski
and just like that we were back to where we left off, but with a different CAN Bus analyzer tool, hopefully a more better one (at least this one has a manual)
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 2:56 pm
by arber333
Gregski wrote: ↑Sat Apr 30, 2022 2:50 pm
and just like that we were back to where we left off, but with a different CAN Bus analyzer tool, hopefully a more better one (at least this one has a manual) CAN-Bus-Analyzer-Users-Guide-DS50001848C.pdf
Dont forget heartbeat signal should be repeated at 30ms and command at 500ms or so. Can you do that with MC tool?
I think savycan can do that without specific programming for Arduino DUE.
But i like to predict my if loops and condition program to a button or two.
Also with CAN you can have several analysers dangling from the same twisted pair. So you can spy with canalyst and command with another tool.
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 2:59 pm
by Gregski
from what I gather so far this tool has two different pieces of software, we will start with the first which seems pretty generic and pretty basic, but already I like the layout better than the CANalyst-II one, so let's take a look at the screen and then we'll break it down
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 3:10 pm
by Gregski
I really like how this tool splits the data into columns that my pea size brain can understand
the first column called
TRACE tells us if we are RXing ie Receiving or TXing ie Transmitting or sending the commands
the next column is the
ID column which is self explanatory (I think lower IDs take precedence in terms of execution, more on this later, maybe)
the next column called
DLC tells us out of the 8 buckets we can send data in, how many actually will have stuff in them, don't let the DATA 7 column throw you off, this is programmer math so we start counting at 0, so 0,1,2,3,4,5,6,7 (equals 8) kapish
then we have the
DATA column aka the meat and potatoes
Then the
Time Stamp column which I'm sure comes in handy when troubleshooting as you look at the last thing that executed before the smoke appeared
and finally the
Time Delta column which delta means difference but I have no idea what it means in this context if I'm being honest
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 3:28 pm
by Gregski
OK, let me share another cool feature of this interface, it allows us to change the view from Hex (pronounced: crazy talk) to Decimal
now this really helped me understand what is going on a bit more, allow me to use a silly analogy, think of the CAN bus message, we'll call it a datagram as a train, a train with 8 passenger cars, each one can be empty ie 0 or full carrying up to 255 passengers, that's what our CAN message can hold up to eight buckets full to the brim with 255 max value "so 256 characters technically" each, type of deal, except to add confusion they write it in HEX (blah)
here is the same data just in decimal formation if you will, so instead of numbers and letters in them boxes all we see is human numbers of 0-255 ha ha
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 3:32 pm
by Gregski
now lets revisit that
DLC column thingie
Example 1: in this example our train conductor, aka the DLC announces that only 7 out of the 8 cars or buckets will have passengers aka data values, the last one will be empty
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 3:43 pm
by Gregski
arber333 wrote: ↑Sat Apr 30, 2022 2:56 pmDont forget heartbeat signal should be repeated at 30ms and command at 500ms or so. Can you do that with MC tool?
Good question, here's what the Transmit interface looks like

Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 3:49 pm
by Gregski
this is a good time as any to remind ourselves that different CAN buses can speak at different speeds, it's like traveling across your country to some places where they speak very fast, and to others where they speeeeaaaakkkk soooooo slllllooooowwwwllllyyyyy
this is measured in killabits or Kbps, and Mr. Kramar reminds us that
"The Lear operates CAN at 500Kbps."
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 3:53 pm
by Gregski
Arber Kramer then instructs us:
Select which of the charger modules you whish to operate. Only one msg is sent for heartbeat, do not send all three messages!
Address DLC Data0 Data1 Data2 Data3
0x30E 1 0x01 Turn on aux12vdc
0x30E 1 0x02 Turn on HV Charging
0x30E 1 0x03 Turn on aux12vdc and turn on HV Charging
This message is sent at 30ms interval
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 3:56 pm
by Gregski
QUESTION: so for testing I could just tell it to charge my regular 12 volt car battery? and not even hook up the high voltage battery pack
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 6:30 pm
by Gregski
alright here we got we are going to try to send our first CAN message, ready set go
first let me shove the command into a table just so it aligns perfectly with the header row
Address | DLC | Data0 | Data1 | Data2 | Data3 |
0x30E | 1 | 0x01 | | |
Turn on aux12vdc (this was just a comment) basically in English all we want to do is enable the 12 volt charger inside of this dual charger (it is essentially two chargers inside of one box, one for 360 volts or so and the other for 12 volts type of deal, pretty cool design
so since we are learning, let me share with you the good, the ugly, and the bad, after all we learn from our mistakes
the first thing I tried was very literal, I mean who wouldn't right?
and I was greeted with an ID out of range Error message, which might as well been written in hieroglyphs
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 6:40 pm
by Gregski
OK, a few cuss breaks later, I guess when someone says 0x30E in Hex the 0x is silent, kinda like saying knee or tsunami I guess
so we changed the ID from 0x30E just to 30e (note the case does not matter) and it liked that, then it choked on the DATA 0 value, same idea hear, hey I never said I was the smartest crayon in the shed
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 6:56 pm
by Gregski
OK, so we gave it a message ID, told it that only one bucket (DLC) has data in it, and honestly just want to send one bit, which brings us to the
PERIOD column and this may be a
Show Stopper
basically we want our CAN bus gizmo to shout "only charge the 12 volt car battery" every .03 seconds
but this Interface won't allow it to do it that often, it says the best I can do is every .1 seconds
but the manual says: Populate the Periodic field (50 ms to 5000 ms).
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 6:59 pm
by Gregski
the Manual also goes on to say: Populate the Repeat field with “0” (which translates to “repeat forever”).
folks, you can't make this stuff up, that's like me writing up a loan contract with you saying, I will borrow $10,000 dollars from you and then I promise to make 0 payments, which then I want you to assume means I will make payments forever
it's like saying I will hit myself in the head with a hammer cause it feels good when I stop
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 7:35 pm
by arber333
Just send the heartbeat msg with canalyst and send command with microchip. That way you CAN get the charger to work today

.
But for not connecting HV i dont know... maybe it doesnt start with only 12v as a load.
So hook up HV battery first, then 12V and then AC input.
Be carefull when connecting DC HV, wear leather gloves when plugging connector. There could be a chance charger could be faulted and inrush current could melt HV connector. Dont ask me how i know...
Re: I think I CAN, I think I CAN...
Posted: Sun May 01, 2022 7:23 am
by Gregski
arber333 wrote: ↑Sat Apr 30, 2022 7:35 pmJust send the heartbeat msg with canalyst and send command with microchip. That way you CAN get the charger to work today

.
Oh wow that sounds clever, but I am hell bent to get at least one of them stand alone retail CAN bus tools to work, ha ha
in theory the below two commands ought to work, no? to charge at 8amps to 400.0vdc as per your instructions
Then send command line.
0x304 4 0x40 0xA0 0x03 0x20 Charge at 8amps to 400.0vdc
This is sent at 500ms interval
Re: I think I CAN, I think I CAN...
Posted: Sun May 01, 2022 7:46 am
by arber333
Gregski wrote: ↑Sun May 01, 2022 7:23 am
in theory the below two commands ought to work, no? to charge at 8amps to 400.0vdc as per your instructions
Then send command line.
0x304 4 0x40 0xA0 0x03 0x20 Charge at 8amps to 400.0vdc
This is sent at 500ms interval
Commands.jpg
1st msg should be sent at 30ms interval. I dont know if 100ms will work.
Again for the first try send 0x30e at 30ms via canalyst and 0x304 at 500ms via the other gadget. That should do the trick.
I imagine the way Chevy uses this heartbeat signal is with TWO control VCUs. One keeps monitoring the state of the battery or contactors at a very fast rate and the other one is just charger command. If something would happen to the battery the faster one would close shop and charger would stall before next command msg arrived to order more amps...
Re: I think I CAN, I think I CAN...
Posted: Sun May 01, 2022 5:02 pm
by Gregski
arber333 wrote: ↑Sat Apr 30, 2022 7:35 pmBe carefull when connecting DC HV, wear leather gloves when plugging connector. There could be a chance charger could be faulted and inrush current could melt HV connector. Dont ask me how i know...
message received
Re: I think I CAN, I think I CAN...
Posted: Sun May 01, 2022 5:34 pm
by Gregski
arber333 wrote: ↑Sun May 01, 2022 7:46 am1st msg should be sent at 30ms interval. I dont know if 100ms will work.
I concur, and the only reason I tried 100ms is because that's the lowest this black MICROCHIP gadget allowed me to go

- Period Error 2.jpg (18.43 KiB) Viewed 5859 times
Re: I think I CAN, I think I CAN...
Posted: Sun May 01, 2022 5:43 pm
by Gregski
arber333 wrote: ↑Sun May 01, 2022 7:46 amAgain for the first try send 0x30e at 30ms via canalyst and 0x304 at 500ms via the other gadget. That should do the trick.
Hey I have an idea, what if I use the
CANalyst-II to send the first 0x30e message at 30ms and use the
Microchip gadget to send the second 0x304 message at 500ms, I think that should do the trick.
Re: I think I CAN, I think I CAN...
Posted: Sun May 01, 2022 5:49 pm
by arber333
Ok so send the command with microchip at 500ms and heartbeat at 30ms from canalyst. If you can connect microchip the last one since it is probably terminated. You can disconnect termination resistor for canalyst so this is your best bet in the middle.
When connecting can modules you need to keep the length of the y line as short as possible, 10cm at most. Better to just put incomming and outgoing lines into the canalyst terminals altogether...
Re: I think I CAN, I think I CAN...
Posted: Sun May 01, 2022 7:56 pm
by Gregski
LESSONS LEARNED
In the spirit of full disclosure thinking I would go out and buy a complete OEM Chevy Volt first gen J1772 charge port and wall charger, seemed like a good idea at the time, but i soon discovered it just complicates things, actually makes it impossible to control the charger, as the silly charge port or wall charger needs to be controlled itself do to the Pilot and Proximity connections
Re: I think I CAN, I think I CAN...
Posted: Sun May 01, 2022 9:46 pm
by arber333
I would assume there is a VCU section of HPCM2 module (under the driver seat) which senses PP signal from charge plug and starts to output heartbeat for the charger. If it just needs HV charging it will go for 01 but if it also needs to charge aux battery it will show 03. Then another section requests power from the charger.
Another notice... charger has 2x CAN ports. I never tried them both but others said those are not the same line.
Re: I think I CAN, I think I CAN...
Posted: Sun May 01, 2022 9:56 pm
by Gregski

- some_time_later.png (174.2 KiB) Viewed 5821 times
Re: I think I CAN, I think I CAN...
Posted: Sun May 01, 2022 9:57 pm
by Gregski