One-touch turn signal module (NN version)

From E31Wiki
Jump to: navigation, search
Turn signal diagram (NN version)

The one-touch turn signal (OTTS) module enhances the functionality of the turn signal lever by adding a mode where a single touch makes the indicators blink for a certain number of times. This behavior is also known as lane change turn signal or comfort blinker. This sub-article describes one of the variants of the OTTS module, the NN version. This variant is for electrical systems where the shared contact of the turn signal lever switch is connected to the negative terminal and the flasher relay switches the turn signal lamps between lamp and negative terminal. For more information about the OTTS module or other variants refer to the one-touch turn signal module main article.


Circuit diagram

As is the case with many microcontroller based projects the circuit diagram is rather simple. Since all logic is inside the controller's program memory, the diagram does not reveal much of the working.

Circuit diagram (NN version)

The heart of the diagram is IC1 – the microcontroller. The OTTS module is built around an Atmel ATtiny24, an inexpensive yet versatile microcontroller. IC2 is a LM2931Z-5 low-dropout voltage regulator and supplies the Atmel microcontroller with a stabilized 5 V. This isolates the sensitive controller from the hostile power environment of the car and ensures stable operation. The rest of the circuit is less critical and operates directly at the 12 V battery voltage.

Left from the controller are the inputs. Four-way DIP switch S1 is used to select the presets for the comfort mode and the canceling. Inputs IN_LEFT and IN_RIGHT are connected to the turn signal lever switch, and IN_LEFT_INDICATOR and IN_RIGHT_INDICATOR are connected to the output of the car's flasher relay. Unlike most other comfort blinker modules the OTTS module does not solely rely on the microcontroller's internal clock or an external crystal clock for the timing, but also uses the car's flasher relay output to the indicators to provide exact blink count and full flash functionality. Where all other inputs and outputs are usually easily accessible in the vehicle's steering column, the two indicator signals may be difficult to get to.

On the right side of the controller are both output stages – the bottom half is the same as the upper half but drawn mirrored. Switching is performed by N-channel MOSFETs T5 and T6. MOSFETs are reliable and inexpensive solid state devices that can switch large currents. To switch small currents MOSFETs may be overkill but the module is designed to be universally applicable. For this virtually every modern MOSFET can be used. Just make sure to use N-channel MOSFETs in a TO-220 package with a maximum gate-source voltage VGS of over 15 V. Pick whatever is cheap and available. The parts list further down shows a few popular types.

If the module has to switch heavy loads, the MOSFET internal resistance RDSon plays an important factor in the choice of MOSFET. The higher RDSon the more heat is dissipated in the MOSFET for a given current. The TO-220 package can dissipate up to 2 W without heat sink, but it is recommended to stay below 1 W when the module is mounted in a small closed box. For example for a current of 5 A the maximum RDSon at 1 W can be calculated as follows:



  • RDSon: MOSFET internal drain-source resistance [Ω]
  • PF: MOSFET power dissipation [W]
  • ID: Current [A]

Thus to switch the 5 A load, MOSFETs with RDSon of 0.04 Ω or lower must be chosen – for example the Fairchild Semiconductor HUF75339P3 N-channel MOSFET with RDSon of 0.012 Ω.

The efficiency of most MOSFETs is best when the gate-source voltage VGS is 10 V or more but the Atmel microcontroller operates at only 5 V. Therefore each MOSFET is driven by a double common emitter circuit around transistors T1 to T4. When the output stage gets a high signal from the microcontroller, current flows through the base of the first transistor, driving it into saturation and making it conduct. This pulls the base of the second transistor to the ground – the second transistor does not conduct. The MOSFET gate is at the same level as the 12 V battery voltage. Since the MOSFET source is connected to the ground, the voltage over gate and source (VGS) is now 12 V. The MOSFET conducts and current can flow through the load. When the microcontroller outputs a low signal, the double common emitter circuit pulls the MOSFET gate to the ground. VGS is then 0 V and the MOSFET does not conduct.

LEDs D1 and D2, and their current-limiting resistors R11 and R12 are optional. The LEDs provide visual feedback of the outputs which may come in handy when diagnosing but are otherwise not needed. Zener diodes D3 and D4 protect the MOSFETs' gate (input) against overvoltages and diodes D5 and D6 protect the MOSFETs against reverse polarity kickback voltages from inductive loads like relays. When the module has to drive large relays with nominal coil currents over 150 mA, it is recommended to use a 1N4007 diode or equivalent instead of the default 1N4148 for D5 and D6.

The double inverting MOSFET driver may seem excessively complex for its purpose. It is possible to omit the common emitter circuits and have the Atmel microcontroller drive the MOSFETs directly. A special type of MOSFET is required for this – logic level MOSFETs. Logic level MOSFETs do not require a VGS of 10 V or higher and can be driven with only 5 V – the voltage the microcontroller operates at. When opting for this approach, simply connect the outputs from the controller directly to the gate resistors R9 and R10. Both zener diodes can be omitted as well.

Circuit diagram (logic level NN version)

As long as the current through the MOSFETs is small any logic level N-channel MOSFET will do – for example the Infineon BUZ73L and International Rectifier IRL3215PBF. In fact, many regular N-channel MOSFETs may even be sufficient for this application. Just make sure the VGS threshold voltage is well below 5 V. For higher currents, like the 5 A example, a logic level MOSFET like the STMicroelectronics STP60NF03L with RDSon of 0.015 Ω can be used.

PCB layout

The OTTS module is designed on a piece of prototyping board with single islands and standard 0.1" pitch. As the name already implies, prototyping board is meant for circuits in development and not final designs. It doesn't look professional and is more time-consuming to solder because all traces must be soldered by bridging islands. However, prototyping board is readily available in electronic components stores and does not require special tools to develop printed circuit boards (PCB). If you have the means to develop PCBs you should also be able to route a neat PCB layout.

PCB layout (NN version). Caution: the solder side layout (left) is mirrored!
PCB layout (logic level NN version). Caution: the solder side layout (left) is mirrored!

Parts list

  • R1, R2: Resistor 47 kΩ
  • R3..R8: Resistor 10 kΩ
  • R9, R10: Resistor 1 kΩ
  • R11, R12: Resistor 2k7 Ω (optional – see text)
  • C1, C3: Capacitor 100 nF
  • C2: Electrolytic capacitor 100 µF 25 V
  • D1, D2: LED 3 mm round (T1) (optional – see text)
  • D3, D4: Zener diode 15 V 500 mW or equivalent
  • D5, D6: Diode 1N4148 or equivalent (see text)
  • T1..T4: Transistor BC547 or equivalent
  • T5, T6: N-channel MOSFET STMicroelectronics IRF630, STMicroelectronics STP36NF06L, International Rectifier IRFZ34NPBF, Fairchild Semiconductor NDP6060 or equivalent (see text)
  • IC1: Atmel ATtiny24-20PU
  • IC2: Voltage regulator LM2931Z-5
  • S1: 4-way DIP switch
  • J1..J5: Jumper wire
  • K1: 8-way screw terminal block 0.2" pitch 100 mm height (e.g. 2 x 3-way and 1 x 2-way) (see text)

Source code and binary

Download the source code and binary for the microcontroller:

One-touch turn signal module source code and binary (NN version)

A programmer, like the excellent low-cost Atmel AVR Dragon is required to upload the binary to the Atmel controller. The source code is written for the Atmel ATtiny24 microcontroller, but it can easily be adapted for other Atmel AVR series controllers – provided they have enough in- and outputs. The OTTS module requires two outputs, four inputs for the turn signal lever and indicators and an additional four inputs for the DIP switch. The ATtiny24 offers 12 in- and outputs. Those who route their own PCB can opt for a different Atmel AVR controller or the same controller in a smaller surface-mount technology (SMT) package. The source code is written in C. The Atmel AVR Studio coupled with WinAVR is a nice integrated development environment with C compiler for the Atmel AVR device series.


Put the OTTS module in a small plastic enclosure. Choose one that offers inner dimensions just slightly larger than the OTTS module. It's a good idea to pad the inside of the enclosure with foam to prevent the circuit board from rattling while driving. Be careful with padding when the MOSFETs switch large currents and become hot!


The OTTS module has eight wires that need to be connected to the car's electrical system. Most of these wires can be connected in or near the steering column in most cars – usually easily accessible. The two indicator inputs may be more difficult to wire up. Disconnect the batteries before installing the module to avoid accidental short circuits!

Wiring of the OTTS module (NN version)

The OTTS module as shown here is built with screw terminal blocks for the wiring. This may not seem like a good choice in environments that are exposed to continuous vibrations and shocks, but a good screw terminal is very secure. Contrary to popular belief it is important not to tin the wires when using screw terminals. Tinning stranded wires in a screw terminal is a recipe for problems. It will come loose sooner or later – no matter how hard the screws are fastened! It is recommended to use wire ferrules for the most reliable connection. Alternatively the screw terminal blocks can be omitted for PCB terminal pins to which the wires can be soldered for a secure connection.