Electredge Posted November 27, 2020 Report Share Posted November 27, 2020 01-05 Miata VVT NA Motor - Alternator I setup a basemap to test function of VVT control and Alternator control. VVT works perfectly, alternator control voltage works fine as well but AUX 5 status shows FAULT while its working, reading through the manual it seems that might mean the hardware is not happy. Let me know what I should do or test to make it happy Thanks https://drive.google.com/file/d/1GaA98Y1Qd678IWGZlyh4mMgZr0QSPUeN/view?usp=sharing, https://drive.google.com/file/d/1fPfkrL19t6YiF3TkdMT5iRn7A0rNXKVM/view?usp=sharing Quote Link to comment Share on other sites More sharing options...
koracing Posted November 27, 2020 Report Share Posted November 27, 2020 I've been looking at making a plug-in solution for the 99-00 and 01-05 Miatas and the alternator control is one of the issues that I'm looking at. I fairly certian there will be additional hardware required to make the control happy and I've looked at several stand alone type controllers, but I think a dumbed down version of one of these with the Link providing the logic via an output similar to what you've done is the right solution. My guess is you're exceeding the capability of standard hardware outputs from the link which is tripping your Fault (overcurrent possibly?), and you would probably need to get the same signal output to the alternator, but with some isolation to the ecu's logic output. Per the help menu: ·Fault - The output is in fault state. For Aux 11-16 this state can occur when Open Circuit Detection is turned on, for all other Aux pins this indicates the hardware is not happy. I think also coming up with a % error from a target voltage is probably a better way to deal with the PWM output - using math channels most likely. Quote Link to comment Share on other sites More sharing options...
Adamw Posted November 28, 2020 Report Share Posted November 28, 2020 I'll have to confirm with engineering on Monday about what scenarios can cause the fault. But the main cause I do know of off the top of my head is where the connected device doesnt allow the aux output voltage to rise to near 12V when off or fall to near 0V when on. In the case I have seen it (subaru fuel pump controller was clamping it to 7V), the output still worked fine, it was more just a warning that the voltage isnt as expected. In my case I moved it to a spare ignition drive which is only a 7V output. Quote Link to comment Share on other sites More sharing options...
Electredge Posted November 29, 2020 Author Report Share Posted November 29, 2020 22 hours ago, Adamw said: I'll have to confirm with engineering on Monday about what scenarios can cause the fault. But the main cause I do know of off the top of my head is where the connected device doesnt allow the aux output voltage to rise to near 12V when off or fall to near 0V when on. In the case I have seen it (subaru fuel pump controller was clamping it to 7V), the output still worked fine, it was more just a warning that the voltage isnt as expected. In my case I moved it to a spare ignition drive which is only a 7V output. If that is the case, then that might work out fine assuming it will not damage the ecu in any way. When the OEM ecu is controlling the alternator repair manual says I should see between 3-8 volts at idle with no electrical load. Appreciate the help and let me know what engineering says, if it won't potential damage an ecu then I will continue further testing, I can easily move the output to the ignition driver if you think that would help in some way. Thanks Jon Quote Link to comment Share on other sites More sharing options...
Adamw Posted November 30, 2020 Report Share Posted November 30, 2020 From engineering: The driver is a XXXXX. It can detect open load, short to ground, and short to bat. The following are tested when the aux is off: Open load threshold voltage (fault detected if VOUTi < VOL) VOL = 2/3VBAT Short to GND threshold voltage (fault detected if VOUTi < VSG) VSG = 1/3VBAT There are similar and further tests when the aux is "ON". You could attach a scope if you have one to see what voltage swing you have on the aux output to confirm which one of these is tripping the fault. But based on some other cases we have investigated I feel the most likely cause is the "open load test" which is caused by what I explained earlier where the voltage is clamped lower than 2/3 battery voltage by the device when the aux is off. After my discussion with engineering today they are going to consider disabling that open load test as it isnt particularly useful in many cases. Quote Link to comment Share on other sites More sharing options...
koracing Posted November 30, 2020 Report Share Posted November 30, 2020 19 hours ago, Electredge said: If that is the case, then that might work out fine assuming it will not damage the ecu in any way. When the OEM ecu is controlling the alternator repair manual says I should see between 3-8 volts at idle with no electrical load. Appreciate the help and let me know what engineering says, if it won't potential damage an ecu then I will continue further testing, I can easily move the output to the ignition driver if you think that would help in some way. Thanks Jon The driving voltage from the output on the OEM ecu is less than 12v? Or is it due to the PWM of the 12v signal you're seeing the voltage displayed as less than 12v? I would worry if an ignition output is limited to a 7VDC+ output that it may not be sufficient for what the alternator is needing to see. Quote Link to comment Share on other sites More sharing options...
Vaughan Posted December 14, 2020 Report Share Posted December 14, 2020 I'm picking up a 1.8 VVT motor for my NA MX5 tonight so might have to give this alternator control a go myself koracing 1 Quote Link to comment Share on other sites More sharing options...
Vaughan Posted December 30, 2020 Report Share Posted December 30, 2020 I've had a bit of a play with the alternator control now and what I've found is that using something like "voltage<14.7" can result in the output just turning on and off lots which appears to regulate the voltage just fine because the output is updated fast enough but it seems a bit too easy. My current setup is an attempt at closed loop control in a table like the above but I was thinking I might try and make a PID loop using mathblocks to see how well that worked. My maths is currently: Math Block 1 (Voltage Error) = (14.7 - batt Voltage)*(Engine Speed > 0) The engine speed is for setting the error to 0 when below 400rpm to prevent the integral forever increasing Math Block 2 (Integral component) = ((Voltage Error>0)-(Voltage Error<0))*Integral Gain + Math Block 2 Think I might start with an integral gain of 0.1, might be able to squeeze a *abs(Math Block 2)>Integral limit in there as well with some clever formatting Math Block 3 (Output) = Voltage Error*Prop Gain + Math Block 2 (Integral Component) + (Voltage Error-Previous Error)*Deriv Gain + Feed forward value (maybe 25 based on my experience so far) Math Block 4 (Previous Error) = Math Block 1 This previous error will be used for the derivative term I haven't implemented or tested this yet so it will doubtless have some teething issues but it could be an interesting demonstration of the power of math blocks. Note the order I have assigned those is very deliberate, error calculated first, then integral, then output, then last error is stored. In terms of physical wiring I have an Aux output connected directly to the grey/red wire going into the alternator, I have left the grey alternator wire completely disconnected and I have connected another Aux output to my Battery light so that it still does something. Active High is important for the control wire as when it is active low it will do full voltage when the output is off which I did manage to get wrong the first time. Electredge 1 Quote Link to comment Share on other sites More sharing options...
Vaughan Posted December 30, 2020 Report Share Posted December 30, 2020 Unsure if I have the derivative around the right way but on the whole it seems to sit there and oscillate at 1.5Hz (on top of the 250Hz PWM speed), maybe more fiddling will improve but should do the job for now. Electredge 1 Quote Link to comment Share on other sites More sharing options...
Electredge Posted December 30, 2020 Author Report Share Posted December 30, 2020 Thanks Vaughan, I hadn't considered trying it with the Math Blocks... I should be able to test it sometime over the weekend and see if I have the same results. Which Aux Out did you end up using? I have tested my setup with Aux 3, Aux 5, Ign 8, Inj 8, Aux 9 Does it matter which is used? When using Aux 9 I didn't get the "fault" on the Aux status but not sure if that was coincidence or just luck? Thanks again for the help Jon Quote Link to comment Share on other sites More sharing options...
Vaughan Posted December 30, 2020 Report Share Posted December 30, 2020 I think I used Aux 5, Aux1-10 are identical, injector and ign drives have slightly different hardware but I'm not 100% on the differences without the diagram in front me, I haven't even looked to see if it shows fault in mine as I'm not too worried as long as it works. Quote Link to comment Share on other sites More sharing options...
koracing Posted December 30, 2020 Report Share Posted December 30, 2020 8 hours ago, Electredge said: Thanks Vaughan, I hadn't considered trying it with the Math Blocks... I should be able to test it sometime over the weekend and see if I have the same results. Which Aux Out did you end up using? I have tested my setup with Aux 3, Aux 5, Ign 8, Inj 8, Aux 9 Does it matter which is used? When using Aux 9 I didn't get the "fault" on the Aux status but not sure if that was coincidence or just luck? Thanks again for the help Jon Was Aux9 the only output that did not give you an Aux fault? The IGN and INJ outputs gave faults as well? 4 hours ago, Vaughan said: I think I used Aux 5, Aux1-10 are identical, injector and ign drives have slightly different hardware but I'm not 100% on the differences without the diagram in front me, I haven't even looked to see if it shows fault in mine as I'm not too worried as long as it works. Problem with any fault reported is as soon as it ends up in customer hands it will always be a point of questioning. Would prefer to not have to have an explanation or work around if trying to offer a solution to a customer or as a competing product to another ecu. Quote Link to comment Share on other sites More sharing options...
Adamw Posted December 31, 2020 Report Share Posted December 31, 2020 2 hours ago, koracing said: Problem with any fault reported is as soon as it ends up in customer hands it will always be a point of questioning. Would prefer to not have to have an explanation or work around if trying to offer a solution to a customer or as a competing product to another ecu. As I mentioned earlier the open load test which is causing this fault will probably be disabled or hidden in a future update. Ignition or Injector drives dont have this fault test so they would be the suggested option if you have to PWM a device that clamps aux output to a low voltage. Quote Link to comment Share on other sites More sharing options...
miat Posted June 9, 2021 Report Share Posted June 9, 2021 I had found this thread, and there didn't seem to be a conclusion. Hence the months later bump... I've been trying to set up alternator control on my NB2 miata with G4X fury. These are the results of a brief test, still a lot of fiddling to do, but the strategy seems to be on the right track. Definitely better than the bang-bang setup I had before. I'll update this later once I figure out better gains The PWM frequency is 250Hz constant, not sure if that is appropriate. Given that the math blocks run at 1kHz, averaging the error across some integer multiple of 4ms seems to be a good idea (still need to play with how many averages works best). I used a 'dt' function, instead of the simple 'current - previous' derivative calc proposed above I used some different axis breakpoints in the GP PWM table, to normalize the gains in math block 4 - they wouldn't fit otherwise. I think I can also move the "+4" term in math block 4 into the GP PWM table, to claim some more character space back. Vaughan and kinko_ben 2 Quote Link to comment Share on other sites More sharing options...
koracing Posted February 1, 2022 Report Share Posted February 1, 2022 Bumping to find out if there are any further improvements to report? Quote Link to comment Share on other sites More sharing options...
Vaughan Posted February 1, 2022 Report Share Posted February 1, 2022 An Alternator Control function has been made and should be available in the next major release version. Electredge, miat and koracing 3 Quote Link to comment Share on other sites More sharing options...
moneypityata Posted May 14 Report Share Posted May 14 Bringing back a dead post, I know. My NB1PNP shows a fault for alternator control too. But it is indeed actually working. The only way I can really tell though is that my battery hasn't died though. Quote Link to comment Share on other sites More sharing options...
Adamw Posted May 14 Report Share Posted May 14 The aux status reporting a fault is normal, explained in the 3rd post from the top. Quote Link to comment Share on other sites More sharing options...
moneypityata Posted May 14 Report Share Posted May 14 Thanks Adam. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.