Electronics > Beginners
A few newbie questions
agilly1989:
Hi all...
I'm not exactly a beginner, but I have very little experience in designing and constructing circuits.
I'm working on a rather large (for me) project which is a ECU for my dads car (1980s Jaguar)... Some project details can be found at http://www.jaguarforums.com/forum/jaguar-engines-47/custom-jaguar-l-jetronic-5cu-ecu-70295/ but in a nutshell, its a programmable ECU so dad can get better fuel consumption out of his car...
I can do the programming (I'm using the arduino environment for the prototype)... I just need a little help with the circuit design.
I need to
* Read the Tacho pulse from the distributor/coil
* Have a 0 to 1 volt signal (from the Lambda sensor) amplified so the micros ADC can read it
Any questions, please ask... I know i may not have been very clear :(
Spikee:
1. voltage divider -> opto coupler ? or hall sensor
2. opamp whit a gain of 5 -> 0-5V for ur adc
Psi:
Is the lamdba signal from ground to +1V ?
Because the ADC can read that. Assuming the ADC power is 5V then you have 1024 steps 5V / 1024 = 4.8mV for each step.
So 1V will be 1/0.0048 = 204 (adc value for 1V).
You can always run the ADC off 3.3V or 2V to get more resolution if needed.
But if the lamdba sensor is very low current you'd need an opamp anyway, so might as well up the voltage while you're at it.
To read the tacho pulses you'd want to
- Get the signal down to your ADC voltage with a resistor divider
- Feed it into a mcu pin that is an external interrupt.
- Then, in the interrupt handler, start one of the timers counting. On the next pulse read the timer value.
(The other way to do it is to clock the timer directly using the timer input pin, but that can cause issues and you lose some control of the counting)
When dealing with stuff in cars you want to add some protection from voltage spikes.
So on each input add a small TVS diode to ground. And another larger TVS from your 12v power input to ground
An optoisolator is also a good idea but not 100% necessary.
agilly1989:
Yes it is from ground, so thanks Psi
I was thinking of using a Rail-to-Rail op amp with a gain of 5 (since it'll be running from 5 volts), but I'm not sure if the load will be too much for the lambda sensor, I believe its only very low current... Should I use a buffer?
I tried the interrupt thing with a computer fan, but the reading was erratic, Im thinking of using the LM2907 (or similar) and using one of the analog inputs for a more accurate reading of RPM
And thanks for the TVS diode tip, I'll incorporate that into my design
Psi:
--- Quote from: agilly1989 on April 02, 2012, 02:18:21 am ---I was thinking of using a Rail-to-Rail op amp with a gain of 5 (since it'll be running from 5 volts), but I'm not sure if the load will be too much for the lambda sensor, I believe its only very low current... Should I use a buffer?
--- End quote ---
Na, the sensor output, (whatever it is) will be able to drive an opamp input, no probs.
--- Quote from: agilly1989 on April 02, 2012, 02:18:21 am ---I tried the interrupt thing with a computer fan, but the reading was erratic, Im thinking of using the LM2907 (or similar) and using one of the analog inputs for a more accurate reading of RPM
--- End quote ---
You can use a freq-voltage IC but the micro is completely capable of reading the tacho pulses directly without any erratic behavior.
My guess is your timer was overflowing or maybe you forgot to declare something volatile.
Navigation
[0] Message Index
[#] Next page
Go to full version