I think I CAN, I think I CAN... Topic is solved
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
I think I CAN, I think I CAN...
INTRODUCTION
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
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
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
A LIST OF THINGS THAT CAN
(these will all be links eventually)
please holler at me with more items to add to the list
(these will all be links eventually)
- BMW 330e, 530e, and 740e battery pack BMS
- Chevy Volt Charger (first gen only)
- Chevy Volt DC-DC Converter (first gen only)
- Damien Maguire's Lexus GS450h VCU
- Isabellenhütte Heusler (made you look)
please holler at me with more items to add to the list
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
-
- Posts: 3273
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 80 times
- Been thanked: 239 times
- Contact:
Re: I think I CAN, I think I CAN...
Outlander heater
Outlander AC compressor
Incidentally Volt AC compressor also does CAN but i dont know its language...
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
"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.
we will rely on this Price to Ease of Use chart to rate our reverse troubleshooting (ha ha) 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.
CANable: USB to CAN Adapter $29 SOLD OUT |
USB to CAN Analyzer CAN-BUS Intelligent Converter Adapter With USB Cable Support XP/WIN7/WIN8 AMAZON - $37 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
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! |
CANalyst-II USB to CAN Analyzer CAN-Bus Converter Adapter Support ZLGCANpro AMAZON - $84 as seen in action by Mr. Arber Kramar a mechanical engineer Ampera/Volt DCDC or APU Manual: In Chinese Tech Support: actually pretty responsive via email
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 AMAZON - $170 Or direct from: Part Number: APGDT002 CAN BUS ANALYZER TOOL Manual: Tech Support: http://support.microchip.com |
we will rely on this Price to Ease of Use chart to rate our reverse troubleshooting (ha ha) tools
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
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.
we will also rely on this Price to Ease of Use chart to rate the open source / roll your own troubleshooting 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 on the Teensy hardware platform 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
yes these are that tiny! |
SaavyCAN on the Arduino DUE hardware platform 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
|
we will also rely on this Price to Ease of Use chart to rate the open source / roll your own troubleshooting tools
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 348 times
Re: I think I CAN, I think I CAN...
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.
Have had a go with the software though and it does look very good.
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
nice, which bits, on what platform, ie the Arduino Due or the Teensy? post some pics if you [ahem] CAN
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 348 times
Re: I think I CAN, I think I 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.
-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 348 times
Re: I think I CAN, I think I CAN...
This prompted me to have a go with the boards I have here. I followed this guide https://openinverter.org/wiki/CAN_bus_with_Arduino_Due which pretty much covers all the setup.
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.
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.
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
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
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
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
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
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
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- TheSilverBuick
- Posts: 187
- Joined: Mon Jun 08, 2020 5:01 pm
- Location: Nevada, United States
- Has thanked: 3 times
- Been thanked: 1 time
Re: I think I CAN, I think I CAN...
Hi, I'm regular guy and intrigued to see if you CAN or CAN't.
Need to learn. Starting from the basics.
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
ha ha, I CAN't make any promises, but I'll definitely tryTheSilverBuick wrote: ↑Sat Apr 30, 2022 1:25 am Hi, I'm regular guy and intrigued to see if you CAN or CAN't.
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
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
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
the CANalyst-II needs software, if you Google for it you can find it, download it, and install it
User Friendly Level: -2
User Friendly Level: -2
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
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
whoa, how did I find that?
well first we start with this forum, from the beautifully organized landing page we know we want a Chevy product so we click on Chevy/Opel/Vauxhall/PSA that takes us to the Chevy subforum where one of the top threads just happens to be Chevy Volt Gen1 Charger and the very first reply by Mr. Jack Bauer points us at https://leafdriveblog.wordpress.com/2018/12/28/ampera-charger/
whoa, how did I find that?
well first we start with this forum, from the beautifully organized landing page we know we want a Chevy product so we click on Chevy/Opel/Vauxhall/PSA that takes us to the Chevy subforum where one of the top threads just happens to be Chevy Volt Gen1 Charger and the very first reply by Mr. Jack Bauer points us at https://leafdriveblog.wordpress.com/2018/12/28/ampera-charger/
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
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
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
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
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
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
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
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)
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)
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
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."
" 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."
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
-
- Posts: 3273
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 80 times
- Been thanked: 239 times
- Contact:
Re: I think I CAN, I think I CAN...
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.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."
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 .
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
Yes, please do, always!
Ah, thank you just learned something
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
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
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
alright, let's see what this MICROCHIP can do, it's black so it's gotta be good
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2326
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 353 times
- Been thanked: 468 times
- Contact:
Re: I think I CAN, I think I CAN...
same concept here, just a bit less arcane USB cable
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg