Arduino as ECU? - Page 6 - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


ECUs and Tuning Discuss Engine Management, Tuning, & Programming

Reply
 
 
 
LinkBack Thread Tools Search this Thread
Old 10-05-2010, 11:38 AM   #101
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

Quote:
Originally Posted by Techsalvager View Post

Looks a little off compared to the 1.6 cas
off course thats probably fixiable but just giving you a view of the 1.6 disc
I just checked, they encode the same data... If you move my Crank timing sequence to the outer edge, and then invert it, it looks identical to the image you posted

Thank you for posting that, I mst say ou had me scared for a moment
bloodline is offline   Reply With Quote
Old 10-05-2010, 03:43 PM   #102
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

A new Disk, this one has the crank signal inverted and moved to the outer edge:

bloodline is offline   Reply With Quote
Old 10-07-2010, 10:39 AM   #103
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

After quite a bit of testing my code seems to exhibit instability at random RPMs... Has anyone else noticed this, has anyonenelse tested my code?

I will profile my code asap, and see if I can find the issue... Stupid work getting in the way at the moment :(
bloodline is offline   Reply With Quote
Old 10-07-2010, 05:20 PM   #104
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

Ok, my ECU code is fine. It was my simulator code that was wrong
bloodline is offline   Reply With Quote
Old 10-07-2010, 11:15 PM   #105
Junior Member
Thread Starter
iTrader: (3)
 
Join Date: Jun 2008
Location: NJ
Posts: 429
Total Cats: 0
Default

good to hear you're still working on it. if you ship me your arduino i'll test it on my car ;-)
ctxspy is offline   Reply With Quote
Old 10-08-2010, 09:48 AM   #106
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

Quote:
Originally Posted by ctxspy View Post
good to hear you're still working on it. if you ship me your arduino i'll test it on my car ;-)
An Arduino UNO only cost about $20... why not buy one and help out? I'm fine dealing with the software side, I'm quite experienced with software design (although hard realtime systems are quite new to me, and one of the reasons why I wanted to do a project like this), but while I understand the theory behind the electronics to interface with the engine, I have 0 experience and would much like someone with that experience to help out

For a laugh, I ported my code to my mBed board... Wow, this project would be much easier on a super fast mcu
bloodline is offline   Reply With Quote
Old 10-08-2010, 10:18 AM   #107
I'm Miserable!
 
Join Date: Jun 2009
Location: albany, ga
Posts: 1,869
Total Cats: 3
Default

will the uno do what is needed as well and have all the outputs? I may buy one and hook it up to bench setup with a 1.6 cas and ignitor\coils\spark plugs
Techsalvager is offline   Reply With Quote
Old 10-08-2010, 11:04 AM   #108
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

Quote:
Originally Posted by Techsalvager View Post
will the uno do what is needed as well and have all the outputs? I may buy one and hook it up to bench setup with a 1.6 cas and ignitor\coils\spark plugs
The UNO has 14 digital I/O (of which 6 can be used as PWM, crudely put as analog outputs), it also has 6 separate analog inputs (which can also be used as Digital I/O) and a USB link... I'm no hardware expert but that would seem to be enough I/O for our needs.

It has 32k of code memory (more than enough for our needs, my barebones code uses about 4k) and 2k of RAM which is adequate. It runs at 16Mhz, with 1 instruction per cycle, so we can brute force a lot of stuff.

I/O pins 2 and 3 can trigger interrupts... Though I've opted not to use interrupts with my software design.

The I/O system is is all 5volt so spot on for the Mazda electronic system. The more powerful mBed device is all 3.3volt so would be a bit more involved to interface with the 5volt electrical system of the mx5...

I would say it's a fair bit better than the 6800 in the stock ECU.

My code is hardcoded to the mk1 (NA) CAS.

If you look at my code, you can see the input/output pins are configurable, so the software is flexible WRT hardware if need be.

-Edit- If you do get one, then let me know, and I'll send you my latest code.

Last edited by bloodline; 10-08-2010 at 03:49 PM.
bloodline is offline   Reply With Quote
Old 10-10-2010, 07:50 AM   #109
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

I found a dump of the '94 1.6 ECU ROM here:

http://forum.miata.net/vb/showpost.p...&postcount=332

I've been working through it to see if there is anything I can learn. It seems pretty straight forward and I'll build my timing and fuelling maps based on that data, which should give a good safe starting point.

I've also started thinking about a Laptop App to allow ECU parameter adjustment while the ECU is running (MacBook only for the time being, apologies)... that should be quite useful.
bloodline is offline   Reply With Quote
Old 10-10-2010, 10:43 AM   #110
I'm Miserable!
 
Join Date: Jun 2009
Location: albany, ga
Posts: 1,869
Total Cats: 3
Default

good stuff bloodline
Techsalvager is offline   Reply With Quote
Old 10-10-2010, 11:42 AM   #111
Junior Member
Thread Starter
iTrader: (3)
 
Join Date: Jun 2008
Location: NJ
Posts: 429
Total Cats: 0
Default

if you share your spec for communication i can write something in Java or C#
ctxspy is offline   Reply With Quote
Old 10-10-2010, 02:52 PM   #112
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

Quote:
Originally Posted by ctxspy View Post
if you share your spec for communication i can write something in Java or C#
That would be brilliant! I spend most of my days using Objective-C and C++ so I tend to keep my personal projects to those languages (I'm quite comfortable with most Asm languages too, hense my interest in micro controllers)... I will make the communication protocol very simple, we can bash out a spec together at a later date
bloodline is offline   Reply With Quote
Old 10-10-2010, 05:52 PM   #113
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

I popped into my local electronics store to pick up a couple of potentiometers, so I can test my analog code, and bought a piazo transducer... After a quick test, it looks like it would be quite easy to add a knock sensor to this project, would have to run extra wiring from the engine bay though as the existing loom lacks any spare wires :(
bloodline is offline   Reply With Quote
Old 10-14-2010, 11:51 AM   #114
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

I don't know if any one is still interested, but I have moved my injector code over to an interrupt based system, (the old system had a limit to the maximum injector open time) and also the coil dwell time is now adjustable. I will be releasing this new code soon. The project is now at version 0.5

I hope someone will find it useful.
bloodline is offline   Reply With Quote
Old 10-14-2010, 01:04 PM   #115
Junior Member
Thread Starter
iTrader: (3)
 
Join Date: Jun 2008
Location: NJ
Posts: 429
Total Cats: 0
Default

I'm still interested. I don't know that i'll use it on my car presently but it's something i'll follow and help where i can.

If i may humbly suggest -- slow down on your version numbers, as 1.0 is usually reserved for a working product :P
ctxspy is offline   Reply With Quote
Old 10-14-2010, 01:51 PM   #116
I'm Miserable!
 
Join Date: Jun 2009
Location: albany, ga
Posts: 1,869
Total Cats: 3
Default

depends on how someone does their versioning.
Techsalvager is offline   Reply With Quote
Old 10-14-2010, 05:02 PM   #117
Junior Member
 
Join Date: Sep 2010
Location: London, England
Posts: 91
Total Cats: 0
Default

Quote:
Originally Posted by ctxspy View Post
I'm still interested. I don't know that i'll use it on my car presently but it's something i'll follow and help where i can.

If i may humbly suggest -- slow down on your version numbers, as 1.0 is usually reserved for a working product :P
Every time I do a large code rewrite or fundamental change in how the code is structured, I bump the 0.x. All subsequent improvements will bump the 0.0x. The first code that is proven to actually work will get 1.0 version number.

It's my system...
bloodline is offline   Reply With Quote
Old 10-15-2010, 12:25 AM   #118
Junior Member
Thread Starter
iTrader: (3)
 
Join Date: Jun 2008
Location: NJ
Posts: 429
Total Cats: 0
Default

got it. Let me know when you want to start talking about a configuration interface.
ctxspy is offline   Reply With Quote
Old 10-15-2010, 11:42 PM   #119
Newb
 
Join Date: Oct 2010
Posts: 6
Total Cats: 0
Default

still watching this thread!

could you clarify what the CAS is and what that black and white disk is?
josdavlar is offline   Reply With Quote
Old 10-16-2010, 01:11 AM   #120
Junior Member
Thread Starter
iTrader: (3)
 
Join Date: Jun 2008
Location: NJ
Posts: 429
Total Cats: 0
Default

Quote:
Originally Posted by josdavlar View Post
still watching this thread!

could you clarify what the CAS is and what that black and white disk is?
http://lmgtfy.com/?q=what+does+a+cas+do+on+a+miata

are you just trying to build up your post count??
having read your other posts (all on this thread) I can only imagine you're a non-miata guy and you joined this forum because of this thread. That said, please spend 5 minutes before posting questions to do basic research.
ctxspy is offline   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
Raleigh: Fiberglass headlight scope, 1.6L ECU, AFM, Hardtop latches, more bigmackloud Miata parts for sale/trade 13 09-22-2017 01:34 PM
3rd Time's a Charm...hopefully. zephyrusaurai Meet and Greet 2 09-28-2015 11:59 PM
Are my coils failing? viriiguy General Miata Chat 5 09-28-2015 08:39 PM
ME221 Now has Autotune and Long Term Fuel Trim Tables Motorsport-Electronics ECUs and Tuning 0 09-05-2015 09:02 AM


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 05:42 AM.