Pages: [1]   Go Down
Author Topic: Hihg voltage input saftely into ardunio. (newbie)  (Read 1090 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: December 16, 2010, 10:40:20 am by mellink » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31567
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31567
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes then an opto is your simplest and best choice.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: December 16, 2010, 10:47:54 am by mellink » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31567
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

SW Scotland
Offline Offline
Edison Member
*
Karma: 13
Posts: 1327
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: December 16, 2010, 11:01:05 am by John_Rae » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31567
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31567
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31567
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: December 17, 2010, 05:23:42 am by Grumpy_Mike » Logged

Pages: [1]   Go Up
Jump to: