Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   MEGAsquirt (https://www.miataturbo.net/megasquirt-18/)
-   -   MS2 AC Idle Up Code (https://www.miataturbo.net/megasquirt-18/ms2-ac-idle-up-code-60882/)

Braineack 10-20-2011 11:11 AM

looks pretty much like the ms2 one:

select input|output
adder duty
adder delay (0 to 1000ms)
rpm target increase
and tps to disable above X%

gslender 10-20-2011 04:03 PM


Originally Posted by Braineack (Post 785883)
I loaded your v3 code on a DIYPNP last night, works as expected but for one caveot -- the delay on status 4. When set to 20, the delay was 20 seconds, when set to 10 the delay was ten seconds. I left it at 1 which seemed to be a good delay, seemed a touch quicker than 1 full sec, so I was okay with it.

On my MS3 I run ~450ms delay at 12% increase, works very well. I don't see any reason why you'd need more than 1 second of delay with the expection being Greg G and his throttled SC.

I wish the MS3 source was available to look at...but either way I'll look at ways of improving resolution and accuacy of the timer.



Originally Posted by Braineack (Post 785883)
BTW, that took a lot of head scratching last night, i kept thinking my DMM was failing, as sometimes I'd check the output and it wasn't grounding, then I'd try it again and it would be, and remove the ground as soon as I'd remove the input. Finally, it hit me that there was a huge delay in the output, where I could count to 20 and the DMM would start beeping.

Lol... Sounds like someone needs to RTFM...:rofl:


Originally Posted by Braineack (Post 785883)
Hopefully you have the fixed code for seq. inj. as I have another unit handy that I want to load this on, but he's running seq.

Nope, still not released.... Have a read and plead the case on the MSEXTRA forums.

Braineack 10-20-2011 05:01 PM


Originally Posted by gslender (Post 786040)
Lol... Sounds like someone needs to RTFM...:rofl:

hey you wrote it. it clearly says 20 = 2sec.

when 20 = like 9-10sec.

gslender 10-20-2011 05:58 PM


Originally Posted by Braineack (Post 786053)
hey you wrote it. it clearly says 20 = 2sec.

when 20 = like 9-10sec.

I was referring to your post above where you didn't realise there was a huge delay between when you ground the input and the DMM beeping from the output - I reads like you didn't even know there would be a delay as I would have thought it would only take you 1 try (and not much head scratching) to figure out that the delay is based on the value.

My code is based on what is written in the source re an existing MAPdot timer, and it should be counting roughly around every 100ms...or tenth of a second, so I'll have to review that to make sure indeed I've got that right.

Braineack 10-20-2011 06:36 PM

(Posting from my phone.)

Yeah I was expecting a very short delay...not 10 seconds worth.

I used "1" and its a good half second delay.

Greg G 10-20-2011 07:51 PM

Yeah maybe there is some more smoothness to be had by increasing the resolution 10x. Though getting it to count in tenths of a second would be ideal. :bowrofl:

Asx 10-20-2011 08:50 PM


Originally Posted by Braineack (Post 785758)
yes, hence the line about the protection to the processor. if you accidentally somehow get 12v on that line, nothing will happen.

if you run straight to pe1 and get 12v to that, the cpu will fry instantly.

maybe my shit is bananas, but on my NB1 (99), 1P (Signal from A/C switch) goes to 12v if the A/C button is on but the fan is off.
Heads up.

Braineack 10-20-2011 09:02 PM

oh yeah. actually, someone found that out the hard way.

input circuit is a must.

gslender 10-21-2011 03:24 AM


Originally Posted by Asx (Post 786097)
maybe my shit is bananas, but on my NB1 (99), 1P (Signal from A/C switch) goes to 12v if the A/C button is on but the fan is off.
Heads up.

Well, if it floats from GND to 12V, then I'm confused how you'd ever be able to trigger any input... what do you look for? and wouldn't it short in that case?

In either case, yes having some protection for PE1 (eg using the input circuits) would be a good idea.

G

Asx 10-21-2011 02:24 PM

I'm not entirely sure of what you're saying.

If AC button is on and Fan is set between 1-4 speed, then 1P goes low
If AC button is on and fan is off, 1P goes 12v
If AC button is off and fan is off, then I'm not entirely sure what happens I'd have to go over the schematic again.

I was assuming, by DIY's description of the input circuits on the DIYPNP that the output would be 5v as long as the input was not grounded, and grounded out when grounded in. It does make me nervous that I can't see a schematic of it though. I'm not good enough at electronics to try to reverse engineer the input circuit.

I would assume that a simpler way to condition the 1P signal would be to use a diode to cockblock +12v and a pull-up to 5v to keep the pin from floating

Then I have Wled (or maybe ALED? can't remember) running to Input 1 in with R14 removed so it won't pull the output (a/c fan and clutch relays) to 5v to the when the input is high.
this is a little silly, but I was running low on jumper wire and I don't need the extra input circuit. Again, I'd feel better if I had the schematic for the input circuits.
EDIT: Actually, I think I'll just pick up some jumper wire at ratshack as I trust the IPS022g a lot more than the pn2222a for driving a pair of relays.

Greg G 10-21-2011 03:42 PM

Ok, so let me get this clearly stated:

Pe1 and pe0 can only accept a 0-5v signal?

So with my input 1 circuit not having the r14 resistor, I am feeding it a 0-12v signal? It is working as is, but am I damaging something?

Asx 10-21-2011 06:26 PM

I beleive, without r14 the connection between your input 1 out and pe0/1 will just float when the the "in" isn't grounded. If that's true then you could have issues with pe0/1 going high/low randomly. Alledgedly. Maybe.
I think you should replace r14 or just use the otherinput circuit.

Think of it like this, the processor pins only understand yes or no, and without r14 in place you're giving it a dunno. It still works but sometimes the dunno might be more negative or more positive andthe processor just kind of guesses. With r14 in there you are giving it a firm yes or no

Again, I'm not cool enough to Totally reverse engineer the input circuits so this is based on my somewhat limited understanding.

But no you aren't showing it 12v. If you did, it would let the magic smoke out

Greg G 10-21-2011 06:34 PM

Ok I think I saw that. Once, I turned off the AC switch, and it didn't turn off till about 3 seconds later. I went "WTF was that?" But it never happened again...

gslender 10-21-2011 07:01 PM

You don't need to use the input circuit to drive pe1, but it certainly is easy if you do as it avoids you having to add something (diode) to protect from 12v live shorts and a pull up to ensure it can't float when not switched to gnd.

From the DIYAutotune docs...

The circuits marked Input 1 and Input 2 are general purpose on/off inputs, with a buffer circuit to protect the processor. They are designed for ground triggered inputs, but with some protection for the processor if you accidentally connect them to 12 volts. The output is 5 volts when the input wire is disconnected, 0 volts when the input signal is pulled to ground.
I've finally decided that this weekend I'm going to produce a wiring guide/diagram that will accompany the next release - this way folks with a DIYPNP kit can simply follow and get it right.

Greg G 10-22-2011 05:54 AM

Well I moved it to input 2 circuit. Works the same, more peace of mind :)

bearda 10-23-2011 04:15 PM

I loaded everything up on Friday and am really liking the idle up feature. I've been fighting with the lightweight flywheel and AC causing the car to stall for so long it FINALLY feels like I don't have to worry about when the AC is engaged anymore. Thanks a ton. I'm waiting to do any extensive testing unit the build with the sequential injection fix is ready, but now that 3.1.4 has been release I'm hoping that's no too far away.

Greg G 10-23-2011 05:36 PM

Great to hear it works with a lightened flywheel. I was holding off on installing my Toda fw because of the droop issue. Could you post a log? :)

The next version will have even more refinements to the AC code ;)

gslender 10-24-2011 08:00 AM

Update 24 Oct 2011 - released ms2extra_3.1.4_idleup_v5
* Fixed timer to now closely match 10th second status4 counting.
* Migrated code to new 3.1.4 beta firmware.

Get it fresh from here
http://www.msextra.com/forums/viewto...p?f=91&t=42485

Braineack 10-24-2011 08:36 AM

Of course you update after I left for work, with a DIYPNP still on v3 in a box ready to ship in my car...

gslender 10-24-2011 08:38 AM

I'd add a silent-box-opening-install feature if I could .... sorry.

G


All times are GMT -4. The time now is 09:56 AM.


© 2024 MH Sub I, LLC dba Internet Brands