-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CHAdeMO Vehicles, Battery #621
Conversation
I added the CHAdeMO GPIO configuration. I thought it was fine that way, but the inputs still didn't work.
Add GPIO INPUT config.
I fixed a lot of faults. - lowByte <-> highByte replace, - variable declaration uint16_t <-> uint8_t replace (Voltage, Current), - Added x102_chg_session.s.status.StatusVehicleDischargeCompatible = bitRead(rx_frame.data.u8[5], 7), - changed the direction of a relationship (x100_chg_lim.MaximumBatteryVoltage < x108_evse_cap.threshold_voltage), - Separate lowByte / highByte x209_evse_dischg_est.remaining_discharge_time, - Park position not invertd.
Nice work @NJbubo ! 🙌 |
|
||
Serial.println("initialization \n"); | ||
ISA_STOP(); | ||
delay(500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note on delay() blocks, these will stop all periodic CAN message sending, and might impact the functionality towards inverter. Would be great to get these replaced
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it stops the program, but I thought it might be acceptable. These program parts should and can only be used for the one-time setup of the ISA SHUNT. They do not work during normal use. At most every CPU startup during setup(). Possibly for queries and debugging without normal working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reminder that these were deliberately removed per discussion @dalathegreat .
You removed the init_battery() function from the Software.ino file. This also removed the intervalUpdateValues = 800 line. |
You can remove the entire intervalUpdateValues = 800. This was only needed before, when the application ran at a default 5000ms update rate for values. It is now increased to 1000ms, which should be good also for Chademo use |
There are several good improvements here, including some that I addressed but hadn't pushed yet due to time conflicts, so I am glad to see them done. NOTE: Because of the many variants of ISA shunt, I am concerned we are introducing some incompatibilities here..e.g., I know of multiple ISA shunts that ship little endian from the factory. Another issue: Several users have contacted me lately indicating that their shunts need to be reconfigured to use the default (documented) CAN IDs because they were set with incompatible values deviating from those in manufacturer documentation. I think (my personal) preferred course of action would be a shunt 'setup' tool not compiled by default in the battery emulator code tree. I've written some of that already to help those individuals. Thoughts/Opinions? @NJbubo @dalathegreat |
@smaresca Maybe let's merge this PR as-is for now, and handle shunt setup in a separate PR? @NJbubo you can fix the pre-commit failing build by following this guide https://github.com/dalathegreat/Battery-Emulator/blob/main/CONTRIBUTING.md |
Let's merge this, and continue with more Shunt PRs? :) |
Issues #548, Pull request #550
What
I added the CHAdeMO GPIO configuration.
I fixed a lot of faults.
Why
The CHAdeMO battery software not working.
How
It is necessary to configure the GPIOs. In particular, setting the initial state of the outputs and enabling the inputs.
In my test, I use the CHADEMO_PIN_7 input as a start button.
I can't imagine how you intended to use "plug_inserted" as a signal according to the program.
I think the CHAdeMO connector pin 7 is connected directly to GND/0V when viewed from the side of the charger.