Question regarding switchable grounding in a 12v automotive environment

Afternoon all.

Before I get to my question, I’d just like to point out that I’m not really all that great (read: at best a layman) at electronics theory, so please don’t bite my head off if I make a stupid assertion/assumption - I’m here to learn, after all - I only add this caveat because I had a poor experience on this forum historically with an old username that I’ve long since forgotten the login details for.

So, the issue I’m having is this - I have a digital dash for my motorbike (one of the SS182 clones of KOSO units), and I have to use an arduino as an intermediary between some functions of the dash and the bike itself. I’ve got most of it worked out, thanks to a lot of google searching and reading through other people’s projects. However, there’s one section that I’m really not sure about, and would like some input on.

The dash has a gear indicator, which is actuated by seven lines which get pulled to ground in accordance to which gear the bike’s in - this is predicated on an old design of motorcycle gear indication, which isn’t really in use all that much anymore. The gear indicator on my bike uses variable resistance to put out a <5v signal that goes straight to the ECU. While I know how to read the <5v signal on the arduino, the example that I’ve seen of someone using an arduino to interface with this dash just had all seven lines from the dash going straight to digital pins on the arduino, which would pull low as and when the appropriate gear was selected. Now, I’m a little leery of this - I was under the impression that it’s generally a bad idea to plug anything from a 12v environment straight into an arduino anyway, so I’m looking for some clarification here. Would this actually endanger the arduino in any way, or am I just highlighting my absolute ignorance of the theory at work?

The absolute max voltage that can be applied to an analog or digital pin, without risking damage, is Vcc ± 0.5V. So for a 5V Arduino the limits are 5.5V or -0.5V. A resistor voltage divider can drop the 12V down to an acceptable level. In an automotive (or motorcycle) environment the 12V can be somewhat more (while charging) so you need take that into account.

I was under the impression that it’s generally a bad idea to plug anything from a 12v environment straight into an arduino anyway, so I’m looking for some clarification here. Would this actually endanger the arduino in any way, or am I just highlighting my absolute ignorance of the theory at work?

You’re right. The Arduino can be damaged by more than 5V.

But the question is - Are those signals pulled-up to 12V (when they are not pulled-down) or is all of the 12V stuff disconnected. If there is no 12V then you just need to enable the Arduino’s internal pull-up resistors and you’re good to go.

If you do have 12V you can use a [u]Protection Circuit[/u]. Or, you can use a 5/12 [u]Voltage Divider[/u]. (In a car/motorcycle you should use the protection diode(s) along with the voltage divider to protect from voltage spikes.)

groundFungus:
The absolute max voltage that can be applied to an analog or digital pin, without risking damage, is Vcc ± 0.5V. So for a 5V Arduino the limits are 5.5V or -0.5V. A resistor voltage divider can drop the 12V down to an acceptable level. In an automotive (or motorcycle) environment the 12V can be somewhat more (while charging) so you need take that into account.

OK, so my assumption that there needs to be some intermediary hardware wasn't a bad one, then?

I was looking at using a TPIC6B595 shift register to control those seven lines going to the dash - given that it can handle up to 50v on the output side, I presume it's tough enough for the task at hand.

Thanks for the answer - it's certainly put my concerns to rest, although I'm sure I'll have more questions borne of ignorance before too long.

DVDdoug:
You're right. The Arduino can be damaged by more than 5V.

But the question is - Are those signals pulled-up to 12V (when they are not pulled-down) or is all of the 12V stuff disconnected. If there is no 12V then you just need to enable the Arduino's internal pull-up resistors and you're good to go.

If you do have 12V you can use a [u]Protection Circuit[/u]. Or, you can use a 5/12 [u]Voltage Divider[/u]. (In a car/motorcycle you should use the protection diode(s) along with the voltage divider to protect from voltage spikes.)

OK, I can't answer that, because the documentation that accompanied this dash is... lacking somewhat. It's an eBay/AliExpress special, and even if it did come with paperwork, I'd view it dubiously at best.