Go Down

Topic: Hihg voltage input saftely into ardunio. (newbie) (Read 1 time) previous topic - next topic

mellink

Dec 16, 2010, 04:21 pm Last Edit: Dec 16, 2010, 04:40 pm by mellink Reason: 1
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.
Transistor?
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

Grumpy_Mike

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?

mellink

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

Grumpy_Mike

Yes then an opto is your simplest and best choice.

mellink

#4
Dec 16, 2010, 04:43 pm Last Edit: Dec 16, 2010, 04:47 pm by mellink Reason: 1
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

Grumpy_Mike

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

jackrae

#6
Dec 16, 2010, 05:00 pm Last Edit: Dec 16, 2010, 05:01 pm by John_Rae Reason: 1
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.

jack

jack

mellink

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

http://www.maplin.co.uk/media/pdfs/AY44%20Datasheet.pdf

mellink

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

Grumpy_Mike

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

Yes
Quote
is this right?

No.

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

mellink

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?

Grumpy_Mike

Quote
What is a correct input for a arduino?

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

Quote
what about current?

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

mellink

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.

Grumpy_Mike

#13
Dec 17, 2010, 11:22 am Last Edit: Dec 17, 2010, 11:23 am by Grumpy_Mike Reason: 1
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.

Go Up