Vanagon EuroVan
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2013, week 1)Back to main VANAGON pageJoin or leave VANAGON (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 3 Dec 2013 19:07:14 -0800
Reply-To:     Brett Ne <brettn777@GMAIL.COM>
Sender:       Vanagon Mailing List <vanagon@gerry.vanagon.com>
From:         Brett Ne <brettn777@GMAIL.COM>
Subject:      Re: Arduino and Vanagons
Comments: To: Ryan Press <ryan@presslab.us>
In-Reply-To:  <CABx3TkVCD2gAMaSM9cA=V5_jgv0iyP2b3pbk05kWG9LvK0y1wA@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

I'll keep that in mind as I continue to play with it. There is an internal pullup resistor built into each input pin that is about 25k. And I do like to keep a series resistor on the input pins for an extra measure of safety.

Brett

On Tue, Dec 3, 2013 at 4:59 PM, Ryan Press <ryan@presslab.us> wrote:

> Most hall sensors are open collector (or drain) so it's not the hall > sensor's fault, it's the ECU that isn't providing much of a pull-up. > Try adding a pull-up resistor, I'd bet that gives you some more oomph. > > You could tie directly to the Ardunio input as well, like you did with > the current limiting resistor. This will cause the body diode inside > the uc to conduct, clamping the voltage. A small RC with a 1 nF cap > or something would be a good idea too. > > Check the datasheet, but most body diodes can handle 5 mA or so, make > sure you size the limiting resistor to have a good margin there. You > could tie your pull-up resistor to 5V of course as well, but in any > case put resistance in series with the input pin to protect against > over-voltage stress. > > Ryan > > > On Tue, Dec 3, 2013 at 4:46 PM, Brett Ne <brettn777@gmail.com> wrote: > > You need an input buffer followed by a voltage clamp. > > > > Perhaps...I'll know more once I get a good shot of the pulse shape on a > > scope. And I'm assuming that the 89 Fox Hall sensor behaves closely to > the > > Vanagon Hall sensor. I'm still surprised by how weak that signal is; > you'd > > think they'd need a shielded wire, especially being so close to the high > > tension ignition wires. > > > > Brett > > > > > > On Tue, Dec 3, 2013 at 3:08 PM, Thomas Hargrave <tphjr@hiwaay.net> > wrote: > > > >> You need an input buffer followed by a voltage clamp. > >> > >> Tom > >> ------------------------------ > >> From: Brett Ne <brettn777@GMAIL.COM> > >> Sent: 12/3/2013 4:18 PM > >> To: vanagon@GERRY.VANAGON.COM > >> Subject: Re: Arduino and Vanagons > >> > >> Just a quick update. > >> > >> I bludgeoned together an Arduino program to calculate and display the > >> engine speed based on the Hall sensor output(my programming "style" > makes > >> hackers' code look elegant). To deal with the presupposed high > voltage(to > >> a microcontroller, anything over 5v is high voltage) from the Hall > sensor , > >> I put a 10k and a 3.3k resistor in series with one end connected to the > >> Hall output and the other to ground. The Arduino input pin was > connected > >> between the two resistors, which should give a voltage output of 1/4 > >> whatever the voltage is coming from the Hall sensor. I tried hooking > it up > >> a couple of times with the engine running and it stopped it cold > >> immediately each time. That is one *weak* signal! A 13.3kohm path to > >> ground shuts it down. Just to live life on the edge, I removed the 3.3k > >> resistor going to ground and tried again. This means that the full > voltage > >> coming from the Hall sensor will be going to the Arduino input pin(it's > >> only $2-3 for a new chip if I burn out the pin). This time, the engine > >> continued running without complaint and I was getting rpm readings on > the > >> LCD. WooHoo! The readout was too high and very unstable, so there is > >> still much work to be done in this first step. I'll have to recheck my > >> code; my formula was based on timing 8 pulses, but I may have set the > >> counter wrong and it's counting only to 7 pulses, giving a higher than > true > >> reading. I think the the instability has to do with the handling of a > very > >> weak signal. > >> > >> Sometime in the next day or two I'll drag my laptop out and hook up my > USB > >> oscilloscope to it and get a better idea of what this Hall sensor output > >> looks like. Because the Hall signal is so easily disrupted, It looks > like > >> we'll need to add an op-amp voltage buffer in order to be able to use > this > >> signal without affecting the ignition system. > >> > >> This gives yet another option for those thinking of installing a hidden > >> vehicle disabling system for security. Tie in a wire to the Hall > output, > >> run it to a hidden toggle switch that switches it to ground via a 5k > >> resistor. Less obvious than a fuel relay disabling system. It'd take a > >> good mechanic at least a half hour to find it. An average mechanic > would > >> take several hours and would have replaced the engine computer, coil, > cap, > >> rotor... > >> > >> I've started looking into the circuitry required, but am not to a stage > yet > >> where I think it would be fruitful to report. > >> > >> > >> Brett > >> > >> > >> On Wed, Nov 27, 2013 at 3:34 PM, Brett Ne <brettn777@gmail.com> wrote: > >> > >> > At this point, I don't know if it's worthwhile spending much more time > >> > studying duty cycle outputs under various conditions. David's > provided > >> > enough data to have a pretty clear picture of what the ICU is doing > under > >> > various idle conditions. The purpose of gathering the duty cycles > isn't > >> to > >> > provide target values for the microcontroller to strive for, but > rather > >> to > >> > get a feel for how much the duty cycle needs to change to compensate > for > >> > various loads. In fact, I'm no longer convinced that the duty cycle > >> values > >> > above closed throttle position have much use for us. Our version of > the > >> > ICU would quickly drop the duty cycle to zero as the throttle is > opened & > >> > the rpm's climb and keep it at zero until the throttle is closed to > >> > decelerate whereupon the duty cycle will start to increase when the > >> engine > >> > speed drops below the idle speed target. We may get away without > needing > >> > the throttle switch input. But then, there may be driveability issues > >> with > >> > that approach; there may need to be some baseline idle valve air flow > >> level > >> > needed. > >> > > >> > We will definitely need coolant sensor voltage readings at a known > cold > >> > value and a known hot value so we can calculate the temperature from > the > >> > sensor voltage. If someone has an infrared thermometer and a decent > >> > digital multimeter, that would be the easiest way to get those > readings. > >> > > >> > Brett > >> > > >> > > >> > On Wed, Nov 27, 2013 at 1:22 PM, JRodgers <jrodgers113@gmail.com> > wrote: > >> > > >> >> David, glad to hear you are crawling back into the light! > >> >> > >> >> \John > >> >> > >> >> > >> >> On 11/27/2013 1:45 PM, David Beierl wrote: > >> >> > >> >>> At 09:33 AM 11/27/2013, Brett Ne wrote: > >> >>> > >> >>>> A member pmailed results of some testing last night: > >> >>>> > >> >>> > >> >>> Ok, I'll 'fess up. I'm the guy who's been supplying numbers for > >> >>> this. I've been going through a very rough patch over the summer > and > >> >>> not wanting to talk to anybody, but at least for the moment this and > >> >>> some other things happening here are bringing me out of my hole to > some > >> >>> degree. > >> >>> > >> >>> > >> >>> "...just checked a spare ISV using DC, operation is proportional to > >> >>>> applied > >> >>>> voltage. Starts opening somewhere around 3 VDC, fully open > somewhere > >> >>>> around 8 VDC." > >> >>>> > >> >>>> So we can treat it as if it's a dc motor operating against spring > >> >>>> pressure. Keep in mind that we are feeding it a modulated signal, > so > >> >>>> even > >> >>>> at 11.5 v and a 50% duty cycle, the valve will operate as if it's > >> >>>> receiving > >> >>>> a constant 5.75 v steady signal(11.5 x 50%) and will not be fully > >> open. > >> >>>> > >> >>> > >> >>> Here are some better numbers for the spare valve, which is a bit > >> >>> sticky at the extremes (maybe they all are, I don't know): > >> >>> > >> >>> Resistance 4.0 ohms. > >> > >> >>> > >> >>> Impedance at 150 Hz (sine wave) using a signal generator with 50-ohm > >> >>> output: 1.0 Vrms --> ~25 mA so ~40 ohms. > >> >>> Impedance at 1000 Hz ditto: 1.0 Vrms --> ~9 mA so ~110 ohms. > >> >>> My generator couldn't maintain a square wave while driving the valve > >> >>> because of its higher output impedance (result was a set of spikes > >> >>> with smoothly declining tails) but the numbers at 150 Hz were > similar. > >> >>> > >> >>> I may be able to hook up an amplifier to the generator and actually > >> >>> drive the valve at operating levels, but in the meantime, using a DC > >> >>> supply with max 1300 mA output: > >> >>> On increasing voltage valve jumps open slightly at about 2.4V / 500 > mA. > >> >>> On decreasing voltage valve closes at about 1.5V / 325 mA. > >> >>> On suddenly applying 6.5V / ~1300 mA valve snaps fully open.** > >> >>> On suddenly applying 5.8V / ~1100 mA valve does not fully open. > >> >>> > >> >>> **The open-circuit voltage is probably somewhat higher since I'm > >> >>> driving the supply at its current limit here. > >> >>> > >> >>> So lets crunch some numbers to see what's going on during cranking. > >> I'm > >> >>>> going to calculate the power (watts) going to the idle valve during > >> cold > >> >>>> idle and during cold cranking and compare. > >> >>>> > >> >>>> First, let's calculate the resistance that the idle valve provides > so > >> >>>> that > >> >>>> we can determine current flow for different voltages. We know > that at > >> >>>> 9v > >> >>>> and 29.4% duty cycle the valve draws .157 A, so we can get > amperage @ > >> >>>> 100% > >> >>>> duty by dividing .157/29.4% = .534 A. > >> >>>> Resistance = Voltage/Current = 9v/.534A = 16.85 ohms of resistance > >> >>>> > >> >>> > >> >>> Actually you can't extrapolate to DC this way because the valve is > >> >>> highly inductive. As your duty cycle approaches 100% the valve > >> >>> effective impedance will get closer and closer to its four ohm > >> >>> resistance. If I can get the amplifier hooked up and delivering > some > >> >>> approximation of a square wave I'll be able to vary the duty cycle > >> >>> directly and provide more numbers. > >> >>> > >> >>> Also bear in mind that the 6V/9V/10-11V numbers I supplied for peak > >> >>> voltages in the system while operating a) are very approximate, > >> >>> eyeballed off a tiny pocket oscilloscope screen at two volts per > >> >>> division and b) need to be increased by about a volt each because > the > >> >>> baseline was about a volt negative. The ~10-~11 range was > >> >>> immediately after starting vs after running a few minutes; probably > >> >>> because B+ was recovering after extended cranking with the ignition > >> >>> disabled. > >> >>> > >> >>> Vrms and duty-cycle numbers are from a fancy 4-1/2 digit Fluke meter > >> >>> with flat response well above our frequencies of interest and IIRC > >> >>> four measurement cycles per second. If I indicate a ~n.whatever on > >> >>> one of those readings it's because it's fluctuating. You shouldn't > >> >>> use any more decimal places in calculation than the least that I > >> >>> provide (i.e. if I give you ~9 for an input, a calculation from that > >> >>> resulting in n.nn has to be trimmed to ~n to be meaningful). > >> >>> > >> >>> The white wire on the ISV is less than an ohm to the alternator > case, > >> >>> so you're right that it's grounded. > >> >>> > >> >>> Duty cycle at a cold start at 60F ambient was down to around 23% by > >> >>> the time I could leave the front of the van, walk through the house > >> >>> to avoid the soaking wet cedar tree and reach the back. Quickly got > >> >>> down to 21% or less. I don't think I've yet seen it below 20%. > >> >>> > >> >>> I've not yet been able to catch the duty cycle for the short > >> >>> excursion above 1000 rpm that happens a few seconds after a cold > >> >>> start. But I think a more important number is the rpm reached > >> >>> (guessing 1100) and duration and how this is affected by > >> >>> ambient/engine initial temp. And is this normal system behavior or > >> >>> an oddity of mine? Like the short period above 1000 when I idle > down > >> >>> while driving, it's consistent among different ECUs both 022D and > >> >>> 022F, but unknown if consistent among different ICUs since I have no > >> >>> spare. > >> >>> > >> >>> Playing with the throttle plate as it was beginning to warm up it > >> >>> seemed to vary between about 22-24% without any particular > systematic > >> >>> behavior. It's hissing down with rain so I'm not going to wait for > >> >>> full warmup at this point. I think the changes are some artifact > of > >> >>> system operation and don't matter. > >> >>> > >> >>> Stabbing the throttle produced slightly wider variations up to maybe > >> >>> 20-25% but I have trouble seeing how it can matter given the input > >> >>> from the driver's foot swamping everything else. > >> >>> > >> >>> This was quite surprising to me; the power going to the idle valve > is > >> >>>> less > >> >>>> during cold cranking than during fast idle. I was thinking that it > >> >>>> would > >> >>>> receive more power during cranking to get a good supply of air & > fuel > >> >>>> into > >> >>>> the engine to really get things going. Then I thought maybe it's > >> >>>> trying to > >> >>>> restrict the air a bit to richen the mixture, but the ECU knows > when > >> the > >> >>>> engine is cold cranking and fuel mixture is one of its main jobs. > >> >>>> Maybe by > >> >>>> restricting airflow, it effectively lessens the compression ratio > to > >> >>>> make > >> >>>> starting easier. Or maybe I'm just overthinking this and it's > trying > >> to > >> >>>> put out the same airflow as cold idle but isn't able to accurately > >> >>>> make up > >> >>>> for voltage drop during cranking. > >> >>>> > >> >>> > >> >>> I suspect the last. It would be answered by doing cold cranking > with > >> >>> a booster to keep the voltage up, but I'm not equipped to do that > >> >>> (though I'm probably going to have to replace the tired battery soon > >> >>> if I want to drive at all this winter). This engine has always > >> >>> seemed to crank hard since I've had the van, and replacing the > >> >>> starter didn't change it. Sometimes it cranks fine and sometimes it > >> >>> goes to its knees on the first revolution, then recovers. > >> >>> > >> >>> > >> >>> I think that it would be best to aim for the same airflow for both > >> cold > >> >>>> idle and cold cranking and adjust as real world results suggest. > >> >>>> > >> >>> > >> >>> I think that's sensible. > >> >>> > >> >>> Yrs, > >> >>> d > >> >>> > >> >>> > >> > > >> > > >> > -- > >> > Brett in Portland, OR > >> > "Albert" '82 VanaFox I4 Riviera > >> > > >> > >> > >> > >> -- > >> Brett in Portland, OR > >> "Albert" '82 VanaFox I4 Riviera > >> > > > > > > > > -- > > Brett in Portland, OR > > "Albert" '82 VanaFox I4 Riviera >

-- Brett in Portland, OR "Albert" '82 VanaFox I4 Riviera


Back to: Top of message | Previous page | Main VANAGON page

Please note - During the past 17 years of operation, several gigabytes of Vanagon mail messages have been archived. Searching the entire collection will take up to five minutes to complete. Please be patient!


Return to the archives @ gerry.vanagon.com


The vanagon mailing list archives are copyright (c) 1994-2011, and may not be reproduced without the express written permission of the list administrators. Posting messages to this mailing list grants a license to the mailing list administrators to reproduce the message in a compilation, either printed or electronic. All compilations will be not-for-profit, with any excess proceeds going to the Vanagon mailing list.

Any profits from list compilations go exclusively towards the management and operation of the Vanagon mailing list and vanagon mailing list web site.