10 ms·
Speeduino – Arduino based engine management
- anfractuosity 3y agoOut of interest does a typical engine management system used in a car, make use of an MCU which supports lockstep computing, with multiple cores executing the same instructions simultaneously?
- actionfromafar 3y agoNo. (But the MCUs are rather rugged. I would imagine they have a watchdog to catch some error conditions, possibly in hardware.)
- ilyt 3y agoI can imagine bitflip in one of the tables could be pretty dangerous and not catched by watchdog
- Gordonjcp 3y agoNot really. What's it going to do, make the engine run rich for a fraction of a second until the next time it recalculates the mapping?
- ilyt 3y agoMapping is not recalculated in flight, it is loaded from flash (or via obd when tuning) and normally not reloaded till restart. You might have some luck with short/long term trim fixing it, or not. If you're lucky ecu might crash or run rich in that one rpm/load point, if not it might run lean entire highway drive, if say a bitflip happens to flip lambda probe settings to always show mixture being too rich.
- samtho 3y agoYeah, the kinetic energy associated with a running engine (flywheel to entire vehicle mass) makes it rather difficult to stall from a single cycle problem, especially given that it consistently recalculates and checks everything multiple times before the timing signal is sent. The engine feels like it’s running fast, but it’s really slow compared to ECU’s ability to observe it and respond to it. A single missed signal would just result in a misfire.
- Gordonjcp 3y ago> kinetic energy associated with a running engine (flywheel to entire vehicle mass) Like the notoriously hard to stall Citroën 2CVs and Dyanes, where roughly a third of the total weight of the engine was the ridiculous flywheel. They could chirp the tyres in first, second, or third gear if you got all that mass spinning fast enough, not from power but from momentum.
- Already__Taken 3y agoI saw a 30 second segment in something I'm sure was about F1 engines that had something on a dyno and they flipped (while running) from the engine map to an ai predicting the engine timing per-firing and you could hear the thing smooth right out. So no I imagine there's actually quite a lot of wiggle room to be off. Less so if you want it to last a million miles. But 30k?
- ilyt 3y agoWell, yeah on top of one in billion chance of bitflip you'd also have one in million chance that the bitflip would cause it doing something incorrectably wrong. There is a lot of protection in modern engine, like retarding timing when there is a knock or long/short fuel trims to correct for any changes in the sensors.
- samtho 3y agoNope, just automotive grade components and potting goop. A Bosch ECU from a VW New Beetle that I recently repaired has a single Infineon MCU, AMD flash, and Bosch power management ICs. All Audi and VWs recently have drive by wire system that opens the throttle, drives ignition coils, and triggers fuel injectors electrically. It’s not like there is much to go wrong. I did find a very high accuracy, temperature compensated Crystal resonator which makes sense for sending timing signals in a harsh environment.
- pkphilip 3y agoCan any of this be done using an open source design? that is, would it be possible to create open source engine management kits for vehicles?
- jacquesm 3y agoYes, yes, and that's already been done: https://rusefi.com/ https://rusefi.com/ / https://github.com/rusefi/rusefi/wiki/Hardware https://github.com/rusefi/rusefi/wiki/Hardware and others...
- pkphilip 3y agoThank you!
- tyingq 3y agoThere's also a fair amount of open source short of full engine management. Things like read/write into the CAN bus, altering fuel curves without fully taking over the engine computer, burning altered EEPROMs for older ECMs, etc.
- pkphilip 3y agoThank you! Would you know why it is not possible for the entire engine management unit to be fully open sourced?
- ilyt 3y ago
- sidewndr46 3y agoFor a car it'd be kind of overkill. The failure mode of the system is usually something like "throttle position sensor value out of range" due to bad wiring or a bad sensor. So multiple cores doesn't do anything, because you still wind up pulling over to the side of road. Some aircraft do something like what you're thinking but it's actually separate computer architectures running the same code. Now if you go back in time far enough to pre-WWII designed vehicles it was common to have two ignition systems with a massive mechanical lever to switch between "magneto" and "coil" based ignition for gas engines in military engines. Coil driven spark plug systems had advantages but the magneto system was much more reliable by virtue of having no moving parts. Diesels had a slight advantage here in that there was no ignition system as such to fail.
- rainbowzootsuit 3y agoShout-out to the OG of open and DIY engine management systems: MegaSquirt. https://megasquirt.info/history/ https://megasquirt.info/history/ http://www.megamanual.com/MSFAQ.htm http://www.megamanual.com/MSFAQ.htm I participated in the Yahoo group where the early development of this happened and had a car that my friend and I retrofitted. Bowling and Grippo deserve all the credit due for making this in a free and open spirit. The original way one made the kit is to order a board in a group buy, and import a BOM .csv file to digikey to put together your own parts kit. It looks like you can mostly still do the same today.
- ehnto 3y agoI have never used a megasquirt but I was always rooting for them. We also had an underdog here in the form of Nistune, it was and still is just a bloke in his garage. I have to support my locals though, Haltech and Link. They have a recent video on the Haltech YouTube channel of a tour of their facilities. It's no Toyota factory line, but feels very pragmatic and I love that they still do it in house.
- geocrasher 3y agoI got interested in MS and ended up doing a deep dive on fuel injection in general, learning the different types (TBI, MPI, etc) and the different sensors involved (MAP vs MAF and the like) and really just soaking it all in. Around that time a friend was having car problems. He described the symptoms to me. I looked up the type of fuel injection used on that car, which sensors it used etc, and recommended they replace a specific sensor, without ever having even seen the car- all based on my knowledge from Megasquirt. I found out later that it worked, the engine ran much better. It's amazing what a bit of open source knowledge can do :)
- rainbowzootsuit 3y agoYeah back then on the forums people were running just the total gamut of everything gasoline internal combustion with MS [0] and living the dream. Chainsaws and string trimmers [1] up to 2-bar turbos with water injection to inhibit detonation [2], and lots of Jaguar V12s [3]— peak internet. I think I still have a spare MS hotwheels sticker around somewhere. [4] [0] http://www.msruns.com/index.php http://www.msruns.com/index.php [1] http://www.msruns.com/viewtopic.php?t=22666 http://www.msruns.com/viewtopic.php?t=22666 [2] http://www.msruns.com/viewtopic.php?p=145732 http://www.msruns.com/viewtopic.php?p=145732 [3] http://www.msruns.com/viewtopic.php?t=20086 http://www.msruns.com/viewtopic.php?t=20086 [4] http://forum.diyefi.org/viewtopic.php?t=1706 http://forum.diyefi.org/viewtopic.php?t=1706
- fegu 3y agoThis is so cool, a nice push towards low cost repairs and de facto "right to repair" for hobbyists. The MX5 is also a cool and inexpensive test vehicle. Hope more models are added.
- technothrasher 3y agoI had some fun a few years ago developing a replacement circuit for Ferrari 308/Mondial ignition ECUs, and then subsequently the ones for the 328/Mondial 3.2/Testarossa cars. It was interesting to see how crude but still effective the original circuits from the 1980's were, but also how much polish I could give to it while retaining form/fit/function compatibility, using an ARM Cortex-M0 and other modern ICs available to me. One of the biggest updates I was able to do was to add a much more rugged power supply. The original boxes get fried easily by dirty jump starters, pulling the alternator while running, etc. It was pretty easy with the components available now to make a new circuit that protects from all that. The most interesting thing to me was that when I went to a more modern ignition map rather than the crude 8 stepped curve they had originally implemented, while testing showed it produced more power and better emissions, people beta testing for me reported it felt 'too smooth, less fun'. So I went back to the original crude steps <shrug>. Anyway, it was an engaging project that taught me a lot about engine ignition, and I've now sold about 100 boxes and helped keep these old classics on the road.
- rainbowzootsuit 3y agoI definitely have no need for this, but do you have anything published about the project?
- technothrasher 3y agoI don't, unfortunately. I've thought about writing it up but never got around to it.
- lemmiwinks 3y ago> while testing showed it produced more power and better emissions, people beta testing for me reported it felt 'too smooth How hard would it be to made that user-selectable? Because I would guess that some would prefer it that way while driving in the city. Can you send CAN bus commands to the ECU?
- technothrasher 3y ago
- haunter 3y agoOne of my favorite examples https://www.youtube.com/watch?v=iH9lp-Nms-o https://www.youtube.com/watch?v=iH9lp-Nms-o
- slicktux 3y agoThis is awesome!
- Matrix89 3y agoI've used to run my it in my miata, until I've moved to Haltech. Given what it's worth speeduino is a killer in terms of price to performance. IIRC I've moved because speeduino being based on ATMega, doesn't allow for high resolution tables, and overall it's quite basic. My friend used to run megasquirt and while it had more features according to him megasquirt was harder to setup right than speeduino
- lubesGordi 3y agoHow did you learn how to tune (fuel maps, timing, etc)? I was kind of hoping the speeduino docs would have something in there, alas "it does not cover advanced engine tuning, fuel / ignition strategies etc".
- Matrix89 3y agoHonestly I don't know, it's not like I've read some kind of a book. I think it's a combination of reading random articles, docs and watching youtube videos(HPAcademy <3). Obviously having a good understanding of how an engine works is also super useful.
- westmeal 3y agoI can send you some video seminars from this company called high performance academy. They have these paid courses and honestly they've got a lot of free shit on youtube too that is helpful for tuning your VE tables and how to come up with timing figures.
- lubesGordi 3y agoHigh Performance Academy looks great! Thanks for bringing that up.
- rainbowzootsuit 3y agoNot sure on speeduino, but for Megasquirt, you would start with a best guess fuel map based on engine displacement. These are data that can be shared around. Then, to tune precisely to the engine, you datalog the oxygen sensor or fuel ratio sensor in closed-loop and process that data to refine the fuel map. I'm harking back to Megasquirt 1 here so things might be a little different now.
- skypanther 3y agoThis has me thinking, are there any similar projects for antique "dumb" cars? I have a 1940 Chevy with a simple distributor, points, timing, etc that all need tweaking now & then. When any of those are out of tune, it runs rough, starts hard, stinks, and so on. I'm not looking for performance, but more efficient and reliable operation would be wonderful. It would involve a lot more than just an Arduino & some wiring obviously. And a lot of the car's charm is its low-tech originality.
- bayindirh 3y agoI think there are solid state ignition coils which replace distributors. Also, there's at least one Speeduino model which does what you want [0]. [0]: https://wtmtronics.com/product/carbumate/ https://wtmtronics.com/product/carbumate/
- jasongill 3y agoYes, there's lot of projects out there, but most people just use off-the-shelf products. Get yourself electronic ignition (Pertronix is a recommended brand) which replaces points and basically uses solid state electronics to fire the spark plugs, making them run much better and no more messing with points. All engines need timing, but modern distributor-less motors do it automatically; timing should be a set it and forget it thing for the most part. Then your carburetor is likely the issue for running rough, hard to start, etc. You could get a different more modern carburetor, but switching to fuel injection may be the way to go if you just want "turn the key and go". They make fuel injection systems that look and mount just like a carburetor but use more modern tech - look at FiTech, or Holley for solutions. Those are going to require you to add a sensor to the exhaust and a couple sensors around the motor (all included in the kit, but work to add), plus you'll probably need a new fuel pump that can put out much higher pressure (fuel injected cars use ~40-60psi fuel, carburetor is more like 3-5psi). It stinks because it's burning raw fuel and you're not used to the smell of that thanks to today's cars with catalytic converters - they do sell them aftermarket that you could add in to your exhaust system as well. At the end of the day, it's all very possible and there are open source projects like Megasquirt that could be a place to start, but going the open source route will be even MORE "fiddling around" than your current setup, so you may want to look at off-the-shelf EFI conversions. At least do yourself a favor and get Pertronix electronic ignition - it's a total game changer in terms of ease of starting, smoother running, and less hassle, and it doesn't cost much and is easy to do.
- westmeal 3y agoLove speeduino! I'm using it to resuscitate an old 87 corvette in batch injection/ignition mode. Starts up but I've got wayyy more to fix on this old turn.
- mewse-hn 3y agoI'd love to convert my ninja 250 from 1987 over to fuel injection but I don't think I have the electrical expertise to figure it out. There are even throttle bodies available from japan where they had fuel injection much earlier than north america. Oh well.
- ctrlc-root 3y agoHaving gone down the rabbit hole of researching aftermarket ECUs for my cars I've discovered that in the US it's basically illegal to make changes to any part of a street legal car's emission control system which of course includes the ECU. It seems that it has been for several years but the EPA did not enforce the regulation consistently. * https://www.saveourracecars.com/about.html https://www.saveourracecars.com/about.html * https://www.aemelectronics.com/product-legal-restrictions https://www.aemelectronics.com/product-legal-restrictions * https://tiremeetsroad.com/2021/07/13/how-californias-bar-approved-smog-stations-know-you-have-a-modified-ecu-resulting-in-a-failed-smog-test/ https://tiremeetsroad.com/2021/07/13/how-californias-bar-app...