TIM-6 ignition > Arduino

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Joined
Mar 24, 2011
Messages
1,091
Reaction score
386
Location
UK, Warwickshire
I have an electronics problem I could do with some help with.

I would like to take a tachometer interrupt signal from a Jerry Howell's TIM-6 kit for an Arduino Uno based engine management system and display.

Initially, I thought I could simply parallel the LED on pins 4 & 5, but now a dangerously slight uderstanding of electronics suggests that probably would not work. I am getting the vague idea that this circuit 'works' on currents rather than voltages.

I would like to get a signal when the hall sensor switches off, as that corresponds with the spark.

I want to avoid having to put another sensor on the engine if possible. If it would help, the hall sensor could perhaps be connected to the ignition circuit in some other way.

Could anyone explain, slowly, how the TIM-6 works, and what voltages to expect where, in both states of the hall sensor?

I will post a circuit diagram of the TIM-6 if necessary, but won't if not for copyright reasons.
 
  • Tell me which electronics forum you asked this on.
  • Point out, on that forum, what part of my answer you didn't understand.
  • I will help.
Or, if that wasn't you:

Replace the LED with the input side of an opto-isolator. Interrupt your Arduino with the output side (if you use an open-collector isolator you'll need a pull-up resistor).

Done. Easy-peasy. A circuit diagram will help, and posting one is fair use, in my but-I'm-not-a-lawyer legal opinion.
 
Unless I am looking at the wrong diagram (or have had one too many beverages), when the hall sensor is "on", it's output goes low and that turns on the LED and also turns on the power transistor causing current through the coil, this builds a magnetic field. When the hall sensor turns off, the LED and the power transistor turn off. When the current through the coil suddenly stops, the magnetic field collapses and this causes a big pulse on the secondary of the coil and this is what makes the spark. If you are simply looking to know the RPM's it doesn't really matter which state change you take because the frequency will be the same going high as going low. So take a 1K and connect it between the output of the hall sensor and your arduino and go form there. If you want the opposite switching polarity add an NPN transistor between the 1K and the arduino, this is probably better and will add isolation between the ignition and arduino. And why is it that when we find schematics on the internet (or in magazines in the "old days") that there is inevitably a minor error that can cause a circuit to not work correctly.
 
Last edited:
Hah! Found it -- if this isn't you, it's someone in the same boat: getting interrupt from ignition circuit
The link looks very much like someone in the same boat ;). It is unkind to publicly make a connection between the different internet identities people may choose to adopt, however obvious it may be to you, unless they are misbehaving in some way. It is a form of 'outing'.

Actually I posted here first, but got no replies until today. I also asked on another relevant forum where I use a different name, but that is very busy and I did not get a single reply there either. OTOH Stack Exchange forums tend to be pretty good.

Replacing the LED with an opto-isolator certainly seems to be the way to do it. The Arduino will also control power to the ignition circuit through a relay, so it can switch it off if the hall sensor stays on for more than a second or so. This protects the coil and the battery.
 
It is unkind to publicly make a connection between the different internet identities people may choose to adopt, however obvious it may be to you, unless they are misbehaving in some way.

Point taken. But folks who spend effort answering questions on technical forums tend to have a low threshold of patience for questions duplicated all over the place. It's tedious if you want to try to get right answers everywhere, and infuriating if someone energetic but wrong has been running ahead of you, peeing on every lamp post.
 
Per that link, putting your Arduino in parallel with the Hall sensor would be the most straightforward way to do it if you were an EE, and understood how to keep the processor safe from the transients on the ignition system and how to protect it from overvoltage on the line from the Hall sensor. But for someone who's a total newbie, an opto is overkill, but safe.
 
I am a MechE, but total newbie as far as electronics goes. May I ask a suplementary? If I use an opto for my signal, do I still earth everything together? Or put it another way, if I want a common earth do I need some form of transient protection for the Arduino, and if so how would I do that? (Jerry Howell does not provide a circuit diagram, so I have worked it out from the pcb, leaving off the component specifics here.)
 

Attachments

  • Ignition Circuit.pdf
    95.7 KB · Views: 467
  • Block Diagram.pdf
    97.9 KB · Views: 400
The opto-isolator is a good plan and it does allow total isolation. It all depends on the power supply for the TIM, if it has it's own battery then run separate grounds. If the supply shares a ground with the rest of the circuitry, then the grounds are going to be common. If that is the case, you could place an inductor coil (not sure on the best values for that) between the TIM ground and the rest of the grounds to help keep noise and transients from getting back to that circuitry.
You should be able to connect the opto-isolator in series with the existing LED if you wanted to keep that for a visual(you MAY need to lower the 270 ohm a tiny bit). Good luck -
 
I am a MechE, but total newbie as far as electronics goes. May I ask a suplementary? If I use an opto for my signal, do I still earth everything together? Or put it another way, if I want a common earth do I need some form of transient protection for the Arduino, and if so how would I do that? (Jerry Howell does not provide a circuit diagram, so I have worked it out from the pcb, leaving off the component specifics here.)

No sort of, Yes, depends on how much you want to spend. Actually he does for the Tim-6.
Sorry to hear your not getting the answer your looking for here but, let's start over ok.
First what kind of tachometer are you going to use? it's required voltage, analog or digital.
The Uno board can use 7-12 supply or the USB cable for PWR but, only 5 volts on the inputs. The outputs are limited to 20ma current draw which is about a simple 3mm LED (check it's specs). If you use an opto-isolator for a trigger source use it serial with the LED you have now so you don't loose the timing LED. Change the 270 ohm resistor to @130 ohm or put 2 270 ohm resistors in parallel. The input side of the opto goes with the timing LED. The output can be whatever the tach needs, say 6-12 volts.

You can use a common ground (-) but, it would be best to use a seperate (+) power supply for the TIM-6 ignition. Filtering consists of using an inductor and capacitors on the input power to the Uno and mostly likely caps on the temp sensor. The filter shown below is very common and used everywhere, you could remove the FR102 and the 100uH parts for use on your temp sensor. I hope this helps

Automotive_Filter.png


Ray
 
Ray, the answers I have had so far have been very helpful, it just took a short time.

The Arduino is the tacho, among other jobs. It takes the input we have been talking about from the ignition as a tacho signal, it will then output to an LCD display.

I may well want a timing light, but again the Arduino can do that accurately enough from the ignition input. The signal is only going to be in the range of 10 to 100Hz at the outside.

The intention, as the block diagram shows, is to power everything from a 12V battery supply, and the Arduino and TIM-6 will each have its own separate LM2596 buck converter power supply from the battery. Will that provide sufficient input power filtering?

An interesting stability test test will be when the 3.3 A-hr batteries are providing something like 2 to 2.5A to the starter motor power supply.

BTW, I still have a to-do list before I try to start the engine, but I do already have the fan control circuit tested, with 25kHz PWM output, and reading the fan tacho signal :
http://www.charleslamont.me.uk/Seagull/ignition.html#preview
 
The block diagram calls out a 12V bus, being fed by a 7.2V battery and a 4.8V battery -- so, uh, "does not compute"?

Assuming that everything is well constructed, the dual LM2596 regulators should make your job easy. But if you're really running off of a 6-cell NiMH pack, the voltage in to the regulator may fall below 5V during starting; that'll get carried through to the Arduino as a voltage sag which may or may not discombobulate it. If you're going to run a 12V pack in the end, then you should be fine.

I don't know how good of brown-out protection those Arduinos have -- if it has a good brown-out circuit, then an undervoltage event on startup will just make it reset, and then carry on (unless it's controlling the starter).
 
Ray, the answers I have had so far have been very helpful, it just took a short time.

The Arduino is the tacho, among other jobs. It takes the input we have been talking about from the ignition as a tacho signal, it will then output to an LCD display.

I may well want a timing light, but again the Arduino can do that accurately enough from the ignition input. The signal is only going to be in the range of 10 to 100Hz at the outside.

The intention, as the block diagram shows, is to power everything from a 12V battery supply, and the Arduino and TIM-6 will each have its own separate LM2596 buck converter power supply from the battery. Will that provide sufficient input power filtering?

An interesting stability test test will be when the 3.3 A-hr batteries are providing something like 2 to 2.5A to the starter motor power supply.

BTW, I still have a to-do list before I try to start the engine, but I do already have the fan control circuit tested, with 25kHz PWM output, and reading the fan tacho signal :
http://www.charleslamont.me.uk/Seagull/ignition.html#preview
I agree with Tim about the voltage sag when starting. I myself prefer to use 12v 7ah gel-cell battery with buck converters. As for the buck converters and noise that all depends on how well they are built. A buck converter which is a switching P.S. and if it has no output filter is very noisy because of the design. The noise level on buck converters generally goes down as more load is applied but, if to much load is applied the voltage will droop. So for the one supplying the Arduino I would put a linear regulator between the buck and the Arduino. The Arduino uses very little current (load).

Side note here: Linear regulators can and will make noise also but it is small and I've never had a problem driving an Arduino with one. Problem with linear regs. is that the more voltage difference between input and output the hotter they run. For example 12v down to 5v will make for a lot of heat. Switching P.S. can handle the convergen better (less heat) but are noisier. I make devices that are UL certified and I always double up on the noise filtering, some advice that was given to me. So in your case it is going to be a lot of trial and error unless you have an oscilloscope.

Here is a good web page but, has a bit much math; Input and Output Noise in Buck Converters - Maxim Integrated

Ray
 
7.2 + 4.8 = 12. I bought the 7.2V pack for experiments with a starter motor. Later, looking in to fans, I found I would need 12V to drive a PWM computer fan, so bought a 4.8V pack to put them in series. Each pack will be charged separately, partly because the charger I bought will only go up to 8 cells. I will probably adjust the starter power supply (10A) to output rather more than the motor's rated 7.2V.
Digesting your post, Ray.
 
That series combination should work. It'll deliver a bit less voltage than a "12V" lead-acid (which is something like 13.8V fully charged, and more when it's actively charging). But if the wiring is stout enough the voltage should hold up.

I'm assuming you're using buck regulator modules; there's no guarantee with cheap eBay stuff, but if it works it'll probably keep working. If it doesn't work, or if you just want to start with something that you can trust, ask -- Texas Instruments makes some very easy to apply power converter modules. They're designed to solder onto a board, but all you need is the module, so it's an easy task. Farnell in the UK, and DigiKey or Mouser in the US, should have 'em.
 
That series combination should work. It'll deliver a bit less voltage than a "12V" lead-acid (which is something like 13.8V fully charged, and more when it's actively charging). But if the wiring is stout enough the voltage should hold up.

I'm assuming you're using buck regulator modules; there's no guarantee with cheap eBay stuff, but if it works it'll probably keep working. If it doesn't work, or if you just want to start with something that you can trust, ask -- Texas Instruments makes some very easy to apply power converter modules. They're designed to solder onto a board, but all you need is the module, so it's an easy task. Farnell in the UK, and DigiKey or Mouser in the US, should have 'em.
It should work. My only concern is that I hope the batteries can deliver enough current without to much voltage droop but, try it and see. Just remember starter motors are noisy but will draw as much current that is available and ignitions are all very noisy EMI and EMF. Also remember what I said about the filtering and you should be ok. Now where did I put my Uno, LOL.
Good luck.

Ray
 
He's using battery packs designed for RC cars, which deliver around 30A in normal operation. So 2.5A should be no trouble.
 
I am a MechE, but total newbie as far as electronics goes. May I ask a suplementary? If I use an opto for my signal, do I still earth everything together? Or put it another way, if I want a common earth do I need some form of transient protection for the Arduino, and if so how would I do that? (Jerry Howell does not provide a circuit diagram, so I have worked it out from the pcb, leaving off the component specifics here.)

Can you let us know how you found that TMP37 as a sensor....... generally analog sensors tend to give readings that vary quite a bit with Arduino, regardless of specific tolerances.
I use the digital DS18B20 which is housed in a stainless jacket and they work well.
 
Bluejets, it will be quite a while before I get that far. The engine is not yet ready to run. I have still to design and make a coolant pump among other things.

Temperature response does not need to be instantaneous, so I can smooth the readings in software, eg feed them into a ring buffer and take a weighted average, but that should be after trying to reduce noise electronically.

I don't know if a TMP37 will be suitable for the environment. Perhaps I should use a thermistor? Or some other gizmo?

I am not sure if I should fix something to the engine, in which case it needs to be very small, non-invasive and unobtrusive, or should measure the coolant temperature near the radiator.

Thanks for suggesting the DS18B20. I think it is much too big to be fitted on the engine. In a pocket by the radiator might be the answer, but even then, at 30mm long it would be nearly half the size of the 80mm fan and radiator!
 
Hi Charles,

Texas Instruments make linear thermistors in surface mount packages. It would be easy to solder wires to them and then bond them to your radiator body with epoxy.
 

Latest posts

Back
Top