Motorcycle gear counter LPC1227 based (Part 1): Prototype

In these three part series I’ll show you my advances in a gear counter for a motorcycle. Part 1 is about the prototype, Part 2 is going to be about the final design and implementation, and finally, Part 3will be about installing it in a motorcycle.

There are tons of tutorials in this matter, that’s way I won’t digg too deep into the theoretical stuff (but it’sn space rocket science, just three switches). I chose the LPC1227 microcontroller, because it’s an industrial grade chip, yet very inexpensive. It’s based on the 32 bits ARM Cortex-M0 low-power core. What is attractive about this chip is its ruggedness for noisy enviroments, plus I’ve worked with its cousines LPC1114 and LPC2129. Maybe the final design will be implemented on one member from the newest LPC800 family, but for now, I’ll be working and coding for the LPC1227 (in any good design one can port from one family to another easily and painless). It’s needless to say that I’m a big NXP 32 bits microcontrollers fan.

Months ago I designed a custom LPC1227 based board, in which the main focus was the automation for (my) home appliances. Now that I’m thinking in buying a motorcycle, I want to test this device in an automobile enviroment.

Most low-price or older motorcycles lack of gear indication, so if you lost the count you need to guess in which one the moto is, or down gears until you find the neutral one. There are some devices ready-to-use in the market, but I wanted to build my own. Besides that, I want to add some features like automatic display contrast, low-power modes, and a beep when the neutral gear is set.

This kind of devices, the easy ones, give us one advantage: we can implement a proof of concepts before we run them (those concepts) in a more serious design. For example, I’m intending to use the next LPC1227 features:

  • Low-power modes
  • Windowed watchdog
  • Analog comparators
  • GPIO digital filters
  • Brown-out reset

I’ve been using the former in my last projects, but as the source code (and the whole project) is going to be open-source, it might help someone else.

I’ll release the hardware and firmware designs once the device is up and running in a motorcycle, because both will be changing as the time goes, as in any project, so I would like to publish the most stable release. Meanwhile you can ask whatever you want about this project. Even more, you may ask for some features I have not thought yet.

Block diagram
Block diagram

The prototype looks like:


This is as I mocked the sensors (by now):


And a video showing the prototype working:

(Note: The blinking digit is not a bug, it’s a feature.)

All your comments are appreciated.


Un comentario sobre “Motorcycle gear counter LPC1227 based (Part 1): Prototype

  1. Kudos on your work! But an idea comes to my mind: Wouldn’t it be better to put an N in the display when it reaches neutral position instead of a zero?
    Keep up the good work.


Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de

Estás comentando usando tu cuenta de Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )


Conectando a %s