Glad to see my 'hey can't we simplify this' theory wasn't crazy in the end.

Thanks Isaac for taking this on.
-Matt
Well at least it's saving now...Jack Bauer wrote: ↑Thu Jul 23, 2020 8:28 am Ok, so I wasn't using the "=" sign which was the problem with the serial monitor ignoring the commands. What happens now is if I type say "V=395" and hit enter the serial monitor freezes and the SAM3 locks up. However, if I then reboot and hit "p" it has actually updated and saved the parameter so it must be hanging on return from the eeprom routine. I also ran the eeprom test and it works fine so I don't think its hardware.
Isaac96, really appreciate your help. This project has been crying out to be ported to a more capable micro since 2015.
In other news my Chademo port turned up so will have a car ready to do some actual testing soon.
I can probably help in a few weeks if no one else is ready.Jack Bauer wrote: ↑Fri Jul 24, 2020 7:54 am Will be a few weeks before I have the E39 kitted out with a Chademo "exhaust" for testing. If anyone else is going to get there quicker and willing to help with testing,I'll donate a leaf vcu.
Yup, go ahead. I've checked through the code a couple times now, all seems correct.Jack Bauer wrote: ↑Fri Jul 24, 2020 7:54 am Working perfectly (at least on the bench). Added this line to Setup() to give a heartbeat led : pinMode(13, OUTPUT); //led
Will be a few weeks before I have the E39 kitted out with a Chademo "exhaust" for testing. If anyone else is going to get there quicker and willing to help with testing,I'll donate a leaf vcu. In the meantime I'll get my wifi guy to do some wifi firmware so we can have a display ready to go.
Isaac96, if you are happy I'll throw this up on Github?
I have car ready to test it and all other components except Leaf VCU...Jack Bauer wrote: ↑Fri Jul 24, 2020 7:54 am Working perfectly (at least on the bench). Added this line to Setup() to give a heartbeat led : pinMode(13, OUTPUT); //led
Will be a few weeks before I have the E39 kitted out with a Chademo "exhaust" for testing. If anyone else is going to get there quicker and willing to help with testing,I'll donate a leaf vcu.
Glad to see you've got that mostly going.Isaac96 wrote: ↑Sat Jul 25, 2020 10:11 pm (That library is weird, it seems to autosave/autorecover amp-hours on power reset. No idea if that works, I don't have an ISA shunt yet).
I also seem to have forgotten that the CAN mailboxes needed to be set up -- I just added that in along with a little more debugging (since there are plenty of bugs).
How, like, 90s man. Don't you know apps are the future?
Most microcontrollers with inbuilt CAN seem to have them -- SAM3X, Teensy (Freescale/NXP ARM chips). I don't know how to use them, just zeroed them all outmdrobnak wrote: ↑Sun Jul 26, 2020 12:08 am Glad to see you've got that mostly going.
The auto save/recover is to try and compute accurate State of Health or Charge. Not sure which.
I didn't realize CAN mailboxes were "a thing" in most micro-controllers.. I have definitely have seen them on ST C167 16-bit processors. (Bosch ME 7.5/7.8 ECUs)
Well, yes, but it's not exactly easy to run an app on a $30 flip phoneHow, like, 90s man. Don't you know apps are the future?
-Matt
Same here. I'm very close to having the battery full in plus have a Chademo port ready to go. Will just need to order another Leaf board so more than willing to test.
Alright, I'll look at the code and see where that could fit. Is it intended to power up a contactor system?Jack Bauer wrote: ↑Tue Jul 28, 2020 6:35 am So I want OUT3 to activate when hv is required and de activate when charging finishes. Yeah I've changed a few things around on this design but no need to worry about that right now. We'll just get it running on the leaf vcu then can adapt.