Using Optoin

This forum is for discussing ignition setup, tuning, and troubleshooting for MicroSquirt (TM)
Forum rules
Read the manual to see if your question is answered there before posting. If you have questions about MS1/Extra or MS2/Extra or other non-B&G code configuration or tuning, please post them at http://www.msextra.com The full forum rules are here: Forum Rules, be sure to read them all regularly.
Post Reply
maxelrad
MegaSquirt Newbie
Posts: 13
Joined: Wed Nov 14, 2007 5:17 pm
Location: Pittsburgh PA

Using Optoin

Post 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
Matt Cramer
Super Squirter
Posts: 910
Joined: Sat Jul 03, 2004 11:35 am

Post by Matt Cramer »

Turn off the wheel decoder by setting trigger wheel teeth to 0. Does that get you an RPM signal?
Matt Cramer at DIY Autotune
Image
maxelrad
MegaSquirt Newbie
Posts: 13
Joined: Wed Nov 14, 2007 5:17 pm
Location: Pittsburgh PA

Problem not solved

Post by maxelrad »

Thanks Matt - setting trigger teeth to zero has no effect - any other suggestions?

michael
Matt Cramer
Super Squirter
Posts: 910
Joined: Sat Jul 03, 2004 11:35 am

Post 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.
Matt Cramer at DIY Autotune
Image
tubefan
MegaSquirt Newbie
Posts: 10
Joined: Fri Aug 31, 2007 8:51 am
Location: Munich / Germany

Post 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
maxelrad
MegaSquirt Newbie
Posts: 13
Joined: Wed Nov 14, 2007 5:17 pm
Location: Pittsburgh PA

Post 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)
grippo
MegaSquirt Guru
Posts: 921
Joined: Mon Feb 16, 2004 6:55 pm

Post 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.
maxelrad
MegaSquirt Newbie
Posts: 13
Joined: Wed Nov 14, 2007 5:17 pm
Location: Pittsburgh PA

Post 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
grippo
MegaSquirt Guru
Posts: 921
Joined: Mon Feb 16, 2004 6:55 pm

Post 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.
maxelrad
MegaSquirt Newbie
Posts: 13
Joined: Wed Nov 14, 2007 5:17 pm
Location: Pittsburgh PA

Post by maxelrad »

I have reloaded the microsquirt code - the problems have disappeared. Thanks for your help.

Michael
Post Reply