I think I CAN, I think I CAN... Topic is solved
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
and we got ourselves a dime a dozen regular US 120 volt (pronounced: "one ten") 15 amp power cord, perfect for some troubleshootin'
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
so here is my setup for dual CAN Bus analyzers (I realize the CAN bus wires are better off twisted together, these are just laid out for demonstration purposes)arber333 wrote: ↑Sun May 01, 2022 5:49 pm 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...
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
alright so I got both CAN analyzers hooked up and running and sending commands (one each)
and I figured out how to filter on CAN ID on the CANalyst-II (the pink one) so I confirmed that the black Microchip one is indeed sending it's message every 500ms as it should
yet it's still NOT WORKING
does what I am sending look alright in the window below to you all?
and I figured out how to filter on CAN ID on the CANalyst-II (the pink one) so I confirmed that the black Microchip one is indeed sending it's message every 500ms as it should
yet it's still NOT WORKING
does what I am sending look alright in the window below to you all?
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
so at this point it is one of these things:
1. I suck and have no idea what i am doing or I am simply making some bonehead mistake (highly likely)
2. the retail CAN analyzers suck
3. the charger is simply broken
1. I suck and have no idea what i am doing or I am simply making some bonehead mistake (highly likely)
2. the retail CAN analyzers suck
3. the charger is simply broken
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 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: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
it's time for...
[ wait for it ]
[ wait for it ]
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
and here is how you bake a SavvyCAN cake, first the dry ingredients (aka the hardware)
you start off with a Chevy Volt first gen onboard charger
then you add a scoop of Arduino Due
a pinch of a CAN BUS transceiver (this is because the Arduino Due board is CAN enabled or CAN ready but it does not have all the extra hardware on it, so it needs what is called a shield, an add on or an adapter if you will)
yes this thing is tiny
a laptop as before
and of course a regular car battery
you start off with a Chevy Volt first gen onboard charger
then you add a scoop of Arduino Due
a pinch of a CAN BUS transceiver (this is because the Arduino Due board is CAN enabled or CAN ready but it does not have all the extra hardware on it, so it needs what is called a shield, an add on or an adapter if you will)
yes this thing is tiny
a laptop as before
and of course a regular car battery
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
Arduino does not make a Due board with a built in CAN bus transceiver EVTV.me does and calls it a EVTVDUE MICROCONTROLLER so we sent them $100 large and now we could wait for it to arrive, or we can roll our own today
the little CAN Bus transceiver is connected to the Arduino Due board (aka the brain ie microcontroller) via four wires, it get's it's 3.3 volt power from the Due board in daisy chain fashion
black - negative / ground
red - positive 3.3 volts
yellow - transmit
green - receive
the little CAN Bus transceiver is connected to the Arduino Due board (aka the brain ie microcontroller) via four wires, it get's it's 3.3 volt power from the Due board in daisy chain fashion
black - negative / ground
red - positive 3.3 volts
yellow - transmit
green - receive
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
alright, congratulations we are half way there to setting up our DIY SavvyCAN thingie
now comes the wet ingredients aka the Software
yes Mr. Collin Kidder gives us a program to run, but that program needs something called Generalized Electric Vehicle Reverse Engineering Tool (GV-RET) which needs to be somehow installed on the Arduino Due board in order to run/execute, and for that we need something called Arduino IDE (Integrated Development Environment) think Notepad on steroids
now comes the wet ingredients aka the Software
yes Mr. Collin Kidder gives us a program to run, but that program needs something called Generalized Electric Vehicle Reverse Engineering Tool (GV-RET) which needs to be somehow installed on the Arduino Due board in order to run/execute, and for that we need something called Arduino IDE (Integrated Development Environment) think Notepad on steroids
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
after you install Arduino IDE and tether your Due board to your computer for the first time you might get prompted to install a board driver, just go on and do it
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
Arduino calls programs "sketches" and when ever you launch the IDE it opens to a fresh new sketch, it wants you to start writing some code, just ignore that for now
we need to tell Arduino what little brain board we are connecting to it via a USB cable, in our case it is a native Arduino Due so we go to:
Tools\Board\Arduino ARM (32-bits) Boards\ and select Arduino Due (Native USB Port) don't even connect to the other Programming port even if programming
now that we told it what board we have now we have to tell it what COM port it is on, the number does not matter, it's what ever COM port your computer finds the board connected to (you may have to close Arduino IDE and relaunch it to get it to see the board on a certain Port)
we need to tell Arduino what little brain board we are connecting to it via a USB cable, in our case it is a native Arduino Due so we go to:
Tools\Board\Arduino ARM (32-bits) Boards\ and select Arduino Due (Native USB Port) don't even connect to the other Programming port even if programming
now that we told it what board we have now we have to tell it what COM port it is on, the number does not matter, it's what ever COM port your computer finds the board connected to (you may have to close Arduino IDE and relaunch it to get it to see the board on a certain Port)
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 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: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
a great write up on CAN bus with Arduino Due is on our very own Wiki, no need for me to reinvent the wheel, but here is a summary
to get pretty much any program to run in Arduino you need something called "Libraries" or as I like to call them ".h files"
1. there are many different ways to install something called "libraries" in Arduino. Libraries are nothing more than just small snippets of code written by people who already dealt with the stuff you are about to deal with, and they were kind enough to save their work and offer it up to you to use so that you don't have to reinvent the wheel (think of it this way a screwdriver in your toolbox is like a library, you don't go buy a new screwdriver every time you go to work on something, you just reach for an existing screwdriver in your toolbox) for example somebody already wrote the code to make a microphone listen, so when you want to write some program that requires a microphone to listen, you can write it from scratch or just download some library called microphone.h because that what suffix the Italians put on their library files ".h"
One way to install libraries is to use the Manage Libraries menu item under Tools cause Arduino comes with a bunch of libraries but they are NOT installed (this is dumb) so you have to install the library that you want/need
the libraries come in different versions and chasing the latest version may not always yield desirable results and you may want to try an older version and if that still doesn't work go a few more version back (ask me how I know)
In order to get the Arduino Due board to realize it can talk to CAN transceiver you need to install a library called due_can this is one of those libraries you install using the Library Manger described above

to get pretty much any program to run in Arduino you need something called "Libraries" or as I like to call them ".h files"
1. there are many different ways to install something called "libraries" in Arduino. Libraries are nothing more than just small snippets of code written by people who already dealt with the stuff you are about to deal with, and they were kind enough to save their work and offer it up to you to use so that you don't have to reinvent the wheel (think of it this way a screwdriver in your toolbox is like a library, you don't go buy a new screwdriver every time you go to work on something, you just reach for an existing screwdriver in your toolbox) for example somebody already wrote the code to make a microphone listen, so when you want to write some program that requires a microphone to listen, you can write it from scratch or just download some library called microphone.h because that what suffix the Italians put on their library files ".h"
One way to install libraries is to use the Manage Libraries menu item under Tools cause Arduino comes with a bunch of libraries but they are NOT installed (this is dumb) so you have to install the library that you want/need
the libraries come in different versions and chasing the latest version may not always yield desirable results and you may want to try an older version and if that still doesn't work go a few more version back (ask me how I know)
In order to get the Arduino Due board to realize it can talk to CAN transceiver you need to install a library called due_can this is one of those libraries you install using the Library Manger described above

"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
we are back to square one for the fourth time? this time using SaavyCAN here we can see that I managed to successfully connect to the charger and am actually once again reading the CAN bus messages flying by
Fun Fact: CAN Bus is chatty, imagine a bunch of birds sitting on a telephone wire all singing, screaming, chirping at the same time, everyone is talking to everyone, everyone hears all the conversations, yup that's good ol' CAN bus for you
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
so with everything hooked up from what I know so far the first thing you have to do in SaavyCAN is make a connection, and you do that via the Open Connection Window and then you simply add a new device the Arduino Due in my case by telling SaavyCAN what Port it is on
and here's a better look at my capture of frames
and here's a better look at my capture of frames
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
alright then it was off to the Frame Sender window and the SaavyCAN documentation
so here is a first super simple message to only enable the 12 volt aka low voltage charger
so here is a first super simple message to only enable the 12 volt aka low voltage charger
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
and here are both messages being sent
and here both frames or messages what ever you wanna call them are captured, does this look right? cause it's still not working
and here both frames or messages what ever you wanna call them are captured, does this look right? cause it's still not working
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 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: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
and literally in the 11th hour I got it working but only by enabling both the low voltage and the high voltage chargers using the 0x03 bit and when I do so I can see amps on the high voltage orange wire going into the battery, it reads 3.5 amps which is approximately half of what I have it set to ie 8 amps, but that's because I am on only 120 volts AC
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
Fun Fact: I tried sending the first command at 100ms, 200ms, all the way up to 500ms and they all work for me, so not sure why it has to be at 30ms
also 0x02 or enabling just the high voltage charger works as well, this begs the question is my low voltage side of this charger broken? when I connect a simple multimeter to it with the low voltage charger enabled I should see a higher voltage like 14 volts or something right? well mine showed 10.5 and dropping and it's at 8.4 right now, so time to quit, I learned a ton
also 0x02 or enabling just the high voltage charger works as well, this begs the question is my low voltage side of this charger broken? when I connect a simple multimeter to it with the low voltage charger enabled I should see a higher voltage like 14 volts or something right? well mine showed 10.5 and dropping and it's at 8.4 right now, so time to quit, I learned a ton
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
-
- Posts: 3555
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 131 times
- Been thanked: 330 times
- Contact:
Re: I think I CAN, I think I CAN...
Sorry for not being there for you, even i have to sleep sometime
.
I managed to find out CAN bus is very finnicky when it comes to Y cable length. So really short extensions from out of the main line please.
Also dont twist the wires in different directions...just dont!
And the use of the termination resistor... oh dear! I spent a lot of moments like "what am i doing wrong?" and it worked just fine when i sorted out two 120ohm resiators on both ends of the long twisted wires. If you measure across CAN twisted pair resistance shouldnt be much more/less than 60ohm. If it is more, than you have another resistor active somewhere...
I managed to find out CAN bus is very finnicky when it comes to Y cable length. So really short extensions from out of the main line please.
Also dont twist the wires in different directions...just dont!
And the use of the termination resistor... oh dear! I spent a lot of moments like "what am i doing wrong?" and it worked just fine when i sorted out two 120ohm resiators on both ends of the long twisted wires. If you measure across CAN twisted pair resistance shouldnt be much more/less than 60ohm. If it is more, than you have another resistor active somewhere...
- EV_Builder
- Posts: 1205
- Joined: Tue Apr 28, 2020 3:50 pm
- Location: The Netherlands
- Has thanked: 18 times
- Been thanked: 37 times
- Contact:
Re: I think I CAN, I think I CAN...
If it's less you mean


Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
see http://www.wdrautomatisering.nl for bespoke BMS modules.
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
Don't lie, heroes never sleep!
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
- Gregski
- Posts: 2691
- Joined: Tue Sep 14, 2021 10:28 am
- Location: Sacramento, California
- Has thanked: 494 times
- Been thanked: 914 times
- Contact:
Re: I think I CAN, I think I CAN...
Oh my goodness, it all works, I figured it out, and you will not believe what was the problem!!!
I was trying to charge an AGM deep cycle battery and not a "real" car battery. Who knew that won't work?
I was trying to charge an AGM deep cycle battery and not a "real" car battery. Who knew that won't work?
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
-
- Posts: 3555
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 131 times
- Been thanked: 330 times
- Contact:
Re: I think I CAN, I think I CAN...
Right...EV_Builder wrote: ↑Mon May 02, 2022 11:16 amIf it's less you mean, adding resistors lowers the total parallel measurement
![]()