I would like to sum up in a thread the process I will go through to learn Controller Area Network aka CAN bus. I am not an expert, I know nothing about it other than some EV components that I will most likely end up using, need it in order to be controlled (I'm looking at you onboard battery chargers)
since I am converting a 1971 Chevy truck to electric, the GIF below sums up my enthusiasm in wanting to A) learn CAN bus, and 2) introduce it to my vehicle, I hope that by posting this thread it will guilt me into learning it, and the tens of readers will hold me accountable
yes I know I am bolting up a ton of electrons and sophistication to it already but I draw the line at CAN, ha ha, also I know commercial chargers exi$t but I want to use repurposed hybrid or electric car bits
so if you share my excitement and interest in learning the bare minimum to make things work, chargers charge, converters convert, and current shunts shunt, than feel free to leisurely scroll down
Re: I think I CAN, I think I CAN...
Posted: Thu Apr 28, 2022 5:05 pm
by Gregski
A LIST OF THINGS THAT CAN
(these will all be links eventually)
please holler at me with more items to add to the list
Re: I think I CAN, I think I CAN...
Posted: Thu Apr 28, 2022 8:35 pm
by arber333
Gregski wrote: ↑Thu Apr 28, 2022 5:05 pmA LIST OF THINGS THAT CAN
please holler at me with more items to add to the list
Outlander heater
Outlander AC compressor
Incidentally Volt AC compressor also does CAN but i dont know its language...
Re: I think I CAN, I think I CAN...
Posted: Fri Apr 29, 2022 2:24 pm
by Gregski
"Retail" TOOLS THAT CAN these are off the shelf store bought tools
listed in order of price-a-tology, you do not need all of them, we will try to compare them and see which ones we like to use
I do not endorse nor profit from any sales of these tools, I am just sharing the tools I plan to try/evaluate and what I've seen the "Big Boys n Girls" use to reverse engineer, operate, or control these gizmos.
I hope to see if this can work as a bare minimum entry level solution,
I have not seen nor know of any of our Open Inverter Reverse Engineers (OIREs) use this particular tool,
if you have experience with it, please do share, feel free to update this thread as you wish
Manual: NA Tech Support: NA
Pros
Cons
cheap
you must download and install drivers in addition to the software
only one CAN channel
61iCyGFES6L._AC_SL1001_.jpg (37.65 KiB) Viewed 18664 times
Final Thoughts: though I somehow managed to get this gizmo to actually see/read CAN Bus messages it is NOT worth the headache, the interface is to arcane, so I actually returned it, and I hate doing that, but it sucked that bad!
Manual: In Chinese Tech Support: actually pretty responsive via email
Pros
Cons
has two CAN Bus Channels
Software comes with driver
(only one thing to install)
Download site is in Chinese
Manual is in Chinese
61SOoQenK0L._AC_SL1200_.jpg (29.79 KiB) Viewed 18664 times
Final Thoughts: I really wanted this thing to work out, it is a well made piece of hardware however it is pretty much for analyzing/reading CAN messages only, and not really for sending multiple commands simultaneously, so if I hadn't waited too long I would have returned this one as well.
MICROCHIP APGDT002 CAN BUS ANALYZER TOOL, CAN 2.0B, ISO11898-2
31UQfBoQzNL._AC_.jpg (9.16 KiB) Viewed 18664 times
we will rely on this Price to Ease of Use chart to rate our reverse troubleshooting (ha ha) tools
Price To Use Chart.jpg (42.67 KiB) Viewed 18486 times
Re: I think I CAN, I think I CAN...
Posted: Fri Apr 29, 2022 4:34 pm
by Gregski
DIY TOOLS THAT CAN these are more difficult/complex to setup initially, but once configured they are great tools!
in addition to the "retail or commercial" tools listed above, I would like to review some free, roll your own, and or open source solutions as well, keep in mind that all things cost, and just because something is "free" as in money, that does not mean you don't get to pay for it in some other way, my personal experience has taught me that usually if it is money free it will cost you in terms of time and energy, not saying that is bad, just sayin'
I do not endorse nor profit from any sales of these tools, I am just sharing the tools I plan to try/evaluate and what I've seen the "Big Boys n Girls" use to reverse engineer, operate, or control these gizmos.
SaavyCAN Bus Analyzer Software: FREE
available on the author's Collin Kidder's GitHub
Hardware: $25 for the Teensy 3.6 controller board (must be version 3.6) plus an additional $10 for the CAN transceiver board
available on AMAZON FYI: Currently SOLD OUT (as of 4/29/2022)
additional Software required for the hardware: FREE
SaavyCAN Bus Analyzer Software: FREE
available on the author's Collin Kidder's GitHub
Hardware: $35 for the Arduino Due controller board (strongly recommend the green name brand board especially if it is your first Arduino product instead of the cheaper generic blue or black ones) plus an additional $10 for the CAN transceiver board
available on AMAZON FYI: Currently ON SALE 30% Off (as of 4/29/2022)
additional Software required for the hardware: FREE
Arduino IDE
RET (Reverse Engineering Tool)
Collin small.jpg (4.72 KiB) Viewed 18639 times
IMG_9450.JPG (27.86 KiB) Viewed 18637 times
IMG_7190.JPG (54.81 KiB) Viewed 18639 times
41Z25TvqDpL._AC_.jpg (10.67 KiB) Viewed 18637 times
we will also rely on this Price to Ease of Use chart to rate the open source / roll your own troubleshooting tools
Re: I think I CAN, I think I CAN...
Posted: Fri Apr 29, 2022 6:29 pm
by Pete9008
I've got the bits to set up SavvyCAN here but not used them yet.
Have had a go with the software though and it does look very good.
Re: I think I CAN, I think I CAN...
Posted: Fri Apr 29, 2022 6:34 pm
by Gregski
Pete9008 wrote: ↑Fri Apr 29, 2022 6:29 pm
I've got the bits to set up SavvyCAN here but not used them yet.
Have had a go with the software though and it does look very good.
nice, which bits, on what platform, ie the Arduino Due or the Teensy? post some pics if you [ahem] CAN
Re: I think I CAN, I think I CAN...
Posted: Fri Apr 29, 2022 6:42 pm
by Pete9008
Gregski wrote: ↑Fri Apr 29, 2022 6:34 pm
nice, which bits, on what platform, ie the Arduino Due or the Teensy? post some pics if you [ahem] CAN
The Due, exact one you have pictured above. I could only get a TJA1050 board (5v not 3v3) to go with it though and I've seen a couple of posts saying they don't work well together so we'll see...
Software is easy to install on 64bit Linux, bit of a pain on 32bit though. May have to compile it from source to get it working on the laptop
I think there is also a wireshark plugin that can handle the CAN protocol but it looked a bit involved setting it up. SavvyCAN looked a lot more straightforward.
Overall it works but there are a couple of issues that may need sorting. Firstly my Due board, which appears to be a genuine Arduino (same as the one pictured above), refuses to start properly following a power cycle and needs a manual reset. Seems there is a design flaw an some boards which can be fixed by adding a resistor, see https://copperhilltech.com/blog/arduino ... res-reset/
Also make sure you get a 3v3 transceiver board, for example something based on the SN65HVD230 should work fine. Mine is based on the 5V TJA1050 which needs a potential divider adding on the Rx output to get it to work with the Due 3V3 inputs.
Also if you use a Due board rather than the proper GVRET candue board then it's missing an EEPROM which means it can't save the configuration. This means it needs reconfiguring each time the power is cycled (although the sketch could be modified to make it default to whatever is needed).
Both GVRET and the SavvyCAN software looks good, I've only scratched the surface with them and apart from one small issue it works fine. The issue is the Temporal Graph window in SavvyCAN - no idea what it is doing but it is the first time I've seen Linux lockup so I'd advise treating it with caution.
Overall this setup looks like it should work well but I think you may be right with the commercial offerings being quicker to get going. I'm going to stick with this though.
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 12:49 am
by Gregski
so I'm gonna cut my teeth on a Chevy Volt Gen 1 onboard charger
and a CANalyst-II pink thingie (yes I am aware of SavvyCAN but for that we need to know how to use Arduino, and yes it's easy once you know how, but I am trying to keep the complexity down so bare with me please)
and a laptop in my case running Windows 10
and a regular car battery (yes a bench power supply would make more sense, but chances are regular folk most likely don't have one of those, but they will have a car battery)
DISCLAIMER: this is a non electrical engineer tutorial, in case you were fooled
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 1:03 am
by Gregski
What the hewk is a bench power supply?
well it's one of these $85 dollar white boxes with knobs on it that you plug into the wall and it takes Alternating Current (AC) and through some sort of VooDoo magic pumps out Direct Current (DC) so make your electronic device which you plug into it think it is running on battery power, the beauty of such a machine is that using the knobs you decide how much voltage 0 to 60 for example on some and how much amperage 0 - 5 comes out, so instead of buying 9 volt battery you just set the dial on 9 volts, and instead of buying a 12 volt car battery you just turn the knob to 12 volts
bench power supply.jpg (11.22 KiB) Viewed 18588 times
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 1:25 am
by TheSilverBuick
Hi, I'm regular guy and intrigued to see if you CAN or CAN't.
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 1:55 am
by Gregski
TheSilverBuick wrote: ↑Sat Apr 30, 2022 1:25 am
Hi, I'm regular guy and intrigued to see if you CAN or CAN't.
ha ha, I CAN't make any promises, but I'll definitely try
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 1:57 am
by Gregski
so the CANalyst-II connects to the laptop using one of them old big square plug USB cables, that comes with it (yes I am aware of Savvy CAN, but I am trying to avoid downloading Arduino IDE and chasing down libraries, and visiting GitHub, you know the drill) so the first pass is with the plug and pray out of the box solution, fingers crossed
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 2:12 am
by Gregski
the CANalyst-II needs software, if you Google for it you can find it, download it, and install it
User Friendly Level: -2
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 2:21 am
by Gregski
since I am using a Chevy Volt gen 1 onboard charger as my CAN controlled device (your mileage may vary) I head on over to Mr. Arber Kramar's website called LEAFDRIVEBLOG next
so one of the first things that we have to do is make a physical connection of what ever CAN bus scan tool we are using to what ever CAN enabled or CAN controlled apparatus we want to control or reverse engineer
at minimum there is a handful of wires to connect
1. one wire for CAN high signal
2. one wire for CAN low signal
3. usually a 12 volt constant power
4. usually a negative or ground wire
5. and usually a key on / ignition on 12 volt power
or some sort of combination of those, but the first two for sure always
for this we seek out what is called a Pinout Diagram, basically a chart or a table or a picture or a napkin with a bunch of numbered of dots representing pins of some sort of connector or a color code chart of a bunch of wires
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 4:20 am
by Gregski
alright so here it is with the minimum wiring required to get some CAN traffic going, at this time we can READ the CAN messages flying by
so just to level set, there is no high voltage battery pack connected yet
the charger is also not plugged in to a J1772 plug connector wall charger what ever you wanna call it
yet we are already seeing CAN messages on the screen in our CANanalyst-II software
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 4:25 am
by Gregski
I am not saying this pink box is better than Savvy CAN by any means, and I will most likey end up using Savvy can in the end, I am just demonstrating that a Neanderthal like me could get this working using a store bought tool like this CANanalyst-II
I literally did not configure anything inside of it's software to get this to work, all I did was click on the shortcut on my desktop and it opened up and then I connected two wires to it, CAN high and CAN low, both of which are nicely labeled on the screw in terminals, I then connected three (thin) wires from the Chevy Volt Charger to the positive terminal on the battery, and the negative and positive leads to the battery on the 12 volt output side (medium thick wires)
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 4:33 am
by Gregski
so we are going to connect the high voltage AC and DC next, bearing in mind the following from Mr. Kramar
" Be aware however you can cause damage in charger if you connect it to HV while 12v is active.
So connect inert charger to HV first, then connect the AC lines and only then attach LV connector."
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 6:21 am
by arber333
Gregski wrote: ↑Sat Apr 30, 2022 4:33 am
so we are going to connect the high voltage AC and DC next, bearing in mind the following from Mr. Kramar
" Be aware however you can cause damage in charger if you connect it to HV while 12v is active.
So connect inert charger to HV first, then connect the AC lines and only then attach LV connector."
Well let me chime in on your nice presentation. Volt gen1 charger is one of those thingies that need a heartbeat signal transmitted along the command signal. As long as heartbeat is there charger will listen to commands as they are on my blog.
Sadly Canalyst CAN only transmitt one telegram repeatedly. Howevwe i did notice it has a script option but i havent come that far because i use Canalyst as a monitor and DUE for issuing actual commands.
Maybe for your first application Volt DCDC converter would be easier to implement. See also if you can connect some 12V light bulbs to have an indication when you get DCDC to 14V .
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 12:30 pm
by Gregski
arber333 wrote: ↑Sat Apr 30, 2022 6:21 amWell let me chime in on your nice presentation.
Yes, please do, always!
arber333 wrote: ↑Sat Apr 30, 2022 6:21 amVolt gen1 charger is one of those thingies that need a heartbeat signal transmitted along the command signal. As long as heartbeat is there charger will listen to commands as they are on my blog.
Ah, thank you just learned something
arber333 wrote: ↑Sat Apr 30, 2022 6:21 amSadly Canalyst CAN only transmitt one telegram repeatedly. However i did notice it has a script option but i haven't come that far because i use Canalyst as a monitor and DUE for issuing actual commands.
that is EXACTLY what I wanted to and needed to hear, as I could not make out how in the world I would send commands via CANalyst-II and how you were doing it on your website, another lesson learned
arber333 wrote: ↑Sat Apr 30, 2022 6:21 amMaybe for your first application Volt DCDC converter would be easier to implement. See also if you can connect some 12V light bulbs to have an indication when you get DCDC to 14V .
it may come to that, but stubbornly I must [ahem] charge on
again 1,000 thanks for chiming in, you or anyone else are more than welcome to sprinkle in as much knowledge as you can spare
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 1:50 pm
by Gregski
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 2:11 pm
by Gregski
alright, let's see what this MICROCHIP can do, it's black so it's gotta be good
Re: I think I CAN, I think I CAN...
Posted: Sat Apr 30, 2022 2:12 pm
by Gregski
same concept here, just a bit less arcane USB cable