Maker Pro
Maker Pro

home made digital speedometer

psykoconnell

Mar 1, 2014
4
Joined
Mar 1, 2014
Messages
4
First, greetings to all. This is my first post. I have a dirbike that I converted to street legal. I pretty much ride it just to commute back and forth to work, but sometimes I just go for a cruise anyway. Although speedometers are NOT required for these types of conversions, I want to build my own digital speedometer just for a reference/general idea of my speed. Odometer would be cool too, but I know the miles I ride to/from work and I can use google earth to figure out any other miles when I go for a cruise.
Here's the parameters of the situation. My bike has a 12v system with plenty of power (battery and stator) available, negative ground system. I have a place to mount a digital readout, which can be attached to the board or not, with an area of 4.5"Width x 5"Length x 3"Depth or Height, whichever you prefer. Routing wiring of any sort is virtually up to my imagination and unlimited pretty much. I have several places I can install a magnetic pickup sensor of some sort and a magnet or magnets to trip the sensor. My skills are at the "beginning hobbyist" level of electronics, I can wire, solder, I have basic understanding of circuits and components, wiring diagrams and I have built a couple of circuit board "project kits" that can be bought at electronics stores. My background is aircraft maintenance and automotive racing, so physical and mechanical stuff is no problem.
What I need is a two digit digital screen. A circuit design with what would be required to convert the sensing to digital readout. Programming language (which I know nothing about) for the conversion. Lastly, I would need an idea on weather proofing the end unit, because rain doesn't scare me and it rains a lot in Florida.
Now, to add one last thing. I'm not a big fan of questions like "why are you doing this?", I can tell you why. This is AMERICA and I'm doing it because I can. I like small projects and doing stuff myself. I don't like the idea of paying some douchebag $199 for some made in china piece of crap that can only be done "THIS WAY" because it was made for something else. Being a converted dirtbike, there is virtually nothing made as a "bolt on" accessory that is not too expensive and complex. There are computer units out there but they have too many functions and BS for what I need and I'm not going to pay the high prices for stuff I don't need.
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Hi there and welcome to Electronics Point :)

You should be able to get a bicycle speedometer pretty cheaply. That's my first thought.

If you really want to do it yourself, you'll need a microcontroller such as an 8-bit PIC or AVR. These can be programmed in C or assembly language, depending on how masochistic you are. You can also get a PIC-based "BASIC stamp" - a small circuit board that can be programmed in BASIC. I know very little about those - for example, I don't know if they can drive a multiplexed LED display.

Your code will need to perform debouncing on the switch (you can use a reed switch or a Hall effect sensor to detect the magnet - a Hall sensor will be more robust), measure the interval between pulses, and convert that into a speed using division or a lookup table. Then it will need to drive a 2-digit display, probably multiplexed - that means that you display the two digits alternately, changing between them quickly enough that persistence of vision makes it look like they're both steadily ON. Two 7-segment LEDs would be a good choice.

The circuit would be best run at 5V. The micro could drive the display segments directly, with transistors for the cathodes.

This is not a beginner project, but not a very difficult one. If you want to learn about this stuff anyway, and you're keen, this is probably a good project to start with.

The microcontroller needs one input (from the Hall sensor), seven segment outputs, two digit enable signals (one at a pinch), and a crystal to set the operating frequency, unless you don't mind an error of a few percent. With power and 0V pins, this is about 14 pins. There are many suitable options in 14-pin DIP packages. You will need a device programmer; Microchip (the maker of the PIC devices) sells these for about USD 50. They're called PICkit 2 (older version, but more features) and PICkit 3 (newer).

Here are some suggestions of suitable components for you to have a think about.

PIC microcontroller - 8-bit core, 14 pin DIP:
PIC16F505 (baseline - cheapest, simplest): http://www.digikey.com/product-detail/en/PIC16F505-I/P/PIC16F505-I/P-ND
PIC16F610 (mid-range): http://www.digikey.com/product-detail/en/PIC16F610-I/P/PIC16F610-I/P-ND
PIC16F1823 (enhanced mid-range): http://www.digikey.com/product-detail/en/PIC16F1823-I/P/PIC16F1823-I/P-ND

Crystals:
4 MHz: http://www.digikey.com/product-detail/en/9B-4.000MBBK-B/887-2028-ND
16 MHz: http://www.digikey.com/product-detail/en/9B-16.000MBBK-B/887-2015-ND/3522089

Seven-segment common cathode displays (see http://www.digikey.com/product-search/en/optoelectronics/display-modules-led-character-and-numeric):
Single digit, red, 1" high, 120 mcd (pretty bright): http://www.digikey.com/product-detail/en/SC10-21SRWA/754-1700-5-ND
Single digit, orange, 0.57" high, 90 mcd: http://www.digikey.com/product-detail/en/LA-601EL/511-1539-ND
I'd go for the first one, if 1" is big enough, since it's big and bright. It needs a forward voltage of 3.7V though which might require special drive circuitry.

Magnetic sensors:
Honeywell 2SS52M: http://www.digikey.com/product-detail/en/2SS52M/480-1997-ND (omnipolar - magnet can be either way round)
I have little experience with magnetic sensors. You may want to choose several and try them out. See http://www.digikey.com/product-sear...tal-switch-linear-compass-ics/1967232?stock=1

Those are the major components. You should also get a breadboard for prototyping, and you'll need some stripboard to build the circuit on.

There are many folks here who can help with the design and programming, but you'll have a lot to learn! Have a think about it and let us know if you want to proceed :)
 

psykoconnell

Mar 1, 2014
4
Joined
Mar 1, 2014
Messages
4
Hello KrisBlueNZ, thanks for responding. My thoughts on the "CHEAP" bicycle speedometer? Already tried that...the POS didn't work and it would be something I would have to "shade tree engineer" the ever loving shiznit out of it to get to work properly...If I'm going to all that trouble, I'd rather have something badass that I built myself for a few dollars more, that will work. I will definitely look at the products you suggested and do some more research. I did find a basic handheld GPS that I could make a bracket to mount it for only $110 that I could also use during boating trips (the wife and I plan on doing some boating since we ARE in Florida) so if it's going to add up to that much doing it myself I may just go that route....
 

psykoconnell

Mar 1, 2014
4
Joined
Mar 1, 2014
Messages
4
thinking of going with this two digit LED display
http://www.digikey.com/product-detail/en/LDD-C814RI/67-1472-ND/252625

I have the perfect component for a weatherproof housing for it. I found an old 3 D cell Maglite that was broken but I still had the top, lens and bezel for the lens....it's double o-ringed so it's weathertight and the 2 digit display will fit with plenty of spare room. A little machine work and fabrication to mount my gauge pod, then I will build a controller board and mount it somewhere else with a pigtail to the display, mounted on the handlebars.
It's gonna look awesome!
I'm definitely taking this project on....the whole handheld GPS idea was ok, but I want COOL stuff on my bike....and whats more cool than people asking where I got that....ya, I built it...:D
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
That display will work but it's not very bright - 3.9 mcd (millicandelas). I thought you would want a very bright display for visibility in daylight.

Do you have any programming experience? If so, what language(s)?
 

psykoconnell

Mar 1, 2014
4
Joined
Mar 1, 2014
Messages
4
Hey Kris. No, I don't have any programming language at all. I know about basic DC circuits, some components and electrical schematics. I've built a couple of printed CB board project kits.
maybe I will look and see if there's other or better units with brighter MCD
 
Top