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


How to Electronically Modify Your Car, Part 10

Getting a handle on digital and analog signals

by Julian Edgar

Click on pics to view larger images

At a glance...

  • Analog signals
  • Digital signals
  • Frequency
  • Duty cycle
  • Variable duty cycle control
Email a friend     Print article
This article was first published in 2009.

Last week in How to Electronically Modify Your Car, Part 9 we looked at how DIY electronic kits can be used to broaden the range of available modification options. This week, we look at the sort of analog and digital signals that you will often need to deal with when modifying car electronics.

Analog Signals

An analog signal is one that changes without steps. For example, the voltage signal output of an airflow meter is usually of this type. The output may be 1.2V at idle and 4.1 volts at full power - and at in between loads, it can be any value between these extremes. 

Analog signals lend themselves to being monitored by devices like the Voltage Switch covered in How to Electronically Modify Your Car, Part 8. The device ‘watches' the varying signal, and when it reaches the pre-set trip-point, the switch activates. 

Click for larger image

This diagram shows an analog signal over time. The signal is indicating temperature, eg of the engine coolant. The signal is being monitored by a Voltage Switch, and when the temp rises above 95 degrees, the switch triggers - eg to run a radiator fan. When the temp falls below 85 degrees, the fan switches off. (Therefore, there is a hysteresis of 10 degrees - again see How to Electronically Modify Your Car, Part 8).

Other examples of analog voltage signals include the output signals from most MAP sensors, yaw sensors, throttle position sensors and temperature sensors.

Most people have no problem in understanding analog signals, so I've kept the description brief. But digital signals often cause consternation!

Digital Signals 

Click for larger image

Digital signals are usually either on or off. (The only exceptions are digital signals that work in discrete steps, but they're rare in car applications.) This diagram shows a digital signal over time. You can see that the signal is either on or off. 

If the signal was powering a light bulb, the light would be flashing. With a varying analog signal voltage, the light would instead be changing in brightness. To continue with the light bulb example - turning it on and off with a switch is to operate it digitally. Changing its brightness with a variable resistor is operate it in an analog manner. (See later in this artricle for more on controlling the brightness of a light bulb!)

An electronic fuel injector is operated with a digital signal - it is either open or closed, there's no attempt made to keep it open part-way.

Let's have a closer look at the way that electronic fuel injectors work, because their operation shows a lot of the characteristics of digital signals that we need to understand. 

Click for larger image

In the fuel injection system, the fuel is supplied to injectors at high pressure. Injectors are just solenoid valves with a built-in fine nozzle. When power is applied, the injector pintle rises, letting fuel flow through the nozzle in a spray. When power is removed, a spring shuts the nozzle, stopping the flow of fuel. 

When the engine is spinning at 2000 rpm, there are about 16 intake strokes every second. Since we add fuel every intake stroke, at 2000 rpm we need to fire the injector (and so squirt in a bit of fuel) 16 times a second. Rather than write "times a second", we say the injector is being pulsed at 16 Hertz (abbreviated to Hz). This is the injector's firing frequency.

So if someone says that a signal varies from 50Hz to 500Hz, we know that they're referring to how many times per second the signal switches on and off - from 50 times a second to 500 times a second. 

You can directly measure the frequency of a signal using a decent quality multimeter (the very cheapest don't have this feature). Normally, you set the meter to read volts DC and then press the frequency button. 

Another example of a variable frequency signal is that used by the car speed sensor. It works just like a bicycle speedo that has a magnet on the wheel and a reed switch on the frame. Each time the wheel rotates, it closes a contact and so sends a pulse to the ECU. If there are lots of pulses per second, the ECU knows the vehicle is travelling faster than if there are only a few pulses per second.

Key Point:

The frequency of a digital signal is how often it is being switched on and off, measured per second and expressed in Hertz.

Let's return to the topic of injectors. Because we want to inject fuel each intake stroke, if the engine is spinning at 2000 rpm, we must open the injector 16 times a second (16Hz). Therefore, we have a maximum of 1/16th of a second to get the injector open, squirt out some fuel, and then close it again, ready for the next event. 

It sounds a short time, but for an injector, 1/16th of a second is long enough to take a holiday in the sun. So at these revs, it's likely it will be open for only a small proportion of the available time - say 10 per cent of the 1/16th of a second. This percentage is called its duty cycle.

Click for larger image

Again, you can directly measure the duty cycle of a signal by using a decent quality multimeter. Normally, you set the meter to read volts DC and then press the duty cycle button.

Key Point:

The duty cycle of a signal refers to the proportion of available time it is switched on. It is expressed in per cent.

If the injector duty cycle is at 50 per cent, the injector is open for half the time. If the injector is at 75 per cent duty cycle, it is open for three-quarters of the available time. At 100 per cent duty cycle, it is open continuously, while at 0 per cent duty cycle it is continuously shut. 

You need to remember that the lift of the pintle is the same irrespective of the duty cycle; it's the duration of its opening that's important. It's also vital to remember that except at 0 and 100 per cent duty cycles, the injector is opening and closing at its pulsing frequency, which varies with engine speed.

Slow Motion

It's hard for humans to think of what's happening all in a blink of an eye.  So let's s-l-o-w it right down. 

Instead of an injector, think of a bouncer (er, crowd control officer) out the front of a club. He's opening and closing the door to let the queued-up line of people through. But this club is a weird one, because he swings opens the door only once every minute. To make sure he remembers this, there's a buzzer that sounds at one minute intervals. 

The rules might say he opens the door every minute, but he decides how long it stays open for. 

When he's feeling a bit mean, he opens it for only 5 seconds out of each 60. In other words, he opens it when the buzzer sounds and closes it just 5 seconds later. He's therefore has it open for 8.3 per cent of the time. 

On other nights, when he's feeling a bit generous, he opens it for 30 seconds out of the available 60 seconds (a 50 per cent duty cycle). Once, long-time patrons remember him opening the door for 45 seconds out of each 60 (a 75 per cent duty cycle) but that hasn't been seen for years.

So the door is being operated with a fixed frequency (once per minute or 0.017 Hz) but with a duty cycle that varies between 0 (door always shut) and 75 per cent (door open for 45 seconds out of the available 60).

You can see now that it's not very hard to picture a fixed frequency, variable duty cycle.

And a variable frequency is pretty easy as well - just change how long it is between each sounding of the door-opening buzzer.

(A point to think about is that a 15 second door opening time at one-a-minute frequency gives a duty cycle of 25 per cent, but that same 15 second door opening at a two-a-minute opening frequency has increased the duty cycle to 50 per cent. That's why the measured duty cycle of injectors goes up so fast with rpm - there's less time to get in the fuel.)

Variable Frequency and Variable Duty Cycle

So a digital signal can vary in two ways - its frequency and its duty cycle. In the case of an injector, its frequency varies with engine rpm and its duty cycle varies with load. But there are lots of other flow control valves in a car where the pulsing frequency stays fixed, with just the duty cycle varying.

This takes us to the next idea - a digital signal can actually be used in another way, a way that makes it act a bit like an analog signal. Let's have a look.

Click for larger image

Most flow control solenoid valves in a car (eg wastegate control valve, electronic Exhaust Gas Recirculation valve and idle speed control solenoid) used a fixed frequency but vary in duty cycle

If the frequency is slow (eg 5Hz), you'll be able to hear the valve actually opening and closing five times second - it will be clicking like mad. 

But if you speed up the valve operation a lot (and run it at say 100Hz), you can make an interesting thing happen. Because of the inertia of its moving parts, at high operating frequencies the valve will hover in mid positions, with the amount of duty cycle determining how far the valve is open. In other words, the valve no longer completely opens and shuts at the operating frequency, but instead stays at in-between positions!

The frequency that will allow this to occur is specific to the solenoid - it depends on aspects like the weight of the moving parts, the stiffness of the return spring and so on. 

Of course, this variable flow approach won't work  at  very low duty cycles (like 0 per cent)  because the valve will just be shut, and very high duty cycles (like 100 per cent) also won't work (the valve will just be fully open). So in solenoids of this sort, the actual duty cycle variation is typically in the range of 20 - 80 per cent.

The same approach can also be taken with other systems. 

Click for larger image

Remember back at the beginning of this story I talked about a light bulb? I said that turning it on and off with a switch was to operate it digitally - the light would flash on and off. Operating it with a variable resistor was to use analog control, and its brightness would change gradually. 

But, just like with the way the above solenoid was held in mid-positions, we can actually change the brightness of the light bulb by using digital control. 

What we do is set a frequency that's so fast the filament ‘averages out' the pulses of supplied current. If we trigger the light bulb at (say) 100Hz, we'll find that by varying the duty cycle from 0 to 100 per cent, we can smoothly change the brightness of the lamp being fully off to being fully on. 

If it's being fed by a 12V supply, at 50 per cent duty cycle the light will see an average voltage of 6 volts. At 75 per cent duty cycle it will see an average of 9 volts - and so on.

Exactly the same approach can be taken with DC motor speed control, eg a radiator fan motor, water/air intercooler pump motor, or fuel pump.

This approach is sometimes called PWM (pulse width modulation) or ‘variable duty cycle control'. 

Key Point:

If the operating frequency is set correctly, solenoid valves, lights and motors can have their operation smoothly changed by a variable duty cycle signal.

Conclusion

If the concepts in this article are all new to you, you'll need to study them carefully - perhaps more than a few times. However, when they're broken down into their simplest ideas, all that we're talking about are:

  • steplessly varying the level of a voltage (analog signal)

  • turning a voltage on and off at different speeds (digitally varying the frequency)

  • turning a voltage on and off for differing lengths of times (digitally changing the duty cycle) 

    Nearly every system in a car - engine management, turbo boost control, exhaust gas recirculation control, ABS, stability control, climate control, active torque split control and so on - uses these concepts. They're very good ones to know!

    Next week we will look at how you can actually see these signals.  

    The parts in this series:

    Part 1 - background and tools

    Part 2 - understanding electrical circuits.

    Part 3 - volts, amps and ohms

    Part 4 - using a multimeter

    Part 5 - modifying car systems with resistors and pots

    Part 6 - shifting input signals using pots

    Part 7 - using relays

    Part 8 - using pre-built electronic modules

    Part 9 - building electronic kits

    Part 10 - understanding analog and digital signals

    Part 11 - measuring analog and digital signals

    Part 12 - intercepting analog and digital signals

    Part 13 - the best approaches to modifying car electronics – and the series conclusion

  • Did you enjoy this article?

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


    Share this Article: 

    More of our most popular articles.
    Organising storage

    DIY Tech Features - 17 April, 2012

    A New Home Workshop, Part 8

    The effects of changing dwell time

    Technical Features - 26 August, 2014

    Ignition coil dwell time

    Some of the best wind tunnel pics you'll ever see

    Technical Features - 4 July, 2007

    Aero Testing, Part 4

    The consequences

    Special Features - 23 March, 2010

    153 km/h in a 110 zone

    Introducing... Vortex Generators!

    Special Features - 26 September, 2006

    Blowing the Vortex, Part 1

    Under $20 and an hour for a welding trolley

    DIY Tech Features - 26 November, 2013

    Make your own welding trolley

    The best shape for inlet pipes

    DIY Tech Features - 29 January, 2002

    Ballistic Bellmouths

    The steering

    DIY Tech Features - 2 June, 2009

    Chalky, Part 4

    One of the best electronic car modification tricks you ever saw

    DIY Tech Features - 15 October, 2013

    Pots aren't just variable resistors

    The concrete

    DIY Tech Features - 21 February, 2012

    A New Home Workshop, Part 4

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