Go Down

Topic: Speedometer newbie guidance (Read 2725 times) previous topic - next topic

DragoslaV

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?  :smiley-roll-sweat:

Thanks a lot in advance!

robtillaart

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?

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

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.
-Ed
Felix qui potuit rerum cognoscere causas.

DragoslaV

#3
Feb 15, 2011, 08:43 pm Last Edit: Feb 15, 2011, 08:47 pm by DragoslaV Reason: 1
- 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.


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

haha ok awesome also thank you for answering!


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 :smiley-roll-blue:


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! :)

Graynomad

#4
Feb 16, 2011, 02:05 am Last Edit: Feb 16, 2011, 02:09 am by Graynomad Reason: 1
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
Rob Gray aka the GRAYnomad www.robgray.com

DragoslaV


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

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


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?


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.


Rob

Thanks sofar Rob! :)

Graynomad

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

I used a hall effect sensor on the tail shaft.

Quote
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
Rob Gray aka the GRAYnomad www.robgray.com

DragoslaV

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

Graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

DragoslaV

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.




Graynomad

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


Rob Gray aka the GRAYnomad www.robgray.com

DragoslaV

#11
Feb 19, 2011, 07:42 pm Last Edit: Feb 19, 2011, 07:49 pm by DragoslaV Reason: 1
Sorry, call me a noob please. That was actual quiet silly of me. :smiley-roll-blue:

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!

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.

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.

Quote
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
Rob Gray aka the GRAYnomad www.robgray.com

DragoslaV

#13
Feb 20, 2011, 03:45 pm Last Edit: Feb 20, 2011, 05:52 pm by DragoslaV Reason: 1
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.

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.)

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.

DragoslaV

#14
Feb 20, 2011, 06:32 pm Last Edit: Feb 20, 2011, 06:44 pm by DragoslaV Reason: 1
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?

Go Up