Author Topic: Multipole ring magnets experience  (Read 11098 times)

0 Members and 2 Guests are viewing this topic.

Offline MolenaarTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: nl
Multipole ring magnets experience
« on: December 18, 2015, 06:39:27 pm »
To replace the points-driven ignition of my Mercedes oldtimer, I would like to use a robust way to detect camshaft position. I thought to use a multipole (32/64) ring magnet in combination with a digital hall sensor, such as TIs DRV5013.

I found myself lost looking for suitable magnets which are orderable in small quantities and are precise enough. Does anyone have experience with precisely made multipole ring magnets? Manufacturer recommendation?

Thanks in advance!
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13129
Re: Multipole ring magnets experience
« Reply #1 on: December 18, 2015, 06:52:23 pm »
Why would you want to go to that much trouble?  The industry standard sensor is a hall or variable reluctance sensor with the permenant magnet in the sensor, sensing the change in flux due to the proximity of the teeth of a ferromagnetic wheel.   

Take a steel gear. Mount one sensor close to its teeth and another for the index pulse close to the side of it near the rim.  Drill out a dimple for the index pulse.  Drill a slightly larger dimple diametrically opposite for balance, a bit nearer the shaft so it doesn't pass under the sensor.  Job done.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3336
  • Country: gb
Re: Multipole ring magnets experience
« Reply #2 on: December 18, 2015, 08:22:59 pm »
Why would you want to go to that much trouble?  The industry standard sensor is a hall or variable reluctance sensor with the permenant magnet in the sensor, sensing the change in flux due to the proximity of the teeth of a ferromagnetic wheel.   

Take a steel gear. Mount one sensor close to its teeth and another for the index pulse close to the side of it near the rim.  Drill out a dimple for the index pulse.  Drill a slightly larger dimple diametrically opposite for balance, a bit nearer the shaft so it doesn't pass under the sensor.  Job done.

You don't even need an index pulse, just remove one (or more) teeth and detect the larger gap.  A multipole magnet doesn't sound like a good solution since there won't be a well defined change in polarity like the edge of a tooth.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28059
  • Country: nl
    • NCT Developments
Re: Multipole ring magnets experience
« Reply #3 on: December 18, 2015, 09:27:45 pm »
I agree. The camshafts I have seen so far all have a missing tooth to indicate the camshaft position. The pickup element usually is a coil and not a hall sensor. An ABS rotation detector ring could also used after one tooth has been removed. I think they are also called reluctor rings.
« Last Edit: December 18, 2015, 09:29:37 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Pjotr

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: nl
Re: Multipole ring magnets experience
« Reply #4 on: December 18, 2015, 09:36:51 pm »
You mean you want to replace the mechanical points and ignition coil by an electronic ignition system? Probably by a capacitive system?

Unless it is a racing car, simply leave the mechanical contacts and replace them with new ones. Then simply use them to steer the electronic ignition. Mechanical points wear out mostly by the current they switch, not so much mechanically. Been there done that for an oldtimer Peugeot 404 and the contacts last more than 10 times longer.
« Last Edit: December 18, 2015, 11:07:34 pm by Pjotr »
 

Offline pmbrunelle

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
Re: Multipole ring magnets experience
« Reply #5 on: December 19, 2015, 06:02:51 am »
To replace the points-driven ignition of my Mercedes oldtimer, I would like to use a robust way to detect camshaft position. I thought to use a multipole (32/64) ring magnet in combination with a digital hall sensor, such as TIs DRV5013.

I found myself lost looking for suitable magnets which are orderable in small quantities and are precise enough. Does anyone have experience with precisely made multipole ring magnets? Manufacturer recommendation?

Thanks in advance!

The nice thing about using a multi-pole strip is that the magnetic flux is AC, with neglegible DC component. So all you have to do is pick a sensitive bipolar latch with low hysteresis; the output of the bipolar latch changes with the sign of the magnetic flux, and as long as the signal is strong enough, you don't need to worry about any of that switching threshold nonsense. The TI DRV5013 is a good latch to use with a multi-pole strip, and it has a diagnostic at power-on where it toggles its output, so it tests its open-drain output MOSFET (if the output is high, you know it's not just because the output MOSFET is failed open). The Allegro A1250 is even more sensitive with less hysteresis, but it doesn't have any self-diagnostic.

However, you won't have an index with a multi-pole strip. You can look to purchase multi-pole strips from AMS, iC-Haus... can't think of any other places off-hand right now.

Also, the Hall plate needs to be at a specified airgap with the multipole strip. Probably if the Hall plate is more than one pole length away from the surface of the multipole strip, this is too far. If the Hall plate is too close to the multipole strip, the magnetic signal will have lots of THD, and it will not appear sinusoidal. However, this may not be an issue for a bipolar latch (as opposed to analog Hall).

Why would you want to go to that much trouble?  The industry standard sensor is a hall or variable reluctance sensor with the permenant magnet in the sensor, sensing the change in flux due to the proximity of the teeth of a ferromagnetic wheel.   

Take a steel gear. Mount one sensor close to its teeth and another for the index pulse close to the side of it near the rim.  Drill out a dimple for the index pulse.  Drill a slightly larger dimple diametrically opposite for balance, a bit nearer the shaft so it doesn't pass under the sensor.  Job done.

At camshaft RPM and typical gear radius, I think the imbalance would be neglegible. But yes, this is the gold standard. I would suggest going to the auto wreckers and trying to look for 3-wire variable reluctance sensors, all packaged and made for automotive duty. Just mount in front of the toothed wheel of your choice.

You don't even need an index pulse, just remove one (or more) teeth and detect the larger gap.  A multipole magnet doesn't sound like a good solution since there won't be a well defined change in polarity like the edge of a tooth.

Actually, the signal from a multipole strip does change in polarity; it's an AC signal. A variable-reluctance sensor with a permanent magnet facing a toothed wheel does not change in polarity; only the intensity changes.

I agree. The camshafts I have seen so far all have a missing tooth to indicate the camshaft position. The pickup element usually is a coil and not a hall sensor. An ABS rotation detector ring could also used after one tooth has been removed. I think they are also called reluctor rings.

As for missing tooth vs. index pulse, this depends on the ECU that OP will be using, and what this ECU expects in terms of a camshaft signal.

A coil is one way to sense the variation in magnetic flux. However, the EMF created by the coil depends on how fast the magnetic flux through the coil is changing. So at low speed, you have no signal. You can try to compensate by using many turns, but there is always a dropout speed (designed to be below cranking RPM I suppose).

A Hall-effect sensor works even at a standstill, and whatever IC you buy will include the conditioning, Schmitt trigger stuff, but if you use a coil, you will need to do a few things to your signal before it becomes a clean useable digital signal. I don't know if any ASICs exist to do this.

You mean you want to replace the mechanical points and ignition coil by an electronic ignition system? Probably by a capacitive system?

Unless it is a racing car, simply leave the mechanical contacts and replace them with new ones. Then simply use them to steer the electronic ignition. Mechanical points wear out mostly by the current they switch, not so much mechanically. Been there done that for an oldtimer Peugeot 404 and the contacts last more than 10 times longer.

This does sound like a good way, if you disable any mechanical/vacuum advance. I would try to maintain some minimum wetting current on the points, otherwise I would not be sure that points would be reliable switching logic-level signals.
 

Offline Pjotr

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: nl
Re: Multipole ring magnets experience
« Reply #6 on: December 19, 2015, 09:42:50 am »

This does sound like a good way, if you disable any mechanical/vacuum advance. I would try to maintain some minimum wetting current on the points, otherwise I would not be sure that points would be reliable switching logic-level signals.

I did use 100mA but anything between 100mA and 500mA will be ok. The system I used was a simple capacitive one without sophisticated timing adjustment, so I left the original vacuum adjustment as it was. The points triggered a one shot to drive the discharge thyristor.
 

Offline 0xdeadbeef

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: Multipole ring magnets experience
« Reply #7 on: December 19, 2015, 09:58:09 am »
I agree. The camshafts I have seen so far all have a missing tooth to indicate the camshaft position. The pickup element usually is a coil and not a hall sensor. An ABS rotation detector ring could also used after one tooth has been removed. I think they are also called reluctor rings.
The typical crankshaft wheel has 60-2 teeth, so there are two teeth missing in the gap for synchronization. Simple camshaft wheels are usually halfmoon type (360° crank low/high) while modern ones are typically multisegment ones (for faster synchronization, camshaft limp-home or camshaft adaption). I never saw a camshaft sensor that was not a hall sensor and they became the standard also for crankshaft sensors as inductive sensors only work above a certain rotation speed. Actually cars with start/stop already use bidirectional hall sensors to also detect a reverse rotation when the engine stops close to a top death center of compression.
Then again, like >10 years ago, inductive sensors where used for the crankshaft. Which means a special zero crossing detection circuit in the ECU - while the hall sensor will create a falling signal edge at an falling tooth edge, the signal of an inductive sensor looks more like a sine that has its zero crossings at tooth edges with the amplitude depending on rotation speed.
Trying is the first step towards failure - Homer J. Simpson
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3336
  • Country: gb
Re: Multipole ring magnets experience
« Reply #8 on: December 19, 2015, 04:28:33 pm »
Actually, the signal from a multipole strip does change in polarity; it's an AC signal. A variable-reluctance sensor with a permanent magnet facing a toothed wheel does not change in polarity; only the intensity changes.

They certainly change in polarity, that's pretty much by definition of a multipole magnet.  My point was that a toothed wheel and VR sensor gives a very defined and sharp change in polarity as the tooth passes, but I would expect to see a much more gradual change with alternating magnetic poles passing a sensor.

As for missing tooth vs. index pulse, this depends on the ECU that OP will be using, and what this ECU expects in terms of a camshaft signal.

A coil is one way to sense the variation in magnetic flux. However, the EMF created by the coil depends on how fast the magnetic flux through the coil is changing. So at low speed, you have no signal. You can try to compensate by using many turns, but there is always a dropout speed (designed to be below cranking RPM I suppose).

The majority of modern cars use variable reluctance sensors for engine position sensing, though some use hall effects sensors as well.  You don't get "no signal" at low RPM, you get a reduced signal, and this is why the zero crossing point is used as a trigger point rather than some defined voltage threshold.


This does sound like a good way, if you disable any mechanical/vacuum advance. I would try to maintain some minimum wetting current on the points, otherwise I would not be sure that points would be reliable switching logic-level signals.

Points are still a poor solution even with lower currents.  The contacts may last longer, but the heel still wears and you still get the same amount of timing scatter from contact bounce and any wear in the distributor bearings etc.
 

Offline Pjotr

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: nl
Re: Multipole ring magnets experience
« Reply #9 on: December 19, 2015, 05:15:58 pm »

Points are still a poor solution even with lower currents.  The contacts may last longer, but the heel still wears and you still get the same amount of timing scatter from contact bounce and any wear in the distributor bearings etc.
Yes you can have this and you can have that. But hey, this concerns an oldtimer. What's next? A modern multipoint injection system?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13129
Re: Multipole ring magnets experience
« Reply #10 on: December 19, 2015, 05:28:57 pm »
It might be worth seeing if there is a distributor from a newer model that had electonic ignition using sensors on the distributor that would fit before getting too deep into this.   
 

Offline mjkuwp

  • Supporter
  • ****
  • Posts: 260
  • Country: us
  • mechanical engineering defector
    • The Mz Lab
Re: Multipole ring magnets experience
« Reply #11 on: December 20, 2015, 01:20:41 am »
a small selection of magnetic code wheels is available here

http://www.phoenixamerica.com/

as I recall they have two different diameters, three different materials and at least two different pole counts.

I have used them to make test fixtures at work.

 

Offline desy2820

  • Contributor
  • Posts: 10
  • Country: us
Re: Multipole ring magnets experience
« Reply #12 on: December 20, 2015, 03:05:20 am »
If all you want to do is replace the points, I would suggest a Pertronix / Pertronix II system.  Some of the fit inside the distributor cap, with no external box required.  http://www.pertronix.com/prod/

If you're wanting to sense the camshaft position for a different reason, then this won't help.
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 10025
  • Country: gb
Re: Multipole ring magnets experience
« Reply #13 on: December 20, 2015, 11:22:49 am »

Points are still a poor solution even with lower currents.  The contacts may last longer, but the heel still wears and you still get the same amount of timing scatter from contact bounce and any wear in the distributor bearings etc.
Yes you can have this and you can have that. But hey, this concerns an oldtimer. What's next? A modern multipoint injection system?

The last electronic ignition system I fitted (years ago) they actually recommended using an old set of contacts (clean) as the heel wear is fastest on brand new ones and slows as they bed-in, plus fresh grease of course. It had wetting current and debounce on the input. That doesn't address wear in the bearings and vacuum advance plate of course.
Best Regards, Chris
 

Online splin

  • Frequent Contributor
  • **
  • Posts: 999
  • Country: gb
Re: Multipole ring magnets experience
« Reply #14 on: December 21, 2015, 02:12:21 am »
Or you could make your own magnetic 'gear wheel' using this:

http://mindsetsonline.co.uk/Catalogue/ProductDetail/smart-magnetic-strip?productID=c5f80ba5-2210-4af1-b8bf-788f7a5797a8&catalogueLevelItemID=00000000-0000-0000-0000-000000000000

It's a flexible strip with magnetic strips running across the width of the strip at 1.6mm intervals. Like any 'plastic' magnet it's not particularly strong but should be perfectly good for triggering a hall sensor. Gluing it to the inside of a metal drum, to stop it flying off at high speeds, along with a low cost hall or inductive pickup would make a cheap position and speed sensor with decent resolution.

It probably wouldn't tolerate temperatures much above 70C which could be a problem in an engine compartment. That's a complete guess though - I'd have to experiment to be sure.
 

Offline rich

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: gb
Re: Multipole ring magnets experience
« Reply #15 on: December 21, 2015, 03:29:43 am »
I've not seen opto sensors mentioned yet..., I had an aftermarket electronic ignition in the late 1980's which used a 4 segment disc mounted on the distributer shaft, and a slotted sensor on the base plate. This arrangement allowed the vacuum advance to still functione, and timing was simply set by rotating the distributor. It worked for years without issue.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16366
  • Country: za
Re: Multipole ring magnets experience
« Reply #16 on: December 21, 2015, 04:25:10 am »
Yes, Optronic, would work till the dust from the rotor clogged the slotted opto sensor, which took about 2 years, if you did not clean every service as you should. Plus was you could run a much higher output coil from it, and run very lean without any issues other than spark plug erosion being very severe. Lodge plugs would last around 15000km, Champion or NGK would do 1000km before misfiring, as the outer electrode was missing, and the centre electrode had receded into the body by around 5mm. But with that and some gasflowing you could just about get turbo levels of power out of a normally aspirated Alfa boxer engine.
 

Offline MolenaarTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: nl
Re: Multipole ring magnets experience
« Reply #17 on: December 23, 2015, 11:36:01 am »
To replace the points-driven ignition of my Mercedes oldtimer, I would like to use a robust way to detect camshaft position. I thought to use a multipole (32/64) ring magnet in combination with a digital hall sensor, such as TIs DRV5013.

I found myself lost looking for suitable magnets which are orderable in small quantities and are precise enough. Does anyone have experience with precisely made multipole ring magnets? Manufacturer recommendation?

Thanks in advance!

The nice thing about using a multi-pole strip is that the magnetic flux is AC, with neglegible DC component. So all you have to do is pick a sensitive bipolar latch with low hysteresis; the output of the bipolar latch changes with the sign of the magnetic flux, and as long as the signal is strong enough, you don't need to worry about any of that switching threshold nonsense. The TI DRV5013 is a good latch to use with a multi-pole strip, and it has a diagnostic at power-on where it toggles its output, so it tests its open-drain output MOSFET (if the output is high, you know it's not just because the output MOSFET is failed open). The Allegro A1250 is even more sensitive with less hysteresis, but it doesn't have any self-diagnostic.

However, you won't have an index with a multi-pole strip. You can look to purchase multi-pole strips from AMS, iC-Haus... can't think of any other places off-hand right now.
Aren't there multi-pole strips with one element being five times as long (i.e. 60 - 2 tooth wheel style)?

Also, the Hall plate needs to be at a specified airgap with the multipole strip. Probably if the Hall plate is more than one pole length away from the surface of the multipole strip, this is too far. If the Hall plate is too close to the multipole strip, the magnetic signal will have lots of THD, and it will not appear sinusoidal. However, this may not be an issue for a bipolar latch (as opposed to analog Hall).
I'd think this would be an advantage, since the switch location would be better defined.

Why would you want to go to that much trouble?  The industry standard sensor is a hall or variable reluctance sensor with the permenant magnet in the sensor, sensing the change in flux due to the proximity of the teeth of a ferromagnetic wheel.   

Take a steel gear. Mount one sensor close to its teeth and another for the index pulse close to the side of it near the rim.  Drill out a dimple for the index pulse.  Drill a slightly larger dimple diametrically opposite for balance, a bit nearer the shaft so it doesn't pass under the sensor.  Job done.

At camshaft RPM and typical gear radius, I think the imbalance would be neglegible. But yes, this is the gold standard. I would suggest going to the auto wreckers and trying to look for 3-wire variable reluctance sensors, all packaged and made for automotive duty. Just mount in front of the toothed wheel of your choice.
Thanks, I will take the imbalance into account if I get beyond the first draft. The digital Hall sensor would be easy to interface to the N2HET timer subprocessor on the TI TMS570LS1114 I want to use, so I prefer not to use external IC's or a variable reluctance sensor.

You don't even need an index pulse, just remove one (or more) teeth and detect the larger gap.  A multipole magnet doesn't sound like a good solution since there won't be a well defined change in polarity like the edge of a tooth.

Actually, the signal from a multipole strip does change in polarity; it's an AC signal. A variable-reluctance sensor with a permanent magnet facing a toothed wheel does not change in polarity; only the intensity changes.

I agree. The camshafts I have seen so far all have a missing tooth to indicate the camshaft position. The pickup element usually is a coil and not a hall sensor. An ABS rotation detector ring could also used after one tooth has been removed. I think they are also called reluctor rings.

As for missing tooth vs. index pulse, this depends on the ECU that OP will be using, and what this ECU expects in terms of a camshaft signal.

A coil is one way to sense the variation in magnetic flux. However, the EMF created by the coil depends on how fast the magnetic flux through the coil is changing. So at low speed, you have no signal. You can try to compensate by using many turns, but there is always a dropout speed (designed to be below cranking RPM I suppose).

A Hall-effect sensor works even at a standstill, and whatever IC you buy will include the conditioning, Schmitt trigger stuff, but if you use a coil, you will need to do a few things to your signal before it becomes a clean useable digital signal. I don't know if any ASICs exist to do this.
I want to implement the ECU myself on a TI TMS570LS1114, using the N2HET timer subprocessor. As I currently see it, it will take into account the engine rpm, engine temperature, engine vacuum and gas pedal position. Maybe I'll directly measure speed on a wheel axis as well. I know modern ECUs take much more variables into account, but the current, original situation is very basic, so I think this should do for the first generation.

.....

Points are still a poor solution even with lower currents.  The contacts may last longer, but the heel still wears and you still get the same amount of timing scatter from contact bounce and any wear in the distributor bearings etc.

Indeed, and aside from learning and the desire to tweak the system, distribution wear and the associated inaccurate and scattered ignition timing are my main reasons to actually try to make something myself.

Thanks for all the feedback!
 

Offline pmbrunelle

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
Re: Multipole ring magnets experience
« Reply #18 on: December 24, 2015, 01:25:14 am »
I don't think that "missing pole" type things are commonly done to designate an index. It seems difficult to do... usually there's something separate for the index.

I suppose THD isn't too much of a problem for digital switches, but in theory there can be ringing (and polarity change) for very close airgaps; probably not likely to occur, especially as whatever sensor you use will need some enclosure, which will increase the effective airgap.

What will the material of the enclosure be? Aluminium? Machined nylon? 3D printed nylon?

To clarify: all of these gear-tooth sensors with a permanent magnet are variable reluctance sensors. The change in reluctance due to a gear tooth causes the magnetic flux density in the gap (between gear and magnet) to change. You can measure the change in flux density with either a coil or a Hall, but the sensor works based on the same principle. Only the measurement method is different.

For an all-included Hall solution, I would look at Allegro. They have gear-tooth type sensors which include all the AGC auto-calibration bells and whistles, and even includes the permanent magnet that goes with it! So connect to your timer and off you go.

But... I see you have a TI chip with the QEP module. If you can get a high resolution position sensor with ABZ output, then this is even easier. Just wire up your incremental + index sensor to the QEP, and the QEP will keep track of the current position. The current shaft angle will be waiting for you in a register, ready whenever your code needs to read the angle. Also, you can set up interrupts when the current position (as counted by the QEP) matches some other value you set in another register.

With this type of setup, you can forgo the countdown timer/extrapolation rubbish to estimate position in between teeth.

For a camshaft, I assume you have access to the end of its shaft. If you can install a diametrically magnetized cylindrical magnet on the end of the camshaft, you can use an end-of-shaft rotary position sensor to read it (presumably with machining of the timing cover), such as AMS AS5040 (or similar). It goes to very high RPM, and it has ABZ output; perfect for the QEP module.

See this appnote for magnet selection for end-of-shaft applications:
http://www.melexis.com/asset/magnet-application-note-mlx90316-downloadlink-5221.aspx

You may need a line driver on the rotary position sensor PCB for the ABZ signal to reach the ECU cleanly.

There may be +/-1 degrees of non-linearity or so, but this is on par with the spark scatter you see on a traditional distributor setup. Anyway, when you tune the spark advance, you tune for the spark that gives good power, whatever this advance is. So you don't need absolute accuracy; all you need is for your sensor to be repeatable (even if it is non-linear).

I'm sure you know that measuring crankshaft position is preferred, but where do you stop, right? Just one camshaft position sensor will not be the best, but it should be "good enough".

I would add intake air temperature (ideal gas law changes in air density) and oxygen sensor (it's good to have instrumentation, you don't want to be tuning blind) as useful inputs. I do not see the need for wheel speed for a beginner-level ECU; the engine stops at the flywheel; the ECU doesn't need to know what is happening outside of its world.
 

Offline MolenaarTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: nl
Re: Multipole ring magnets experience
« Reply #19 on: December 24, 2015, 11:04:12 am »
I don't think that "missing pole" type things are commonly done to designate an index. It seems difficult to do... usually there's something separate for the index.

I suppose THD isn't too much of a problem for digital switches, but in theory there can be ringing (and polarity change) for very close airgaps; probably not likely to occur, especially as whatever sensor you use will need some enclosure, which will increase the effective airgap.

What will the material of the enclosure be? Aluminium? Machined nylon? 3D printed nylon?
It would be a nice bonus to build the circuit inside the original enclosement, but this is not necessary.

To clarify: all of these gear-tooth sensors with a permanent magnet are variable reluctance sensors. The change in reluctance due to a gear tooth causes the magnetic flux density in the gap (between gear and magnet) to change. You can measure the change in flux density with either a coil or a Hall, but the sensor works based on the same principle. Only the measurement method is different.

For an all-included Hall solution, I would look at Allegro. They have gear-tooth type sensors which include all the AGC auto-calibration bells and whistles, and even includes the permanent magnet that goes with it! So connect to your timer and off you go.

But... I see you have a TI chip with the QEP module. If you can get a high resolution position sensor with ABZ output, then this is even easier. Just wire up your incremental + index sensor to the QEP, and the QEP will keep track of the current position. The current shaft angle will be waiting for you in a register, ready whenever your code needs to read the angle. Also, you can set up interrupts when the current position (as counted by the QEP) matches some other value you set in another register.

With this type of setup, you can forgo the countdown timer/extrapolation rubbish to estimate position in between teeth.

For a camshaft, I assume you have access to the end of its shaft. If you can install a diametrically magnetized cylindrical magnet on the end of the camshaft, you can use an end-of-shaft rotary position sensor to read it (presumably with machining of the timing cover), such as AMS AS5040 (or similar). It goes to very high RPM, and it has ABZ output; perfect for the QEP module.
I was thinking of using the axis in the old distributor, which is a handy camshaft breakout, to connect the tooth wheel/magnet for the sensor. Would it not be easier though, to just bypass the QEP module and use SPI to read out, for example, the AMS AS5147P?

See this appnote for magnet selection for end-of-shaft applications:
http://www.melexis.com/asset/magnet-application-note-mlx90316-downloadlink-5221.aspx

You may need a line driver on the rotary position sensor PCB for the ABZ signal to reach the ECU cleanly.
Would I run into trouble if I would use SPI to read out the sensor, since SPI is single ended? I would strive to put the sensor and MCU in the same compartment in the old distributor housing.

There may be +/-1 degrees of non-linearity or so, but this is on par with the spark scatter you see on a traditional distributor setup. Anyway, when you tune the spark advance, you tune for the spark that gives good power, whatever this advance is. So you don't need absolute accuracy; all you need is for your sensor to be repeatable (even if it is non-linear).

I'm sure you know that measuring crankshaft position is preferred, but where do you stop, right? Just one camshaft position sensor will not be the best, but it should be "good enough".

I would add intake air temperature (ideal gas law changes in air density) and oxygen sensor (it's good to have instrumentation, you don't want to be tuning blind) as useful inputs. I do not see the need for wheel speed for a beginner-level ECU; the engine stops at the flywheel; the ECU doesn't need to know what is happening outside of its world.
Currently, the car does not even have a G3 LPG system, just a G1 system, which the previous owner put in. As such, I can't accurately adjust gas input electronically. That might be the next project, but I will make sure to include interfaces for these sensors to be future proof, whatever that might mean on an old timer ;)
 

Offline pmbrunelle

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
Re: Multipole ring magnets experience
« Reply #20 on: December 24, 2015, 03:08:43 pm »
Using the old distributor housing is a good idea for the sensor.

However, I would not put the ECU in there. Underhood temperatures are severe. You will need all -40 to +125 Celsius rated parts, and probably silly things like 0402 resistors to fit everything in the space of the distributor housing. You may have difficulties to find enough room for all the connectors you want. I would only expose the minimum number of parts to underhood heat. Instead I would put the ECU in the cabin.

Use the SPI only for configuration at start-up, or even better: if you can do a one-time programming of the chip with all the settings you need, then you don't need to use SPI in the automobile at all.

This is how I would do a beginner ECU (lets say single-cylinder to simplify things).

Fuel Injection Sequence
  • In the background code, continuously do the following:
    -Calculate and then load the start-of-injection angle into the QEP compare match register
    -Calculate the injection pulse duration
  • When engine reaches the start-of-injection angle, the QEP compare match interrupt executes.
  • In the QEP compare match interrupt, do the following:
    -Based on the injection pulse duration (most recent value from background code), load the timer compare match register with T = Tpresent + Tinjection
    -Turn on the injector.
  • When the injection time is finished, the timer compare match interrupt executes.
  • In the timer compare match interrupt, do the following:
    -Turn off the injector.
The ignition sequence is similar to this, perhaps a little more complicated.

Obviously things will get a little more complex with multiple cylinders if you need to share compare match registers.

I would not connect an ECU's main angle reference only by SPI. You will have latency, you cannot have the compare match interrupt anymore, and you need to keep asking the sensor all the time where the engine is at...

Having the QEP is a huge advantage.
« Last Edit: December 24, 2015, 03:11:04 pm by pmbrunelle »
 

Offline rrinker

  • Super Contributor
  • ***
  • Posts: 2046
  • Country: us
Re: Multipole ring magnets experience
« Reply #21 on: December 24, 2015, 06:32:20 pm »
You mean you want to replace the mechanical points and ignition coil by an electronic ignition system? Probably by a capacitive system?

Unless it is a racing car, simply leave the mechanical contacts and replace them with new ones. Then simply use them to steer the electronic ignition. Mechanical points wear out mostly by the current they switch, not so much mechanically. Been there done that for an oldtimer Peugeot 404 and the contacts last more than 10 times longer.

 Good point. I remember my Dad retrofitting a CD ignition to our old '66 Chevy, had the car at least 10 years after he did that in the early 70's and never again had to replace points. That car worked hard, too, as we used it to pull a camping trailer and a small boat.

 A good engineer knows good enough as well as 'this is perfect' 😀 Best of all, there will be no fiddling around with the attachment of the disk and sensor trying to get the timing right.


     --Randy
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13129
Re: Multipole ring magnets experience
« Reply #22 on: December 24, 2015, 10:57:53 pm »
+ you get the benefit that its easy to implement a 'limp home' mode that disables the electronics and simply connects the points (+ a suitable condensor that's out of circuit in electronic mode) to the coil.
 

Offline MolenaarTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: nl
Re: Multipole ring magnets experience
« Reply #23 on: December 24, 2015, 11:41:28 pm »
I'd rather take a backup ECU with me than relay on unreliable points ignition
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13129
Re: Multipole ring magnets experience
« Reply #24 on: December 24, 2015, 11:52:39 pm »
Kettering ignition systems are repairable at the roadside with no more than a test lamp.  Even if you had a spare ECU, you would be most unlikely to be able to diagnose a wiring or sensor problem without a lot of test equipment.  Its not that Kettering ignitions are unreliable, its just that they need regular maintenance (clean and regap points, + a light smear of molybdenum disulphide grease on the cam) to remain reliable, and few car owners are willing to get their hands dirty now.
« Last Edit: December 24, 2015, 11:56:18 pm by Ian.M »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf