Optimot, consultes lingüístiques

enHome tachometerHDHD-tacho-part7

Digital Tachometer for Harley Davidson Sportster (Part 7 - Components)

Part1 / Part2 / Part3 / Part4 / Part5 / Part6 / Part7 / Part8 / Part9 / Part10 / Part11 / Part12 / Part13 / Part14 / Part15

In this part I will list the components and integrated circuits (IC) I have used. Below, there is a basic circuit diagram (full schematic will be detailed in the next part).

Basic circuit diagram. Source: Momex.cat
Remark: Digit3 driver will be used alternatively with the RPM bar. In RPM mode we will see all 4 digits but in the rest of modes, Digit3 will remain OFF and the RPM bar will show the RPMs. This is done because the rest of modes can work perfectly with only 3 of the 4 digits.

Microchip PIC18F2553

The PIC18F2553 is the project brain. I would lie to you if I say that I chose this particular brand and model because it was the best of the best (best performance, best price, …). Frankly speaking, I chose it because it was the MCU family I started to work with when I decided to learn electronics. That and because it had enough pins to carry out this project.

PIC18F2553. Source: Microchip Technology PIC18F2553 pinout. Source: Microchip Technology

Requirements and specifications:

- Processing speed: According the datasheet, this PIC can run up to 48MHz. For this application, 20MHz will be enough.
- Interruptions: we will need one in order to stop temporarily the infinite loop and read the incoming J1850 bus message.
- Timers: there are 4 timers available and they will be used as following.
TO: functions related to the messages emission and reception.
T1: main code timer.
T2: brightness intensity regulation by means of PWM.
T3: function used to broadcast the information to the 7-segment driver.
- I/O: needed for the switch button, transistors and signals to the 7-segment display.
- PWM: adjustment of the 7-segment display brightness by means of PWM control.
- USART: In case we need the capability of designing a datalogger.

Furthermore, we will need:

  • In-Circuit Debugger/Programmer: this means a specífic programmer for PICs. In this project I used the PICkit 2 and PICkit 3, from the same Microchip Technology company. These tools are connected between the computer (via USB) and your IC (via 3 pins; PGC, PGD i MCLR) and they allow you to program the PIC with the code you have compiled previously.
PICkit 3. Source: Microchip Technology
  • MPLAB it is an IDE (Integrated Development Environtment) for PICs. It allows us to edit and compile code that we will program on the PIC afterwards with the PICkit.

Micrel/Microchip MM5450YN

If the PIC is the brain of the project, the MM5450 is the heart. This IC will allow us to control lots of pins in a very easy way. As a quick fact, according its website, by 2015 Microchip bought Micrel.

MM5450. Source: Micrel MM5450 pinout. Source: Micrel

Main specifications:

- Brightness Control: This IC has 1 pin (#19) that allows us to regulate the brightness of all the pins. With a PWM signal from the PIC and a resistor, we will be able to regulate the brightness by changing the PWM DC (Duty cycle).
- Serial Data input: All the 34 input pins from this LED driver are controlled by 2 pins; a clock signal (CLK) and a Data signal (DATA).
DATA and CLK signals. Source: Momex.cat
The MM5450 always waits for 36 clock signals (rising edge). First, it will check that the value on pin DATA has high value. If it is like this, it will start saving the values read from DATA for the next 35 rising edges. Once it receives the last clock (last rising edge), (for the MM5450 with only 34 operative pins, the read value on the 35th rising edge will not be considered, but it is mandatory to send something) the IC will apply the values to the output pins and it will wait again for the new 36 next values.
- 34 pins: Following diagram will show you how pins will be used on the MM5450. The alternative would be to multiplex the 7-Segments, this would allow me to use only 12 instead of 29, but for reasons I will explain on Part 15 (Issues during development) I decided to go for this configuration.
Connection diagram. Source: Momex.cat


No doubt, for me, this 5V Fixed Voltage Regulator from Texas Instruments (TI) offers the best solution in IC format in order to have a simple and reliable power supply.

LM340T Source: unknown

Brief Specifications:

  • It can supply up to 1A on the output. It has to be combined with a heat sink.
  • Overtemperature protection.
  • Shortcircuit protection.


In order to be able to read the J1850 bus messages, first we need to adapt the voltage levels between the bus and the PIC. There are some IC such as theMC33990 (NXP Feescale Semiconductor) or the HIP7020 (HARRIS Semiconductor), but as it is a very old technology, these ICs are discontinued and finding them on second hand markets it is no easy task.

MC33990 Source: Momex.cat MC33990 i HIP7020 Source: Momex.cat

Nevertheless, currently I am using the MC33990 in order to send some fake RPM and gear messages through a J1850 bus and receiving them by one of my working prototypes. Thanks to this, I am able to improve the software/code with no need to physically connect it to the motorcycle.

MC33990 Diagram Source: Momex.cat Signal shape on MC33990 Source: Momex.cat

The alternative on these circuits is to use transistors and resistors in order to adapt the voltage levels between the bus and the PIC. As, for the moment, we will need only to read, the final circuit will be very simple as you can see in the image below. One intersting thing to see is how the voltage values are changing on the circuit and how they are finally inverted at the end. If you want to use the MC33990, you will need to change 2 things in the code; invert the input value on the PIC by means of a “!” and the most important, to change the kind of interruption selecting the rising edge interruption.

Diagram transceiver Source: Momex.cat Signals shape: unknown

Project Index:
Part1 / Part2 / Part3 / Part4 / Part5 / Part6 / Part7 / Part8 / Part9 / Part11 / Part12 / Part13 / Part14 / Part15

keywords: HD, harley, davidson, tachometer, tacho, tacòmetre, rpm, J1850, components