For any add-on boards such as VR conditioners, optos and OEM interface boards
#56999
NickZ wrote: Tue May 17, 2022 11:18 am Latest update is working well, ive worked out the calibration bit, if i use 1 and 1 it works fine.
after about 3/4 throttle you can hold and maintain it, but anything under that it will hold for about 3-5 seconds and then go into safety mode, I think the slight oscillation of the butterfly trips the safety.
What error tolerance is there with the APP and TPS and can it be adjusted?
Looking great! APP vs TPS correlation is not checked at the moment. Here you can adjust the threshold(APP1 vs APP2, TPS1 vs TPS2), it is in ADC counts and currently 10. https://github.com/digmorepaka/DBW-Cont ... l.ino#L265
By JHolland
#57008
NickZ wrote: Tue May 17, 2022 11:18 am after about 3/4 throttle you can hold and maintain it, but anything under that it will hold for about 3-5 seconds and then go into safety mode, I think the slight oscillation of the butterfly trips the safety.
The oscillation may be caused by inadequate resolution of the PWM - I had that issue with the Denso throttle body. I wrote a simple programme that gradually increased the PWM duty cycle and measured the throttle position. Because it is a low impedance motor it only needs around 50 bits (8-bit resolution) to drive from closed throttle to fully open, on average the minimum angle is around 2 degrees but because of the non-linearity of the springs I was seeing around a 10 degree change with a one bit change of PWM at around 45 degrees. Dithering will reduce that to around 5 degrees but its still inadequate.
You will also have problems if your control loop is not well timed, If you write a programme to drive the throttle at 100% for something like 100ms initially and then measure how long it takes to fully open, then set your control loop time to 5 to 10 times faster than that. Also disable the serial port because it will cause erratic timing of the loop.
User avatar
By DStage
#57080
I've just noticed the topic (I rarely check the forum to be honest :roll: ). Nice that you took the challenge, the second board looks quite neat. If you use UART with a constant debug flow I would also advice to disable that - I've seen really bad side effects on timing sensitive applications.
I guess once you tune it it will show the potential for various modes and non linear behaviours etc as you described in the first post. The thing is to get there first ;-)
I will try to read more posts in this topic if I find a moment as I'm quite curious.
By NickZ
#57083
and my next question. How to use a tps that has its signals opposite from each other that can't be changed in wiring as they use common ground and supply voltage?
The firmware doesn't like it.
Where does the "FastCRC_cpu.h" library come from?
#57097
NickZ wrote: Sat May 21, 2022 3:04 am What does the Requested Idle Input pin do or how is it used?
I believe the original implementation tries to run a pulsewidth detection on it, I think a normal low pass filter and just using the analog input for voltage is a better idea. Got it working on the bench, not sure if i uploaded it right before another project took over my desk.
NickZ wrote:and my next question. How to use a tps that has its signals opposite from each other that can't be changed in wiring as they use common ground and supply voltage?
The firmware doesn't like it.
Should handle them fine without modification if you set the ascending one as primary, with a little modification you can swap around the Minimum and Maximum points in the correlation tables(both safety and pedal vs throttle) for descending primary. So that the non-linear map() library doesn't act up. My ITB set has one like this so I can test it if you're having problems

NickZ wrote: Where does the "FastCRC_cpu.h" library come from?
Should be a component of https://github.com/FrankBoesing/FastCRC haven't tried if it's redundant naming though.
#57098
DStage wrote: Sat May 21, 2022 9:53 pm I've just noticed the topic (I rarely check the forum to be honest :roll: ). Nice that you took the challenge, the second board looks quite neat. If you use UART with a constant debug flow I would also advice to disable that - I've seen really bad side effects on timing sensitive applications.
I guess once you tune it it will show the potential for various modes and non linear behaviours etc as you described in the first post. The thing is to get there first ;-)
I will try to read more posts in this topic if I find a moment as I'm quite curious.
It's not on a car yet so it's the easiest to use. Haven't noticed much problem with it but it might become an issue on a car. Any suggestions for alternative communication that wont interfere?
By JHolland
#57102
digmorepaka wrote: Sun May 22, 2022 6:59 pm It's not on a car yet so it's the easiest to use. Haven't noticed much problem with it but it might become an issue on a car. Any suggestions for alternative communication that wont interfere?
I have seen this issue. The best method is to poll the serial port and run the control loop on a timer interrupt.
By NickZ
#57129
slowly working through this, but doesn't matter what is do any thing in between idle and full throttle it will error after a few seconds.
the expected numbers don't follow the raw values in the throttle body, seems it doesn't calculate them correctly.
my tps2 goes up and back down through its sweep according to the raw value.
but writing a program to display the 2 tps readings, main tps raw1 is 200 ish to 780 and raw2 is 780ish to 170 over the range of moment.
TPS2 only reads to about 3/4 of the range, the last 1/4 doesn't read for TPS2 which is wide open throttle.
#57134
NickZ wrote: Wed May 25, 2022 1:42 pm TPS2 only reads to about 3/4 of the range, the last 1/4 doesn't read for TPS2 which is wide open throttle.
Yes, my throttle is the same. When it's calibrated correctly it works. If you send 3 to serial it should tell you the calibration values. Paste them here, the grid 4x4 grid of numbers.
MAP LOOKUP & TS DEFINITIONS

See how the write commands use the identifiers to […]

Ok, I feel so stupid. I was running the Uno output[…]

Let's all have a laugh for second. There's trash[…]

It has been done more than a few times, there was […]

Still can't find what you're looking for?