Hacker News new | ask | show | jobs
by bsimpson 3883 days ago
I'm not an embedded developer, so I don't have much value to add re: architecture; however, this caught my eye:

> The microprocessor has to run for 10+ years in a wide range of temperatures and be dirt cheap, so you end up with specs like 180 MHz, 4 MB of flash and 128 KB of RAM.

If I'm paying tens of thousands of dollars for a car, how come they're using the cheapest possible components? If tinkerers can ship the Raspberry Pi for $30 per board, inc. a 900Mhz quad-core chip and 1GB RAM, you'd think GM could get components at least that modern for an insignificant cost relative to the car they are controlling.

5 comments

This is because the parts are orders of magnitude more expensive when being put in harsh environments

These "really slow" parts are actually tested and built for much more extreme conditions. For microchips that go into satelites, you even have hand-checked chips that go through a very long (and costly compared to something like a Pi) testing process. Multiply this by all the eletrical components, and you got yourself a lot of things to check.

Put your Raspberry Pi next to a car motor, and it's pretty likely(1) a part will fail in the heat and grime conditions.

(1) actually, I'm not sure about the likelihood, but there's no assurance that it will be fine

> Put your Raspberry Pi next to a car motor, and it's pretty likely() a part will fail in the heat and grime conditions.

Depending on how hot your motor goes, there's a good chance that unshielded Pi will simply de-solder itself into pieces.

Fun harsh environment: I reviewed software a few weeks ago that ran on one of our boards while it was irradiated by a neutron source (I work in aerospace). Radiation has interesting effects on electronics :).
$30 Raspberry Pi (2) reboots itself when exposed to strong light. The RPi line is also totally unreliable, it tends to bug up and/or crash after running for too long.

The car components are made to different spec than consumer electronics (for starters, there are several types of component, depending on what "range of temperatures" you need to operate them in; e.g. the stuff that goes into the traffic lights in northern parts of Europe is not something you buy off Farnell for your hobby project), and they also need to be reliable and tested. Add, of course, the usual graft and overhead.

Another thing is that a engine controller doesn't need a near-GHz quad-core chip and shit ton of RAM. It's not meant to stream HD videos or run Python, it has to run a bunch of feedback loops fast enough. Less powerful chips tend to be cheaper and more reliable.

All good points.

The CPU, Flash and RAM share the silicon die with lots of specialized peripherals like CAN controllers and hardware timer units. There's a lot more on the chip than just a CPU.

Also, cost is king in automotive...

If I'm paying tens of thousands of dollars for a car, how come they're using the cheapest possible components?

Save a dollar on the part, and you make a million cars, how much does that add up to? Or conversely, why spend more than you have to if the quoted specs do the job? What the hell am I going to do with four cores if I follow the well-written description above?

And I'd give your Raspberry Pi a lifespan of about a month if you were to strap it to the firewall of your car while you drive it. Less if you actually powered it up.

You'd do it because the million dollars in parts is peanuts compared to the combined salaries of the engineers who are paid to have the specialized knowledge to do this, and the time it to bring up a new application/car. I know that a million dollars is lowball, but this same principle can be applied to other components and scaled up (to a point).

Potting electronics in epoxy isn't terrifically difficult, and would greatly increase the durability. I'm willing to bet that a potted Beaglebone Black (for its real-time subsystem) would do just fine in my engine bay for a very long time. The hard part would be getting a single large-pin-count plug coming out of it to handle all the inputs.

This point is actually kind of moot because for a long time the ECUs of cars were located in the passenger cabin with wires fed in through a grommet in the firewall.

I'd wager that the cost of replacing this system with some standard real-time platform is so monumental, it won't ever be done. Good luck getting the automotive equivalent of BSPs (board-support packages) running on any system other than this.

Where this gets interesting is when the people who actually know this system die start retiring/exiting the market. There will be a pretty strong incentive to 1) keep reusing the same system with no new development, 2) accept the lead time in training students/etc, or 3) start paying crazy salaries for people to go out of their way to learn it.

Cars are life-critical systems. If GM half-assed it by putting...

> a potted Beaglebone Black (for its real-time subsystem)

...into an actual production car, what happens when the thing breaks down and kills someone? Death, recalls, lawsuits, and massive brand damage.

> This point is actually kind of moot because for a long time the ECUs of cars were located in the passenger cabin with wires fed in through a grommet in the firewall.

Even in the passenger compartment, cars aren't exactly friendly environments for electronics. They have large temperature swings (from a controlled climate to very hot in summer or very cold in winter). So putting it in the passenger compartment doesn't necessarily moot concerns over withstanding extreme environments.

The first point was meant to illustrate that it's not good enough to say that it's okay to not innovate because there's no better hardware available. I'm not suggesting that GM would seriously put a potted development board inside a vehicle. TI can simply produce automotive-grade equivalents for them.

What I'm suggesting is that things like higher sampling rates of input sensors and more composability and reusability can be realized by a newer, more standardized and open approach to hardware.

I would also wager that the outcome of failure would be the same as with the traditional systems. GM shifts the blame onto the ECU development shop that it contracted out to make the hardware or software, or the QE shop that failed to pick up the failure.

Vehicle electronics are typically rated from -40C to 125C, although it's seen that they routinely fail even inside these margins. The BBB for example can have an operating temperature from -40C to 85C. There are also plenty of industrial boards that meet or exceed the requirements of automotive operating environments. Companies such as TI are (in part) releasing development boards (such as the BBB) to try to inspire innovation in these environments. The dev boards themselves aren't rated for it, but the platform can be.

There's a few things at play here.

Economy of scales is huge of course. A lot of the parts are actually shared between many different cars at different price points. There can be on the order of 50+ micro-controller in that car. Do you want to pay 10$ extra for each of them just because they have cooler specs?

The various parts are designed at various times so that car might have controllers for the anti-lock braking system that were designed 5 years ago.

Hard real-time applications (brakes, ECU, etc.) don't magically need more gigahertz, that engine with direct injection only needs to calculate fuel volume maybe 20000 times per seconds (once per cylinder per 2 rpm) and that would probably be a ridiculous upper bound.

In-car navigation and entertainment packages are completely separate from the hardware actually controlling the car.

You'd be surprised at how much "good" software can accomplish. Just think of an 80mhz embedded cpu. You have 80,000,000 calculations per second right there in your hand.

In a side project I was involved in. We were using 60mhz chips to modulate data at 1khz. I kept worrying about running out of cpu cycles, I mean after all, I was doing a few thousand things per second. But in reality, I still had a ton of head room to go :)