Anything not specifically related to the Speeduino hardware. Eg sensors, bluetooth, displays etc
#51411
I've the last year or so, I've been slowly developing my own board, mainly for educational purposes, but to be PnP compatible with a motorcycle that I have.

I have an issue with my latest revision that I need a little help understanding. I *think* I understand what's going on, and broadly what the solution might be, but I'm a bit hazy on the specifics.

First - let me describe the problem - it's very noticeable.. when powered on, the fuel pump runs for the allotted time, then when it tries to switch off, the fuel relay on the bike goes into a continuous cycle of clicking on/off, and never switches permanently off (note - the engine is not turning, this is purely at ignition on).

My previous board revision did not exhibit this problem, and the feature that I introduced onto this version of the board was an onboard VR (NCV1124DR2G based). Through trial and error, and building up multiple boards, I'm entirely convinced that what is probably happening is flyback from the fuel relay coil is *probably* charging up one of the capacitors on the VR circuit, and tripping the fuel pump mosfet back on for a moment.

Here's a capture of a scope of what's happening to demonstrate. You can see the spikes appearing after 5 seconds, where the bike fuel pump relay is clicking on and off.

Yellow = Fuel pump voltage (after the relay on the bike)
Pink = Fuel pump mosfet collector output (marked FUELPUMP-OUT in the below circuit)
Purple = +5v

Image

The fuel pump circuit is straightforward:
Image

The VR circuit is pretty much straight from the datasheet - though C5 and C13 are not fitted at this time, so the only capacitors in play here are C12 (220nF) and C14 (22nF):
Image

The issue *has* to be related to the introduction of the VR circuit because as I built up a fresh board this afternoon, I built up only the minimum necessary for the fuel pump control to work, and the problem was not evident. Then I added the NCV1124 IC, and the problem started manifesting itself.

As said - I suspect the issue is related to flyback, and if so, the solution is probably a diode, but I don't want to make any assumptions - can anyone help point me in the right direction please?

Thanks,
Mike
#51413
Mike, I'd say you're on a good path for diagnostics and you're gathering indicators or clues to the issue(s). At this point I'd be creating more clues, and if you think it's relay flyback, then it only takes a moment to temporarily back-probe a diode into the relay coil connectors to see the effect. It may not fix it (or cause new issues), but will likely give you different info towards your diagnostics creating more pointers toward your problem source. Keep going! 8-)
#51415
Yes - very true - I just found a 1N4007 diode, and soldered it between the collector output and +12V, but with no improvement (cathode on +12V).

Not really sure where to go next, I'm afraid. I can't see any diodes in play on the speeduino reference design, although I can see a similar diode on other third party designs - (e.g. https://github.com/oelprinz-org/Blitzbo ... matics.pdf ), and that fuel pump circuit looks to be configured very similarly to my own.
#51416
I thought it might be useful to see a trace including the fuel pump mosfet gate.

As before -
Blue = Fuel pump Mosfet Gate
Yellow = Fuel pump voltage (after the relay on the bike)
Pink = Fuel pump mosfet collector output (marked FUELPUMP-OUT in the below circuit)
Purple = +5v

It seems that the pulsing is visible on the gate (as expected, I suppose)
Image

but zooming in - that blue (gate) trace looks awfully square to be caused by a capacitor (I think, but I'm no expert).. could the Arduino be actually pulsing the output?
Image
#51420
Yes indeed - that's an IGBT, but that's mainly because that's what I had lying around, and it was working previously. To explore my previous finding, I thought it might be worthwhile to write a small Arduino sketch to simulate Speeduino switching the fuel pump on/off.

Nothing fancy - just something that switches pin 45 high for 5 seconds, then switches it off.
const int FP_pin=45;

void setup() {
//set pins as outputs
pinMode(FP_pin, OUTPUT);
digitalWrite(FP_pin,LOW);

Serial.begin(115200);
}

void loop() {
Serial.println("FP on");
digitalWrite(FP_pin,HIGH);
delay(5000);

Serial.println("FP off");
digitalWrite(FP_pin,LOW);

// lock up
while (true) {}
}
Plugging the Arduino with that sketch into the my board, with no other hardware changes, and the fuel pump/relay behaves perfectly as expected. I think this suggests that there is some odd software element to this - possibly Speeduino reacting to something and pulsing D45 as a consequence. I'm running 2020/05, so first step will be to upgrade to the latest release available.
#51421
Gaaah - I think I've just figured it out. It's noise from the fuel pump making it's way through the VR conditioner circuit. Remember I said earlier that two caps were not present.. that was deliberate to test it before moving on to trying to figure out the best values for input/output filtering...

I can see a lot of phony CKPS input pulses on the speeduino input, which must be confusing the software (though, intriguingly, there was no sync loss events noted). If I ground the CKPS input, silencing the chatter on pin D19, then the fuel pump handling behaves itself, so I'm guessing that if I get those two (missing) caps right, then it should also behave.
#51430
Fortunately, this time it did. It was a tiny amount of noise, and a 22nF across the input was sufficient to stop the problem, though I'll now need to test that to make sure that the cap doesn't inhibit 60-2 pulses up to 9000rpm, and if so, might need to further tune that value, if it proves to be a problem
blitzbox

12v is unusual. You could probe it using 5v and se[…]

Hello to everyone! I am starting this thread beca[…]

STM32 development

Do you mean the "full clean" com[…]

The Max9926 or A2 , Is there anything else i wou[…]

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