buba wrote: ↑Sep 13 2019 5:56amExciting that you are experimenting and testing! If I can help in any way please let me know!vadda wrote: ↑Sep 13 2019 5:31amI have compiled and tested the latest version on your GitHub.
The current reading is much better, as is that of the Volts.
There remains a discrepancy of 0.3V on the Volts and about 20W less reported on the LCD3 compared to the Wattmeter (on a reading of about 570W reported by LCD3)
I wanted to know if the two variables that are used to calculate the V and I are BATTERY_VOLTAGE_PER_10_BIT_ADC_STEP_X1000 and BATTERY_CURRENT_PER_10_BIT_ADC_STEP_X100?
I wanted to try raising both by 1 to see if the reading improved.
I do not stop thanking you for the excellent work done and the kindness and competence with which you always respond.
Yes, I know that there is still a discrepancy but I think it is as close we can get for now. It is best to test the voltage and current separately. If they are correct the watts will be correct. But there are filters on the values displayed on the display so when testing it is best to have a "steady state" on whatever you are measuring. Example: if you limit the current to 10 A and use Cruise to give maximum power the system will limit to around 10 A and hold it there. As a result, it will be possible to somewhat accurately measure the current.
You are free to experiment with the other values you mentioned without any problems. But I would advise against changing the x512 values. They are used in the FOC calculation.
Thank you for the kind words, Vadda! We all appreciate that you are testing and experimenting with the code! Again, please let me know if I can help or if you see anything that can be improved in any way!
Is the Battery voltage used for the calculations measured at the screen or the motor?
I ask as i noticed that when i had a dodgy wet connection in my cable i could easily get a 0.5v volt drop at the screen compared to the actual battery voltage.
Ideally the voltage should be measured as close to the motor as possible for accuracy.