Wouldn't a voltage divider with two resistors be easier?
Ok, just doing a bit of work with an Arduino for an exhaust controller and i need to filter the 12v pulse for the tacho down to 5v pulses for the arduino to count.
I was planning on doing this:
Tacho output ----20k----> Arduino
.....................|
.....................4.7v 1w zener
.....................|
.....................Gnd
I was going to use this Zener for the ground pull: http://www.jaycar.com.au/productView...r&form=KEYWORD because i have a bunch lying around.
Will it work? Thoughts?
-Chris | Garage takai - Breaking cars since 1998
Sparky - AE86 IPRA Racer | RZN149 Hilux - Parts and Car Hauler
I never saw a wild thing sorry for itself. A small bird will drop frozen dead from a bough without ever having felt sorry for itself. - D.H.Lawrence
Wouldn't a voltage divider with two resistors be easier?
1977 RA35 Celica GT - I4 | 2007 GSV40R Aurion - V6
Don't live life being scared of death, live in the fear of not truly living. RP 2012
Easier, yes. But the Zener provides a bit better overvoltage protection.
-Chris | Garage takai - Breaking cars since 1998
Sparky - AE86 IPRA Racer | RZN149 Hilux - Parts and Car Hauler
I never saw a wild thing sorry for itself. A small bird will drop frozen dead from a bough without ever having felt sorry for itself. - D.H.Lawrence
Another option is to have the tacho signal drive an NPN and have a pull up to +5V on Atmel side (Or use the internal pull up...).
Cheers
Wilbo
Hi,
Just run it through an opto isolator. 12volt into the opto part and run your 5v off the transistor output. Depending on the opto device you use, you may need to run a shunt resistor to limit the current, as per any normal LED running on 12v.
30mA is a good value for current through the LED on the opto, so you'll need to run a 470ohm resistor from the output of the tacho into the opto.
Use something like the 4N27 device. You can find its data sheet on the web Here it is.....
http://www.datasheetcatalog.org/data...ild/4N27-M.pdf
If you're not sure how to connect/use the opto, here's a link witha few circuits to help you out...
http://www.discovercircuits.com/O/opto.htm
seeyuzz
river
The thinking man's clown and the drinking woman's sex symbol
RA25GT - There is no substitute | 18R-G - Toyota's Dependable Masterpiece
Toymods Car Club Treasurer, assistant Historic Plate Registrar & Forums Admin
-Chris | Garage takai - Breaking cars since 1998
Sparky - AE86 IPRA Racer | RZN149 Hilux - Parts and Car Hauler
I never saw a wild thing sorry for itself. A small bird will drop frozen dead from a bough without ever having felt sorry for itself. - D.H.Lawrence
Hi,
Yeah, a single resistor and a 6pin chip can over complicate things.![]()
seeyuzz
river
The thinking man's clown and the drinking woman's sex symbol
RA25GT - There is no substitute | 18R-G - Toyota's Dependable Masterpiece
Toymods Car Club Treasurer, assistant Historic Plate Registrar & Forums Admin
A single resistor and a diode does nigh on exactly the same thing.
Also the 4N27 has a ramped output, rather than a single pulse. Depends on the edge detection of the Arduino, but it could get quite finnicky.
-Chris | Garage takai - Breaking cars since 1998
Sparky - AE86 IPRA Racer | RZN149 Hilux - Parts and Car Hauler
I never saw a wild thing sorry for itself. A small bird will drop frozen dead from a bough without ever having felt sorry for itself. - D.H.Lawrence
the opto isolates it tho.. so rather than relying on the zener to pull voltage down and save your arduino from smoke, the opto/NPN removes the possibility?
how ramped is the tach pulse compared to the output of the other options?
"I'm a Teaspoon, not a mechanic"
"There is hardly anything in the world that a man can not make a little worse and sell a little cheaper" - John Ruskin (1819 - 1900)
AU$TRALIA... come and stay and PAY and PAY!!! The moral high horse of the world!
Hi,
Yes, the extra advantage of the opto is it isolates the system from 12V. If the zener goes AWOL you'll get 12V into the Arduino.
seeyuzz
river
The thinking man's clown and the drinking woman's sex symbol
RA25GT - There is no substitute | 18R-G - Toyota's Dependable Masterpiece
Toymods Car Club Treasurer, assistant Historic Plate Registrar & Forums Admin
And if the resistor goes i lunch the opto... not much difference. The Arduino has polyfuses incase of overvolting.
Also, getting the opto is a pain. Its either Farnell or RS components, and ill almost be paying more for postage than an entirely new Arduino.
NPN is readily available. Not sure of the ramping characteristics though.
-Chris | Garage takai - Breaking cars since 1998
Sparky - AE86 IPRA Racer | RZN149 Hilux - Parts and Car Hauler
I never saw a wild thing sorry for itself. A small bird will drop frozen dead from a bough without ever having felt sorry for itself. - D.H.Lawrence
I used IGT as the input to my tacho corrector. On the UZ it was already 0-5v.
1977 RA35 Celica GT - I4 | 2007 GSV40R Aurion - V6
Don't live life being scared of death, live in the fear of not truly living. RP 2012
Interesting about IGT already being 5v, ill have to check what it is on the 2JZ ecu.
NPN looks easy enough to implement, especially that they have added code to allow for interrupts on falling.
Any suggestions for an NPN to handle a 5-12v input?
-Chris | Garage takai - Breaking cars since 1998
Sparky - AE86 IPRA Racer | RZN149 Hilux - Parts and Car Hauler
I never saw a wild thing sorry for itself. A small bird will drop frozen dead from a bough without ever having felt sorry for itself. - D.H.Lawrence
Hi,
Why not just use an open collector buffer? Run 12v into the device and tie the output to 5v with a resistor. That's simple and also keeps the unit isolated. You can use a TTl or CMOS open collector chip.
seeyuzz
river
The thinking man's clown and the drinking woman's sex symbol
RA25GT - There is no substitute | 18R-G - Toyota's Dependable Masterpiece
Toymods Car Club Treasurer, assistant Historic Plate Registrar & Forums Admin
Because again, getting parts sucks. Farnell charge through the nose for their "service" and Jaycar stocks buggerall.
-Chris | Garage takai - Breaking cars since 1998
Sparky - AE86 IPRA Racer | RZN149 Hilux - Parts and Car Hauler
I never saw a wild thing sorry for itself. A small bird will drop frozen dead from a bough without ever having felt sorry for itself. - D.H.Lawrence
Bookmarks