Noob; part selection for Teensy based EFI (Speeduino variant).

HugoW

New member
Hi, I am a car guy with some Arduino experience. I love making small projects with the Arduinos, but most of my projects a copied from others and modified to suit. Same applies to my new project, but this one is more complicated and; Teensy based. The choice for Teensy is based on the fact that on the current Speeduino firmware, it can support CANbus communication. I also believe it is best to stick with the 3.5, as it is 5V tolerant.

A bit of background on the why and how. The CANbus communication is a wish, but not the only reason to chose this project. My car's setup (1998 MX-5 with a 2004 MX-5 1.8 VVT engine and turbo) has evolved over the past few years. I started with a simple Speeduino 0.4.4 board on an Arduino Mega, as it should. I have a third PCB I made myself (JLCPCB) between the 40 pin Speeduino connector and the 73 pin Mazda connector. On that board is an IC converting some outputs from 5 to 12V and higher power, to control actuators on the engine. I also added a few extra outputs on another PCB, for some more high power outputs not coming from the 40 pin Speeduino output. There is another PCB (fourth, are you counting) floating somewhere in the wiring harness, controlling my alternator for stable voltage. The fifth board is also floating in the wiring harness, and converts the wideband O2 sensor signal to 0 - 5V and powers the sensor heater. To convert this set-up to Teensy 3.5 calls for another PCB, housing the Teensy, and mimicking the Mega (with signal converters on it). That would be the 6th PCB. And a lot of messy wiring and unnecessary parts. So, I want one 'motherboard' with as much on it as possible, and nothing more. The Teensy will be mounted to that board and so will the wideband sensor controller, as I have not been able to reverse engineer it (as I did with the alternator controller).

But, as I said in the beginning, I don't really know what I am doing. And I want to learn. I hope to get some help here. So, here are some questions:
For various outputs, grounding things like injectors (on/off coil), idle control valve (PWM coil) boost control valve (PWM coil), etc, the schematic I found is this:
Injector drivers.png
I think I copied this from a Teensy based Speeduino board, but I cannot guarantee it. How to I detemine this IC and the Teensy are happily working together, right voltages (3,3V) and currents?
Besides that, two other high current outputs (fuel pump and cooling fan, both switchting the ground of a relais) are drawn like this:
Fuel pump driver.png
First, again the same question, is this working with the Teensy, and how do I know? But even more of a question to me is why use two different set-ups for high current grounding outputs? Why use two of the above for fuel pump relais and cooling fan relais, and not one of the first schematic to run both?

I also have a lot of questions about inputs, but with the above clear I can finish up the outputs, first. Oh, if anyone here can let me know how I can link to an EasyEDA project, live, please let me know. I can then give you all access to my whole project.

Any help is appreciated, if you need advice on turboing your car let me know ;)

Cheers,

Hugo
 
For the VNLD5090TR-E, VINTH Input threshold voltage at VDS = VIN ; I D = 1 mA 1volt min 3.5volt max. (copied straight from the datasheet)

So the input to the driver chip has to have a voltage at least 3.5 volts to guarantee it will work. Will a 5V Teensy do that?

It is unclear if this device needs a fly back diode, like one needs for inductive loads - like coils, relays, and motors/pumps. Being a belts and suspenders guy, I'd put in a fly back diode. Cheap insurance.

As for choice of drivers - it depends on the device loads. You need to know how much current is required for everything you are driving. Once you know that, you select the appropriate parts. If you don't know the loads, then you can't pick the least expensive parts that can do the job! Pick the wrong parts, then things fail, if not immediately, then later, when you are least prepared for it. Unlike many projects here, the one you have chosen, requires attention to these details. You can put a hole in your engine block, or dump oil out on a public street, or worse. I am not telling you not to proceed, but I am telling you to do your homework first.

I have an aftermarket ECU on my turbocharged MX5. It is a lot of fun. But you need to learn what you are doing (learn as you go) because your electronic and software choices can greatly affect your personal safety and that of others. Looking forward to your progress on this project.
 
Thank you very much for your reply. It immideatly shows my lack of knowledge in this subject. When I read (datasheet) "1volt min 3.5volt max", I presume the 3,3V given by the Teensy is sufficient. Can you explain why I need 3,5 V as a minimum?

Yes, I will put flyback diodes on all those outputs. I have a second project I can clone / copy from, which has a 1N4001 diode with a 1k resistor in parrallel on each output, I think I will use that.

I am making a list of everything I need to know, and how to figure out the numbers. For the most part, I will look at the BOM of my Speeduino 0.4.4 board. Since that is working in my car. If the drivers in the schematics I copy from can handle similar or bigger loads, they should suffice.

I understand what you mean. I've been driving the car for a few years now on Speeduino successfully, adding the turbo to the mix early this summer. I *think* I know what I do on the engine / tuning subject. It is now that I have most issues worked out in temporary wiring / modded PCB solutions, I want to build something less amateuristic. And about safety; not even perfect factory ECU can stop me from driving like an idiot ;)
 
I will re-read the driver spec, but usually the inputs are specified that way. Will report back on that today.

Flyback diodes don't need a parallel resistor to my knowledge. When the driver turns off the voltage at the driver output can reach very high levels. The diode shunts the voltage back to the supply (the battery) protecting the driver. This is what you want. The resistor only increases your parts count and reduces your reliability. There are uses for the resistor, they can reduce oscillation, but I have not used them for coil drivers. That's because I have not seen any significant oscillation when viewed by an oscilloscope. I don't add parts unless they are needed.

A Teensy is a great choice for this application.

I can't help you with your driving, but I certainly am aware of the effects of improper spark timing and air fuel ratio. You want good reliable circuitry for both. Blindly copying circuitry is not a good idea. Check it out yourself. Blown engines are expensive to repair even if you do everything yourself. Reviewing the specs of the parts doesn't take that long. Check that they make sense to you. It's also a way to learn about things. It's your engine, so be good to it. :).

Have fun with this.
 
Just looked at the spec again. https://www.st.com/content/ccc/reso...df/jcr:content/translations/en.DM00055363.pdf
I interpret that to mean a logic low is guaranteed when Vin <= 1 volt. Logic high is guaranteed when Vin >= 3.5V. It could work under other conditions, but these are the guaranteed levels. Under high or low temperatures the thresholds will vary. If you use the part outside of the guaranteed specifications, you may not have a reliable system.

The suggested circuit shows a 5V processor controlling the part. Please pay attention to the section about latch up. They show equations to determine the correct value for the resistor. Look up the info for the Teensy of your choice, and use those values for the calculation.
 
Ah, something is slowly making sense in my brain. The schematic I posted part from is probably working OK-ish as 3,3 V is close to 3,5 V, but design wise not the best / most secure choice. The other schematic I have for reference uses a VND14NV04, which has that value at 2,5 V. Current-wise, they don't make sense to me. The 5090 sheet shows 'Drain current' as 13 A, but it also says ID as 25A. the 14N sheet says 12A. The original item on the Speeduino 0.4.4 shows an ID of 62A. I'll have a look at the injector's resistance.

[EDIT]The injector specs shown a resistance (impendance, to be precise, don't know the difference) of 11,8 to 16,5 Ohm and an amperage of 1 A. The car has a steady voltage of 14,5 V, over 11,8 ohm that makes 1,23 amps. And that is not constant, I might be able to calculate what part of the time they are using that current. But in any case, even the 12 A would be enough, I think.[/EDIT]

Hugo
 
Last edited:
Back
Top