regulation

OK so i gotta start this off a little abnormally. this is the first time posting in this forum and i'm kinda a noob. while i'm normally a decently resourceful lad, i'm stumped here. i only know the very basics of electronics wiring so i'm coming for help. i'm in the middle of a project. i'm rebuilding my motorcycle over the winter. its an 84 Honda Sabre. (may not be relevant. may be useful.) and i'm programming an arduino mega to run a nextion 7 inch basic for the moment to act as a digital gauge cluster. and though it sounds like i'm going the hard way for a digital cluster, i assure you, i am. but i have my reasons.

so here is my issue, i was programming my board and testing to run the speed sensor which i believe is gonna be the hardest part, and while i was doing this i was having trouble getting a signal in(had the board programmed for the wrong pin and didn't know it) having said that i plugged my tach signal wire into the board....which is a twelve volt wire...which....well....i think we can understand what happened next. my problem is, i need a way to regulate the tach signal to 5 volts so i can accurately read the signal. the signal comes straight from the ignition module and i believe the voltage coming from it can change just as the alternator voltage does. can anyone guide me through this?

First look up and study automotive electronics to save you future grief, there are unbelievable transients etc your system will see. There are several ways to solve this, first simply put a resistor in series from the tach to your board. This will work but!!! Second use a transistor to isolate the signal. Third use a Schmidt trigger gate such as the 74C914, it is rated at about 25 volts on its input. Fourth use a 74HC14 and put a 27K resistor or there about in series with tach input to the gate. There are more this is just a start. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

ok, so heres the noob part....i know what a resister is....vaguely what a transister is....as for the rest...im have no clue and im having trouble visualizing how the transistor works...

I have no knowledge of car electronics; just know that it's tricky.

To reduce a 12V signal to a 5V signal, you can use a voltage divider; look it up. I can't say if it's suitable (safe/reliable) in your scenario.

With a transistor, you put 12V on the base via a resistor and 5V on the collector via another resistor. The collector of the transistor is also connected to a pin of the Arduino Arduino GND, transistor emitter and bike GND need to be connected together. Again, I can't say if it's suitable (safe/reliable) in your scenario.

i've been using a simulation program to slowly learn and build the circuit. so hopefully this is the part where i'm gonna start to learn stuff. i know that the low voltage on my bike is 12 volts. the high voltage can be anywhere close to 15 volts. so i figure use a resister to take the 12 to 5 and then if the voltage goes any higher ill have a zener to let anything else bypass. i'm not sure where everyone does their diagrams at so they can post them here though to show you what i mean.

Hand sketches are just fine, the sticky post at the top of the forum has instructions for posting images

i found a way that i can do it. never tried it before. my apologies. but this is where ive gotten to so far. i guess that this is also where im stuck as i dont know where the limitations in the components lie. i suppose the best thing for me to do is see about aquiring components and testing. as a quick note though, i substituted the 5 volt led in as i couldnt simulate a pin on my board.. best i could think of.

Your diagram is refreshingly neat for a beginner! ++Karma;

Your general idea is fine but note:
The best part of 40mA seems excessive. If I were trying to do this I'd probably start with a 10k Ohm resistor and see if it worked OK.
LEDs are not voltage operated, they are current operated. Like a Zener diode below some particular voltage they don't conduct, above that voltage they conduct a lot. You use them in the same way as a Zener; you put a resistor in series to limit the current. The Vf for a green LED is about 2V. In your circuit you would find that the green LED lit and the voltage at the junction of the LED, resistor and Zener would be about 2V.

I'm curious to know how you calculated the current through the LED. I'll tell you why it's wrong once you show your working.

well hell...i just dont have anything in that program other then a led that i can substitute for the arduino board is all. lol it was just there. my ignition is a tranzizterized ignition so i now know ill have t read the low points i do believe and a fellow sabre rider/ arduino enthusiast pointed me insted to a voltage devider. once again...the coding i think i may be able to limp through when i get to that point but first i need to get the voltage down so i dont keep burning boards....i already accidentaly shot sparks from a mega 2560....which im not happy with...so i have to replace that first...im not completly familiar with the electrical component part...

A simpler analogy...

Say the voltage is the fuel.
You cannot just pour that in the piston head and hope for the best.
You need to regulate that and feed just the right amount in...

Too much and magic smoke comes out of your arduino and other bits
Too little and you will be lucky if it even farts let alone turns over.

What they are telling you is you need something to throttle down and stabilize the electrickery into something more manageable like a carb would do.

And like any fuel system there are different ways of doing it depending if it is high octane or diesel.

You need to understand what type of electrickery is coming down the line and is it coming in dribs and drabs low voltage pulses or being sent with some added nitro.

So for these electrickery jockeys to help you you need to tell them EXACTLY what fuel (pulses) are coming in and how much nitro you think was added. To do that you also need to do some homework and as you are the one with all the gubbins you are best suited for that task...

What is the highest voltage you see ?
What type of pulses do you see ?
What is the exact part that gives off those magic bursts of electrickery (exact model) ?

Bob.

I already accidental shot sparks from a mega 2560....which I'm not happy with

Bit like riding a motorbike really; you've not ridden one until you've fallen off one. We've all let the smoke out of electronic components, natural thing with the hobby. Try the circuit you have with something like a 10k resistor. Should be fine.

PerryBebbington:
Bit like riding a motorbike really; you've not ridden one until you've fallen off one. We've all let the smoke out of electronic components, natural thing with the hobby.

I built my first electronics bench in the loft when I was 13 in 1969: have never once let smoke out.

There's nothing natural about it. It's not compulsory, it's not desirable, and nor is it any kind of rite of passage. It's carelessness, or not following the instructions, or having duff instructions in the first place.

(I have crashed motorbike though; drunk out of my mind, see nickname and av....)

The patient my son transported to hospital for subsequent admission last night with his face ripped open to the bone, will probably be pleased to know that he can now say he's ridden a motorbike.

well, i guess either way i can add some information to this. i found a fellow who not only rides the kind of bikes i do but is also and arduino fiend. he was very helpful and taught me a lot about what i wanted to do. guided me a lot. and i've learned a lot about how this was all going down. i went about it the completely wrong way. its an 84 Honda Sabre. (think i said that already) either way it was a little more advanced of a motorcycle for those years. i was expecting to be trying to catch a high point on the voltage like you would from an cdi ignition. but mines not cdi. its transistorized ignition. so the line to my tach comes off the primary coil winding and is twelve volt all the time but when the spark module closes the transistor it draws the voltage going to the tach down to 0 volts and the oem tach counts the low spots.