Shopping: Real Estate |  Costumes  |  Guitars
This Issue Archived Articles Blog About Us Contact Us
SEARCH


Performance Electronics, Part 5

Get your mind around these concepts and you'll be streets ahead

by Julian Edgar

Click on pics to view larger images

At a glance...

  • Part 5 of a 5-part series
  • Frequency signals
  • Pull-up resistors
  • Pull-down resistors
  • Intercepting frequency signals so the system still works!
Email a friend     Print article

Over the last four weeks we’ve looked at systems that switch on and off (Performance Electronics, Part 1), systems that use pulsed signals for control (Performance Electronics, Part 2) and (Performance Electronics, Part 3), and the modification of analog signals like those from most airflow meters (Performance Electronics, Part 4).

This week, in the last of the series, we’re going to look at one of the electronic problems that can occur when intercepting pulsed signals.

Frequency Signals

In Parts 2 and 3 of this series we discussed variable duty cycle signals. These are used to control solenoid valves in systems as diverse as boost control and the fuel injection. In addition to variable duty cycle signals, there’s another form of pulsed signal. It often keeps the same duty cycle (eg 50 per cent) but varies in frequency.

One of the easiest of these signals to understand is a speed sensor signal. There are different ways in which speed signals are generated but let’s look first at the simplest. Some older speed sensors are built into the speedo of the car and comprise a reed switch that is closed whenever a magnet passes. If the magnet spins with the speedo drive, the switch will open and close rapidly as the car is driven along. The faster the car is travelling, the faster the switch is turned on and off.

Click for larger image

This diagram shows the system. Each time the magnet gets near the reed switch, it closes, sending a 5V to the ECU. Then, when the magnet moves away from the reed switch, the switch opens, turning off the 5V. The results is an on/off 5V signal – a square wave.

ECU Input Pull Up and Pull Down

Click for larger image

Now, let’s take a closer look at what happens inside the ECU. The arrangement could be like this – the signal goes straight into a microcontroller that looks at the signal’s frequency and then works out how fast the car is travelling. When the reed switch is closed, there’s 5 volts being fed into the micro input. But what happens when the reed switch is open? Then there’s nothing – the input is just floating! Any electrical noise on the input could be seen as a signal – not good.

Click for larger image

So to avoid that problem, here’s what is done. A resistor is wired between the input and ground. When the reed switch is closed, 5 volts is available on the micro’s input – the resistor is too high in value to prevent much current passing through it to ground. But when the reed switch opens, the resistor can pull the micro input to ground. Now the input is no longer floating because it’s tied to ground.

Click for larger image

So that’s a pull-down resistor – but what about a pull-up? It’s very much the same idea but this time the other side of the reed switch is connected to ground and the pull-up resistor is tied to 5V. When the reed switch is open, the input to the micro is pulled-up to 5V. When the reed switch is closed, the input to the micro is pulled-down to ground. (Note the voltage of the pull-up doesn’t have to 5V – it could be 12V.)

Sensor Output Pull-Up and Pull-Down

Some sensors need pull-up or pull-down resistors before they’ll produce an output. For example, a Hall Effect sensor usually requires a pull-up resistor before it will have an output. Let’s take a closer look at this.

Click for larger image

The action of the Hall Effect device can be thought of as being like a switch to ground. Here the switch is open and when the output is off, the meter shows zero voltage output.

Click for larger image

But when the switch is closed, there’s still zero voltage to ground! Hmm, no signal output, whether the Hall Effect sensor is ‘open’ or ‘closed’.

Click for larger image

But if we add a pull-up resistor, the situation changes. Now when the sensor is ‘open’, the output is 5V.

Click for larger image

When the sensor is ‘closed’, the output drops to 0 volts. (There’s not a short circuit between the 5V supply and ground because of the resistor in between.)

In some cases sensors need pull-down resistors to operate – but it’s just a reverse of what was shown for a pull-up sensor.

The Implications

Click for larger image

As we said, a few parts ago in this series, all this used to fall into the “yeah-it’s technically-trick-but-so-what?” area of knowledge. Pull-ups, pull-downs – who cares? Well, if you intercept a frequency signal and want to modify it, it all becomes very important! For example, if you put a speedo interceptor into the circuit and the correct pull-ups and pull-downs are not put into place, the system will stop working.

Intercepting a frequency signal is much trickier than intercepting an analog voltage of the sort coming out of an airflow meter!

The main trouble with intercepting frequency circuits is that until you make some measurements, you don’t know what you’ve got. And furthermore, after you’ve made those measurements, the module that you’re doing the intercepting with needs to be able to take all configurations into account. Before we get into the possible problems, let’s take a look at the Silicon Chip Speedo Corrector interceptor kit. (This can alter the speedo reading in 1 per cent increments, either up or down. It can also be used for tachos.)

Click for larger image

This diagram shows how you would never have the system set up! In fact it shows pretty all the options in place simultaneously. But let’s take it step by step. On the input to the speedo corrector (so what the sensor sees as its output) we have the options of a pull-up resistor or a pull-down resistor or no resistor. The pull-up resistor has the further options of being either pulled up to 5V or pulled up to 12V. As you would expect, the pull-down resistor goes to ground.

On the output (so what the ECU sees on its input) we have the same pull-up options of 5 or 12V (if it’s selected for the input it’s also selected for the output), and also a pull-down is available.

If the pull-up or pull-down is wrong on the input to the Speedo Corrector, it’s likely the sensor won’t work – it will have zero output. However, what if the pull-up or pull-down is wrong on the Speedo Corrector output? Hmm, now it gets really tricky.

Click for larger image

If the pull-up or pull-down resistor is wrong on the output of the Speedo Corrector (ie it’s the opposite of the input to the ECU) then the resulting signal will depend on the battle of the values between the two resistors. In other words, as shown here, with a pull-down at the output of the Speedo Corrector and a (hidden!) pull-up in the ECU, the result will be that the two resistors act as a voltage divider and the signal voltage ends up somewhere between 0V and 5V. So it’s important the output pull-up/pull-down resistor matches what’s inside the ECU.

OK, it’s not a very easy subject, is it? So let’s take a look at how you can work out what’s needed to successfully intercept a frequency signal, just by making some measurements with your mutlimeter.

Measuring a Working System

The first step is to measure what’s going on when the standard system is working correctly – that is, before an interceptor is put into the circuit. Since the system is working we know that there will be a signal travelling between the sensor and the ECU. But what sort of signal is it? By far the best way of finding this out is to use an oscilloscope (see Using Oscilloscopes on Cars, Part 1) but even if you have just a multimeter, it’s possible to work out what’s happening.

Click for larger image

So far we’ve described systems where the signal is a square wave – an on/off signal. As can be seen on this graph, as time passes, the voltage goes high-low-high-low. This is a 5V square wave.

Click for larger image

But another possibility also exists – the signal might be a sine wave like this. For example, the ABS sensors in most cars output a sine wave signal. A sine wave signal is measurable by a multimeter set to AC volts, but when set to DC volts, the meter will show little or no voltage (because the signal spends the some time above 0V as it does below it).

So the first question to answer is: is the signal a square wave or sine wave? If measurement of the working signal shows an AC voltage, it is a sine wave. If measurement of the working signal shows no (or very little) DC voltage, it is a square wave.

  • Sine Waves

A sine wave output sensor doesn’t need a pull-up or pull-down resistor on the input to the interceptor – like an AC bicycle generator, this type of sensor will work without being pulled up or down.

But what about on the output of the interceptor?  How is that configured? In the case of the Speedo Corrector and most other interceptors, sine waves get turned into square waves by the action of the interceptor. This is the case simply because it’s easier to electronically engineer an interceptor that does this, and since the ECU isn’t looking at the shape of the wave but only how many up/downs it has per second, the system still works fine. We know the ECU wouldn’t have had a pull-up or pull-down resistor inside it (because there was no need to have one) but for the Speedo Corrector output to work, it needs a pull-down or pull-up resistor on its output. So with a sine wave signal, an output pull-down resistor is fitted, pulling down from 5V.

  • Square Waves

But what if the signal is a square wave? A 50 per cent duty cycle square wave working on a 0-5-0-5V waveform will have an average DC voltage of 2.5V. So if we can measure a 2.5V DC voltage on the working signal, we can be fairly sure we’re dealing with a 5V square wave. If that’s the case, we need to pull the signal to 5V, or pull the signal from 5V. Either way, we know we’re dealing with a 5V square wave.

If we measure a DC voltage higher than 2.5V (eg 6V) we know we’re dealing with a square wave that works on a higher voltage – like 12V for example. So we’re going to need to pull the voltage from (or to) a higher voltage, like 12V.

So at this stage we don’t know whether we need pull-up or pull-down resistors, but at least we now know we’re dealing with a square wave that works 0-5-0-5 or 0-12-0-12 volts. To find out whether pull-up or pull-down resistors are needed requires that we disconnect the sensor and directly measure its output.

Measuring the Sensor

The next step is to measure the sensor output signal without the sensor connected to the ECU. If we can measure a voltage that’s relatively high (eg above 2V) we know that the ECU must use a pull-down resistor, in order that the voltage falls to zero in the ‘low’ parts of the waveform.  Therefore, a high measured voltage will require the installation of a pull-down resistor on the interceptor’s input.

If we can measure a sensor voltage that is relatively low (eg below 2V) we know that the ECU must use a pull-up resistor, so the voltage is pulled to a much higher value than this on the ‘high’ parts of the waveform. Therefore, a low measured voltage will require the installation of a pull-up resistor on the interceptor’s input.

(Important: when doing these measurements, just the signal output of the sensor should be disconnected from the ECU. Make sure power and earth are still available to the sensor!)

The output of the interceptor is then configured in the same way as the input – ie an input pull-down uses an output pull-down, and an input pull-up uses an output pull-up.

Steps Summarised

So by making measurements with a multimeter, first of the working system and then of the sensor output, we can find out the following:

  1. Is the signal a sine wave or square wave? A sine wave does not require a pull-up or pull-down resistor on the input to the interceptor, but the interceptor output signal will need to be pulled down from 5V.
  1. Is the square wave working with 5V or 12V on its high points? The pull-up resistor that we might need to fit will need to pull-up to this voltage.
  1. Is the signal output of the disconnected sensor high? If so, a pull-down resistor will be needed.
  1. Is the signal output of the disconnected sensor low? If so, a pull-up resistor (to whatever pull-up voltage we measured above in Step 2) will be needed.

Series Conclusion

That’s it for this series. In it we’ve covered a lot of ground – from hysteresis to pull-up resistors. We hope you’ve enjoyed the ride, brow-wrinkling though it has been. One thing’s for certain, understanding these concepts will make electronically modifying your car far more likely to be successful.

Did you enjoy this article?

Please consider supporting AutoSpeed with a small contribution. More Info...


Share this Article: 

More of our most popular articles.
Getting a great looking and durable finish

DIY Tech Features - 21 October, 2014

Powdercoating of fabricated parts

A day of testing with the Hyundai i30 diesel rally car

Special Features - 18 May, 2010

Pushing Limits

A home-built jet-powered kid's scooter...

Feature Cars - 23 January, 2007

John's Jet Madness!

Want to see where you're going with modifications? Measure the airflow meter output.

DIY Tech Features - 20 January, 2005

Using the Airflow Meter as a Dyno

Reducing engine intake restriction to a bare minimum

DIY Tech Features - 30 October, 2007

We Have a Record!

An engine that combines both 2-stroke and 4-stroke functions

Technical Features - 16 September, 2008

Stroke of Genius

Will we one day all be driving solar powered cars? Nope!

Technical Features - 19 September, 2007

Alternative Cars, Part 2 - Solar

Ten great home workshop ideas

DIY Tech Features - 16 May, 2008

Useful Ideas

Yeah, bro. Fit a huge single...

Technical Features - 10 August, 2010

Turbocharging Philosophies

Stopping the heat spreading

DIY Tech Features - 1 July, 2014

Making turbo heat shields

Copyright © 1996-2020 Web Publications Pty Limited. All Rights ReservedRSS|Privacy policy|Advertise
Consulting Services: Magento Experts|Technologies : Magento Extensions|ReadytoShip