I think I CAN, I think I CAN... Topic is solved

User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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)
CAN-Bus-Analyzer-Users-Guide-DS50001848C.pdf
(907.26 KiB) Downloaded 98 times

IMG_2216.JPG
IMG_2218.JPG
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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.
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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

Data 1.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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
Trace Column.jpg

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)
ID Column.jpg

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
DLC Column.jpg

then we have the DATA column aka the meat and potatoes
DATA Column.jpg
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
Time Stamp Column.jpg

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
Time Delta Column.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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)
Data Decimal 1.jpg

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
Data Decimal 2.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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
DLC Column 1.jpg
DLC Column 2.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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

Transmit.jpg

Image
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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."

Kbps.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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

ID Error.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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

ID Error 2.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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).


Period Error.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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...
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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
Commands.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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...
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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

IMG_7157.JPG
IMG_7159.JPG
IMG_7161.JPG
IMG_7163.JPG
IMG_7165.JPG
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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
Period Error 2.jpg (18.43 KiB) Viewed 1976 times
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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.

indian guy.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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...
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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

IMG_2253.JPG
IMG_2255.JPG
IMG_2174.JPG
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: I think I CAN, I think I CAN...

Post 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.
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post by Gregski »

some_time_later.png
some_time_later.png (174.2 KiB) Viewed 1938 times
IMG_2257.JPG
IMG_2259.JPG
IMG_2261.JPG
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2274
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 330 times
Been thanked: 451 times
Contact:

Re: I think I CAN, I think I CAN...

Post by Gregski »

oh no he didn't....
IMG_2263.JPG
IMG_2265.JPG
IMG_2267.JPG
IMG_2269.JPG
IMG_2271.JPG
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
Post Reply