Hi there Boffin! Indeed I am still on my quest
I have read the material, and every other input I have protected, but this one seems different to me... Perhaps this thread will reveal that it isn't, let's see!
Ok so some more background... Here is my little CAN Translator board as it stands today:
It's pretty simple, basically just an IDC connector onto the board for 5v and GND from a close by board with a 5v dc-dc regulator on it, then it has a small CAN transceiver arrangement for the CAN bus, a 3.5 Teensy and a a bunch of opto-isolators to monitor the switch states of various things like lights, indicators etc.
The trunk release is different (to me) because the circuit is just a switch to ground. There is nothing on the car right now and the loom I'm designing is totally bespoke. I will use an alarm system like this Autowatch one, which will control trunk release. To do that, I will use my PDU to control the solenoid side of the circuit, but it needs to know when to operate and for that I need the control input which will come from either a button under the dash, or the alarm system switching to ground.
So to be clear, this part of the circuit goes in the bin - I'm not using any relays in the car build at all (at least that's the goal!), leaving me with this:
From here there are a few options... Here's 3 that I can see...
Option 1 would just use a resistor to the 3.3v pin from the teensy, so I could use input_pulldown to determine when the trunk release is activated
Option 2 would use an opto-isolator. I only have 5v available on this PCB so this would be used to drive the isolator with a resistor. I'd use input_pullup to read the state of the input. The downside with this one is I don't have much space on the PCB to include this extra isolator and resistor
Option 3 would be to just use input_pullup to read the state of the input, with a set of protection diodes to prevent any spikes picked up in the long wire between the units. I'm unsure if this would need a resistor/cap as well since the signal would be tiny from the teensy internal pullup.
What do you reckon the best route is, with simplicity in mind to keep the board small..?
[EDIT] - I think actually for my purposes, option 2 looks to be the best solution so I've tried to squeeze it onto the board and it looks like I can just about do it...