ahlis_se wrote: ↑Tue Jun 26, 2018 12:56 pm
The use of induction on HT leads is an option but not preferred as when everything jumps around there is a risk of malfunciton. As the engine built produces twice the power compared to a standard engine I would prefer to keep the ignition system as it is to avoid any ignition related issues.
Well, your concept is wrong there. Using an inductive pickup avoids interfering with the ignition electronics.
ahlis_se wrote: ↑Tue Jun 26, 2018 12:56 pm
Currently it is fitted with a CDI ignition system using a Hall effect. This box actually provides a 12 V tacho signal.
So it should be easy then, even for a novice.
ahlis_se wrote: ↑Tue Jun 26, 2018 12:56 pm
Still being in a car there is absolutely no guarantee it will be 12V at all times as the alternator will charge between 13.8-14.4V if it is as it should be. Most car electronics survive short spikes up to 16-20 Volts depending on the age of it and depending on how far away it is from the source of the spike( and the amount of electronics in it of course).
Dips are to be expected, when the electric cooling fan starts it will draw a lot of current causing voltage drop to about 10.5-11 Volts for a brief moment. To be on the safe side, any given auto will have a Voltage between 10-14.4V it may go above that if something goes wrong with the generator but this usecase can be excluded.
If you need this not to die under any automotive circumstances/mishap, you need to allow for the possibility of 50V excursions in the supply
including negative. Manufacturers electronics systems in cars are designed to withstand this.
ahlis_se wrote: ↑Tue Jun 26, 2018 12:56 pm
I need help with is to understand how to wire it. I am a good mechanic, but not very good with micro electronics

.
You're right there, the first thing we needed to see is the circuit diagram:
https://www.sparkfun.com/datasheets/Bre ... or-v12.pdf
This shows the opto-isolator IC being used the opposite way round to what you intend, but it clarifies things considerably. On the RPi side connect HV and HV-GND to 3.3V and 0V on the GPIO respectively. OUT1 can then go straight to a GPIO input (and so can OUT2, if you want a second channel). This is what you have already shown in your sketch.
On the input to the breakout board, the LEDs in the 2-channel opto-isolator are simply driven directly, via 220ohm resistors. Thus the inputs are current (not voltage) driven, and all you need to do to adapt them to a particular voltage is choose the right resistor. Get rid of the resistor you have shown connected between the breakout GND and your car 0V, just connect it directly.
1k "feels" about right for the other resistor, but all you need to do is get a simple program running on the RPi to monitor the input, and see if it reads properly when you put 12V on the opto. If it doesn't switch, or doesn't switch fast enough, decrease the resistor a bit (but not much).
To protect the opto from voltage excursions, wire a 4.7V Zenner diode between IN1 (cathode) and GND (anode).
There should be no direct connection between HV-GND (RPi 0V) and GND (car 0V).