I'm a complete idiot when it comes to electronics (background in software development) and have taken it upon myself to integrate some stuff into my car. To do this, I need to monitor some 'pull to ground' type signals from the car control unit.
Couple of questions:
Is it enough to use the internal 'pull high' feature of the board, and connect it directly to the pin on the car control unit that goes to ground? ie: with a common ground between the car ECU and the arduino that will register the pull to ground signal on the ECU?
To protect the input pin on the arduino, is something like this enough?
I'm a complete idiot when it comes to electronics (background in software development) and have taken it upon myself to integrate some stuff into my car. To do this, I need to monitor some 'pull to ground' type signals from the car control unit.
These are open-collector outputs? Or push/pull? what voltage logic is used in the unit?
Couple of questions:
Is it enough to use the internal 'pull high' feature of the board, and connect it directly to the pin on the car control unit that goes to ground? ie: with a common ground between the car ECU and the arduino that will register the pull to ground signal on the ECU?
normally on a small circuit on a breadboard yes, in the automotive environment there's much more
electrical noise so I'd say no - use perhaps a 2k2 pullup resistor to the control units rail - assuming the
device can drive enough current.
To protect the input pin on the arduino, is something like this enough?
Well a series resistor is much simpler, and you can then have an RC filter to filter out noise too.
Perhaps 10k/10nF RC filter after the strong pull-up will be simple and adequate.
The only downside to using opto isolators I can think of are cost and space. But they'll give your MCU the maximum amount of protection (and peace of mind )
I've never used the breakout board you mention, but it looks to me from the description like it's designed to protect outputs, where your original question was about protecting inputs. The description says "This module allows you to use low level signal to control a higher level voltage, for example, 3V or 5V voltage controlling 9V or 12V voltage." It may work both ways, but I'd ask before buying if you can.
Okay, remember the 'I'm a complete idiot bit' from my first post?
I decided to check my assumption that the signal lines on the becm (the car computer thing) pulled to ground (an assumption based on the fact that other units in the same car did that). They don't, they go to 12v when they're triggered.
So, I need a way of converting a 12v high signal to a 5v digital input pin. It sounds like opto-isolators might be the simplest way forward as long as I find some that can take a 12v input.
I've attached a PDF file that contains a link to a typical optical isolator data sheet and a schematic that I hope will be of help in attaching your 12V active car signals to your MCU.