Arduino Mega Bitmaps Triggered by Signal

Hey guys,

So I dove headfirst in all things arduino. I've done some pretty basic projects already (LED lights, Max6675 sensor, etc). But I'm trying to tackle something that is a little harder...

I'm recreating my "door ajar" display in my 1989 Dodge Spirit turbo. When a door is open, the sensor sends 10 millivolts to a small lightbulb in the dash to light up.

I drew some simple bitmaps, saved them on a microSD, and got them to display on an Arduino Uno with a 3.5 TFTLCD utilizing MCUFRIEND_kbv

Example of trunk open:

On the Uno:

I could really use some help and direction with the following:

  1. Is 10 millivolts enough signal to register as a digital input on the Mega 2560?
  2. How do I trigger a bitmap based on that signal?
  3. How would I set up the "homepage" to stay on when all doors are closed?

Please forgive me if I'm using the wrong language or if these questions are rudimentary. I drank a lot of info from the proverbial firehose these past couple of days (possibly to the point of confusion).

Okay I think I answered Question #1 on my own. For a Digital Input, the voltage must read at least 3V for the pin to be recognized as HIGH. So I won't be able to use a Digital Input for my needs...

But I could use Analog Input to read millivolts, right?

If my math is correct, a readVal of 1 = .0049 volts.
readVal of 2 = .0098
readVal of 3 = .0146

So could I write an If readVal = 2 (aka .0098 millivolts or greater) statement to show a specific bitmap from the microSD???

Voltages that low are basically amid the noise floor of the ADC so you'll likely be getting false triggers.

Can you restate how the door ajar signal works? Is it just a door switch that is open circuit when the door is closed and closed (connected to GND) when the door is open?

Or use another chip as a buffer to get higher levels.
https://www.digikey.com/en/products/detail/texas-instruments/SN74AHCT541N/375903
Can buffer a 2V input into 5V output.
I use them on the middle board here to buffer 3V output from SX1509 into high current 5V output to drive N-channel MOSFET gates.

I'm recreating my "door ajar" display in my 1989 Dodge Spirit turbo. When a door is open, the sensor sends 10 millivolts to a small lightbulb in the dash to light up.

No, it is a 12 volt system.

You’re saying 10 millivolts which is 0.01 volts. Maybe that’s the voltage drop over a closed switch but that’s not what you’ll be measuring for a door open signal. It’s either 12-14 volts when the door is closed, approximately zero volts when it’s open. There’s nothing in an automobile that operates at a ten millivolt level. Well, okay, in the radio but let’s not go there.

You need a voltage divider with some overvoltage protection. Automotive systems are very, very noisy and full of transient voltages which must be addressed by your circuit.

Blackfin:
Voltages that low are basically amid the noise floor of the ADC so you’ll likely be getting false triggers.

Can you restate how the door ajar signal works? Is it just a door switch that is open circuit when the door is closed and closed (connected to GND) when the door is open?

So the original computer has a little harness. After playing with it using a multimeter, something in the stock module sends 10 millivolts to a little lightbulb. Other than that, I have zero clue how it works or what sensors the car uses.
I figured I’d just use that little signal going to the bulb.

How are you measuring the 10 millivolts? That sounds very unlikely for a light bulb, unless it is a fairly high current, short duration pulse.

WattsThat:
No, it is a 12 volt system.

You’re saying 10 millivolts which is 0.01 volts. Maybe that’s the voltage drop over a closed switch but that’s not what you’ll be measuring for a door open signal. It’s either 12-14 volts when the door is closed, approximately zero volts when it’s open. There’s nothing in an automobile that operates at a ten millivolt level. Well, okay, in the radio but let’s not go there.

You need a voltage divider with some overvoltage protection. Automotive systems are very, very noisy and full of transient voltages which must be addressed by your circuit.

Right, but the sensor signal is going to a computer somewhere than sends voltage to a tiny lightbulb. I'm basically trying to use that signal going to the lightbulb as an analog input (not the 12v signal from the door switch itself).

That would solve the transient voltage, correct?

I'm going to the car to retest and see if I screwed up measuring the voltage just to make sure. It does seem rather low. Maybe I'm missing something.

oh WOW ya I stand corrected and apologize profusely! It is 12 volts going to that bulb. I am so sorry. I guess I’m better with the mechanical stuff than the electric stuff (boy do I feel dumb).

Thank You Thank You Thank You for catching my mistake. I would have gone done a rabbit hole for sure!

Okay so let’s talk about voltage dividers and overvoltage protection. What’s the best way to go about it?

A voltage divider is nothing more than two resistors in series. One side gets the 12V signal, where they are joined is the "output" and the other side goes to GND. You can search the web for design and calculations.

I have no knowledge of the specifics of car electronics; I would use a zener diode (4.7V) over the resistor that goes to GND to short spikes that might occur. There might be more to it though.

A better solution might be an optocoupler between the source and the microcontroller

Or just a simple transistor with a resistor to limit current into the base.
When signal goes High, Arduino input gets pulled Low.

signal = digitalRead (inputPin);
if (signal == LOW){
// signal received, do something
}

Thanks everybody!!! This gives me a lot of info to move forward :slight_smile: