Arduino as ECU?
#181
I think you'd lose developers if you switched to C#. Check out this arm-based arduino clone:
http://leaflabs.com/
http://leaflabs.com/
My current ARM platform is the lovely mBED, but that is another project
#182
Is it possible to build fast accurate hardware timers in a CPLD device?
http://hackaday.com/2008/12/11/how-t...-devices-cpld/
I am wondering would it be possible if you built something like the above and have the CPLD do the time critical tasks of ignition and injection timing and leave the arduino to read A2Ds perform the calculations for injection time and ignition advance and transfer this to the CPLD. (Maybe with a parallel bus?)
Where I am getting at is you abstract all the timing critical tasks out of the Arduino and leave the "fun" stuff for a larger spectrum of enthusiasts to play with, within the Arduino development environment?
http://hackaday.com/2008/12/11/how-t...-devices-cpld/
I am wondering would it be possible if you built something like the above and have the CPLD do the time critical tasks of ignition and injection timing and leave the arduino to read A2Ds perform the calculations for injection time and ignition advance and transfer this to the CPLD. (Maybe with a parallel bus?)
Where I am getting at is you abstract all the timing critical tasks out of the Arduino and leave the "fun" stuff for a larger spectrum of enthusiasts to play with, within the Arduino development environment?
Ideally the custom electronics should be no more than a simple board with a few discrete components that sit between the miata ECU plug (engine side) and the Arduino
#183
I totally agree than we need to move the project to GITHub, but as I'm currently Job Hunting I'm not able to spend any time on this project. Also I want to freeze the current code base, as I think I've come up with a much better way to implement it. My current timing model is a little too complex, and I think we could actually use a much simpler one freeing up a lot of CPU time
#184
I local garage had a '93 MX5 write-off in and I picked up the ECU for £20. My car is a '91 but I think the computers are compatible... This ECU is a B63H... I figured that even if the board was not compatible I would at least have an ECU Plug that I could use to make an Arduino->MX5 Loom adaptor.
But opening it up, it seems I lucked out! Someone has socket mounted the CPU (and mounted a Turbo daughterboard- Help identifying this would be good)... So If I could figure out the Pinout of the MX5's CPU I could interface the ECU with the Arduino much more simply and get some real world testing done.
I am aware that the CPU is some custom 6800 (Marked MP5270 in my attached photo)... but trying to find details of it is hard.
-Edit- All the chips on the daughter board have had their markings blacked out, I have tried to remove the ink, but to no avail :(
-Edit2- Googling around suggests the CPU might be a MC68HC908AP64... reading the datasheet now...
But opening it up, it seems I lucked out! Someone has socket mounted the CPU (and mounted a Turbo daughterboard- Help identifying this would be good)... So If I could figure out the Pinout of the MX5's CPU I could interface the ECU with the Arduino much more simply and get some real world testing done.
I am aware that the CPU is some custom 6800 (Marked MP5270 in my attached photo)... but trying to find details of it is hard.
-Edit- All the chips on the daughter board have had their markings blacked out, I have tried to remove the ink, but to no avail :(
-Edit2- Googling around suggests the CPU might be a MC68HC908AP64... reading the datasheet now...
Last edited by bloodline; 03-14-2011 at 07:01 AM.
#185
Junior Member
Join Date: Feb 2007
Location: 11368 miles from where i would like to be
Posts: 269
Total Cats: 92
Screw this, mannnnnnnn, swap in a 4and1 disk instead of the DSM style disk and you can run FreeEMS RIGHT NOW :-) On a 4 cyl you can run wasted spark and sequential OR COP/CNP and semi sequential/bank injection. In a few weeks I'll have added the DSM/Miata decoder and you'll be able to run them like that without the disk swap. On any hardware you want. Without restriction. Free. Libre. Gratis.
Fred.
Fred.
#186
Elite Member
iTrader: (10)
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,978
Total Cats: 356
If they really wanted to run something off the shelf or somewhat ready, they would have installed a PNP Megasquirt or assembled a DIY V3 board and they would be golden by now. The point of this thread is that they want to do something completely on their own.
#187
Junior Member
Join Date: Feb 2007
Location: 11368 miles from where i would like to be
Posts: 269
Total Cats: 92
Urr, which drugs are you smoking dude? Next time I'm having a bad day I'd like to be that far away from the truth. There is nothing off-the-shelf about FreeEMS, what-so-ever, it's 100% DIY... to the core, to the grave.
#188
I'm not asking if you can, for free, unrestricted. I'm asking if you *have* to. As Reverant said, it wasn't about installing someone else's work on their cars. This is about building something completely from the ground up 100% on their own.
Now take your shitty attitude and go **** yourself with it.
#189
Junior Member
Join Date: Feb 2007
Location: 11368 miles from where i would like to be
Posts: 269
Total Cats: 92
Do you have to write the code for it? Is it *THAT* DIY?
I'm not asking if you can, for free, unrestricted. I'm asking if you *have* to. As Reverant said, it wasn't about installing someone else's work on their cars. This is about building something completely from the ground up 100% on their own.
Now take your shitty attitude and go **** yourself with it.
I'm not asking if you can, for free, unrestricted. I'm asking if you *have* to. As Reverant said, it wasn't about installing someone else's work on their cars. This is about building something completely from the ground up 100% on their own.
Now take your shitty attitude and go **** yourself with it.
Fred.
PS, you may have mistaken me for a noob, think again.
#190
E-thug is thuggish.
PS, you may have mistaken me for a noob, think again.
#191
Junior Member
Join Date: Feb 2007
Location: 11368 miles from where i would like to be
Posts: 269
Total Cats: 92
No, not at all.
Thanks for that, I quoted you elsewhere, I hope you don't mind. I need to document the process that you're at the beginning of for the benefit of others. I find MegaSquirt* incredibly dull, because I understand it on every level. You'll have your epiphany eventually, don't worry :-)
No, not sensibilities, nor abilities, nothing injured or insulted.
Bingo, here is the part that IS confusing, I didn't! I'm not sure what you read or thought you understood. Whatever it is, though, it's irrelevant.
The only "mistake" I made here is believing that this behaviour from you both has anything to do with forum social pecking order, which can't be argued, because it is purely subjective.
Fred.
Bingo, here is the part that IS confusing, I didn't! I'm not sure what you read or thought you understood. Whatever it is, though, it's irrelevant.
The only "mistake" I made here is believing that this behaviour from you both has anything to do with forum social pecking order, which can't be argued, because it is purely subjective.
Fred.
#192
I local garage had a '93 MX5 write-off in and I picked up the ECU for £20. My car is a '91 but I think the computers are compatible... This ECU is a B63H... I figured that even if the board was not compatible I would at least have an ECU Plug that I could use to make an Arduino->MX5 Loom adaptor.
But opening it up, it seems I lucked out! Someone has socket mounted the CPU (and mounted a Turbo daughterboard- Help identifying this would be good)... So If I could figure out the Pinout of the MX5's CPU I could interface the ECU with the Arduino much more simply and get some real world testing done.
I am aware that the CPU is some custom 6800 (Marked MP5270 in my attached photo)... but trying to find details of it is hard.
-Edit- All the chips on the daughter board have had their markings blacked out, I have tried to remove the ink, but to no avail :(
-Edit2- Googling around suggests the CPU might be a MC68HC908AP64... reading the datasheet now...
But opening it up, it seems I lucked out! Someone has socket mounted the CPU (and mounted a Turbo daughterboard- Help identifying this would be good)... So If I could figure out the Pinout of the MX5's CPU I could interface the ECU with the Arduino much more simply and get some real world testing done.
I am aware that the CPU is some custom 6800 (Marked MP5270 in my attached photo)... but trying to find details of it is hard.
-Edit- All the chips on the daughter board have had their markings blacked out, I have tried to remove the ink, but to no avail :(
-Edit2- Googling around suggests the CPU might be a MC68HC908AP64... reading the datasheet now...
Oooh, that's interesting. I've never seen that daughtercard before. The only one I've seen before this one is the board from Grid in Japan (http://www.grid.co.jp/direct/direct150.htm).
The only other thing I can tell you about that ECU is that it's not a USDM one. There's no barometric sensor. I know the Japanese ECU's don't have barometric sensors, but I don't know about the European units.
#193
I local garage had a '93 MX5 write-off in and I picked up the ECU for £20. My car is a '91 but I think the computers are compatible... This ECU is a B63H... I figured that even if the board was not compatible I would at least have an ECU Plug that I could use to make an Arduino->MX5 Loom adaptor.
But opening it up, it seems I lucked out! Someone has socket mounted the CPU (and mounted a Turbo daughterboard- Help identifying this would be good)... So If I could figure out the Pinout of the MX5's CPU I could interface the ECU with the Arduino much more simply and get some real world testing done.
I am aware that the CPU is some custom 6800 (Marked MP5270 in my attached photo)... but trying to find details of it is hard.
-Edit- All the chips on the daughter board have had their markings blacked out, I have tried to remove the ink, but to no avail :(
-Edit2- Googling around suggests the CPU might be a MC68HC908AP64... reading the datasheet now...
But opening it up, it seems I lucked out! Someone has socket mounted the CPU (and mounted a Turbo daughterboard- Help identifying this would be good)... So If I could figure out the Pinout of the MX5's CPU I could interface the ECU with the Arduino much more simply and get some real world testing done.
I am aware that the CPU is some custom 6800 (Marked MP5270 in my attached photo)... but trying to find details of it is hard.
-Edit- All the chips on the daughter board have had their markings blacked out, I have tried to remove the ink, but to no avail :(
-Edit2- Googling around suggests the CPU might be a MC68HC908AP64... reading the datasheet now...
#194
After reading the datasheet, it looks like the 68HC9 is a pretty standard 6800 in a 42pin package with a bunch of GPIO and 8 analogue inputs.
Now a question for the hardware guys, if I remove the CPU (and the daughterboard), then test the signal between a pin on the ECU plug and a pin on the CPU socket, will I be able to see what is connected to what... Given the very small amount of logic on the mainboard and the high IO count of the CPU, I am going to assume that for many pins there will be a 1:1 relationship between at least some of the signals on the CPU plug and the ECU plug... Can I assume this? Really, I would prefer if someone had a schematic for the ECU... Any joy?
Now a question for the hardware guys, if I remove the CPU (and the daughterboard), then test the signal between a pin on the ECU plug and a pin on the CPU socket, will I be able to see what is connected to what... Given the very small amount of logic on the mainboard and the high IO count of the CPU, I am going to assume that for many pins there will be a 1:1 relationship between at least some of the signals on the CPU plug and the ECU plug... Can I assume this? Really, I would prefer if someone had a schematic for the ECU... Any joy?
#195
After reading the datasheet, it looks like the 68HC9 is a pretty standard 6800 in a 42pin package with a bunch of GPIO and 8 analogue inputs.
Now a question for the hardware guys, if I remove the CPU (and the daughterboard), then test the signal between a pin on the ECU plug and a pin on the CPU socket,
Now a question for the hardware guys, if I remove the CPU (and the daughterboard), then test the signal between a pin on the ECU plug and a pin on the CPU socket,
The best way is to slowly work backwards from the ECU connector and reverse engineer the complete schematic.
I actually was planning to do this for the whole ECU anyway, mainly because I am interested in comparing the hardware input / output circuits and components we use in megasquirts to what was chosen for the OEM design. (And compare design margins etc...)
Should receive an ECU any day now hopefully and I will start, ill will take a photo of the PCB when I get it, I wonder how many variants of ECU there might be and how much they will differ internally?
#196
I've spent a little while reverse engineering some of the circuits. You do have to be careful "copying" circuits from the OEM ECU to the megasquirt. You have to take the entire MS as a whole, and realize that there's more to it than just a bunch of individual circuits.
For instance, the OEM ECU uses a 10k resistor along with two caps to filter the AFM signal. The megasquirt suggested circuit for a MAF is a 2.2k resistor and two caps. If you compare the circuits you'll see that the OEM circuit has quite a bit more smoothing, which makes sense. However, if you look at the datasheet for the megasquirt's CPU, you'll see that they warn against using any resistor 10k or higher on the analog inputs, otherwise it could affect the timing of the readings.
For instance, the OEM ECU uses a 10k resistor along with two caps to filter the AFM signal. The megasquirt suggested circuit for a MAF is a 2.2k resistor and two caps. If you compare the circuits you'll see that the OEM circuit has quite a bit more smoothing, which makes sense. However, if you look at the datasheet for the megasquirt's CPU, you'll see that they warn against using any resistor 10k or higher on the analog inputs, otherwise it could affect the timing of the readings.
#197
Its not really that easy to determine by simple probing: EG inputs might have common pullups, which means simple probing would find they are all sort of connected together. Output drivers are not going to have a testable connection between the uC pin and the connector pin.
The best way is to slowly work backwards from the ECU connector and reverse engineer the complete schematic.
I actually was planning to do this for the whole ECU anyway, mainly because I am interested in comparing the hardware input / output circuits and components we use in megasquirts to what was chosen for the OEM design. (And compare design margins etc...)
Should receive an ECU any day now hopefully and I will start, ill will take a photo of the PCB when I get it, I wonder how many variants of ECU there might be and how much they will differ internally?
Should receive an ECU any day now hopefully and I will start, ill will take a photo of the PCB when I get it, I wonder how many variants of ECU there might be and how much they will differ internally?
If I can help in any way then let me know.
If I can use my spare ECU as an interface between the Engine and the Arduino, I can do some real testing of my software