0
Offline
Jr. Member
Karma: 0
Posts: 76
Arduino rocks
|
 |
« on: December 16, 2010, 10:21:36 am » |
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
Brattain Member
Karma: 277
Posts: 25556
Solder is electric glue
|
 |
« Reply #1 on: December 16, 2010, 10:40:17 am » |
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
Jr. Member
Karma: 0
Posts: 76
Arduino rocks
|
 |
« Reply #2 on: December 16, 2010, 10:41:06 am » |
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
Brattain Member
Karma: 277
Posts: 25556
Solder is electric glue
|
 |
« Reply #3 on: December 16, 2010, 10:42:33 am » |
Yes then an opto is your simplest and best choice.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 76
Arduino rocks
|
 |
« Reply #4 on: December 16, 2010, 10:43:45 am » |
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
Brattain Member
Karma: 277
Posts: 25556
Solder is electric glue
|
 |
« Reply #5 on: December 16, 2010, 10:51:31 am » |
Yes most opto isolators can work well above 100KHz and some into the MHz region.
|
|
|
|
|
Logged
|
|
|
|
|
SW Scotland
Offline
Edison Member
Karma: 6
Posts: 1053
Arduino rocks
|
 |
« Reply #6 on: December 16, 2010, 11:00:21 am » |
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
Jr. Member
Karma: 0
Posts: 76
Arduino rocks
|
 |
« Reply #7 on: December 16, 2010, 12:12:11 pm » |
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
Jr. Member
Karma: 0
Posts: 76
Arduino rocks
|
 |
« Reply #8 on: December 16, 2010, 12:15:39 pm » |
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
Brattain Member
Karma: 277
Posts: 25556
Solder is electric glue
|
 |
« Reply #9 on: December 16, 2010, 12:59:24 pm » |
do i need to add a resistor between the input and the diode Yes is this right?
No. base = not connected collector = arduino input + enable the pull up resistors emitter = arduino ground
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 76
Arduino rocks
|
 |
« Reply #10 on: December 16, 2010, 01:22:59 pm » |
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
Brattain Member
Karma: 277
Posts: 25556
Solder is electric glue
|
 |
« Reply #11 on: December 16, 2010, 02:47:13 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 76
Arduino rocks
|
 |
« Reply #12 on: December 16, 2010, 04:12:54 pm » |
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
Brattain Member
Karma: 277
Posts: 25556
Solder is electric glue
|
 |
« Reply #13 on: December 17, 2010, 05:22:44 am » |
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
|
|
|
|
|
|