Page 1 of 1

Using Optoin

Posted: Wed Nov 14, 2007 5:42 pm
by maxelrad
I am sending a simple one pulse per revolution square wave (high for approx 10 degrees of the revolution +5V) connected to the optoin + optoin - (positive to optoin + gnd to optoin -) I get no reading on the megatune engine speed when cranking - may not have set the software correctly?

trigger offset 0
skip pulses 1

predictor algo alphabetagamma
alpha 90
beta 80
gam 10

tach signal masking
time mask 0
percentage mask 50

next pulse tol
cranking 50
after start 70
normal 25

check tach sync check always
ignition input capture rising edge
cranking trigger calculated
coil charging standard
spark output going high

trigger wheel teeth 1
missing teeth 0
skip teeth 0
delay teeth 0

dual spark options single crank wheel
offset advance 0

Any help is greatly appreciated

Posted: Thu Nov 15, 2007 7:18 am
by Matt Cramer
Turn off the wheel decoder by setting trigger wheel teeth to 0. Does that get you an RPM signal?

Problem not solved

Posted: Thu Nov 15, 2007 2:47 pm
by maxelrad
Thanks Matt - setting trigger teeth to zero has no effect - any other suggestions?

michael

Posted: Fri Nov 16, 2007 5:57 am
by Matt Cramer
Try connecting Optoin + to a 5 volt source through a 330 ohm resistor and Optoin - to the sensor output. Sometimes inverting the trigger input can improve its sensitivity.

Posted: Fri Nov 16, 2007 3:01 pm
by tubefan
maxelrad

The 'Option' input drives an optocoupler MOC-205 which needs 10 milliamps for safe operation. As there is a 680 Ohms resistor in series, 10 milliamps cause a voltage-drop of 6.8 Volts. The LED of the MOC-205 needs 2 additional Volts. That is why 5 Volts are not enough for the 'option' input.

Best results are achieved at 12 Volts operation.

Norbert

Posted: Sat Nov 17, 2007 2:47 pm
by maxelrad
I appreciate all your help. I have programed an AVR micro to send a simulated 380 rpm 12 tooth crank signal - one missing 5 skips to the optoin + 5 v.

The microsquirt and the megatune work fine - I don't think the software can handle the single tooth encoding.
( i also tried 4 tooth one missing one skip - didn't work)

Posted: Sun Nov 18, 2007 7:21 am
by grippo
Skip teeth represents the number of teeth between tach pulses (= 1 pulse per cylinder), so it can never be 0 as you specified in the 1 tooth settings. In your 4 tooth, 1 skip tooth case, that would imply 8 cylinders. But this might not work because the tooth logic is premised on having the tooth after the missing tooth being the tach pulse for the first cylinder (or the middle cylinder in wasted spark configuration), and all other tach pulses have to arrive on real teeth not missing ones. So if you specified 4 cylinder, 4 teeth, 2 skip teeth that should work.

I think things should work if you understand that skip teeth is number of teeth between tach pulses and select No_skip = No_teeth / (no_cyl/2), (for a 4-stroke. For the 1 tooth case, you have to declare 2 cylinder, 2 teeth, 1 missing, 2 skip teeth.

Posted: Sun Nov 18, 2007 11:06 am
by maxelrad
Thanks for the explanation of wheel decoder logic.

My latest experiment - AVR microcontroller simulates a 36 tooth wheel 1 missing tooth skip 18 teeth 2ms per pulse/space 416 rpm. Works fine for 38 seconds - then the rpm display stops - time counting on real time display stops - very mysterious! The pulse chain never varies (monitored on an oscilloscope). Mega Tune continues to report the other variables. Reset microsquirt - 38 seconds and RPM & time reporting stops. Consistantly repeatable. Pulse chain is 35 alternating 2ms pulses followed by two zero 2ms pulses.

Also after Start Enrichment and Warm Up Enrichment indicators switch to off

Overflow? Reset interrupts?

michael

Posted: Mon Nov 19, 2007 9:27 am
by grippo
I have run such a configuration 100s of times and never run into anything like that. I can't think of any significance to the 38 secs. To go any further I need an msq and what exact code version you are running.

Posted: Mon Nov 19, 2007 2:10 pm
by maxelrad
I have reloaded the microsquirt code - the problems have disappeared. Thanks for your help.

Michael