Hihg voltage input saftely into ardunio. (newbie)

Hi all,
i'm looking to take a input from a engine spark pack. (obvesouly not from the HT side of it) but the output still peaks around the 140V mark so I need to step it down etc.
My question is what do i have to do to make it safe for the arduino? and then I can just use a digital input right?

The way I see it i can.
Use a p.d. divider?
Capacitor to block on DC poroption?
Use some sort of IC after the the p.d. divider to give a layer of protection and signal conditioning.
Differental amp to remove the noise from the power source?

The wave will have pulses as the coil fires so i'm trying to read the frequency of these pulses.

If anyone could explain what to do and why its right?

Thanks Rob

If you have enough current then I would recommend an opto isolator. That is the safest way to keep the arduino safe. Do you want to just detect that the voltage is present or do you want to measure it's size?

should just be when it is there.
but it just will spike and thats what i need to pick up.

Yes then an opto is your simplest and best choice.

ok so a opto isolator works the same as a opto interuptor but your just interupting the power to the LED.
How fast can a opto isolator work? just the signal frequency will be about 100 hz i think. Is it quick enough?
Thanks Rob

just looking at Maplins I think 2*10^-6 seconds is certainly fast enough

Yes most opto isolators can work well above 100KHz and some into the MHz region.

I'd suggest you try and avoid any sort of direct coupling to the ignition system on the basis that, without an oscilloscope to predetermine voltage form and polarity you are literally shooting in the dark. If you wrap a few turns of wire around one of the HT spark leads you should get enough inductive coupling to produce a strong enough signal to feed directly into the arduino. You may need a blocking diode to ensure that the pulses are unidirectional ie positive going only since, when the spark collapses you will also get a negatively induced pulse.

Bear in mind that a plug only fires once per two revs on a 4-stroke engine so the running speed will be twice spark frequency.



Hi question with the opto interupter do i need to add a resistor between the input and the diode? ie to project it form excess current?

ie pin 1


and i’m struggling to recall

on the transistor side.

is this right?
base = not connected
collector = 5V (from arduino?)
emitter = arduino input

Thanks for the help

do i need to add a resistor between the input and the diode


is this right?


base = not connected
collector = arduino input + enable the pull up resistors
emitter = arduino ground

What is a correct input for a arduino?

is it just to ground the pin? or put up to 5V on it? what about current?

What is a correct input for a arduino?

?? I just told you in the last post
What don't you understand?

what about current?

What about it? It doesn't enter into things.

Well i mean if i'm designing a system what is the ideal input.
its it just it grounds when its on. or is it if a voltage is applied that the input it on?
Sorry really new and want to understand what the ideal is.

In your original question you were asking for a digital input. That is just a zero or a one. That translates into a ground contact or a 5V contact. Whether that is an "ideal" input is up to your application and your needs.

I assume you are more interested in the timing of these pulses rather that the absolute amplitude.

If you actually want to measure how high these voltages are then you asked the wrong question at the start. This is an altogether much more tricky proposition but it still can be done, it would involve the analogue input to the arduino.