HOWTO Make a Plug-and-Play Board¶
We believe in 100% Plug and Play (PnP) ECUs. There are a few steps helping to make an amazing PnP ECU:
- have a proven breakout board in order to confirm connector availability and footprint.
- have a wired PnP prototype, i.e. one of rusEFI universal ECUs with harness adapter and breakout board connector. Depends on #1
- investigate cheap compatible used ECU cases, if applicable.
Once we have #2 and #3 we can make a nice PnP which uses some OEM box without the breakout board.
Q: why so many steps? I am so excited, I shall make a PnP right away¶
A: Please start with a wired prototype, it's a valuable development tool. It lets you easily change configurations and play with options until you are happy. At the same time it allows you to become family with the entire system, the entire WORKING system on a WORKING car. It also lets you show off what the product would be on a running car to get feedback from the potential market place with very little investment in time or money. Its about starting at the beginning rather than trying to jump to the end. Worst that happen on this path is you're buddy's car is up and running as quickly and cheaply as possible and you realize the target market doesn't exist. Best case is you're buddy's car is up and running as quickly and cheaply as possible and serves as a marketing and development tool as you can just plug you're new board in, load the tune and know it should work and you can always resell the working generic board you've used for prototyping once you're done testing with it.
There is no down side. It is both project risk management 101 and project acceleration methods 101. It is hands down the best path, its just not what you WANT hear....but it is the right thing to do.
I am going to make a Nissan76pin -> RusEFI "Proteus" adapter. A friend asked how I was going to do it because he was interested in making a PnP PCB for his car. These instructions are pretty general. "Proteus" can mean any RusEFI version that has enough "stuff" to run your engine. "Nissan76pin" can mean whatever OEM connector will work for your engine. I'm going to assume KiCAD is being used but there's nothing stopping you from using your CAD package of choice.
- Make a spreadsheet. I like spreadsheets. If you don't, you can take notes. The point here is to keep a lot of information organized and be able to shuffle it around easily. Here is a link to the spreadsheet I made to help make the N76-Proteus adapter. (incomplete at time of writing)
- You need a reliable and complete pinout for the OEM connector you wish to use. You will need to know the function of every pin you want to map, what kind of signal it is/how it interacts with the engine. It would be helpful if you give each OEM signal a unique and somewhat descriptive name. You will use this name to connect the OEM connector and the RusEFI board pin when building a schematic in KiCAD.
- Look at Proteus(or your board of choice) pinout. Identify "unique" pins that must be matched with specific functions. ("unique" i.e. Coils, Injectors, Knock sensors, Idle motors) Identify specialized pins which exist in groups - multiple interchangeable pins that have a specialized function. ("specialized" i.e. injectors, coils) Identify general purpose output pins, sort according to low side and high side drive. Note any current limitations. *MAKE SURE THAT THERE ARE ENOUGH PINS ON THE RUSEFI BOARD YOU WANT TO USE TO MAP 1:1 WITH OEM CONNECTOR!*
- Identify any power distribution pins. Constant/battery +12V. Main power/switched 12V. Main relay/ASD relay control. Power ground(s). Sensor grounds. Sensor reference (+5V). Be aware that not all OEM harnesses do power distribution the same way. You can add a "main relay" or "auto shutdown (ASD) relay" on your adapter board, if need be.
- match up Nissan OEM pinout and Proteus resources: match unique items first - knock sensor(s), idle motors, etc. Match special function items next - coils, injectors, etc. Assign an initial 1:1 connection, or at least where you think it should go. Match GPIO functions like fuel pump, etc. to available I/O. Pay attention to high side drive vs. low side drive. Try to group pins of like function, keeping in mind interchangeability of coil/injector assignments and of GPIO pins for routing later.
- Fire up KiCAD. Choose/create a schematic element with 76 pins to assign to the Nissan 76 pin connector. This can be as simple or as fancy as you want. This can be an existing symbol. The important thing is that the symbol has the same number of pins as the connector you want to use for your PnP.
- Create symbol(s) to use for the RusEFI board that you're going to connect to the OEM connector. Again, you need to make sure that your symbol has the same number of pins on it as the connectors on the RusEFI board. On the Proteus PCB, I need 2x 35pin and 1x 23 pin for the Ampseal connectors on the PCB. You're probably *notgoing to use a board that actually has these connectors soldered to it but it will be much* easier to connect your adapter board to an existing RusEFI board if you can just set the two boards on top of each other and use a bunch of straight pins/wires to connect the two boards together - how we're going to set it up.
- On the schematic in KiCAD, assign all pins on Nissan76 the unique meaningful name from your spreadsheet, to keep them straight. You will use this same name later to connect Proteus pins to OEM connector pins, taking advantage of the fact that KiCAD creates an electrical connection between signals which have the same name.
- Use your detailed Spreadsheet to assign the same unique meaningful symbol names(tm) on the Nissan76 pin connector to Proteus pins with a compatible function. Having a pin on each connector with a signal named the same will cause the design software to assign an electrical connection between pins
- If you can't find a reliable PCB footprint, make one. Refer to datasheet. If you can't find a datasheet, break out the calipers and measure pin spacing and pin diameter. as a rule of thumb, you want to have PTH that are at least 15 if not 30mil larger than the pins at their largest diameter. This will give a snug and precise but not too tight fitment. If you think you "found" a decent PCB footprint (versus making one that suits your needs precisely), double check how the pins are numbered. Many PCB footprints that I've downloaded use a different numbering scheme than OEMs use. KiCAD basically only uses pin numbering to connect a schematic symbol and a PCB footprint. You can't assign pin 7 on a schematic to pin 9 on a PCB footprint very easily. *You need to make sure that however you have your KiCAD symbol numbered EXACTLY matches how your footprint is numbered* Failure to respect this important rule will cause your design to be totally broken.
- Open PCB, import netlist. Define your board outline based on physical constraints of the case that the contraption needs to fit in. Add any mounting holes and other zones dictated by the case that the contraption needs to fit in. There will be physical measuring here to come up with something that makes sense. At a bare minimum, your board outline needs to be big enough for both the OEM and RusEFI board connectors.
- Place OEM connector that will mate with the harness footprint (N76 in my case) in a place that makes sense for the physical case. Again, there will be physical measuring here to get it right.
- Use a Proteus board (or a life size print out that you cut out) to place the Proteus (or poison of choice) board in a sensible place in the case. Think about the space it will take up and how you are going to mount it. Remember, vibration is a thing and solder joints are not designed to be load bearing, particularly for long periods of time. You will want rigid connections between your adapter board and the RusEFI board that are NOT accomplished by solder. Think: holes with bolts through them, mounting screws, co-mounting with case standoffs/edges, etc. Again, there will be physical measuring here to get it right.
- Place the connectors for Proteus so that simple straight pins can connect the two PCBs. This means putting the connectors on your PCB where you can simply place the Proteus PCB on top. Pay attention to connector orientation!
- It's time to start routing connections:
- Route unique, sensitive tracks first. knock sensors come to mind. VR sensors come to mind. Be mindful of the need for ground planes / signal return path! Cars are electrically noisy environments and failure to think about signal return paths will cause problems. If you need more of a primer on this, look up papers/videos on high speed design / controlled impedance as the same concepts will apply.
- Route analog signals. Start with analog +5v/reference. Try to stake out an area to put a power plane for analog ground such that all analog signals can be on top of the power plane. Then move on to analog signals.
- Remember that in most cases, ALL analog inputs will be able to be used for ALL sensors. You can swap AN1 and AN6 on RusEFI boards in order to get cleaner routing to the OE traces that can't be moved on the OEM connector.
- Route unique signals like idle, DBW, etc. You will have extremely limited choice for these so getting them out of the way first is a good idea.
- Route coils as a group. Remember that in almost all cases you'll be able to set the phase of the coils so any coil output can be used to drive any ignition coil. Swap signals in order to keep layout as clean as possible.
- Route injectors as a group. Again, swap signals to keep layout as clean as possible.
- Route any GPIO, main relay control, etc. etc. etc. Keep in mind Low Side Drivers and High Side Drivers are not compatible. Swap signals around to keep layout as clean as possible. Be mindful of any current requirements!
- At this point, analog power/reference should already be routed along with an associated limited power plane for analog signals. It's time to route primary power and ground pins. Start with constant battery power as this is typically a low-power signal. FOR POWER, YOU WANT TO USE POURS/PLANES WHERE POSSIBLE. Typically, top-side power pour and bottom side ground pour. Keep in mind that analog signals should have ANALOG GROUND RETURN plane underneath them if possible, NOT the main ground plane.
Final step: go back and update your spreadsheet with what you ACTUALLY connected. Make sure your OEM coil numbers are mapped to the coil driver that is connected on the PCB. Make sure the OEM injector numbers are mapped to the drivers controlling them. Make sure that the specific sensors on the harness are mapped to the general analog inputs receiving the signal. Make sure your solenoids, relays, etc. are mapped to GPIO. When you go to configure the unit, having this information to refer to will be invaluable and save you having to chase your schematic.