Česky | English

Tachometer RCEXL - alternative firmware

Intro

This article describe the technical solution of RCEXL tachometer (and changing its firmware). This company is known primarily as a manufacturer and supplier of electronic ignitions for engines for various companies (DLE, DLA, Saito and others). For this reason, I hope that this description may be interesting for a wide range of modelers.

The idea for updating the firmware is not new, nor original. The condition is fairly accomplished the hardware (peripheral solution) and the ability to change software (microcontroller firmware). The two basic conditions tachometer satisfies (I tested the version 1.0 and 2.1 successfully), so why not try it?

What you need

What you get

What you lose

Circuit description

To make it possible to change the aforementioned firmware (requires write your own program for the microcontroller, because the original firmware is not public), it is necessary to know the outer solution, respectively. its behavior and properties. Therefore, the mention of it at least marginally. The main part is the Michrochip microcontroller PIC16F628A with the ICSP bus on the connector (5 points on the PCB - see photo). It is probably the most interesting feature for us - due to this we are able to re-flash the microcontroller, which is already soldered on the PCB. Next element is the 4-digit LED display (common cathode) connected to port A and B of microcontroller and operating in multiplex mode (switching time is about 1 ms). The last part consists LDO voltage regulator 5 V, 4 MHz crystal oscillator (may be for higher accuracy the internal oscillator is not used) and the transistor amplifier of input signal.

Measurement theory

The input signal (directly from the Hall sensor or from output signal of ignition) is connected to pin RB3 microcontroller, specifically to the internal CCP module. It is clear that the period is measured. So time, no frequency (frequency of pulses per unit time). This method provides more accurate results, especially at low RPM. The downside is necessary conversion to the frequency (or speed) - mathematical operation (RPM = 60x [1 / T]). But the microcontroller is here for this job.

The display is updated approx. every 300 ms. During this time, repeated the measurement of individual signal periods (up to 20, the rest is "deleted"). Subsequently, to calculate average values and its own speed (RPM). While the result in units of RPM, the figure is relatively stable. During development, I also tried to replace the arithmetic mean by the median (which is, as we know, more immune to one extreme value), but it turned out that it is unnecessary. Despite the fact that the calculation of median need logically much more time and "space" for microcontroller difficult than calculating the arithmetic average. For the sake of completeness, that period is measured with a 1 ms resolution - for this application it is completely sufficient.

Programming

Reflashing the microcontroller memory is relatively simple. Just connect the ICSP programmer to the connector to the corresponding pads on the PCB (see photo). For easy orientation the first point (MCLR) is the square, others are circular. Next step is to load the compiled program (hex) into the software and burn (program, flash) the microcontroller.

Specific setup (hw, sw) is individual of each. I'm using ELNEC products for many years, but of course you can use anything that is designed for programming microcontrollers and memories.

The newer versions of original tachometer (tested on 2.1) have "autocalibration" procedure. But I think that it's only show during power on. Therefore, I also did something. Succesfully updated tachometer with new program can be identified by: COPY / 2011 / PEb / U_10 / "rpm value"

Calibration

Every oscillator (include crystal) will oscillate at a different frequency. This is due to precision of used components in oscillator circuit, respectively due to their tolerance deviation. For this reason is needed to calibrate your tachomometer. This is done experimentally by setting the calibration value. This value is located at the first 4 bytes of internal EEPROM microcontroller memory. If none value is set (data on these address are FF or 00), the program automatically will use the 'default' value corresponding to the ideal oscillator frequency (4 MHz).

The ideal situation is to use a precise frequency signal generator. Another possible solution is to calibrate the tachometer with second one unit. The original tachometers are relatively accurate (from my experience 0.3 to 0.5%). Unfortunately I do not know any other simple solution. But there is an assumption that reprogramming will do person with experience and he will not have problem with searching the correct calibration value.

Program (firmware)

Maybe it seems that the description is still only theories. Therefore, we move to what is really need - the program for the microcontroller. It is freely available for non commercial purposes.

The original program is not publicly available (or I don't know where) and therefore is not possible change/upgrade them. Therefore, an alternative program was written again from begin (and logically a little bit differently). The result is the same or better (I hope ...). The program occupies approximately 50% of internal memory. So if someone have an idea for the addition or expansion, so there is still space.

I don't know what more write about the program. Perhaps, that the maximum rpm value is stored (from power connections) and is displayed approximately every 25 seconds (triple flash). After that the current rpm is again displayed.

Conclusion

Don't worry about the flashing/upgrading firmware. For real destruction of tachometer you need a hammer. When flashing will fail - the original firmware remain unchanged (tested). The only little trouble might be with finding the correct calibration value.

Files

Follow link "Download"

Photo

RCEXL tachometer with ICSP connector RCEXL tachometer with original and alternative firmware

Video

« back to category "Electronics"