Speedometer newbie guidance

Hello Arduino team & community,

I am new here and noob till the bone, nice to meet you all! I am a webdeveloper and I just stumbled upon Arduino and really thought; WOW! This can be really fun! I really look forward to do some codes 8)

For quiet some time I have the idea to build an embedded speedometer on my motorcycle with two dot matrix screens of 8 by 5. My only real requirement in the project is to keep everything as small as possible. So after I was done drawing everything out I think I can get things done with the following items:

Hardware - 1 Arduino Nano (v3) - 2 x Dot Matrix 8 by 5

Hardware input: - 1 x ABS speed sensor - 2 x Indicator left/right - external voltage provided by motor - 1 x Indicator Warm-up - external voltage provided by motor during warm-up

The drawing (sorry not the best): http://test.aerosol.me/leds/LED-technische-tekening.gif

Dot matrix: http://test.aerosol.me/leds/matrix.png

However I am just a noob so please help me out: - Am I on the right track with my hardware? - Are there any problems with my drawing? - Why do my dot matrix have two inputs on column #3? Should I be aware now of that fact I could blow up that column? :cold_sweat:

Thanks a lot in advance!

wrt the drawing looks good, 2 points: - I think the 12V directly on the +5V may be not so smart, don't know if the tiny has a voltage regulator on board otherwise use an LM7805 to make 5V - the blink has 2 lines to 2 analog ports, I think you meant one for left and one for right, right?

The double connector to the pin, consider it an extra freedom for the design of PCB.

Why are you using only 2 digits, in the Netherlands the speed limit is 120 so you need three digits I guess?

Looks like he's using a Nano, which has an on-board regulator. But, you're dreaming if you think what you're going to get is 12V. ;) More like 10-15V, bouncing around all over the place (but generally around 13-14V) at runtime. But, that's technically within the limits of the regulator on the Nano.

robtillaart: - the blink has 2 lines to 2 analog ports, I think you meant one for left and one for right, right?

Yes, indeed, one line will be for the left and the other one for the right.

robtillaart: The double connector to the pin, consider it an extra freedom for the design of PCB.

haha ok awesome also thank you for answering!

robtillaart: Why are you using only 2 digits, in the Netherlands the speed limit is 120 so you need three digits I guess?

Good question :D to be honest; its for my scooter :roll_eyes:

logic: Looks like he's using a Nano, which has an on-board regulator. But, you're dreaming if you think what you're going to get is 12V. ;) More like 10-15V, bouncing around all over the place (but generally around 13-14V) at runtime. But, that's technically within the limits of the regulator on the Nano.

Thank you for confirmation that! :)

I did a 2-digit speedo for my truck, that's more than enough for some vehicles :)

What's with the 3v3 going to the ABS speed sensor? For that matter what is this sensor?

And what's the warmup mode V going into AREF? And what is the warmup mode V for?


Rob

Graynomad:
I did a 2-digit speedo for my truck, that’s more than enough for some vehicles :slight_smile:

Very true and I like to cruise. perfect combination :slight_smile:

Graynomad:
What’s with the 3v3 going to the ABS speed sensor? For that matter what is this sensor?

I didn’t bought a sensor yet. I am waiting for my new wheels+front brake kit so that I can buy one that fits best.
I could use an ABS speed sensor but if I cant one that fit I might need to use something else. What sensor did you use on your project if I may ask?

Graynomad:
And what’s the warmup mode V going into AREF? And what is the warmup mode V for?

My bike is fuel injected, it needs a few seconds before you can turn on the engine. Sofar my bike already lights up a LED during this process.

Graynomad:
Rob

Thanks sofar Rob! :slight_smile:

What sensor did you use on your project if I may ask?

I used a hall effect sensor on the tail shaft.

My bike is fuel injected, it needs a few seconds before you can turn on the engine.

How does this affect your gadget? And I still can't figure out why it would go to AREF, if for some reason you need to provide your own AREF it is normally a nice clean solid source right next to the chip.

BTW, "12v" in a vehicle can easily reach > 100v if something goes wrong with the electrics (say a wire comes off the battery). Also most protection devices are rated at 18v continuous and 24v for several minutes.

Having said that I've just plonked a circuit in a truck with no protection apart from the regulator and it's still working after 18 months :)


Rob

Thank you, I am also keeping the hall sensor as a last resort. For now I am still trying to see if there is a way I can use my native speed indicator, which is a wire spinning around.

I hooked up the warm-up mode to the AREF because that was the only input I had left. I thought I saw in the documentation that it could handle external 5v so I thought; thats a nice reference for the 'Loading' part.

I hope I will protect my Arduino as much as I can, so I was thinking about putting fuse's between it.

Animations of input - Loading (warm-up): http://test.aerosol.me/leds/LED-Loading.gif - Indicator left side: http://test.aerosol.me/leds/LED-richting-v2.gif - Indicator right side: http://test.aerosol.me/leds/LED-richting-v2-rightside.gif

AREF is not a usable input AFAIK. It may be possible to detect the presence or absense of 5v but I wouldn't bet on it. You'll have to have a real good look at the ADC to see if there's a trick you can pull.

Fuses won't protect against bad stuff on the power input.


Rob

I still don't understand what AREF is for then, but despite that I made a new drawing based on your input. Do you think this is safer and possible? I am literally on the edge of all inputs and outputs.

No resistors on the LED-driving pins.

12v goes into a pin called 5v (should go to VIN?)

GND goes to the displays?

Tx and Rx used, often this causes problems?

Maybe be better off using a shift register to free up a few pins.


Rob

Sorry, call me a noob please. That was actual quiet silly of me. :roll_eyes:

I really thought about the structure and I could try something different. Since my indicators can only be turn on once at the time I also could power both left and right indicator with the warmup voltage, I then can program if both inputs are on then the warm-up is active, it would like look this:

I also dropped one row. I don't know if there is a way I could use it on RX or TX but that would be nice else I just to need to make a new animation :)

Also to be honest I really have no clue how to calculate the resistors. So I used this calculator (with the 'Leds in parallel' formula) and it came out with 12 Ohm and 0.48 watt.

I used this as input: - Supply Voltage: 5v - Voltage Drop Across LED: 3.2v (LED's need 1.8v) - Desired LED Current: 20 mA - How many leds connected: 8

Also thank you very much for your time and patience Rob!

That’s a high forward voltage. The calculator does come up with 12R but you are multiplexing so each LED only get turned on for 1/8th of the time so I reckon you could go lower. However I’ve not got much experience with MUXing LEDs so maybe someone else can chip in here.

What is inside the “indicator turn light” block? Is that just lights or logic?

Also, is the warmup signal logic or power?

I still don’t get why you need the warmup input.

it needs a few seconds before you can turn on the engine.

What has that got to do with your gadget? It can run just fine motor ready or not.


Rob

Graynomad: That's a high forward voltage. The calculator does come up with 12R but you are multiplexing so each LED only get turned on for 1/8th of the time so I reckon you could go lower. However I've not got much experience with MUXing LEDs so maybe someone else can chip in here.

Thanks! I hope somebody can help me with this.

Graynomad: What is inside the "indicator turn light" block? Is that just lights or logic? Also, is the warmup signal logic or power?

I will get into this a bit more. I just ordered my new set of LED indicators with a resistor between it. The indicator has as power 12 voltage with 2 watts. I will get back with the precise specs of my warm-up mode. (I need to open my current speedometer for it.)

Graynomad: What has that got to do with your gadget? It can run just fine motor ready or not.

Yes my gadget will still run. If I turn my ignition to its 'On' state it will turn on the electronics of my bike, then I can turn on the engine with the start button after the warm-up regulator did its job.

Oww I think I grasp what my mistake was on the calculation. I did a new calculation and used the following calculator with the 'LEDs in Series' formula. I used the following inputs:

Supply Voltage: 18v Forward voltage: 1.8v Desired LED Current: 20 mA How many leds connected: 8

I based the supply voltage on 18v because 8 * 1.8 = 14.4v So 14.4 voltage is required to power up each LED. However 18v will give each LED a current of 20mA instead of 18mA with 16v.

The output of the calculation: 180 Ohms and 1/8 watts

I am on the right track now? and if yes, how do I convert the 5v to 18v?

The schematics have disappeared.

Forward voltage: 1.8v

This has changed.

Supply Voltage: 18v

Why? I can see no reason to drive the LEDs with 18v unless there are several LEDs in series. It's hard to say without knowing the display being used but if you're MUXing columns of 8 LEDs then they are not in parallel, they are 8 individual LEDs and the current resistors should be set accordingly.

because 8 * 1.8 = 14.4v

Are there 8 LEDs in series? You only ever turn on one column at a time and drive the eight LEDs of that column, even if they are all on they are in parallel not series so it's no different to just having normal 8 LEDs hooked up to you outputs.

Yes my gadget will still run. If I turn my ignition to its 'On' state it will turn on the electronics of my bike, then I can turn on the engine with the start button after the warm-up regulator did its job.

That's true of many vehicles but has nothing to do with a gadget that flashes some LEDs. Anyway I'll stop asking about this signal now, if you need it you need it.

Another thing to think about is the sinking ability of an AVR pin, you can drive (source current to) a single LED from a pin but cannot sink the current from 8 LEDs, so the columns need a high-current device or some transistors. By using a special LED-driving shift register you solve this problem and also the lack of IO pins.


Rob

Sorry, my internet was busted and my server went down with it. The schematics should be back now. But I really should stop trying to make up with some random calculations. Makes me look more like a noob. haha. :D

Thanks for the shift register tip. I will definitely look into this option and also again thank you for your time and advice Rob!