Spudmn's Puma board build

All home-built FreeEMS implementations without a forum of their own, usually TA-based.
User avatar
Spudmn
LQFP112 - Up with the play
Posts: 232
Joined: Thu Feb 10, 2011 12:27 am
Location: Auckland, NZ

Re: Spudmn's Puma board build

Post by Spudmn »

Thanks to jharvey I now have his old Puma.

The plan is to try and get my board working by using his one as a working reference.

But over the Xmas break I am going to try and get it running on my car.

I have made a bench mounted missing tooth wheel out of an old hard drive.

Image

It is working great and I am getting RPM signals showing up on MTX when I spin it.

I am now starting to add the components I need for a wasted spark ignition.
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

Spudmn! Bad news, there are issues with the missingteeth stuff, not directly, but in the related code, and I'm unable to debug it until after xmas day sometime, hopefully before new years. I hope that's not too big a deal for you. You should still proceed to wire things up and get it ready, however don't attempt to run the car with it until I give you the green light. This is my highest priority right now, and I'll be doing it as soon as humanly possible, as there are two other vehicles waiting to run using that code too. I'm blocking all of you. My most humble apologies, there will be a solution in the next few weeks, somehow, I promise.

I LOVE the HDD idea! Brilliant, can you please do a thread on that in some other section as I might try to replicate your efforts here. More pics, some vids? Pretty please? Swap you for some working missing tooth code? lol :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Spudmn
LQFP112 - Up with the play
Posts: 232
Joined: Thu Feb 10, 2011 12:27 am
Location: Auckland, NZ

Re: Spudmn's Puma board build

Post by Spudmn »

The weather in NZ has been very wet for our summer Xmas break so I have been making some good progress on the Puma board.

Fred and I have been trying to find a bug in the missing teeth code. I found one problem but there is still couple of other problems. An ignition event set to 360 doesn't work on Pin 1. I also have seen the code crash and RPM interrupts taking a lot longer than they should. I haven't been able to get a log of that yet and when I do I will let Fred know.


I was getting some strange spikes on my Logic Analyser only on the XOR outputs. It turned out that I had left some of the unused inputs open because I had not fitted the 1K resistors.

Today I started working on the FET outputs for the ignition. I am driving a J722T Mitsi Amp. As far as I can tell the inputs need 5V. They might take 12V but it works on 5 and I don't want to blow anything up. It was a bit confusing with all the BOM changes and but I worked out a circuit that pulls the output to 5V.

I was stumped for a while as to why the output wasn't working. Then I found that the ignition GND was separate from the power GND and I had left it floating. With that sorted I am now getting lots of nice sparks.

I will post my circuit here soon.
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

Re the "crash" it's not a crash unless it locks solid. If you spun it to a high RPM then yes, things would take longer because you literally run out of processing time. This is a known flaw, however I'm surprised that you got that high with 8-1. The only thing that can cause something like that is a runaway interrupt, not being cleared or being set too often. There are only a handful of interrupts enabled and the chances of that are slim to none, though I don't doubt what you saw, I'm super curious about what the cause was as it doesn't make a lot of sense.

Re the missing event on 360, wording it that way made me realise something. The problems with the code are solved, the problem is with the advice you've been getting. I don't know who this Fred guy is, but he's been giving you bad advice... <runs for cover>

A decoder that is crank based has a 360 span, not 720. A 4 cyl dizzy setup has 180, not 720, and what that means is that the range is zero, up to, but NOT including 360. Hence if you set it at 360, you'll get exactly nothing.

Additionally, you emailed me this:

Code: Select all

anglesOfTDC[0] = 0 * oneDegree; // 1 and 4
anglesOfTDC[1] = 180 * oneDegree; // 2 and 3
anglesOfTDC[2] = 360 * oneDegree; // 1 and 4
anglesOfTDC[3] = 540 * oneDegree; // 2 and 3
outputEventPinNumbers[0] = 0;
outputEventPinNumbers[1] = 1;
outputEventPinNumbers[2] = 0;
outputEventPinNumbers[3] = 1;
#define cliConfigredNumberOfIgnitionEvents 4
Which is wrong in two ways. And I didn't spot it or tell you. I'm very sorry!

Firstly, because it's 360 based, you only configure two, and they are repeated. If you had a 720 sync, and wanted wasted spark, you'd do it the way you have.

Secondly, as I mentioned above, the correct config is 0, 180, which will get you 4 events at 0, 180, 360, 540, just as you want. I'm sorry that I didn't notice this sooner, but I'm sure you'll agree that it actually makes sense once you think about it.

Also, later, there will be a config check, once it's not hard coded, that is. I think there is a comment somewhere saying "check that X angle isn't greater than Y angle" though I could be wrong.

So, reconfigure and post a glorious pic of the correct wave form :-)

Now, ignitors, they don't need voltage, they need current. You can get them to work from 5v, depending on the model and the coil style, but they may work poorly. My testing showed that 5v with NO series resistance produced about 35mA or so, and that best spark was in the 65 to 150mA range, not attainable from 5v. My truck ran on 5v with MS and about 8mA, however it was always prone to spark plug fowling and no timing lights would work on it LOL. Sparks were not very bright. It only worked because it was CNP, really. Additionally, if you get a voltage drop in some grounding to your ignitor or ecu or both, then you can run into the case where you don't get enough voltage to generate the required current and you get no spark. FreeEMS would have run one more engine if not for that. Thus 12v with a current limit resistor guarantees you a sufficient current at the ignitor (which is a big darlington) and thus sufficient current to the coil. I tested the input and output current during my tests, and past about 100mA there was no increase in current or voltage across the coil, however the difference from raw 5v to limited 12v was significant. I also tested the ignitors I had to 1.5A of input current, and they didn't explode. Reason being, that they're limited internally. So don't be scared. Preston verified these tests over gmail chat at the same time in his workshop. hence the recommendations from us both in the Puma bom. The idea there is to keep the circuit mods simple and roll with a huge fet pulling a resistor low to turn off dwell and the resistr pullin the ignitor input high to turn dwell on. This isn't ideal as when you're idling with low dwell duty the ecu will warm up from heat dissipated in the resistors. No big deal, though. The alternatives are worse, ie, new circuit in perf board or inferior and unreliable performance. I hope this helps.

Lastly, if you wanna roll with 5V, you need to build something to drive it, and it needs to be high side with almost no output resistance, mine used 10 ohms. You can't do the pull up and force down thing with 5v as the resistance values required are too low. The XOR chip has max 10mA per pin, which is NOT enough, esp not with appropriate current limit resistors to protect the XOR.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

Fred wrote:A decoder that is crank based has a 360 span, not 720. A 4 cyl dizzy setup has 180, not 720, and what that means is that the range is zero, up to, but NOT including 360. Hence if you set it at 360, you'll get exactly nothing.

<snip>

So, reconfigure and post a glorious pic of the correct wave form :-)
Thinking again, it may not work, as I'd have expected the 0 one to work for that as well.

What is your decoder offset value? If it's zero, perhaps you found a corner case and setting it to "anything else less than 360" might work fine? Just a thought.

Should be testing this before midnight with some luck.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Spudmn
LQFP112 - Up with the play
Posts: 232
Joined: Thu Feb 10, 2011 12:27 am
Location: Auckland, NZ

Re: Spudmn's Puma board build

Post by Spudmn »

Re the "crash" it's not a crash unless it locks solid. If you spun it to a high RPM then yes, things would take longer because you literally run out of processing time. This is a known flaw, however I'm surprised that you got that high with 8-1. The only thing that can cause something like that is a runaway interrupt, not being cleared or being set too often. There are only a handful of interrupts enabled and the chances of that are slim to none, though I don't doubt what you saw, I'm super curious about what the cause was as it doesn't make a lot of sense.
Sorry I was vague about this. I wanted to get some logs before I went into detail. At the time I thought it was my LA. If it happens again I will let you know.
Now, ignitors, they don't need voltage, they need current
OK. I had already built a 5V version but it will be easier to have a 12V pull up. I will try today.
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

If you've built it, use it. If you have 100 ohms or less, it'll likely work OK. Are you doing the same dodgy thing I recommended for the other puma builders? IE, resistor provides current always and fet pulls it low stealing current from the ignitor to prevent it dwelling? A high side solution is better, that's what my puma has with a transistor each and a 10 ohm just to limit current if bad things happened. If it's working, maybe consider it an upgrade option if you find your spark a bit weak.

No worries about the "crash" thing. The only times I've seen that have been when I've made a code mistake and with the 36-1 @15k rpm which equates to 60k rpm with your setup, in terms of interrupt load. Hence I don't understand how it's happening. Though it could be happening, and if it is, I definitely want to know about it. Thanks for the testing, testing is probably the most valuable contribution anyone could make right now :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Spudmn
LQFP112 - Up with the play
Posts: 232
Joined: Thu Feb 10, 2011 12:27 am
Location: Auckland, NZ

Re: Spudmn's Puma board build

Post by Spudmn »

yep doing dodgy circuit. I will post sch when done.

Changing the settings did not help.

I have been trying different options but still no luck.

I did notice that on one setup the whole wave form got inverted. like the Xor had changed state. That didn't make sense. It might help with debugging.

I get alot of failed flash updates when using FreeEMS loader. Is this a known problem
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Spudmn's Puma board build

Post by Fred »

Spudmn wrote:Changing the settings did not help.

I have been trying different options but still no luck.
OK, I've seen your emails and will investigate tonight before I get to sleep, somehow!
I did notice that on one setup the whole wave form got inverted. like the Xor had changed state. That didn't make sense. It might help with debugging.
Weird. I'll take a look at the logs that you grabbed soon.
I get alot of failed flash updates when using FreeEMS loader. Is this a known problem
I'm unsure, but bug Sean about it on the forum or in IRC or file a bug report on the tracker: http://issues.freeems.org

Try mtxloader, the latest version has some fixes in it, and works pretty well, but does not verify. You can use some other tool to rip into an s19 and visually diff them if you're paranoid.

I've not used Sean's loader for a while. I can't remember why I switched to Dave's tools, but part of it was that Sean was working on a new structure for the app and I wanted to try that.

If mtxloader gives trouble too, then you've got some dodgy serial issues. If not, maybe Sean's app has issues.

Have you moved the FTDI power to USB yet? And installed the transistor to make it work? And removed any large caps from the BDM header?

I feel slightly in the dark about your hw setup right now :-) Excuse my impatience.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply