work in progress Wreck Racing rusEfi Board

Hardware inside and outside of the ECU
Post Reply
mck1117
running engine in first post
running engine in first post
Posts: 1494
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Wreck Racing rusEfi Board

Post by mck1117 »

Status

Engine successfully run on v0.1 + F4 discovery.

v0.2 is in the works. Feedback is welcome on the changes made for v2 in the GitHub repository (link at the bottom of this post).

Intro

(this intro is copied from the thread on my car at http://rusefi.com/forum/viewtopic.php?f=3&t=1162)

Story time. I'm a computer science student at Georgia Tech in Atlanta, and I'm part of the Wreck Racing club. We build a car to compete in the Grassroots Motorsports $20xx Challenge. The premise is similar to that of LeMons racing, where we build an autocross and drag car for under the current year in dollars. This year we get a budget of $2017 (one additional dollar per year, for "inflation"). Our current car is a 2001 Honda Insight, but with the 3.3L engine from a Subaru SVX stuffed under the rear hatch, along with a Subaru 5 speed manual. We're currently running the stock Subaru ECU, but are trying to move to an aftermarket solution to give us better flexibility. We have run Megasquirt-1 on other cars, but it's incapable of doing sequential fuel and ignition. Megasquirt 2 and 3 can do it, but it's far too expensive to fit in our budget.

I'd started on a fully custom ECU solution, designed to be the bare minimum of hardware to do sequential ignition on a 6 or 8 cylinder, based around the STM32F373. Well, at least I was working on that until about a week ago, when I realized that rusEfi was almost exactly what we were looking for, so I decided to switch. I had the hardware mostly complete, and a first revision board in hand.

Here's the first spin of the board, with an F373, next to the F4 discovery:

Image

With quite a few bodge wires and an STM32F4 Discovery board, I successfully ran an engine with the first rev of the board.

Image

[video][/video]

Links:
Georgia Tech Wreck Racing

Board GitHub
User avatar
kb1gtt
contributor
contributor
Posts: 3759
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Wreck Racing rusEfi Board

Post by kb1gtt »

Some feedback. Also keep in mind anything I can do can do nothing more than make it stronger :)

Generally you want a ground flood. Barriers on floods is very rarely any better than a full flood. You should spend more time placing the chips, then placing the traces. See this page for some suggestions, http://rusefi.com/wiki/index.php?title=Manual:Hardware:PCB_design_rules specifically this maxim app note. https://www.maximintegrated.com/en/app-notes/index.mvp/id/5450 take note about the pretty pictures about half way down, which show how currents start to follow traces at about 1kHz. This routing is critical for avoiding issues.

Also I was surprised at how dirty the 12V really is. When you blow a head light, you get load dumps, as well you can have an alternator fail which can create a sustained over voltage surge situation, and there is of course the low voltage of cold cranking in cold weather. Getting a proper 5V regulator is hard. See notes found here about an automotive 5V supply. http://rusefi.com/wiki/index.php?title=Manual:Hardware Note the peak voltages, and min voltages.

Beware the DB37. Those pins are not rated for the current or the voltages seen on these. The contact resistance causes all sorts of problem. Your injectors and such loads are inductors, which are separated by the resistance of the wire and connection contact resistance, then connected to a capacative power source. This is commonly called a tank circuit. They like to resonate and cause all sorts of funky RF problems. As well the contact resistance can cause the connector to melt. A better connector would help prevent many longer term problems.

I'll try to comment in more detail over the next couple days. Cool to see you making progress and doing cool things.
Welcome to the friendlier side of internet crazy :)
mck1117
running engine in first post
running engine in first post
Posts: 1494
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Wreck Racing rusEfi Board

Post by mck1117 »

kb1gtt wrote:Some feedback. Also keep in mind anything I can do can do nothing more than make it stronger :)

Generally you want a ground flood. Barriers on floods is very rarely any better than a full flood. You should spend more time placing the chips, then placing the traces. See this page for some suggestions, http://rusefi.com/wiki/index.php?title=Manual:Hardware:PCB_design_rules specifically this maxim app note. https://www.maximintegrated.com/en/app-notes/index.mvp/id/5450 take note about the pretty pictures about half way down, which show how currents start to follow traces at about 1kHz. This routing is critical for avoiding issues.
Yeah, I have ground on the back, and +5v on the front. I've made an attempt to get ground in between signals on the back, but not really on the front. I've considered switching to a 4 layer board, but the price jump is pretty steep. I may try starting over from scratch on the layout, and see what happens. I can go up to a full 10x10 cm before the next price jump, and I'm currently at only 8.9x7.9cm. I'm also not terribly happy about the super long analog traces running down the back of the board to the MCU.

edit: I suppose the question I meant to ask here is: Ground plane on the front or back? Should I then have a 3.3v/5v plane on the other?
kb1gtt wrote:Also I was surprised at how dirty the 12V really is. When you blow a head light, you get load dumps, as well you can have an alternator fail which can create a sustained over voltage surge situation, and there is of course the low voltage of cold cranking in cold weather. Getting a proper 5V regulator is hard. See notes found here about an automotive 5V supply. http://rusefi.com/wiki/index.php?title=Manual:Hardware Note the peak voltages, and min voltages.
Any notes on switching vs. linear if you aren't drawing a huge amount of power, and minimizing cost is your primary goal?
kb1gtt wrote:Beware the DB37. Those pins are not rated for the current or the voltages seen on these. The contact resistance causes all sorts of problem. Your injectors and such loads are inductors, which are separated by the resistance of the wire and connection contact resistance, then connected to a capacative power source. This is commonly called a tank circuit. They like to resonate and cause all sorts of funky RF problems. As well the contact resistance can cause the connector to melt. A better connector would help prevent many longer term problems.
I'm aware that the DB37 is inadequate. That was as a temporary solution so that I don't have to cut the existing Megasquirt compatible harness up until I'm ready to permanently switch. The footprint on the board is for a two bay Molex Stac64 automotive connector.
Rhinoman
contributor
contributor
Posts: 256
Joined: Thu Sep 24, 2015 2:14 pm
Location: Wiltshire, UK

Re: Wreck Racing rusEfi Board

Post by Rhinoman »

kb1gtt wrote:See notes found here about an automotive 5V supply. http://rusefi.com/wiki/index.php?title=Manual:Hardware Note the peak voltages, and min voltages.
I think there is a mistake there, load dump is 100V repetitive a 0.5R source not a 50R source, if your alternator is clamped then you only need to survive 45V which means that you don't need additional circuitry, automotive regulators are usually 45V silicon.

If you are only drawing a relatively small amount of current then I would stick with a linear regulator rather than a switcher because switchers can cause a lot of EMC issues if they are not properly filtered and proper filtering takes a fair bit of board space. You have an alternator so a few extra mAs aren't an issue while running, the shutdown current is the more important consideration.
The ISO requirement for 7V minimum is based on old technology - a 4.75V minimum voltage for silicon plus a couple of volts for an LDO plus a tolerance. Many manufacturers now specify much lower cranking voltages - VW require 2.5V minimum for a very short period for powertrain components, although this is mostly driven by the need to be able to start diesel engines in very cold temperatures.
User avatar
kb1gtt
contributor
contributor
Posts: 3759
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Wreck Racing rusEfi Board

Post by kb1gtt »

Per this pdf http://www.smd.ru/upload/medialibrary/a3d/iso_7637_2.pdf page 10 and 14, it notes the below. This is why I think it's 50 ohms and 100V.
ISO_snippet.PNG
ISO_snippet.PNG (67.91 KiB) Viewed 14478 times
ISO_snippet_100V.PNG
ISO_snippet_100V.PNG (60.06 KiB) Viewed 14478 times
Also keep in mind that a linear regulator with out the proper filters can oscillate as well. In this video at about 1:20, he shows it oscillating with a 10V supply. You can get EMC issues with both switching or linear regulators which are not properly designed.
Welcome to the friendlier side of internet crazy :)
User avatar
kb1gtt
contributor
contributor
Posts: 3759
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Wreck Racing rusEfi Board

Post by kb1gtt »

mck1117 wrote:I suppose the question I meant to ask here is: Ground plane on the front or back? Should I then have a 3.3v/5v plane on the other?
These are not easy answers. It depends on a bunch of things. For automotive I would generally suggest all unused area's be used for GND flood. If you are getting into RF circuits, it's common that you also put the traces on the internal layers such that you can put a GND flood on the front, and back, with the traces in the middle. However for industrial and lower frequency boards, you generally have a GND plane and Power plane internal and signal traces on the outer layers. Also your GND plane in the PCB stack up is usually say layer 3 of 4, with 1 being the top. Then your analog stuff would be on layer 4, and your digital on layer 1. The FR4 between 3 and 4 is like 0.015 thick, while the FR4 between 1 and 8 is like 0.063 thick. This helps isolate the analog from the digital. Also your digital traces should be analyzed for where the currents are flowing, such that you can steer the RF away from other sensitive components.
mck1117 wrote:Any notes on switching vs. linear if you aren't drawing a huge amount of power, and minimizing cost is your primary goal?
Also not an easy answer. Proper design is the more important question. The switching regulator we have on Frankenso is something like $2. Is it really important if you could drop that to something like $1.50? If this was a high qty, sure that matters. But for low production, I think the extra cost is fine. As well it's far more energy efficient, so less watts dissipated by the ECU. In the case of Frankenso for like $2, we provided a 3A 5V supply, but we typically only consume like 0.125A. If we dropped the current requirement we could make the regulator for like $0.50 cheaper, but then that part of the design is not usable in other efforts. So I guess it depends on your Non-Recurring Engineering (NRE) costs. I designed the regulator we have once, and plan to use it on many projects. I'm a fan of this until you hit high qty. Then I would re-evaluate, and would probably stay with a switcher. Pretty much all purchased products use switchers, this is done for some good reasons.
mck1117 wrote:The footprint on the board is for a two bay Molex Stac64 automotive connector.
The cost of a good connector is stupid expensive. Typically it costs almost as much as the assembled PCB board. It's just a blob of plastic with some metal in it. We have found a VW connector which can come with a pigtail harness. It was sourced from china and cost something like $20 to $50 each. If we spin something that is not a salvaged connector and salvaged pigtail, I would suggest considering that connector. I think it was water tight as well.
Welcome to the friendlier side of internet crazy :)
User avatar
kb1gtt
contributor
contributor
Posts: 3759
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Wreck Racing rusEfi Board

Post by kb1gtt »

Also this video shows how Linears and switchers are very similar.
Welcome to the friendlier side of internet crazy :)
Rhinoman
contributor
contributor
Posts: 256
Joined: Thu Sep 24, 2015 2:14 pm
Location: Wiltshire, UK

Re: Wreck Racing rusEfi Board

Post by Rhinoman »

kb1gtt wrote:Per this pdf http://www.smd.ru/upload/medialibrary/a3d/iso_7637_2.pdf page 10 and 14, it notes the below. This is why I think it's 50 ohms and 100V.
ISO_snippet.PNG
ISO_snippet_100V.PNG
Also keep in mind that a linear regulator with out the proper filters can oscillate as well. In this video at about 1:20, he shows it oscillating with a 10V supply. You can get EMC issues with both switching or linear regulators which are not properly designed.
That's the LISN, its across the power supply which already has a very low impedance, the 50R is in series with the cap and across the supply so its impedance is not presented to a DC source, the LISN is intended to ensure that tests are repeatable irrespective of the power supply used. In a load dump test which, for 12V, has a peak voltage of around 100R there is a source resistance of 0.5R minimum which means that the peak current into the ECU can be very high during clamping. Chips intended for the front end of 12V circuits are usually 45V silicon and clamping is performed at around 40V so you're looking at around 120A peak which is the usually the worst case over all the tests. I'm pretty sure that the full specs can be found on-line, I may have a copy of them filed somewhere; they are the legal minimum requirement and manufacturers often specify harsher tests, like 100 load dump repetitions instead of something like 5 and using the maximum amplitude and maximum length.

A linear regulator usually only needs the correct value capacitor on the output to ensure stability. A switcher usually needs pre and post LC filters to remove conducted emissions and very careful choice of FETs, resistors and layout to avoid radiated emissions issues. A linear cap is an analogue device and the currents are slow to change, a switcher always has high frequency components.
I have had an oscillating linear before when the required ESR value was not quoted in the datasheet and a ceramic output cap had been used, the quick fix was to switch to an alternative from a different manufacturer.
Rhinoman
contributor
contributor
Posts: 256
Joined: Thu Sep 24, 2015 2:14 pm
Location: Wiltshire, UK

Re: Wreck Racing rusEfi Board

Post by Rhinoman »

Test pulse 1 is a reverse voltage test, the voltage is -100V. Also note that Ri is separate from the resistor in the LISN and is in series with the battery voltage so the current into the ECU is limited to -2A maximum.
User avatar
kb1gtt
contributor
contributor
Posts: 3759
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Wreck Racing rusEfi Board

Post by kb1gtt »

I should probably add some more pictures to the wiki to indicate what kinds of tests and such it should survive. The noted Maxim app note shows 100V forward pulse. Is this app note and ISO standard overly conservative, or is this a typical and good design spec? Is this Maxim and ISO standards good for Wreck Racing's board design? I guess that's a decision for @mck1117. I'll suggest that they are good items to design for, as I see them as low costs protections. You say that OEM's use 45V, so these specs might be excessive, and he might be able to use less front end protection. Less front end protection would certainly help decrease assembly costs. I don't think he's crazy concerned about EMC issues. An OEM would be concerned, but someone building their own board probably is not that concerned. So I'm not sure if filters before and after are that big of a deal for him.
Attachments
Capture.PNG
Capture.PNG (66.45 KiB) Viewed 14464 times
Welcome to the friendlier side of internet crazy :)
Rhinoman
contributor
contributor
Posts: 256
Joined: Thu Sep 24, 2015 2:14 pm
Location: Wiltshire, UK

Re: Wreck Racing rusEfi Board

Post by Rhinoman »

[quote="kb1gtt"]I should probably add some more pictures to the wiki to indicate what kinds of tests and such it should survive. The noted Maxim app note shows 100V forward pulse. Is this app note and ISO standard overly conservative, or is this a typical and good design spec? Is this Maxim and ISO standards good for Wreck Racing's board design?quote]

That is pulse 5A and 5B which I was referring to. Approx. 100V is correct, the alternator and electrical system are designed to meet this requirement, there are several different levels and durations and the vehicle manufacturer will state which to use or will impose a more stringent requirement, on a generic ECU the maximum amplitude and longest duration should be considered. The Maxim app note is based on the ISO standard, the ISO standards are all intended to replicate the type of conditions that are present on a vehicle so every ECU should meet them. An engine ECU is one of the few modules that has to operate through load dump and is often the main load dump protection on a vehicle so it protects other electrical components as well. If its a racing vehicle then it may not be important, on a road vehicle then its considered highly dangerous if a vehicle stops suddenly on the highway.

On all these tests the voltages are measured open circuit so you need to read the ISO spec to determine what the source resistance (Ri) is for that test because it can make a big difference to the voltages seen at the ECU. Test pulse 1 that you posted above has a fairly large source resistance so a good part of the pulse can be lost across the source resistance and the input caps, the rest is usually clamped by the TVS on the input. Test pulse 1 isn't really a stress test, its intended to ensure that the ECU does not reset when a solenoid switches off and places a short negative spike on the power rail.
User avatar
kb1gtt
contributor
contributor
Posts: 3759
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Wreck Racing rusEfi Board

Post by kb1gtt »

On Frankenso R0.5, I added some circuitry which can sustain a 200V voltage potentially indefinitely. I'm not sure when it would hit a thermal limit. Basically the front end chip keeps the down stream side at 28V, then the rest of the regulator can survive a 28V spike, with out any abnormal stuff going on. When it exceeds 28V, the front end MOSFET will absorb a bunch of heat as it drops the voltage to 28V. So this could potentially be 3A at 170V, which would be lots of watts. In reality it would be more like 0.125A at 170V, for 21W. You could sustain this until the watts make the board to hot. If you have a 200V spike, you have some other issues. So the ECU should survive. Any how R0.4 is perhaps a bit weak about these spikes, and the regulator on R0.5 is expected to be more robust.
Welcome to the friendlier side of internet crazy :)
mck1117
running engine in first post
running engine in first post
Posts: 1494
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Wreck Racing rusEfi Board

Post by mck1117 »

kb1gtt wrote: The switching regulator we have on Frankenso is something like $2. Is it really important if you could drop that to something like $1.50? If this was a high qty, sure that matters. But for low production, I think the extra cost is fine.
Actually, because it's low quantity I think the opposite is true. The consensus for the GRM Challenge is that it's frowned upon to buy 100 of something to get the volume discount, then only use one. So we really only care about the single quantity of 10 unit pricing. I don't intend to build this board to be for sale, only small quantity self-assembly. Using the linear reg I have currently saves about $4-5 in single qty from Digikey. With it being a racecar, and we aren't pulling enough power for the efficiency to matter, I'm not sure that the switcher is worth the cost.
kb1gtt wrote:The cost of a good connector is stupid expensive.
Yeah, it is. I found a few that looked great, had the right number/type of pins, right size, only to find out that they're $75 each.

That Molex is only around $15 for both board mount halves, and both plugs. The pins are cheap. It isn't waterproof, but again, it's a racecar, so we're willing to relax some of the requriements like environmental protection, because we have more control about how and where the ECU is mounted.
kb1gtt wrote:circuitry which can sustain a 200V voltage potentially indefinitely
That circuitry (Q1002, R1003, D1002) is just functions as a poor man's high voltage linear regular, right? This + a TVS should fit on the board. I think the cost of the voltage protection is probably more worth it than switching to an SMPS.
User avatar
kb1gtt
contributor
contributor
Posts: 3759
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Wreck Racing rusEfi Board

Post by kb1gtt »

The LM2596 can be purchased on ebay for about $0.40 in qty 1 and on an assembled board.
http://www.ebay.com/itm/Buck-Converter-Step-Down-Adjustable-Converter-Power-Module-Regulator-LM2596-New-/262830204743?hash=item3d31e6a747:g:uj0AAOSw3ydVxXc~

Just the chip costs about $1 in qty 2.
http://www.ebay.com/itm/2PCS-SMD-TO-263-LM2596S-3-3-chip-switching-regulator-3A-3-3V-/252021579431?hash=item3aada81ea7:g:iCwAAOSwYlJW3kb6

Sky-Macau will sell you the regulator and the inductors for small $
http://www.sky-macau.com/Products/All-C92/LM2596S-50-LM2596-Simple-Switcher-Power-Converter-5V-150-KHZ-3A-Step-down-Voltage-Regulator-TO-263-P6841999795.html

On Frankenso, we have a more refined version, lower EMI, more optimal efficiency and a bunch of extra stuff. We order in qty 5 to 10'ish from china assembly, and we pay about $2 for this part of the assembled board. If you buy in qty 1 at digikey, it costs something like $20. So we just don't do that.

Yes on Frankenso R0.5, R1003, D1002 and Q1002 are basically a 19V output with a 200V input linear regulator. When the input is below 19V, this is basically just a wire. Most normal linear regulators are only good for around 50V. So this one at 200V is much higher voltage than a typically linear regulator. I wish it was a poor-mans linear regulator. It's not as low cost as the other components. See SuperTek app note found here http://ww1.microchip.com/downloads/en/AppNotes/AN-D66.pdf
Welcome to the friendlier side of internet crazy :)
Rhinoman
contributor
contributor
Posts: 256
Joined: Thu Sep 24, 2015 2:14 pm
Location: Wiltshire, UK

Re: Wreck Racing rusEfi Board

Post by Rhinoman »

mck1117 wrote: It isn't waterproof, but again, it's a racecar, so we're willing to relax some of the requriements like environmental protection, because we have more control about how and where the ECU is mounted.

That circuitry (Q1002, R1003, D1002) is just functions as a poor man's high voltage linear regular, right? This + a TVS should fit on the board.
You don't need a waterproof case if its fitted inside the vehicle, not many ECUs are waterproof, its an unnecessary expense and vehicle manufacturers beat down every cent.

To pass the ISO load dump test all you need is a 27 TVS in an SMC package and a 45V capable regulator, its simple but its been well proven over many years. The TVS across the front end will also take care of short duration negative spikes - you need to ensure that the tracking is robust enough to survive a reverse battery connection until the fuse blows and use a reasonable amount of copper around the TVS to heat sink it. You need a 36V device because the forward voltage increases quite a bit when you have a large current flowing through it.
Post Reply