Railroader:
What is the value og the resistor connected to the +12v?
Don´t know. Can I just probe the wire and ground to check de resistance? The ECU don´t have datasheet.
Just for understanding.. if the pullup resistor is 100k, my voltage divider needs to be just higher, or twice the resistance? Or will it always ground as soon as I put the voltage divider?
Can I go high as 1M and 600k for the voltage divider and still read?
Disconnect that 12 volt connected resistor in one end and measure the resistance across the resistor. Using very high resistance voltage dividers might cause difficulties.
Hi,
With the neutral switch open can you please measure what voltage you have at the ECU input?
Do this with and without the Arduino circuit connected.
TomGeorge:
Hi,
With the neutral switch open can you please measure what voltage you have at the ECU input?
Do this with and without the Arduino circuit connected.
Railroader:
Disconnect that 12 volt connected resistor in one end and measure the resistance across the resistor. Using very high resistance voltage dividers might cause difficulties.
Can´t open the ECU.
Blackfin:
Use the 12V signal to drive the gate of a small-signal MOSFET (e.g. 2N2007); connect the source to GND and the drain to the Arduino pin.
Set the Arduino pin to INPUT_PULLUP.
When the neutral switch is "open" the buffer transistor will be on and the pin will be low.
When the neutral switch is "closed" the buffer transistor will be off and the pin will be pulled high by the internal pull-up.
I've done something like the schematic below for this situation. The "666k Ohm" resistor represents your unknown ECU pullup resistance. Operation is that the diode blocks this pullup and the "out" sees the pullup to 5V when the switch is open. When the switch is closed, "out" is pulled to ground through the diode. The 10k Ohm resistor in series with the output adds some level of protection from voltage spikes to "out" which is the Arduino input.
MrMark:
I've done something like the schematic below for this situation. The "666k Ohm" resistor represents your unknown ECU pullup resistance. Operation is that the diode blocks this pullup and the "out" sees the pullup to 5V when the switch is open. When the switch is closed, "out" is pulled to ground through the diode. The 10k Ohm resistor in series with the output adds some level of protection from voltage spikes to "out" which is the Arduino input.
Nice! very clever. But the difference between 5v and 12v won´t be a ploblem? And why not use internal pullup in this case?
Blackfin:
Use the 12V signal to drive the gate of a small-signal MOSFET (e.g. 2N2007); connect the source to GND and the drain to the Arduino pin.
Set the Arduino pin to INPUT_PULLUP.
When the neutral switch is "open" the buffer transistor will be on and the pin will be low.
When the neutral switch is "closed" the buffer transistor will be off and the pin will be pulled high by the internal pull-up.
I don´t have any mosfet. Can I use a NPN transistor? 12v wire to base, Collector to arduino input pullup and emiter to ground?
I guess I´ll have the same problem as the voltage divider. Have to use mosfet. right?