Connect external sensors

i’m making a custom interface for a unique car and it’s going to have a display for showing stuff like fuel level, oil temp, oil pressure, turn signal and so on.

my question is how do i connect it? i’m probably going to use a hydra+ or a spyder.

The external sensors for pressure and temperature have variable resistance and the fuel level has an outout from 0.5 to 5v. how should i connect it all? are there any modules i might need? How do i connect the turn signals?

The engine does not have an ODB connector.

For the fuel Level you could use an simple voltage divider and connect it directly to an analog Input.
I guess same would work for the pressure and temperature by applying an voltage to it.
But Keep in mind that a car is a very unfriendly Environment to electronics and analog signals. Depending on where the wires run through you might consider to add extra protection to your internal circuits.
If the car has some CAN bus where these signals are already present, you cold hook up to this and only listening.

ok dont i have to use some kind of pulse width modulator or can the mainboard read the voltage directly?

the car doesnt have a CAN bus either.

Analog Input Pins can read a voltage between 0 and 3V3 directly.
If you have 0.5 to 5V then you could add a 1k7 and 3k3 voltage divider to get a Maximum of 3V3.
You also could add external ADC’s which you can connect via I2C or SPI bus.
There are a ton of ADC variants to choose from.

@ Rayman - Post a pic of the car :slight_smile:

you can check out the website for the car here:
www.vegra.se

it’s in swedish, but the pictures work in any language :slight_smile:

haven’t updated it in a while though…

i’ve been ordering some of the parts but was wondering about the temperature senders. There are a few diffrent ones to choose from. amongst them are a common model that only have 1 wire connector and the sender itself is grounded to the engine. would i be able to use one of those?

Looks stunning!

thanks!

but does anyone have any ide regarding the temperature senders?

if by “1 wire” you mean the “1 wire” communication protocol, then it would be an excellent choice. As @ Reinhard Ostermeier mentioned, running analog signals around a car can be a challenging process. Most sensors are still inherently analog but the modern approach for cars (and almost everything else) is to digitize the analog signal right at the sensor and send the data digitally. I’d make every effort to select sensors that work this way. Try to pick sensors that are designed to work in noisy, industrial environments. 1 wire is a good choice as are CAN devices. I2C and SPI sensors are also widely available but are designed for use over very short cable runs so they probably aren’t a good choice. I’ve used 1 wire in the past and it is very effective. I haven’t used it in any of my .net micro projects but there is support for it.

You can also search this forum for threads talking about 1 wire applications

With respect to the sensors being grounded at the engine, I would guess this isn’t an issue. There is normally a single point ground in any system and on a car it is usually the frame and everyting electrically connected to it with bolts, welds and/or wires which usually includes the engine. As long as your electronics is grounded to the same place, you should be good.

Good luck and I’m hoping for a ride some day.

unfortunately i wont have either the time or the money for digital sensors. alot of aftermarket gauges use analog senders.

i dont really understand why there is so much interference in a car or whatever you’re talking about.

i’ve found other senders that all have 2 wires now so all of them are either variable resistors or 0,5-5v output from the senders.

i’ve looked at the motherboards and the ones i’m interested in have T and A on the same socket if i use it for a touchscreen, would i still be able to use pin 3 on the socket for analog in?

what do you mean by 1 wire communication protocol?

ah ok nothing like that.

as i said the sensors are like these:

http://www.ebay.com/itm/261667388910?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
http://www.ebay.com/itm/171393173424?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

@ da_Rayman - So, what is your question again?

If you plan to use 5V analog sensors - the simplest thing to do is to use voltage divider.

when it comes to on-off kind of input to the system, like for the headlight icon, would i be able to use the GPIO connectors? what would be required for that?

@ iamin - yes the problem right now are the other sensors, the ones with variable resistors.

I don’t know what you have in mind when you talk about “headlight icon”, please provide an example. But most likely you will not be able to control them directly.

About which ones are you talking about? Sorry, I am not following you.

When i turn on the headlight highbeams, i want an icon to be showed on the display. Fixing so the icon shows is probably not difficult but getting the signal in that the headlights are activated… i tought i should connect it to the high beam realy and maybe lover the voltage for the signal and maybe send it through one GPIO ports?

if you look at http://www.ebay.com/itm/171393173424?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
it’s temperature “feedback” is that it changes resistance according to the temperature. it’s a thermistor. i dont really know how to get an signal from that…

da_Rayman, please note that the readings that you can read are going to be all in voltages. You’ll have to pull-up the variable resistances so that they can give you a potential difference. In order to read all the values from these sensors, you’ll need to have as many ADC channels in any embedded system that you use. You can read on the various available board on the internet. Using a banana pi or Raspberry Pi might be an overkill for this problem but I can’t really say that since I don’t know how much complicated you want your display to be.

pcb manufacturing and assembly china